From e68e106be7a25b19fd739623d31828d176dddf41 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 10 Mar 2014 13:40:49 +1100 Subject: [PATCH] UI: we only intended to add the word "new" for new topics --- .../components/basic-topic-list.js.handlebars | 6 +++--- .../templates/discovery/categories.js.handlebars | 12 ++++++------ .../templates/list/topic_list_item.js.handlebars | 6 +++--- config/locales/client.en.yml | 5 +++++ 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/components/basic-topic-list.js.handlebars b/app/assets/javascripts/discourse/templates/components/basic-topic-list.js.handlebars index 45e45f3b4a5..76afb4705ae 100644 --- a/app/assets/javascripts/discourse/templates/components/basic-topic-list.js.handlebars +++ b/app/assets/javascripts/discourse/templates/components/basic-topic-list.js.handlebars @@ -30,13 +30,13 @@ {{topicStatus topic=topic}} {{{unbound topic.fancy_title}}} {{#if unread}} - {{unbound topic.unread}} {{i18n filters.unread.title.zero}} + {{unbound topic.unread}} {{/if}} {{#if topic.new_posts}} - {{unbound topic.new_posts}} {{i18n filters.new.title.zero}} + {{unbound topic.new_posts}} {{/if}} {{#if topic.unseen}} - {{i18n filters.new.title.zero}} + {{i18n filters.new.lower_title}} {{/if}} diff --git a/app/assets/javascripts/discourse/templates/discovery/categories.js.handlebars b/app/assets/javascripts/discourse/templates/discovery/categories.js.handlebars index 9bb46d4f14d..476d3ac66c1 100644 --- a/app/assets/javascripts/discourse/templates/discovery/categories.js.handlebars +++ b/app/assets/javascripts/discourse/templates/discovery/categories.js.handlebars @@ -20,10 +20,10 @@ {{#if controller.ordering}}{{/if}} {{categoryLink this allowUncategorized=true}} {{#if unreadTopics}} - {{unbound unreadTopics}} {{i18n filters.unread.title.zero}} + {{unbound unreadTopics}} {{/if}} {{#if newTopics}} - {{unbound newTopics}} {{i18n filters.new.title.zero}} + {{i18n filters.new.lower_title_with_count count="newTopics"}} {{/if}} @@ -59,13 +59,13 @@ {{topicStatus topic=this}} {{{unbound fancy_title}}} {{#if unread}} - {{unread}} {{i18n filters.unread.title.zero}} + {{unread}} {{/if}} {{#if new_posts}} - {{new_posts}} {{i18n filters.new.title.zero}} + {{new_posts}} {{/if}} {{#if unseen}} - {{i18n filters.new.title.zero}} + {{i18n filters.new.lower_title}} {{/if}} {{#if controller.latestTopicOnly}} diff --git a/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars b/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars index 79142de8ae3..168edfc8a11 100644 --- a/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars +++ b/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars @@ -14,13 +14,13 @@ {{topicStatus topic=this}} {{{topicLink this}}} {{#if unread}} - {{unread}} {{i18n filters.unread.title.zero}} + {{unread}} {{/if}} {{#if displayNewPosts}} - {{displayNewPosts}} {{i18n filters.new.title.zero}} + {{displayNewPosts}} {{/if}} {{#if unseen}} - {{i18n filters.new.title.zero}} + {{i18n filters.new.lower_title}} {{/if}} {{#if hasExcerpt}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 3dc89a9252f..b6697604656 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1177,6 +1177,11 @@ en: other: "Unread ({{count}})" help: "topics you are watching or tracking with unread posts" new: + lower_title_with_count: + zero: "" + one: "1 new" + other: "{{count}} new" + lower_title: "new" title: zero: "New" one: "New (1)"