.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 })
})
)
}
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
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 }))
}
}
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
() => {
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()
},
() => {
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' ])
},
() => {
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' ])
},
() => {
this.notificationsService.success(
this.i18n('Success'),
- this.i18n('User {{ username }} deleted.', { username: user.username })
+ this.i18n('User {{username}} deleted.', { username: user.username })
)
this.loadData()
},
() => {
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()
},
this.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' ])
},
this.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' ])
},
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'),
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 })
)
},
.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 })
})
)
}
let errorMessage = error.message
if (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.'
)
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) })
}
}
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.')
}
() => {
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()
},
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 />')
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'))
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()
},
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.
private setVideoLikesBarTooltipText () {
this.likesBarTooltipText = this.i18n(
- '{{ likesNumber }} likes / {{ dislikesNumber }} dislikes',
+ '{{likesNumber}} likes / {{dislikesNumber}} dislikes',
{ likesNumber: this.video.likes, dislikes: this.video.dislikes }
)
}