UX: Topic stats were hard to translate

This commit is contained in:
Saurabh Patel 2018-11-24 16:55:23 +05:30 committed by Gerhard Schlager
parent 851ef14096
commit 49c3cf9c75
2 changed files with 14 additions and 7 deletions

View File

@ -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;

View File

@ -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: