diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-28 15:13:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-28 15:13:01 +0200 |
commit | baf0a8c98e68e7221fec371281a99b13133cc7d0 (patch) | |
tree | a1fe26410e89a93de0b3e7476c636eeea4876e71 /client/src/app/+admin/users/shared/user.service.ts | |
parent | 01fe5bd721ae99569f776ad362ebdaa5ba8f494f (diff) | |
download | PeerTube-baf0a8c98e68e7221fec371281a99b13133cc7d0.tar.gz PeerTube-baf0a8c98e68e7221fec371281a99b13133cc7d0.tar.zst PeerTube-baf0a8c98e68e7221fec371281a99b13133cc7d0.zip |
Fix some i18n tags
Diffstat (limited to 'client/src/app/+admin/users/shared/user.service.ts')
-rw-r--r-- | client/src/app/+admin/users/shared/user.service.ts | 9 |
1 files changed, 8 insertions, 1 deletions
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' | |||
4 | import { BytesPipe } from 'ngx-pipes' | 4 | import { BytesPipe } from 'ngx-pipes' |
5 | import { SortMeta } from 'primeng/components/common/sortmeta' | 5 | import { SortMeta } from 'primeng/components/common/sortmeta' |
6 | import { Observable } from 'rxjs' | 6 | import { Observable } from 'rxjs' |
7 | import { ResultList, UserCreate, UserUpdate, User } from '../../../../../../shared' | 7 | import { ResultList, UserCreate, UserUpdate, User, UserRole } from '../../../../../../shared' |
8 | import { environment } from '../../../../environments/environment' | 8 | import { environment } from '../../../../environments/environment' |
9 | import { RestExtractor, RestPagination, RestService } from '../../../shared' | 9 | import { RestExtractor, RestPagination, RestService } from '../../../shared' |
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | 10 | import { I18n } from '@ngx-translate/i18n-polyfill' |
@@ -81,7 +81,14 @@ export class UserService { | |||
81 | 81 | ||
82 | const videoQuotaUsed = this.bytesPipe.transform(user.videoQuotaUsed, 0) | 82 | const videoQuotaUsed = this.bytesPipe.transform(user.videoQuotaUsed, 0) |
83 | 83 | ||
84 | const roleLabels: { [ id in UserRole ]: string } = { | ||
85 | [UserRole.USER]: this.i18n('User'), | ||
86 | [UserRole.ADMINISTRATOR]: this.i18n('Administrator'), | ||
87 | [UserRole.MODERATOR]: this.i18n('Moderator') | ||
88 | } | ||
89 | |||
84 | return Object.assign(user, { | 90 | return Object.assign(user, { |
91 | roleLabel: roleLabels[user.role], | ||
85 | videoQuota, | 92 | videoQuota, |
86 | videoQuotaUsed | 93 | videoQuotaUsed |
87 | }) | 94 | }) |