aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-channels
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-04 16:21:17 +0200
committerChocobozzz <me@florianbigard.com>2018-06-05 08:43:01 +0200
commitb1d40cff89f7cff565a98cdbcea9a624196a169a (patch)
treed24746c1cc69f50471a9eba0dfb1c1bae06a1870 /client/src/app/+video-channels
parent989e526abf0c0dd7958deb630df009608561bb67 (diff)
downloadPeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.gz
PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.zst
PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.zip
Add i18n attributes
Diffstat (limited to 'client/src/app/+video-channels')
-rw-r--r--client/src/app/+video-channels/video-channel-about/video-channel-about.component.html8
-rw-r--r--client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts6
-rw-r--r--client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts12
-rw-r--r--client/src/app/+video-channels/video-channels.component.html10
4 files changed, 23 insertions, 13 deletions
diff --git a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html
index a4338121f..b7125ff71 100644
--- a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html
+++ b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html
@@ -1,20 +1,20 @@
1<div *ngIf="videoChannel" class="row"> 1<div *ngIf="videoChannel" class="row">
2 <div class="description col-md-6 col-sm-12"> 2 <div class="description col-md-6 col-sm-12">
3 <div class="block"> 3 <div class="block">
4 <div class="small-title">Description</div> 4 <div i18n class="small-title">Description</div>
5 <div class="content">{{ getVideoChannelDescription() }}</div> 5 <div class="content">{{ getVideoChannelDescription() }}</div>
6 </div> 6 </div>
7 7
8 <div class="block" *ngIf="videoChannel.support"> 8 <div class="block" *ngIf="videoChannel.support">
9 <div class="small-title">Support this channel</div> 9 <div i18n class="small-title">Support this channel</div>
10 <div class="content">{{ videoChannel.support }}</div> 10 <div class="content">{{ videoChannel.support }}</div>
11 </div> 11 </div>
12 </div> 12 </div>
13 13
14 <div class="stats col-md-6 col-sm-12"> 14 <div class="stats col-md-6 col-sm-12">
15 <div class="block"> 15 <div class="block">
16 <div class="small-title">Stats</div> 16 <div i18n class="small-title">Stats</div>
17 <div class="content">Created {{ videoChannel.createdAt | date }}</div> 17 <div i18n class="content">Created {{ videoChannel.createdAt | date }}</div>
18 </div> 18 </div>
19 </div> 19 </div>
20</div> \ No newline at end of file 20</div> \ No newline at end of file
diff --git a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts
index 6f862718f..c5fd442c6 100644
--- a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts
+++ b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core'
2import { ActivatedRoute } from '@angular/router' 2import { ActivatedRoute } from '@angular/router'
3import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' 3import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
4import { VideoChannel } from '@app/shared/video-channel/video-channel.model' 4import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
5import { I18n } from '@ngx-translate/i18n-polyfill'
5 6
6@Component({ 7@Component({
7 selector: 'my-video-channel-about', 8 selector: 'my-video-channel-about',
@@ -12,7 +13,8 @@ export class VideoChannelAboutComponent implements OnInit {
12 videoChannel: VideoChannel 13 videoChannel: VideoChannel
13 14
14 constructor ( 15 constructor (
15 protected route: ActivatedRoute, 16 private route: ActivatedRoute,
17 private i18n: I18n,
16 private videoChannelService: VideoChannelService 18 private videoChannelService: VideoChannelService
17 ) { } 19 ) { }
18 20
@@ -25,6 +27,6 @@ export class VideoChannelAboutComponent implements OnInit {
25 getVideoChannelDescription () { 27 getVideoChannelDescription () {
26 if (this.videoChannel.description) return this.videoChannel.description 28 if (this.videoChannel.description) return this.videoChannel.description
27 29
28 return 'No description' 30 return this.i18n('No description')
29 } 31 }
30} 32}
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 c9e72e512..22239d75b 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
@@ -10,6 +10,7 @@ import { VideoService } from '../../shared/video/video.service'
10import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' 10import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
11import { VideoChannel } from '@app/shared/video-channel/video-channel.model' 11import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
12import { tap } from 'rxjs/operators' 12import { tap } from 'rxjs/operators'
13import { I18n } from '@ngx-translate/i18n-polyfill'
13 14
14@Component({ 15@Component({
15 selector: 'my-video-channel-videos', 16 selector: 'my-video-channel-videos',
@@ -20,7 +21,7 @@ import { tap } from 'rxjs/operators'
20 ] 21 ]
21}) 22})
22export class VideoChannelVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { 23export class VideoChannelVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
23 titlePage = 'Published videos' 24 titlePage: string
24 marginContent = false // Disable margin 25 marginContent = false // Disable margin
25 currentRoute = '/video-channel/videos' 26 currentRoute = '/video-channel/videos'
26 loadOnInit = false 27 loadOnInit = false
@@ -34,10 +35,13 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On
34 protected notificationsService: NotificationsService, 35 protected notificationsService: NotificationsService,
35 protected confirmService: ConfirmService, 36 protected confirmService: ConfirmService,
36 protected location: Location, 37 protected location: Location,
38 protected i18n: I18n,
37 private videoChannelService: VideoChannelService, 39 private videoChannelService: VideoChannelService,
38 private videoService: VideoService 40 private videoService: VideoService
39 ) { 41 ) {
40 super() 42 super()
43
44 this.titlePage = this.i18n('Published videos')
41 } 45 }
42 46
43 ngOnInit () { 47 ngOnInit () {
@@ -63,7 +67,11 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On
63 67
64 return this.videoService 68 return this.videoService
65 .getVideoChannelVideos(this.videoChannel, newPagination, this.sort) 69 .getVideoChannelVideos(this.videoChannel, newPagination, this.sort)
66 .pipe(tap(({ totalVideos }) => this.titlePage = `Published ${totalVideos} videos`)) 70 .pipe(
71 tap(({ totalVideos }) => {
72 this.titlePage = this.i18n('Published {{ totalVideos }} videos', { totalVideos })
73 })
74 )
67 } 75 }
68 76
69 generateSyndicationList () { 77 generateSyndicationList () {
diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html
index 6b25d16ab..a52894cac 100644
--- a/client/src/app/+video-channels/video-channels.component.html
+++ b/client/src/app/+video-channels/video-channels.component.html
@@ -8,19 +8,19 @@
8 <div class="actor-names"> 8 <div class="actor-names">
9 <div class="actor-display-name">{{ videoChannel.displayName }}</div> 9 <div class="actor-display-name">{{ videoChannel.displayName }}</div>
10 </div> 10 </div>
11 <div class="actor-followers">{{ videoChannel.followersCount }} subscribers</div> 11 <div i18n class="actor-followers">{{ videoChannel.followersCount }} subscribers</div>
12 12
13 <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" title="Go the owner account page" class="actor-owner"> 13 <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" i18n-title title="Go the owner account page" class="actor-owner">
14 <span>Created by {{ videoChannel.ownerBy }}</span> 14 <span i18n>Created by {{ videoChannel.ownerBy }}</span>
15 <img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" /> 15 <img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" />
16 </a> 16 </a>
17 </div> 17 </div>
18 </div> 18 </div>
19 19
20 <div class="links"> 20 <div class="links">
21 <a routerLink="videos" routerLinkActive="active" class="title-page">Videos</a> 21 <a i18n routerLink="videos" routerLinkActive="active" class="title-page">Videos</a>
22 22
23 <a routerLink="about" routerLinkActive="active" class="title-page">About</a> 23 <a i18n routerLink="about" routerLinkActive="active" class="title-page">About</a>
24 </div> 24 </div>
25 </div> 25 </div>
26 26