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-list/video-most-liked.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-list/video-most-liked.component.ts')
-rw-r--r-- | client/src/app/+videos/video-list/video-most-liked.component.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/client/src/app/+videos/video-list/video-most-liked.component.ts b/client/src/app/+videos/video-list/video-most-liked.component.ts index ca14851bb..e5f7bd152 100644 --- a/client/src/app/+videos/video-list/video-most-liked.component.ts +++ b/client/src/app/+videos/video-list/video-most-liked.component.ts | |||
@@ -5,7 +5,6 @@ import { HooksService } from '@app/core/plugins/hooks.service' | |||
5 | import { immutableAssign } from '@app/helpers' | 5 | import { immutableAssign } from '@app/helpers' |
6 | import { VideoService } from '@app/shared/shared-main' | 6 | import { VideoService } from '@app/shared/shared-main' |
7 | import { AbstractVideoList } from '@app/shared/shared-video-miniature' | 7 | import { AbstractVideoList } from '@app/shared/shared-video-miniature' |
8 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
9 | import { VideoSortField } from '@shared/models' | 8 | import { VideoSortField } from '@shared/models' |
10 | 9 | ||
11 | @Component({ | 10 | @Component({ |
@@ -20,7 +19,6 @@ export class VideoMostLikedComponent extends AbstractVideoList implements OnInit | |||
20 | useUserVideoPreferences = true | 19 | useUserVideoPreferences = true |
21 | 20 | ||
22 | constructor ( | 21 | constructor ( |
23 | protected i18n: I18n, | ||
24 | protected router: Router, | 22 | protected router: Router, |
25 | protected serverService: ServerService, | 23 | protected serverService: ServerService, |
26 | protected route: ActivatedRoute, | 24 | protected route: ActivatedRoute, |
@@ -40,8 +38,8 @@ export class VideoMostLikedComponent extends AbstractVideoList implements OnInit | |||
40 | 38 | ||
41 | this.generateSyndicationList() | 39 | this.generateSyndicationList() |
42 | 40 | ||
43 | this.titlePage = this.i18n('Most liked videos') | 41 | this.titlePage = $localize`Most liked videos` |
44 | this.titleTooltip = this.i18n('Videos that have the higher number of likes.') | 42 | this.titleTooltip = $localize`Videos that have the higher number of likes.` |
45 | } | 43 | } |
46 | 44 | ||
47 | getVideosObservable (page: number) { | 45 | getVideosObservable (page: number) { |