diff --git a/app/assets/javascripts/discourse/models/category.js b/app/assets/javascripts/discourse/models/category.js index d377df6f74f..fd517a64ece 100644 --- a/app/assets/javascripts/discourse/models/category.js +++ b/app/assets/javascripts/discourse/models/category.js @@ -136,12 +136,20 @@ Discourse.Category = Discourse.Model.extend({ return this.get('topicTrackingState').countNew(this.get('name')); }.property('topicTrackingState.messageCount'), - totalTopicsTitle: function() { - return I18n.t('categories.total_topics', {count: this.get('topic_count')}); + topicStatsTitle: function() { + var string = I18n.t('categories.topic_stats'); + _.each(this.get('topicCountStats'), function(stat) { + string += ' ' + I18n.t('categories.topic_stat_sentence', {count: stat.value, unit: stat.unit}); + }, this); + return string; }.property('post_count'), - totalPostsTitle: function() { - return I18n.t('categories.total_posts', {count: this.get('post_count')}); + postStatsTitle: function() { + var string = I18n.t('categories.post_stats'); + _.each(this.get('postCountStats'), function(stat) { + string += ' ' + I18n.t('categories.post_stat_sentence', {count: stat.value, unit: stat.unit}); + }, this); + return string; }.property('post_count'), topicCountStats: function() { diff --git a/app/assets/javascripts/discourse/templates/list/wide_categories.js.handlebars b/app/assets/javascripts/discourse/templates/list/wide_categories.js.handlebars index 78c978bafa6..8046105de2f 100644 --- a/app/assets/javascripts/discourse/templates/list/wide_categories.js.handlebars +++ b/app/assets/javascripts/discourse/templates/list/wide_categories.js.handlebars @@ -79,7 +79,7 @@ {{/each}} - + {{#each topicCountStats}} @@ -89,7 +89,7 @@ {{/each}}
- + {{#each postCountStats}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 681526b103b..16ec9422e93 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -188,14 +188,20 @@ en: all_subcategories: "all subcategories" no_subcategory: "no subcategory" category: "Category" - posts: "Posts" - topics: "Topics" + posts: "New Posts" + topics: "New Topics" latest: "Latest" latest_by: "latest by" toggle_ordering: "toggle ordering control" subcategories: "Subcategories:" - total_topics: "Total topics: %{count}" - total_posts: "Total posts: %{count}" + topic_stats: "The number of new topics." + topic_stat_sentence: + one: "%{count} new topic in the past %{unit}." + other: "%{count} new topics in the past %{unit}." + post_stats: "The number of new posts." + post_stat_sentence: + one: "%{count} new post in the past %{unit}." + other: "%{count} new posts in the past %{unit}." user: said: "{{username}} said:"