From b1d40cff89f7cff565a98cdbcea9a624196a169a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Jun 2018 16:21:17 +0200 Subject: Add i18n attributes --- .../app/+accounts/account-videos/account-videos.component.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'client/src/app/+accounts/account-videos') 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' import { Account } from '@app/shared/account/account.model' import { AccountService } from '@app/shared/account/account.service' import { tap } from 'rxjs/operators' +import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-account-videos', @@ -20,7 +21,7 @@ import { tap } from 'rxjs/operators' ] }) export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { - titlePage = 'Published videos' + titlePage: string marginContent = false // Disable margin currentRoute = '/account/videos' loadOnInit = false @@ -34,10 +35,13 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit, protected notificationsService: NotificationsService, protected confirmService: ConfirmService, protected location: Location, + protected i18n: I18n, private accountService: AccountService, private videoService: VideoService ) { super() + + this.titlePage = this.i18n('Published videos') } ngOnInit () { @@ -63,7 +67,11 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit, return this.videoService .getAccountVideos(this.account, newPagination, this.sort) - .pipe(tap(({ totalVideos }) => this.titlePage = `Published ${totalVideos} videos`)) + .pipe( + tap(({ totalVideos }) => { + this.titlePage = this.i18n('Published {{ totalVideos }} videos', { totalVideos }) + }) + ) } generateSyndicationList () { -- cgit v1.2.3