aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-settings/my-account-change-email
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-12 10:40:04 +0200
committerChocobozzz <me@florianbigard.com>2020-08-14 10:28:30 +0200
commit66357162f8e1227495f09bd4f68446aad7071c6d (patch)
tree7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/+my-account/my-account-settings/my-account-change-email
parent8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff)
downloadPeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.gz
PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.zst
PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.zip
Migrate to $localize
* Remove i18n polyfill to translate things in components * Reduce bundle sizes * Improve runtime perf * Reduce a lot the time to make a full client build * Reduce client build complexity * We don't need a service to translate things anymore (so we will be able to translate title pages etc) Unfortunately we may loose some translations in the migration process. I'll put a message on weblate to notify translators
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-change-email')
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts12
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'
3import { Component, OnInit } from '@angular/core' 3import { Component, OnInit } from '@angular/core'
4import { AuthService, ServerService, UserService } from '@app/core' 4import { AuthService, ServerService, UserService } from '@app/core'
5import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' 5import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
6import { I18n } from '@ngx-translate/i18n-polyfill'
7import { User } from '@shared/models' 6import { 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