From 66357162f8e1227495f09bd4f68446aad7071c6d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 12 Aug 2020 10:40:04 +0200 Subject: 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 --- .../my-account-change-email.component.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'client/src/app/+my-account/my-account-settings/my-account-change-email') 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' import { Component, OnInit } from '@angular/core' import { AuthService, ServerService, UserService } from '@app/core' import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' -import { I18n } from '@ngx-translate/i18n-polyfill' import { User } from '@shared/models' @Component({ @@ -21,9 +20,8 @@ export class MyAccountChangeEmailComponent extends FormReactive implements OnIni private userValidatorsService: UserValidatorsService, private authService: AuthService, private userService: UserService, - private serverService: ServerService, - private i18n: I18n - ) { + private serverService: ServerService + ) { super() } @@ -52,15 +50,15 @@ export class MyAccountChangeEmailComponent extends FormReactive implements OnIni this.form.reset() if (config.signup.requiresEmailVerification) { - this.success = this.i18n('Please check your emails to verify your new email.') + this.success = $localize`Please check your emails to verify your new email.` } else { - this.success = this.i18n('Email updated.') + this.success = $localize`Email updated.` } }, err => { if (err.status === 401) { - this.error = this.i18n('You current password is invalid.') + this.error = $localize`You current password is invalid.` return } -- cgit v1.2.3