]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-moderation/video-block.component.ts
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-moderation / video-block.component.ts
index 400913f0239998904ca5bc2e58d65cb722f3e927..f8b22a3f61175be55cccab06dda85a0f162184f5 100644 (file)
@@ -1,5 +1,6 @@
 import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'
 import { Notifier } from '@app/core'
+import { prepareIcu } from '@app/helpers'
 import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
 import { Video } from '@app/shared/shared-main'
 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
@@ -80,9 +81,10 @@ export class VideoBlockComponent extends FormReactive implements OnInit {
     this.videoBlocklistService.blockVideo(options)
         .subscribe({
           next: () => {
-            const message = this.isMultiple
-              ? $localize`Blocked ${this.videos.length} videos.`
-              : $localize`Blocked ${this.getSingleVideo().name}`
+            const message = prepareIcu($localize`{count, plural, =1 {Blocked {videoName}.} other {Blocked {count} videos.}}`)(
+              { count: this.videos.length, videoName: this.getSingleVideo().name },
+              $localize`Blocked ${this.videos.length} videos.`
+            )
 
             this.notifier.success(message)
             this.hide()