aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-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/+my-account/my-account-videos
parent989e526abf0c0dd7958deb630df009608561bb67 (diff)
downloadPeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.gz
PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.zst
PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.zip
Add i18n attributes
Diffstat (limited to 'client/src/app/+my-account/my-account-videos')
-rw-r--r--client/src/app/+my-account/my-account-videos/my-account-videos.component.html8
-rw-r--r--client/src/app/+my-account/my-account-videos/my-account-videos.component.ts22
2 files changed, 18 insertions, 12 deletions
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 @@
1<div *ngIf="pagination.totalItems === 0">No results.</div> 1<div i18n *ngIf="pagination.totalItems === 0">No results.</div>
2 2
3<div 3<div
4 myInfiniteScroller 4 myInfiniteScroller
@@ -17,18 +17,18 @@
17 17
18 <div class="video-info"> 18 <div class="video-info">
19 <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a> 19 <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a>
20 <span class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span> 20 <span i18n class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span>
21 <div class="video-info-private">{{ video.privacy.label }}</div> 21 <div class="video-info-private">{{ video.privacy.label }}</div>
22 </div> 22 </div>
23 23
24 <!-- Display only once --> 24 <!-- Display only once -->
25 <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0 && j === 0"> 25 <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0 && j === 0">
26 <div class="action-selection-mode-child"> 26 <div class="action-selection-mode-child">
27 <span class="action-button action-button-cancel-selection" (click)="abortSelectionMode()"> 27 <span i18n class="action-button action-button-cancel-selection" (click)="abortSelectionMode()">
28 Cancel 28 Cancel
29 </span> 29 </span>
30 30
31 <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()"> 31 <span i18n class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()">
32 <span class="icon icon-delete-white"></span> 32 <span class="icon icon-delete-white"></span>
33 Delete 33 Delete
34 </span> 34 </span>
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'
11import { AbstractVideoList } from '../../shared/video/abstract-video-list' 11import { AbstractVideoList } from '../../shared/video/abstract-video-list'
12import { Video } from '../../shared/video/video.model' 12import { Video } from '../../shared/video/video.model'
13import { VideoService } from '../../shared/video/video.service' 13import { VideoService } from '../../shared/video/video.service'
14import { I18n } from '@ngx-translate/i18n-polyfill'
14 15
15@Component({ 16@Component({
16 selector: 'my-account-videos', 17 selector: 'my-account-videos',
@@ -18,7 +19,7 @@ import { VideoService } from '../../shared/video/video.service'
18 styleUrls: [ './my-account-videos.component.scss' ] 19 styleUrls: [ './my-account-videos.component.scss' ]
19}) 20})
20export class MyAccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { 21export class MyAccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
21 titlePage = 'My videos' 22 titlePage: string
22 currentRoute = '/my-account/videos' 23 currentRoute = '/my-account/videos'
23 checkedVideos: { [ id: number ]: boolean } = {} 24 checkedVideos: { [ id: number ]: boolean } = {}
24 pagination: ComponentPagination = { 25 pagination: ComponentPagination = {
@@ -30,14 +31,19 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
30 protected baseVideoWidth = -1 31 protected baseVideoWidth = -1
31 protected baseVideoHeight = 155 32 protected baseVideoHeight = 155
32 33
33 constructor (protected router: Router, 34 constructor (
34 protected route: ActivatedRoute, 35 protected router: Router,
35 protected authService: AuthService, 36 protected route: ActivatedRoute,
36 protected notificationsService: NotificationsService, 37 protected authService: AuthService,
37 protected confirmService: ConfirmService, 38 protected notificationsService: NotificationsService,
38 protected location: Location, 39 protected confirmService: ConfirmService,
39 private videoService: VideoService) { 40 protected location: Location,
41 protected i18n: I18n,
42 private videoService: VideoService
43 ) {
40 super() 44 super()
45
46 this.titlePage = this.i18n('My videos')
41 } 47 }
42 48
43 ngOnInit () { 49 ngOnInit () {