From 66b2d7d0f5e077fdaaa2afa46f1ef8cea21117e5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 12 Aug 2024 17:01:52 +0200 Subject: [PATCH] Better plural localization support --- .../runner-job-list/runner-job-list.component.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts index 423bbadcf..b7655f451 100644 --- a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts +++ b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts @@ -130,7 +130,13 @@ export class RunnerJobListComponent extends RestTable implements OnI .subscribe({ next: () => { this.reloadData() - this.notifier.success($localize`Job(s) cancelled.`) + + this.notifier.success( + formatICU( + $localize`{count, plural, =1 {Job cancelled} other {{count} jobs cancelled}}`, + { count: jobs.length } + ) + ) }, error: err => this.notifier.error(err.message) @@ -151,7 +157,13 @@ export class RunnerJobListComponent extends RestTable implements OnI .subscribe({ next: () => { this.reloadData() - this.notifier.success($localize`Job(s) removed.`) + + this.notifier.success( + formatICU( + $localize`{count, plural, =1 {Job removed} other {{count} jobs removed}}`, + { count: jobs.length } + ) + ) }, error: err => this.notifier.error(err.message)