aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+accounts/account-videos
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/+accounts/account-videos
parent989e526abf0c0dd7958deb630df009608561bb67 (diff)
downloadPeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.gz
PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.zst
PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.zip
Add i18n attributes
Diffstat (limited to 'client/src/app/+accounts/account-videos')
-rw-r--r--client/src/app/+accounts/account-videos/account-videos.component.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/src/app/+accounts/account-videos/account-videos.component.ts b/client/src/app/+accounts/account-videos/account-videos.component.ts
index eca9fb6b7..7b7629480 100644
--- a/client/src/app/+accounts/account-videos/account-videos.component.ts
+++ b/client/src/app/+accounts/account-videos/account-videos.component.ts
@@ -10,6 +10,7 @@ import { VideoService } from '../../shared/video/video.service'
10import { Account } from '@app/shared/account/account.model' 10import { Account } from '@app/shared/account/account.model'
11import { AccountService } from '@app/shared/account/account.service' 11import { AccountService } from '@app/shared/account/account.service'
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-account-videos', 16 selector: 'my-account-videos',
@@ -20,7 +21,7 @@ import { tap } from 'rxjs/operators'
20 ] 21 ]
21}) 22})
22export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { 23export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
23 titlePage = 'Published videos' 24 titlePage: string
24 marginContent = false // Disable margin 25 marginContent = false // Disable margin
25 currentRoute = '/account/videos' 26 currentRoute = '/account/videos'
26 loadOnInit = false 27 loadOnInit = false
@@ -34,10 +35,13 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit,
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 accountService: AccountService, 39 private accountService: AccountService,
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 AccountVideosComponent extends AbstractVideoList implements OnInit,
63 67
64 return this.videoService 68 return this.videoService
65 .getAccountVideos(this.account, newPagination, this.sort) 69 .getAccountVideos(this.account, 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 () {