diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-12 10:40:04 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-08-14 10:28:30 +0200 |
commit | 66357162f8e1227495f09bd4f68446aad7071c6d (patch) | |
tree | 7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.ts | |
parent | 8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff) | |
download | PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.gz PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.zst PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.zip |
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
Diffstat (limited to 'client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.ts')
-rw-r--r-- | client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.ts | 6 |
1 files changed, 2 insertions, 4 deletions
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 | |||
4 | import { Video } from '@app/shared/shared-main' | 4 | import { Video } from '@app/shared/shared-main' |
5 | import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature' | 5 | import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature' |
6 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' | 6 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 7 | import { UserLocalStorageKeys } from '@root-helpers/users' |
8 | import { RecommendationInfo } from './recommendation-info.model' | 8 | import { RecommendationInfo } from './recommendation-info.model' |
9 | import { RecommendedVideosStore } from './recommended-videos.store' | 9 | import { RecommendedVideosStore } from './recommended-videos.store' |
10 | import { UserLocalStorageKeys } from '@root-helpers/users' | ||
11 | 10 | ||
12 | @Component({ | 11 | @Component({ |
13 | selector: 'my-recommended-videos', | 12 | selector: 'my-recommended-videos', |
@@ -38,7 +37,6 @@ export class RecommendedVideosComponent implements OnInit, OnChanges { | |||
38 | private userService: UserService, | 37 | private userService: UserService, |
39 | private authService: AuthService, | 38 | private authService: AuthService, |
40 | private notifier: Notifier, | 39 | private notifier: Notifier, |
41 | private i18n: I18n, | ||
42 | private store: RecommendedVideosStore, | 40 | private store: RecommendedVideosStore, |
43 | private sessionStorageService: SessionStorageService | 41 | private sessionStorageService: SessionStorageService |
44 | ) { | 42 | ) { |
@@ -58,7 +56,7 @@ export class RecommendedVideosComponent implements OnInit, OnChanges { | |||
58 | ) | 56 | ) |
59 | } | 57 | } |
60 | 58 | ||
61 | this.autoPlayNextVideoTooltip = this.i18n('When active, the next video is automatically played after the current one.') | 59 | this.autoPlayNextVideoTooltip = $localize`When active, the next video is automatically played after the current one.` |
62 | } | 60 | } |
63 | 61 | ||
64 | ngOnInit () { | 62 | ngOnInit () { |