diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts index 5444b97ae..396936ef3 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts | |||
@@ -3,7 +3,6 @@ import { tap } from 'rxjs/operators' | |||
3 | import { Component, OnInit } from '@angular/core' | 3 | import { Component, OnInit } from '@angular/core' |
4 | import { AuthService, ServerService, UserService } from '@app/core' | 4 | import { AuthService, ServerService, UserService } from '@app/core' |
5 | import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' | 5 | import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' |
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
7 | import { User } from '@shared/models' | 6 | import { User } from '@shared/models' |
8 | 7 | ||
9 | @Component({ | 8 | @Component({ |
@@ -21,9 +20,8 @@ export class MyAccountChangeEmailComponent extends FormReactive implements OnIni | |||
21 | private userValidatorsService: UserValidatorsService, | 20 | private userValidatorsService: UserValidatorsService, |
22 | private authService: AuthService, | 21 | private authService: AuthService, |
23 | private userService: UserService, | 22 | private userService: UserService, |
24 | private serverService: ServerService, | 23 | private serverService: ServerService |
25 | private i18n: I18n | 24 | ) { |
26 | ) { | ||
27 | super() | 25 | super() |
28 | } | 26 | } |
29 | 27 | ||
@@ -52,15 +50,15 @@ export class MyAccountChangeEmailComponent extends FormReactive implements OnIni | |||
52 | this.form.reset() | 50 | this.form.reset() |
53 | 51 | ||
54 | if (config.signup.requiresEmailVerification) { | 52 | if (config.signup.requiresEmailVerification) { |
55 | this.success = this.i18n('Please check your emails to verify your new email.') | 53 | this.success = $localize`Please check your emails to verify your new email.` |
56 | } else { | 54 | } else { |
57 | this.success = this.i18n('Email updated.') | 55 | this.success = $localize`Email updated.` |
58 | } | 56 | } |
59 | }, | 57 | }, |
60 | 58 | ||
61 | err => { | 59 | err => { |
62 | if (err.status === 401) { | 60 | if (err.status === 401) { |
63 | this.error = this.i18n('You current password is invalid.') | 61 | this.error = $localize`You current password is invalid.` |
64 | return | 62 | return |
65 | } | 63 | } |
66 | 64 | ||