diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-04 16:21:17 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-05 08:43:01 +0200 |
commit | b1d40cff89f7cff565a98cdbcea9a624196a169a (patch) | |
tree | d24746c1cc69f50471a9eba0dfb1c1bae06a1870 /client/src/app/shared/video | |
parent | 989e526abf0c0dd7958deb630df009608561bb67 (diff) | |
download | PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.gz PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.zst PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.zip |
Add i18n attributes
Diffstat (limited to 'client/src/app/shared/video')
4 files changed, 6 insertions, 4 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.html b/client/src/app/shared/video/abstract-video-list.html index 690529dcf..e8ded6ab8 100644 --- a/client/src/app/shared/video/abstract-video-list.html +++ b/client/src/app/shared/video/abstract-video-list.html | |||
@@ -4,7 +4,7 @@ | |||
4 | </div> | 4 | </div> |
5 | <my-video-feed [syndicationItems]="syndicationItems"></my-video-feed> | 5 | <my-video-feed [syndicationItems]="syndicationItems"></my-video-feed> |
6 | 6 | ||
7 | <div *ngIf="pagination.totalItems === 0">No results.</div> | 7 | <div i18n *ngIf="pagination.totalItems === 0">No results.</div> |
8 | <div | 8 | <div |
9 | myInfiniteScroller | 9 | myInfiniteScroller |
10 | [pageHeight]="pageHeight" | 10 | [pageHeight]="pageHeight" |
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 100cbff8d..1c84573da 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts | |||
@@ -10,6 +10,7 @@ import { AuthService } from '../../core/auth' | |||
10 | import { ComponentPagination } from '../rest/component-pagination.model' | 10 | import { ComponentPagination } from '../rest/component-pagination.model' |
11 | import { VideoSortField } from './sort-field.type' | 11 | import { VideoSortField } from './sort-field.type' |
12 | import { Video } from './video.model' | 12 | import { Video } from './video.model' |
13 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
13 | 14 | ||
14 | export abstract class AbstractVideoList implements OnInit, OnDestroy { | 15 | export abstract class AbstractVideoList implements OnInit, OnDestroy { |
15 | private static LINES_PER_PAGE = 4 | 16 | private static LINES_PER_PAGE = 4 |
@@ -40,6 +41,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { | |||
40 | protected abstract authService: AuthService | 41 | protected abstract authService: AuthService |
41 | protected abstract router: Router | 42 | protected abstract router: Router |
42 | protected abstract route: ActivatedRoute | 43 | protected abstract route: ActivatedRoute |
44 | protected abstract i18n: I18n | ||
43 | protected abstract location: Location | 45 | protected abstract location: Location |
44 | protected abstract currentRoute: string | 46 | protected abstract currentRoute: string |
45 | abstract titlePage: string | 47 | abstract titlePage: string |
@@ -124,7 +126,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { | |||
124 | }, | 126 | }, |
125 | error => { | 127 | error => { |
126 | this.loadingPage[page] = false | 128 | this.loadingPage[page] = false |
127 | this.notificationsService.error('Error', error.message) | 129 | this.notificationsService.error(this.i18n('Error'), error.message) |
128 | } | 130 | } |
129 | ) | 131 | ) |
130 | } | 132 | } |
diff --git a/client/src/app/shared/video/video-miniature.component.html b/client/src/app/shared/video/video-miniature.component.html index 09ce0ef7f..3010e5ccc 100644 --- a/client/src/app/shared/video/video-miniature.component.html +++ b/client/src/app/shared/video/video-miniature.component.html | |||
@@ -9,7 +9,7 @@ | |||
9 | {{ video.name }} | 9 | {{ video.name }} |
10 | </a> | 10 | </a> |
11 | 11 | ||
12 | <span class="video-miniature-created-at-views">{{ video.publishedAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span> | 12 | <span i18n class="video-miniature-created-at-views">{{ video.publishedAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span> |
13 | <a class="video-miniature-account" [routerLink]="[ '/accounts', video.by ]">{{ video.by }}</a> | 13 | <a class="video-miniature-account" [routerLink]="[ '/accounts', video.by ]">{{ video.by }}</a> |
14 | </div> | 14 | </div> |
15 | </div> | 15 | </div> |
diff --git a/client/src/app/shared/video/video-thumbnail.component.html b/client/src/app/shared/video/video-thumbnail.component.html index 4604d10e2..971f352ba 100644 --- a/client/src/app/shared/video/video-thumbnail.component.html +++ b/client/src/app/shared/video/video-thumbnail.component.html | |||
@@ -1,6 +1,6 @@ | |||
1 | <a | 1 | <a |
2 | [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name" | 2 | [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name" |
3 | class="video-thumbnail" | 3 | class="video-thumbnail" |
4 | > | 4 | > |
5 | <img [attr.src]="getImageUrl()" [ngClass]="{ 'blur-filter': nsfw }" /> | 5 | <img [attr.src]="getImageUrl()" [ngClass]="{ 'blur-filter': nsfw }" /> |
6 | 6 | ||