From b1d40cff89f7cff565a98cdbcea9a624196a169a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Jun 2018 16:21:17 +0200 Subject: Add i18n attributes --- .../my-account-videos.component.html | 8 ++++---- .../my-account-videos.component.ts | 22 ++++++++++++++-------- 2 files changed, 18 insertions(+), 12 deletions(-) (limited to 'client/src/app/+my-account/my-account-videos') diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html index a31cb0c3d..35a99d0b3 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html @@ -1,4 +1,4 @@ -
No results.
+
No results.
{{ video.name }} - {{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views + {{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views
{{ video.privacy.label }}
- + Cancel - + Delete diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts index 6ab6c2aa5..eed4be01f 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts @@ -11,6 +11,7 @@ import { ConfirmService } from '../../core/confirm' import { AbstractVideoList } from '../../shared/video/abstract-video-list' import { Video } from '../../shared/video/video.model' import { VideoService } from '../../shared/video/video.service' +import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-account-videos', @@ -18,7 +19,7 @@ import { VideoService } from '../../shared/video/video.service' styleUrls: [ './my-account-videos.component.scss' ] }) export class MyAccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { - titlePage = 'My videos' + titlePage: string currentRoute = '/my-account/videos' checkedVideos: { [ id: number ]: boolean } = {} pagination: ComponentPagination = { @@ -30,14 +31,19 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni protected baseVideoWidth = -1 protected baseVideoHeight = 155 - constructor (protected router: Router, - protected route: ActivatedRoute, - protected authService: AuthService, - protected notificationsService: NotificationsService, - protected confirmService: ConfirmService, - protected location: Location, - private videoService: VideoService) { + constructor ( + protected router: Router, + protected route: ActivatedRoute, + protected authService: AuthService, + protected notificationsService: NotificationsService, + protected confirmService: ConfirmService, + protected location: Location, + protected i18n: I18n, + private videoService: VideoService + ) { super() + + this.titlePage = this.i18n('My videos') } ngOnInit () { -- cgit v1.2.3