aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-28 15:13:01 +0200
committerChocobozzz <me@florianbigard.com>2018-09-28 15:13:01 +0200
commitbaf0a8c98e68e7221fec371281a99b13133cc7d0 (patch)
treea1fe26410e89a93de0b3e7476c636eeea4876e71 /client/src/app/+admin
parent01fe5bd721ae99569f776ad362ebdaa5ba8f494f (diff)
downloadPeerTube-baf0a8c98e68e7221fec371281a99b13133cc7d0.tar.gz
PeerTube-baf0a8c98e68e7221fec371281a99b13133cc7d0.tar.zst
PeerTube-baf0a8c98e68e7221fec371281a99b13133cc7d0.zip
Fix some i18n tags
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/users/shared/user.service.ts9
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'
4import { BytesPipe } from 'ngx-pipes' 4import { BytesPipe } from 'ngx-pipes'
5import { SortMeta } from 'primeng/components/common/sortmeta' 5import { SortMeta } from 'primeng/components/common/sortmeta'
6import { Observable } from 'rxjs' 6import { Observable } from 'rxjs'
7import { ResultList, UserCreate, UserUpdate, User } from '../../../../../../shared' 7import { ResultList, UserCreate, UserUpdate, User, UserRole } from '../../../../../../shared'
8import { environment } from '../../../../environments/environment' 8import { environment } from '../../../../environments/environment'
9import { RestExtractor, RestPagination, RestService } from '../../../shared' 9import { RestExtractor, RestPagination, RestService } from '../../../shared'
10import { I18n } from '@ngx-translate/i18n-polyfill' 10import { 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 })