diff options
author | kimsible <kimsible@users.noreply.github.com> | 2020-08-07 23:24:22 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-14 15:03:38 +0200 |
commit | ddb0303f4da8777b0c1254eada8b2cd12774b716 (patch) | |
tree | 0048e5c2887d5f43d697829b2360648f2551fbd7 /client/src/app/+videos/+video-watch/comment/video-comments.component.ts | |
parent | 3c176894bae9de7958605fe432bff770b9232807 (diff) | |
download | PeerTube-ddb0303f4da8777b0c1254eada8b2cd12774b716.tar.gz PeerTube-ddb0303f4da8777b0c1254eada8b2cd12774b716.tar.zst PeerTube-ddb0303f4da8777b0c1254eada8b2cd12774b716.zip |
Fix i18n on delete modal and linter
Diffstat (limited to 'client/src/app/+videos/+video-watch/comment/video-comments.component.ts')
-rw-r--r-- | client/src/app/+videos/+video-watch/comment/video-comments.component.ts | 10 |
1 files changed, 5 insertions, 5 deletions
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 { | |||
160 | this.timestampClicked.emit(timestamp) | 160 | this.timestampClicked.emit(timestamp) |
161 | } | 161 | } |
162 | 162 | ||
163 | async onWantedToDelete (commentToDelete: VideoComment, message = 'Do you really want to delete this comment?'): Promise<boolean> { | 163 | async onWantedToDelete(commentToDelete: VideoComment, title = $localize`Delete`, message = $localize`Do you really want to delete this comment?`): Promise<boolean> { |
164 | if (commentToDelete.isLocal || this.video.isLocal) { | 164 | if (commentToDelete.isLocal || this.video.isLocal) { |
165 | message += $localize` The deletion will be sent to remote instances so they can reflect the change.` | 165 | message += $localize` The deletion will be sent to remote instances so they can reflect the change.` |
166 | } else { | 166 | } else { |
167 | message += $localize` It is a remote comment, so the deletion will only be effective on your instance.` | 167 | message += $localize` It is a remote comment, so the deletion will only be effective on your instance.` |
168 | } | 168 | } |
169 | 169 | ||
170 | const res = await this.confirmService.confirm(message, $localize`Delete`) | 170 | const res = await this.confirmService.confirm(message, title) |
171 | if (res === false) return | 171 | if (res === false) return false |
172 | 172 | ||
173 | this.videoCommentService.deleteVideoComment(commentToDelete.videoId, commentToDelete.id) | 173 | this.videoCommentService.deleteVideoComment(commentToDelete.videoId, commentToDelete.id) |
174 | .subscribe( | 174 | .subscribe( |
@@ -189,8 +189,8 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
189 | return true | 189 | return true |
190 | } | 190 | } |
191 | 191 | ||
192 | async onWantedToRedraft(commentToRedraft: VideoComment) { | 192 | async onWantedToRedraft (commentToRedraft: VideoComment) { |
193 | const confirm = await this.onWantedToDelete(commentToRedraft, 'Do you really want to delete and re-draft this comment?') | 193 | const confirm = await this.onWantedToDelete(commentToRedraft, $localize`Delete and re-draft`, $localize`Do you really want to delete and re-draft this comment?`) |
194 | 194 | ||
195 | if (confirm) { | 195 | if (confirm) { |
196 | this.inReplyToCommentId = commentToRedraft.inReplyToCommentId | 196 | this.inReplyToCommentId = commentToRedraft.inReplyToCommentId |