Skip to content

A platform for community discussion. Free, open, simple.

FIX: staff_counters should be pluralized strings (#21039)

David Battersby569b923fb696
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}}
<div class="staff-counters">
{{#if this.model.number_of_flags_given}}
- <div><span
- class="helpful-flags"
- >{{this.model.number_of_flags_given}}</span>{{i18n
- "user.staff_counters.flags_given"
- }}</div>
+ <div>
+ {{html-safe
+ (i18n
+ "user.staff_counters.flags_given"
+ className="helpful-flags"
+ count=this.model.number_of_flags_given
+ )
+ }}
+ </div>
{{/if}}
{{#if this.model.number_of_flagged_posts}}
<div>
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: '<span class="%{className}">%{count}</span> helpful flag'
+ other: '<span class="%{className}">%{count}</span> helpful flags'
flagged_posts: "flagged posts"
deleted_posts: "deleted posts"
suspensions: "suspensions"