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/+admin/jobs | |
parent | 989e526abf0c0dd7958deb630df009608561bb67 (diff) | |
download | PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.gz PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.zst PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.zip |
Add i18n attributes
Diffstat (limited to 'client/src/app/+admin/jobs')
-rw-r--r-- | client/src/app/+admin/jobs/index.ts | 5 | ||||
-rw-r--r-- | client/src/app/+admin/jobs/jobs-list/jobs-list.component.html | 12 | ||||
-rw-r--r-- | client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts | 6 |
3 files changed, 14 insertions, 9 deletions
diff --git a/client/src/app/+admin/jobs/index.ts b/client/src/app/+admin/jobs/index.ts index 7b5271956..c0e0cc95d 100644 --- a/client/src/app/+admin/jobs/index.ts +++ b/client/src/app/+admin/jobs/index.ts | |||
@@ -1 +1,4 @@ | |||
1 | export * from './' | 1 | export * from './shared' |
2 | export * from './jobs-list' | ||
3 | export * from './job.routes' | ||
4 | export * from './job.component' | ||
diff --git a/client/src/app/+admin/jobs/jobs-list/jobs-list.component.html b/client/src/app/+admin/jobs/jobs-list/jobs-list.component.html index 0cc4dc3e0..20c35cb5b 100644 --- a/client/src/app/+admin/jobs/jobs-list/jobs-list.component.html +++ b/client/src/app/+admin/jobs/jobs-list/jobs-list.component.html | |||
@@ -1,5 +1,5 @@ | |||
1 | <div class="admin-sub-header"> | 1 | <div class="admin-sub-header"> |
2 | <div class="form-sub-title">Jobs list</div> | 2 | <div i18n class="form-sub-title">Jobs list</div> |
3 | 3 | ||
4 | <div class="peertube-select-container"> | 4 | <div class="peertube-select-container"> |
5 | <select [(ngModel)]="jobState" (ngModelChange)="onJobStateChanged()"> | 5 | <select [(ngModel)]="jobState" (ngModelChange)="onJobStateChanged()"> |
@@ -15,11 +15,11 @@ | |||
15 | <ng-template pTemplate="header"> | 15 | <ng-template pTemplate="header"> |
16 | <tr> | 16 | <tr> |
17 | <th style="width: 27px"></th> | 17 | <th style="width: 27px"></th> |
18 | <th style="width: 60px">ID</th> | 18 | <th i18n style="width: 60px">ID</th> |
19 | <th style="width: 210px">Type</th> | 19 | <th i18n style="width: 210px">Type</th> |
20 | <th style="width: 130px">State</th> | 20 | <th i18n style="width: 130px">State</th> |
21 | <th style="width: 250px" pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> | 21 | <th i18n style="width: 250px" pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> |
22 | <th style="width: 250px">Updated</th> | 22 | <th i18n style="width: 250px">Updated</th> |
23 | </tr> | 23 | </tr> |
24 | </ng-template> | 24 | </ng-template> |
25 | 25 | ||
diff --git a/client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts b/client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts index ad2f05c6b..29dd9f31c 100644 --- a/client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts +++ b/client/src/app/+admin/jobs/jobs-list/jobs-list.component.ts | |||
@@ -7,6 +7,7 @@ import { JobState } from '../../../../../../shared/models' | |||
7 | import { RestPagination, RestTable } from '../../../shared' | 7 | import { RestPagination, RestTable } from '../../../shared' |
8 | import { RestExtractor } from '../../../shared/rest/rest-extractor.service' | 8 | import { RestExtractor } from '../../../shared/rest/rest-extractor.service' |
9 | import { JobService } from '../shared' | 9 | import { JobService } from '../shared' |
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
10 | 11 | ||
11 | @Component({ | 12 | @Component({ |
12 | selector: 'my-jobs-list', | 13 | selector: 'my-jobs-list', |
@@ -27,7 +28,8 @@ export class JobsListComponent extends RestTable implements OnInit { | |||
27 | constructor ( | 28 | constructor ( |
28 | private notificationsService: NotificationsService, | 29 | private notificationsService: NotificationsService, |
29 | private restExtractor: RestExtractor, | 30 | private restExtractor: RestExtractor, |
30 | private jobsService: JobService | 31 | private jobsService: JobService, |
32 | private i18n: I18n | ||
31 | ) { | 33 | ) { |
32 | super() | 34 | super() |
33 | } | 35 | } |
@@ -51,7 +53,7 @@ export class JobsListComponent extends RestTable implements OnInit { | |||
51 | this.totalRecords = resultList.total | 53 | this.totalRecords = resultList.total |
52 | }, | 54 | }, |
53 | 55 | ||
54 | err => this.notificationsService.error('Error', err.message) | 56 | err => this.notificationsService.error(this.i18n('Error'), err.message) |
55 | ) | 57 | ) |
56 | } | 58 | } |
57 | 59 | ||