From d8d1c7013e33701315087716dc809e8846f87ac8 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 24 May 2016 15:04:06 -0400 Subject: [PATCH] UX: Suppress date on on timeline for previous years --- app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 | 2 +- config/locales/client.en.yml | 1 + 2 files changed, 2 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 870353caceb..deb063e3bf8 100644 --- a/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 +++ b/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 @@ -48,7 +48,7 @@ createWidget('timeline-scroller', { if (date) { const format = (date.getFullYear() === new Date().getFullYear()) ? 'long_no_year_no_time' : - 'long_with_year_no_time'; + 'timeline_diff_year'; contents.push(h('div.timeline-ago', moment(date).format(I18n.t(`dates.${format}`)))); } diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 9e5463fdbb2..d5c19a624e1 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -37,6 +37,7 @@ en: dates: time: "h:mm a" timeline_start: "MMMM YYYY" + timeline_diff_year: "MMM YYYY" long_no_year: "MMM D h:mm a" long_no_year_no_time: "MMM D" full_no_year_no_time: "MMMM Do"