Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix some i18n tags

Chocobozzzbaf0a8c98e68
diff --git a/client/src/app/+admin/users/shared/user.service.ts b/client/src/app/+admin/users/shared/user.service.ts
index a0e2f666d3..470beef08c 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 8caff972f7..c542cc6759 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 @@
<div class="delete-me">
- <p>Once you delete your account, there is no going back. Please be certain.</p>
+ <p i18n>Once you delete your account, there is no going back. Please be certain.</p>
- <button (click)="deleteMe()">Delete your account</button>
+ <button (click)="deleteMe()" i18n>Delete your account</button>
</div>
\ 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 276d01408f..a6911e4bf8 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 @@
<my-edit-button [routerLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button>
- <my-button i18n label="Change ownership"
+ <my-button i18n-label label="Change ownership"
className="action-button-change-ownership"
icon="icon-im-with-her"
(click)="changeOwnership($event, video)"
diff --git a/client/src/app/login/login.component.html b/client/src/app/login/login.component.html
index 9105831933..93dbed525e 100644
--- a/client/src/app/login/login.component.html
+++ b/client/src/app/login/login.component.html
@@ -48,7 +48,7 @@
</div>
</div>
- <input type="submit" value="Login" [disabled]="!form.valid">
+ <input type="submit" i18n-value value="Login" [disabled]="!form.valid">
</form>
</div>
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 46869268c2..33c766d87c 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 @@
<my-help i18n-preHtml preHtml="Tags could be used to suggest relevant recommendations.</br>Press Enter to add a new tag."></my-help>
<tag-input
[validators]="tagValidators" [errorMessages]="tagValidatorsMessages"
+ i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a new tag"
formControlName="tags" maxItems="5" modelAsStrings="true"
></tag-input>
</div>
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 2f0c9abb58..a933a64f0d 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 @@
</div>
<span class="button-file-extension">(.torrent)</span>
- <div class="torrent-or-magnet">Or</div>
+ <div class="torrent-or-magnet" i18n>Or</div>
<div class="form-group form-group-magnet-uri">
<label i18n for="magnetUri">Paste magnet URI</label>