From baf0a8c98e68e7221fec371281a99b13133cc7d0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 28 Sep 2018 15:13:01 +0200 Subject: Fix some i18n tags --- client/src/app/+admin/users/shared/user.service.ts | 9 ++++++++- .../my-account-danger-zone/my-account-danger-zone.component.html | 4 ++-- .../my-account-videos/my-account-videos.component.html | 2 +- client/src/app/login/login.component.html | 2 +- .../src/app/videos/+video-edit/shared/video-edit.component.html | 1 + .../video-add-components/video-import-torrent.component.html | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/+admin/users/shared/user.service.ts b/client/src/app/+admin/users/shared/user.service.ts index a0e2f666d..470beef08 100644 --- a/client/src/app/+admin/users/shared/user.service.ts +++ b/client/src/app/+admin/users/shared/user.service.ts @@ -4,7 +4,7 @@ import { Injectable } from '@angular/core' import { BytesPipe } from 'ngx-pipes' import { SortMeta } from 'primeng/components/common/sortmeta' import { Observable } from 'rxjs' -import { ResultList, UserCreate, UserUpdate, User } from '../../../../../../shared' +import { ResultList, UserCreate, UserUpdate, User, UserRole } from '../../../../../../shared' import { environment } from '../../../../environments/environment' import { RestExtractor, RestPagination, RestService } from '../../../shared' import { I18n } from '@ngx-translate/i18n-polyfill' @@ -81,7 +81,14 @@ export class UserService { const videoQuotaUsed = this.bytesPipe.transform(user.videoQuotaUsed, 0) + const roleLabels: { [ id in UserRole ]: string } = { + [UserRole.USER]: this.i18n('User'), + [UserRole.ADMINISTRATOR]: this.i18n('Administrator'), + [UserRole.MODERATOR]: this.i18n('Moderator') + } + return Object.assign(user, { + roleLabel: roleLabels[user.role], videoQuota, videoQuotaUsed }) diff --git a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.html b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.html index 8caff972f..c542cc675 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.html @@ -1,5 +1,5 @@
-

Once you delete your account, there is no going back. Please be certain.

+

Once you delete your account, there is no going back. Please be certain.

- +
\ No newline at end of file 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 276d01408..a6911e4bf 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 @@ -43,7 +43,7 @@ - - + diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.html b/client/src/app/videos/+video-edit/shared/video-edit.component.html index 46869268c..33c766d87 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.html +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.html @@ -18,6 +18,7 @@ diff --git a/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.html b/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.html index 2f0c9abb5..a933a64f0 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.html +++ b/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.html @@ -8,7 +8,7 @@ (.torrent) -
Or
+
Or
-- cgit v1.2.3