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-profile/my-account-profile.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts') diff --git a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts index b0d8494e7..ed0984bf7 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts @@ -2,7 +2,6 @@ import { Subject } from 'rxjs' import { Component, Input, OnInit } from '@angular/core' import { Notifier, User, UserService } from '@app/core' import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' -import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-account-profile', @@ -19,9 +18,8 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit { protected formValidatorService: FormValidatorService, private userValidatorsService: UserValidatorsService, private notifier: Notifier, - private userService: UserService, - private i18n: I18n - ) { + private userService: UserService + ) { super() } @@ -50,7 +48,7 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit { this.user.account.displayName = displayName this.user.account.description = description - this.notifier.success(this.i18n('Profile updated.')) + this.notifier.success($localize`Profile updated.`) }, err => this.error = err.message -- cgit v1.2.3