From a8251b3036246490e478031ef21558765a7e3f04 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 19 May 2016 13:38:18 -0400 Subject: [PATCH] UX: Suppress "replies" when there are many replies in the timeline --- app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 | 3 ++- config/locales/client.en.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 b/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 index 71ce0c9f0af..97b69788c43 100644 --- a/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 +++ b/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 @@ -41,8 +41,9 @@ createWidget('timeline-scroller', { html(attrs) { const { current, total, date } = attrs; + const repliesKey = (total < 1000) ? 'replies' : 'replies_short'; const contents = [ - h('div.timeline-replies', I18n.t('topic.timeline.replies', { current, total })) + h('div.timeline-replies', I18n.t(`topic.timeline.${repliesKey}`, { current, total })) ]; if (date) { diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index ffd4f498da8..9e5463fdbb2 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1291,6 +1291,7 @@ en: timeline: replies: "%{current} / %{total} replies" + replies_short: "%{current} / %{total}" progress: title: topic progress