From d1146463975b949ef82cde3a536e1cdf1ab4b37b Mon Sep 17 00:00:00 2001 From: alihaghighatkhah Date: Wed, 26 Apr 2017 16:33:26 +0200 Subject: [PATCH] fix typos --- src/app/components/login/login.js | 3 +-- src/app/components/main/secondPass.pug | 2 +- src/app/components/main/setSecondPassDirective.js | 6 +++--- src/test/components/login/login.spec.js | 4 ++-- src/test/components/login/passphrase.spec.js | 2 +- src/test/components/main/setSecondPassDirective.spec.js | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/app/components/login/login.js b/src/app/components/login/login.js index b5f7a45af..84b61f269 100644 --- a/src/app/components/login/login.js +++ b/src/app/components/login/login.js @@ -9,8 +9,7 @@ app.component('login', { }, controller: class login { - /* eslint no-param-reassign: ["error", { "props": false }] */ - + /* eslint no-param-reassign: ["error", { "props": false }] */ constructor($scope, $rootScope, $timeout, $document, $mdMedia, $cookies, $peers, Passphrase) { this.$scope = $scope; this.$rootScope = $rootScope; diff --git a/src/app/components/main/secondPass.pug b/src/app/components/main/secondPass.pug index 60d13c409..9402e8ee9 100644 --- a/src/app/components/main/secondPass.pug +++ b/src/app/components/main/secondPass.pug @@ -1,4 +1,4 @@ -md-dialog.dialog-second(aria-label='Generate a second passphrase of your account') +md-dialog.dialog-second(aria-label='Generate a second passphrase for your account') form md-toolbar .md-toolbar-tools diff --git a/src/app/components/main/setSecondPassDirective.js b/src/app/components/main/setSecondPassDirective.js index 48886f1fe..39001cc5f 100644 --- a/src/app/components/main/setSecondPassDirective.js +++ b/src/app/components/main/setSecondPassDirective.js @@ -10,16 +10,16 @@ app.directive('setSecondPass', (setSecondPass, $peers, $rootScope, success, erro scope.passConfirmSubmit = (secondsecret) => { $peers.active.setSignature(secondsecret, attrs.publicKey, attrs.passphrase) .then(() => { - success.dialog('Your second passphrase is successfully registered.'); + success.dialog('Your second passphrase was successfully registered.'); }) .catch((err) => { let text = ''; if (err.message === 'Missing sender second signature') { text = 'You already have a second passphrase.'; } else if (/^(Account does not have enough LSK)/.test(err.message)) { - text = 'You don\'t have enought credit to register second passphrase.'; + text = 'You have insuffcient funds to register a second passphrase.'; } else { - text = 'An error happended registering your second passphrase. Please try later.'; + text = 'An error occurred while registering your second passphrase. Please try again.'; } error.dialog({ text }); }); diff --git a/src/test/components/login/login.spec.js b/src/test/components/login/login.spec.js index 32219b047..6069e3519 100644 --- a/src/test/components/login/login.spec.js +++ b/src/test/components/login/login.spec.js @@ -121,7 +121,7 @@ describe('Login controller', () => { expect(spy).to.have.been.calledWith(); }); - it('Listens for broadcasting onAfterSignup', () => { + it('listens for an onAfterSignup event', () => { const spy = sinon.spy(controller, 'passConfirmSubmit'); $rootScope.$broadcast('onAfterSignup', { passphrase: 'TEST_VALUE', @@ -160,7 +160,7 @@ describe('Login controller', () => { }); describe('devTestAccount()', () => { - it('calls passConfirmSubmit with timeoout if a passphrase is set in the cookies', () => { + it('calls passConfirmSubmit with timeout if a passphrase is set in the cookies', () => { $cookies.put('passphrase', testPassphrase); const spy = sinon.spy(controller, '$timeout'); controller.devTestAccount(); diff --git a/src/test/components/login/passphrase.spec.js b/src/test/components/login/passphrase.spec.js index 8ecdbcf8c..ca83a045b 100644 --- a/src/test/components/login/passphrase.spec.js +++ b/src/test/components/login/passphrase.spec.js @@ -33,7 +33,7 @@ describe('Passphrase Directive', () => { }); describe('PassphraseLink', () => { - it('should asign progress to its own $scope', () => { + it('should assign progress to its own $scope', () => { expect($isolateScope.progress).to.not.equal(undefined); expect($isolateScope.progress).to.equal(Passphrase.progress); }); diff --git a/src/test/components/main/setSecondPassDirective.spec.js b/src/test/components/main/setSecondPassDirective.spec.js index e5938e9e7..5f2697567 100644 --- a/src/test/components/main/setSecondPassDirective.spec.js +++ b/src/test/components/main/setSecondPassDirective.spec.js @@ -40,7 +40,7 @@ describe('setSecondPass Directive', () => { }); describe('SetSecondPassLink', () => { - it('Listens for broadcasting onAfterSignup', () => { + it('listens for an onAfterSignup event', () => { $peers.active = { setSignature() {} }; const mock = sinon.mock($peers.active); const deffered = $q.defer();