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 --- .../+video-watch/recommendations/recommended-videos.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.ts') diff --git a/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.ts b/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.ts index d2372023f..a1c8e0661 100644 --- a/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.ts +++ b/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.ts @@ -4,10 +4,9 @@ import { AuthService, Notifier, SessionStorageService, User, UserService } from import { Video } from '@app/shared/shared-main' import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature' import { VideoPlaylist } from '@app/shared/shared-video-playlist' -import { I18n } from '@ngx-translate/i18n-polyfill' +import { UserLocalStorageKeys } from '@root-helpers/users' import { RecommendationInfo } from './recommendation-info.model' import { RecommendedVideosStore } from './recommended-videos.store' -import { UserLocalStorageKeys } from '@root-helpers/users' @Component({ selector: 'my-recommended-videos', @@ -38,7 +37,6 @@ export class RecommendedVideosComponent implements OnInit, OnChanges { private userService: UserService, private authService: AuthService, private notifier: Notifier, - private i18n: I18n, private store: RecommendedVideosStore, private sessionStorageService: SessionStorageService ) { @@ -58,7 +56,7 @@ export class RecommendedVideosComponent implements OnInit, OnChanges { ) } - this.autoPlayNextVideoTooltip = this.i18n('When active, the next video is automatically played after the current one.') + this.autoPlayNextVideoTooltip = $localize`When active, the next video is automatically played after the current one.` } ngOnInit () { -- cgit v1.2.3