aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-channels/video-channel-videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-12 10:40:04 +0200
committerChocobozzz <me@florianbigard.com>2020-08-14 10:28:30 +0200
commit66357162f8e1227495f09bd4f68446aad7071c6d (patch)
tree7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/+video-channels/video-channel-videos
parent8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff)
downloadPeerTube-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/+video-channels/video-channel-videos')
-rw-r--r--client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts
index 599d38da9..e1ec6bbcb 100644
--- a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts
+++ b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts
@@ -6,7 +6,6 @@ import { AuthService, ConfirmService, LocalStorageService, Notifier, ScreenServi
6import { immutableAssign } from '@app/helpers' 6import { immutableAssign } from '@app/helpers'
7import { VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' 7import { VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
8import { AbstractVideoList } from '@app/shared/shared-video-miniature' 8import { AbstractVideoList } from '@app/shared/shared-video-miniature'
9import { I18n } from '@ngx-translate/i18n-polyfill'
10 9
11@Component({ 10@Component({
12 selector: 'my-video-channel-videos', 11 selector: 'my-video-channel-videos',
@@ -23,7 +22,6 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On
23 private videoChannelSub: Subscription 22 private videoChannelSub: Subscription
24 23
25 constructor ( 24 constructor (
26 protected i18n: I18n,
27 protected router: Router, 25 protected router: Router,
28 protected serverService: ServerService, 26 protected serverService: ServerService,
29 protected route: ActivatedRoute, 27 protected route: ActivatedRoute,
@@ -38,7 +36,7 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On
38 ) { 36 ) {
39 super() 37 super()
40 38
41 this.titlePage = this.i18n('Published videos') 39 this.titlePage = $localize`Published videos`
42 this.displayOptions = { 40 this.displayOptions = {
43 ...this.displayOptions, 41 ...this.displayOptions,
44 avatar: false 42 avatar: false
@@ -72,7 +70,9 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On
72 .getVideoChannelVideos(this.videoChannel, newPagination, this.sort, this.nsfwPolicy) 70 .getVideoChannelVideos(this.videoChannel, newPagination, this.sort, this.nsfwPolicy)
73 .pipe( 71 .pipe(
74 tap(({ total }) => { 72 tap(({ total }) => {
75 this.titlePage = this.i18n(`{total, plural, =1 {Published 1 video} other {Published {{total}} videos}}`, { total }) 73 this.titlePage = total === 1
74 ? $localize`Published 1 video`
75 : $localize`Published ${total} videos`
76 }) 76 })
77 ) 77 )
78 } 78 }