ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix i18n in components
Chocobozzz25acef90a85c
diff --git a/client/src/app/+accounts/account-videos/account-videos.component.ts b/client/src/app/+accounts/account-videos/account-videos.component.tsindex 7b76294802..476f040247 100644--- a/client/src/app/+accounts/account-videos/account-videos.component.ts+++ b/client/src/app/+accounts/account-videos/account-videos.component.ts@@ -69,7 +69,7 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit,.getAccountVideos(this.account, newPagination, this.sort).pipe(tap(({ totalVideos }) => {- this.titlePage = this.i18n('Published {{ totalVideos }} videos', { totalVideos })+ this.titlePage = this.i18n('Published {{totalVideos}} videos', { totalVideos })}))}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.tsindex 3ffcc6c31b..73ff4b7bbe 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) returndiff --git a/client/src/app/+admin/follows/following-add/following-add.component.ts b/client/src/app/+admin/follows/following-add/following-add.component.tsindex f197c1fe9f..bd9cc022ba 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.tsindex 2fb818c905..06e341e683 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.tsindex b91ffa1151..8478a7692e 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.tsindex dca5557065..5689aab2f8 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.tsindex b644fcf719..ab25608c17 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.tsindex 1864e5f650..143ec8406f 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()},diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.tsindex 9b5a12d18b..a4073728b2 100644--- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts+++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts@@ -73,7 +73,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelEthis.authService.refreshUserInformation()this.notificationsService.success(this.i18n('Success'),- this.i18n('Video channel {{ videoChannelName }} created.', { videoChannelName: videoChannelCreate.displayName })+ this.i18n('Video channel {{videoChannelName}} created.', { videoChannelName: videoChannelCreate.displayName }))this.router.navigate([ '/my-account', 'video-channels' ])},diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.tsindex 78c5787641..db38c7da9c 100644--- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts+++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts@@ -101,7 +101,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelEthis.authService.refreshUserInformation()this.notificationsService.success(this.i18n('Success'),- this.i18n('Video channel {{ videoChannelName }} updated.', { videoChannelName: videoChannelUpdate.displayName })+ this.i18n('Video channel {{videoChannelName}} updated.', { videoChannelName: videoChannelUpdate.displayName }))this.router.navigate([ '/my-account', 'video-channels' ])},diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.tsindex cff1041f6c..6d1098865d 100644--- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts+++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts@@ -35,7 +35,7 @@ export class MyAccountVideoChannelsComponent implements OnInit {async deleteVideoChannel (videoChannel: VideoChannel) {const res = await this.confirmService.confirmWithInput(this.i18n(- 'Do you really want to delete {{ videoChannelName }}? It will delete all videos uploaded in this channel too.',+ 'Do you really want to delete {{videoChannelName}}? It will delete all videos uploaded in this channel too.',{ videoChannelName: videoChannel.displayName }),this.i18n('Please type the name of the video channel to confirm'),@@ -50,7 +50,7 @@ export class MyAccountVideoChannelsComponent implements OnInit {this.loadVideoChannels()this.notificationsService.success(this.i18n('Success'),- this.i18n('Video channel {{ videoChannelName } deleted.', { videoChannelName: videoChannel.displayName })+ this.i18n('Video channel {{videoChannelName}} deleted.', { videoChannelName: videoChannel.displayName }))},diff --git a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.tsindex 22239d75be..28c591039f 100644--- a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts+++ b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts@@ -69,7 +69,7 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On.getVideoChannelVideos(this.videoChannel, newPagination, this.sort).pipe(tap(({ totalVideos }) => {- this.titlePage = this.i18n('Published {{ totalVideos }} videos', { totalVideos })+ this.titlePage = this.i18n('Published {{totalVideos}} videos', { totalVideos })}))}diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.tsindex 363f58155e..9ec404557b 100644--- a/client/src/app/core/auth/auth.service.ts+++ b/client/src/app/core/auth/auth.service.ts@@ -76,7 +76,7 @@ export class AuthService {let errorMessage = error.messageif (error.status === 403) {- errorMessage = this.i18n('Cannot retrieve OAuth Client credentials: {{ errorText }}.\n', { errorText: error.text })+ errorMessage = this.i18n('Cannot retrieve OAuth Client credentials: {{errorText}}.\n', { errorText: error.text })errorMessage += this.i18n('Ensure you have correctly configured PeerTube (config/ directory), in particular the "webserver" section.')diff --git a/client/src/app/shared/misc/from-now.pipe.ts b/client/src/app/shared/misc/from-now.pipe.tsindex 3a64a4077c..33e6d25fe9 100644--- a/client/src/app/shared/misc/from-now.pipe.ts+++ b/client/src/app/shared/misc/from-now.pipe.ts@@ -12,28 +12,28 @@ export class FromNowPipe implements PipeTransform {let interval = Math.floor(seconds / 31536000)if (interval > 1) {- return this.i18n('{{ interval }} years ago', { interval })+ return this.i18n('{{interval}} years ago', { interval })}interval = Math.floor(seconds / 2592000)- if (interval > 1) return this.i18n('{{ interval }} months ago', { interval })- if (interval === 1) return this.i18n('{{ interval }} month ago', { interval })+ if (interval > 1) return this.i18n('{{interval}} months ago', { interval })+ if (interval === 1) return this.i18n('{{interval}} month ago', { interval })interval = Math.floor(seconds / 604800)- if (interval > 1) return this.i18n('{{ interval }} weeks ago', { interval })- if (interval === 1) return this.i18n('{{ interval }} week ago', { interval })+ if (interval > 1) return this.i18n('{{interval}} weeks ago', { interval })+ if (interval === 1) return this.i18n('{{interval}} week ago', { interval })interval = Math.floor(seconds / 86400)- if (interval > 1) return this.i18n('{{ interval }} days ago', { interval })- if (interval === 1) return this.i18n('{{ interval }} day ago', { interval })+ if (interval > 1) return this.i18n('{{interval}} days ago', { interval })+ if (interval === 1) return this.i18n('{{interval}} day ago', { interval })interval = Math.floor(seconds / 3600)- if (interval > 1) return this.i18n('{{ interval }} hours ago', { interval })- if (interval === 1) return this.i18n('{{ interval }} hour ago', { interval })+ if (interval > 1) return this.i18n('{{interval}} hours ago', { interval })+ if (interval === 1) return this.i18n('{{interval}} hour ago', { interval })interval = Math.floor(seconds / 60)- if (interval >= 1) return this.i18n('{{ interval }} min ago', { interval })+ if (interval >= 1) return this.i18n('{{interval}} min ago', { interval })- return this.i18n('{{ interval }} sec ago', { interval: Math.floor(seconds) })+ return this.i18n('{{interval}} sec ago', { interval: Math.floor(seconds) })}}diff --git a/client/src/app/shared/rest/rest-extractor.service.ts b/client/src/app/shared/rest/rest-extractor.service.tsindex 468ac3e32e..0d5b6d6f3f 100644--- a/client/src/app/shared/rest/rest-extractor.service.ts+++ b/client/src/app/shared/rest/rest-extractor.service.ts@@ -71,7 +71,7 @@ export class RestExtractor {const secondsLeft = err.headers.get('retry-after')if (secondsLeft) {const minutesLeft = Math.floor(parseInt(secondsLeft, 10) / 60)- errorMessage = this.i18n('Too many attempts, please try again after {{ minutesLeft }} minutes.', { minutesLeft })+ errorMessage = this.i18n('Too many attempts, please try again after {{minutesLeft}} minutes.', { minutesLeft })} else {errorMessage = this.i18n('Too many attempts, please try again later.')}diff --git a/client/src/app/signup/signup.component.ts b/client/src/app/signup/signup.component.tsindex 72a0c045b1..eaed2626d2 100644--- a/client/src/app/signup/signup.component.ts+++ b/client/src/app/signup/signup.component.ts@@ -84,7 +84,7 @@ export class SignupComponent extends FormReactive implements OnInit {() => {this.notificationsService.success(this.i18n('Success'),- this.i18n('Registration for {{ username }} complete.', { username: userCreate.username })+ this.i18n('Registration for {{username}} complete.', { username: userCreate.username }))this.redirectService.redirectToHomepage()},@@ -106,9 +106,9 @@ export class SignupComponent extends FormReactive implements OnInit {const normalSeconds = initialUserVideoQuotaBit / (1.5 * 1000 * 1000)const lines = [- this.i18n('{{ seconds }} of full HD videos', { seconds: SignupComponent.getApproximateTime(fullHdSeconds) }),- this.i18n('{{ seconds }} of HD videos', { seconds: SignupComponent.getApproximateTime(hdSeconds) }),- this.i18n('{{ seconds }} of average quality videos', { seconds: SignupComponent.getApproximateTime(normalSeconds) })+ this.i18n('{{seconds}} of full HD videos', { seconds: SignupComponent.getApproximateTime(fullHdSeconds) }),+ this.i18n('{{seconds}} of HD videos', { seconds: SignupComponent.getApproximateTime(hdSeconds) }),+ this.i18n('{{seconds}} of average quality videos', { seconds: SignupComponent.getApproximateTime(normalSeconds) })]this.quotaHelpIndication = lines.join('<br />')diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.tsindex 8c6ddb89e5..72f66ff096 100644--- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts+++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts@@ -114,7 +114,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {async onWantedToDelete (commentToDelete: VideoComment) {let message = 'Do you really want to delete this comment?'if (commentToDelete.totalReplies !== 0) {- message += this.i18n(' {{ totalReplies }} replies will be deleted too.', { totalReplies: commentToDelete.totalReplies })+ message += this.i18n(' {{totalReplies}} replies will be deleted too.', { totalReplies: commentToDelete.totalReplies })}const res = await this.confirmService.confirm(message, this.i18n('Delete'))diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.tsindex f3b4f7a2b0..23d74494c5 100644--- a/client/src/app/videos/+video-watch/video-watch.component.ts+++ b/client/src/app/videos/+video-watch/video-watch.component.ts@@ -163,7 +163,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {status => {this.notificationsService.success(this.i18n('Success'),- this.i18n('Video {{ videoName }} had been blacklisted.', { videoName: this.video.name })+ this.i18n('Video {{videoName}} had been blacklisted.', { videoName: this.video.name }))this.redirectService.redirectToHomepage()},@@ -265,7 +265,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {status => {this.notificationsService.success(this.i18n('Success'),- this.i18n('Video {{ videoName }} deleted.', { videoName: this.video.name })+ this.i18n('Video {{videoName}} deleted.', { videoName: this.video.name }))// Go back to the video-list.@@ -297,7 +297,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {private setVideoLikesBarTooltipText () {this.likesBarTooltipText = this.i18n(- '{{ likesNumber }} likes / {{ dislikesNumber }} dislikes',+ '{{likesNumber}} likes / {{dislikesNumber}} dislikes',{ likesNumber: this.video.likes, dislikes: this.video.dislikes })}