From 4cb48433233c7af196e9075ca3c6eb892c4e6852 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 27 Mar 2013 10:53:43 -0400 Subject: [PATCH] Includes post count in filter message by user --- .../javascripts/discourse/controllers/topic_controller.js | 5 ++++- config/locales/client.en.yml | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/topic_controller.js b/app/assets/javascripts/discourse/controllers/topic_controller.js index 935239f4997..a2d6c6757c5 100644 --- a/app/assets/javascripts/discourse/controllers/topic_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic_controller.js @@ -169,7 +169,10 @@ Discourse.TopicController = Discourse.ObjectController.extend({ posts_count: this.get('posts_count') })); } else if (postFilters.userFilters.length > 0) { - this.set('filterDesc', Em.String.i18n("topic.filters.user", {count: postFilters.userFilters.length})); + this.set('filterDesc', Em.String.i18n("topic.filters.user", { + filtered_posts_count: this.get('filtered_posts_count'), + count: postFilters.userFilters.length + })); } else { // Hide the bottom bar $('#topic-filter').slideUp(); diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index b49769b7ad4..22a3c8785a1 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -503,8 +503,8 @@ en: filters: user: - one: "You're viewing only posts by a specific user." - other: "You're viewing only posts made by specific users." + one: "You're viewing only {{filtered_posts_count}} posts by a specific user." + other: "You're viewing only {{filtered_posts_count}} posts made by {{count}} specific users." best_of: "You're viewing the {{filtered_posts_count}} best posts of {{posts_count}} in the topic." cancel: "Show all posts in this topic again."