X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-moderation%2Fvideo-block.component.ts;h=3ff53443af7b6645079c3a0edbe9293e2851cc37;hb=b1dbb9fefc870a90b25f5c0153589f45c9e75e3e;hp=400913f0239998904ca5bc2e58d65cb722f3e927;hpb=3cfa817672657df18260ece5b354efa0f3b6e317;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-moderation/video-block.component.ts b/client/src/app/shared/shared-moderation/video-block.component.ts index 400913f02..3ff53443a 100644 --- a/client/src/app/shared/shared-moderation/video-block.component.ts +++ b/client/src/app/shared/shared-moderation/video-block.component.ts @@ -1,6 +1,7 @@ import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' import { Notifier } from '@app/core' -import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' +import { prepareIcu } from '@app/helpers' +import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' import { Video } from '@app/shared/shared-main' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' @@ -24,7 +25,7 @@ export class VideoBlockComponent extends FormReactive implements OnInit { private openedModal: NgbModalRef constructor ( - protected formValidatorService: FormValidatorService, + protected formReactiveService: FormReactiveService, private modalService: NgbModal, private videoBlocklistService: VideoBlockService, private notifier: Notifier @@ -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()