From 569b923fb6968f0500e45c49a9876679117f427b Mon Sep 17 00:00:00 2001 From: David Battersby Date: Mon, 10 Apr 2023 17:00:31 +0800 Subject: [PATCH] FIX: staff_counters should be pluralized strings (#21039) Small change to format the staff counter template to apply the correct pluralization for flagged posts/topics. --- .../javascripts/discourse/app/templates/user.hbs | 14 +++++++++----- config/locales/client.en.yml | 4 +++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/discourse/app/templates/user.hbs b/app/assets/javascripts/discourse/app/templates/user.hbs index ba01ab343d0..6b73db4c03f 100644 --- a/app/assets/javascripts/discourse/app/templates/user.hbs +++ b/app/assets/javascripts/discourse/app/templates/user.hbs @@ -22,11 +22,15 @@ {{#if this.showStaffCounters}}
{{#if this.model.number_of_flags_given}} -
{{this.model.number_of_flags_given}}{{i18n - "user.staff_counters.flags_given" - }}
+
+ {{html-safe + (i18n + "user.staff_counters.flags_given" + className="helpful-flags" + count=this.model.number_of_flags_given + ) + }} +
{{/if}} {{#if this.model.number_of_flagged_posts}}
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index bbd01a2e0c8..3ba455d5e44 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1281,7 +1281,9 @@ en: staged: "Staged" staff_counters: - flags_given: "helpful flags" + flags_given: + one: '%{count} helpful flag' + other: '%{count} helpful flags' flagged_posts: "flagged posts" deleted_posts: "deleted posts" suspensions: "suspensions"