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-video-playlist-update.component.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts') diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts index 6787fb757..149d0d94f 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts @@ -6,7 +6,6 @@ import { AuthService, Notifier, ServerService } from '@app/core' import { populateAsyncUserVideoChannels } from '@app/helpers' import { FormValidatorService, VideoPlaylistValidatorsService } from '@app/shared/shared-forms' import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' -import { I18n } from '@ngx-translate/i18n-polyfill' import { VideoPlaylistUpdate } from '@shared/models' import { MyAccountVideoPlaylistEdit } from './my-account-video-playlist-edit' @@ -29,7 +28,6 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis private router: Router, private route: ActivatedRoute, private videoPlaylistService: VideoPlaylistService, - private i18n: I18n, private serverService: ServerService ) { super() @@ -91,10 +89,7 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis this.videoPlaylistService.updateVideoPlaylist(this.videoPlaylistToUpdate, videoPlaylistUpdate).subscribe( () => { - this.notifier.success( - this.i18n('Playlist {{videoPlaylistName}} updated.', { videoPlaylistName: videoPlaylistUpdate.displayName }) - ) - + this.notifier.success($localize`Playlist ${videoPlaylistUpdate.displayName} updated.`) this.router.navigate([ '/my-account', 'video-playlists' ]) }, @@ -107,7 +102,7 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis } getFormButtonTitle () { - return this.i18n('Update') + return $localize`Update` } private hydrateFormFromPlaylist () { -- cgit v1.2.3