From eaa529528cafcfb291009f9f99d296c81e792899 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 May 2022 16:29:01 +0200 Subject: Support ICU in TS components --- client/src/app/shared/shared-moderation/video-block.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared/shared-moderation/video-block.component.ts') 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..e14473b89 100644 --- a/client/src/app/shared/shared-moderation/video-block.component.ts +++ b/client/src/app/shared/shared-moderation/video-block.component.ts @@ -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() -- cgit v1.2.3