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 --- .../plugins/plugin-show-installed/plugin-show-installed.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts') diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts index dde03f1da..a33f01691 100644 --- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts +++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts @@ -4,7 +4,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core' import { ActivatedRoute } from '@angular/router' import { Notifier } from '@app/core' import { BuildFormArgument, FormReactive, FormValidatorService } from '@app/shared/shared-forms' -import { I18n } from '@ngx-translate/i18n-polyfill' import { PeerTubePlugin, RegisterServerSettingOptions } from '@shared/models' import { PluginApiService } from '../shared/plugin-api.service' @@ -22,7 +21,6 @@ export class PluginShowInstalledComponent extends FormReactive implements OnInit constructor ( protected formValidatorService: FormValidatorService, - private i18n: I18n, private pluginService: PluginApiService, private notifier: Notifier, private route: ActivatedRoute @@ -50,7 +48,7 @@ export class PluginShowInstalledComponent extends FormReactive implements OnInit this.pluginService.updatePluginSettings(this.plugin.name, this.plugin.type, settings) .subscribe( () => { - this.notifier.success(this.i18n('Settings updated.')) + this.notifier.success($localize`Settings updated.`) }, err => this.notifier.error(err.message) -- cgit v1.2.3