From ddb0303f4da8777b0c1254eada8b2cd12774b716 Mon Sep 17 00:00:00 2001 From: kimsible Date: Fri, 7 Aug 2020 23:24:22 +0200 Subject: Fix i18n on delete modal and linter --- .../+videos/+video-watch/comment/video-comments.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'client/src/app/+videos/+video-watch/comment/video-comments.component.ts') 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.ts index 8080afd8d..9e8e143c2 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 @@ -160,15 +160,15 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { this.timestampClicked.emit(timestamp) } - async onWantedToDelete (commentToDelete: VideoComment, message = 'Do you really want to delete this comment?'): Promise { + async onWantedToDelete(commentToDelete: VideoComment, title = $localize`Delete`, message = $localize`Do you really want to delete this comment?`): Promise { if (commentToDelete.isLocal || this.video.isLocal) { message += $localize` The deletion will be sent to remote instances so they can reflect the change.` } else { message += $localize` It is a remote comment, so the deletion will only be effective on your instance.` } - const res = await this.confirmService.confirm(message, $localize`Delete`) - if (res === false) return + const res = await this.confirmService.confirm(message, title) + if (res === false) return false this.videoCommentService.deleteVideoComment(commentToDelete.videoId, commentToDelete.id) .subscribe( @@ -189,8 +189,8 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { return true } - async onWantedToRedraft(commentToRedraft: VideoComment) { - const confirm = await this.onWantedToDelete(commentToRedraft, 'Do you really want to delete and re-draft this comment?') + async onWantedToRedraft (commentToRedraft: VideoComment) { + const confirm = await this.onWantedToDelete(commentToRedraft, $localize`Delete and re-draft`, $localize`Do you really want to delete and re-draft this comment?`) if (confirm) { this.inReplyToCommentId = commentToRedraft.inReplyToCommentId -- cgit v1.2.3