A platform for community discussion. Free, open, simple.
UX: Topic stats were hard to translate
Saurabh Patel49c3cf9c758a
diff --git a/app/assets/javascripts/discourse/models/category-list.js.es6 b/app/assets/javascripts/discourse/models/category-list.js.es6index 31aff951209..2b49a62b52e 100644--- a/app/assets/javascripts/discourse/models/category-list.js.es6+++ b/app/assets/javascripts/discourse/models/category-list.js.es6@@ -52,10 +52,14 @@ CategoryList.reopenClass({const unit = I18n.t(statPeriod);if (stat > 0) {c.stat = `<span class="value">${stat}</span> / <span class="unit">${unit}</span>`;- c.statTitle = I18n.t("categories.topic_stat_sentence", {- count: stat,- unit: unit- });++ c.statTitle = I18n.t(+ `categories.topic_stat_sentence_${statPeriod}`,+ {+ count: stat+ }+ );+c["pick" + statPeriod[0].toUpperCase() + statPeriod.slice(1)] = true;diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 3b7ec233ddd..b06270555dc 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -582,9 +582,12 @@ en:topic_sentence:one: "1 topic"other: "%{count} topics"- topic_stat_sentence:- one: "%{count} new topic in the past %{unit}."- other: "%{count} new topics in the past %{unit}."+ topic_stat_sentence_week:+ one: "%{count} new topic in the past week."+ other: "%{count} new topics in the past week."+ topic_stat_sentence_month:+ one: "%{count} new topic in the past month."+ other: "%{count} new topics in the past month."n_more: "Categories (%{count} more) ..."ip_lookup: