From 25acef90a85c1584880dec96aa402f896af8364a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 5 Jun 2018 09:13:26 +0200 Subject: Fix i18n in components --- .../config/edit-custom-config/edit-custom-config.component.ts | 6 +++--- .../src/app/+admin/follows/following-add/following-add.component.ts | 2 +- .../app/+admin/follows/following-list/following-list.component.ts | 4 ++-- client/src/app/+admin/users/user-edit/user-create.component.ts | 2 +- client/src/app/+admin/users/user-edit/user-update.component.ts | 2 +- client/src/app/+admin/users/user-list/user-list.component.ts | 2 +- .../video-blacklist-list/video-blacklist-list.component.ts | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) (limited to 'client/src/app/+admin') diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 3ffcc6c31..73ff4b7bb 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts @@ -161,14 +161,14 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { const customizationsText = customizations.join('/') // FIXME: i18n service does not support string concatenation - const message = this.i18n('You set custom {{ customizationsText }}. ', { customizationsText }) + + const message = this.i18n('You set custom {{customizationsText}}. ', { customizationsText }) + this.i18n('This could lead to security issues or bugs if you do not understand it. ') + this.i18n('Are you sure you want to update the configuration?') const label = this.i18n( - 'Please type "I understand the {{ customizationsText }} I set" to confirm.', + 'Please type "I understand the {{customizationsText}} I set" to confirm.', { customizationsText } ) - const expectedInputValue = this.i18n('I understand the {{ customizationsText }} I set', { customizationsText }) + const expectedInputValue = this.i18n('I understand the {{customizationsText}} I set', { customizationsText }) const confirmRes = await this.confirmService.confirmWithInput(message, label, expectedInputValue) if (confirmRes === false) return diff --git a/client/src/app/+admin/follows/following-add/following-add.component.ts b/client/src/app/+admin/follows/following-add/following-add.component.ts index f197c1fe9..bd9cc022b 100644 --- a/client/src/app/+admin/follows/following-add/following-add.component.ts +++ b/client/src/app/+admin/follows/following-add/following-add.component.ts @@ -36,7 +36,7 @@ export class FollowingAddComponent { for (const host of hosts) { if (validateHost(host) === false) { - newHostsErrors.push(this.i18n('{{ host }} is not valid', { host })) + newHostsErrors.push(this.i18n('{{host}} is not valid', { host })) } } diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts index 2fb818c90..06e341e68 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.ts +++ b/client/src/app/+admin/follows/following-list/following-list.component.ts @@ -33,7 +33,7 @@ export class FollowingListComponent extends RestTable implements OnInit { async removeFollowing (follow: AccountFollow) { const res = await this.confirmService.confirm( - this.i18n('Do you really want to unfollow {{ host }}?', { host: follow.following.host }), + this.i18n('Do you really want to unfollow {{host}}?', { host: follow.following.host }), this.i18n('Unfollow') ) if (res === false) return @@ -42,7 +42,7 @@ export class FollowingListComponent extends RestTable implements OnInit { () => { this.notificationsService.success( this.i18n('Success'), - this.i18n('You are not following {{ host }} anymore.', { host: follow.following.host }) + this.i18n('You are not following {{host}} anymore.', { host: follow.following.host }) ) this.loadData() }, diff --git a/client/src/app/+admin/users/user-edit/user-create.component.ts b/client/src/app/+admin/users/user-edit/user-create.component.ts index b91ffa115..8478a7692 100644 --- a/client/src/app/+admin/users/user-edit/user-create.component.ts +++ b/client/src/app/+admin/users/user-edit/user-create.component.ts @@ -72,7 +72,7 @@ export class UserCreateComponent extends UserEdit implements OnInit { () => { this.notificationsService.success( this.i18n('Success'), - this.i18n('User {{ username }} created.', { username: userCreate.username }) + this.i18n('User {{username}} created.', { username: userCreate.username }) ) this.router.navigate([ '/admin/users/list' ]) }, diff --git a/client/src/app/+admin/users/user-edit/user-update.component.ts b/client/src/app/+admin/users/user-edit/user-update.component.ts index dca555706..5689aab2f 100644 --- a/client/src/app/+admin/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/users/user-edit/user-update.component.ts @@ -85,7 +85,7 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { () => { this.notificationsService.success( this.i18n('Success'), - this.i18n('User {{ username }} updated.', { username: this.username }) + this.i18n('User {{username}} updated.', { username: this.username }) ) this.router.navigate([ '/admin/users/list' ]) }, diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/users/user-list/user-list.component.ts index b644fcf71..ab25608c1 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.ts +++ b/client/src/app/+admin/users/user-list/user-list.component.ts @@ -44,7 +44,7 @@ export class UserListComponent extends RestTable implements OnInit { () => { this.notificationsService.success( this.i18n('Success'), - this.i18n('User {{ username }} deleted.', { username: user.username }) + this.i18n('User {{username}} deleted.', { username: user.username }) ) this.loadData() }, diff --git a/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts b/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts index 1864e5f65..143ec8406 100644 --- a/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts +++ b/client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.ts @@ -43,7 +43,7 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { () => { this.notificationsService.success( this.i18n('Success'), - this.i18n('Video {{ name }} removed from the blacklist.', { name: entry.name }) + this.i18n('Video {{name}} removed from the blacklist.', { name: entry.name }) ) this.loadData() }, -- cgit v1.2.3