Merge pull request from techAPJ/patch-3

UX: add line break before time for post navigator
This commit is contained in:
Jeff Atwood 2014-08-30 13:26:28 -07:00
commit a0e47dae63
3 changed files with 6 additions and 4 deletions
app/assets/javascripts/discourse
config/locales

View file

@ -8,12 +8,12 @@ function entranceDate(dt, showTime) {
if (dt.getYear() === today.getYear()) { if (dt.getYear() === today.getYear()) {
// No year // No year
return moment(dt).format( return moment(dt).format(
showTime ? I18n.t("dates.long_date_without_year") : I18n.t("dates.long_no_year_no_time") showTime ? I18n.t("dates.long_date_without_year_with_linebreak") : I18n.t("dates.long_no_year_no_time")
); );
} }
return moment(dt).format( return moment(dt).format(
showTime ? I18n.t('dates.long_date_with_year') : I18n.t('dates.long_date_with_year_without_time') showTime ? I18n.t('dates.long_date_with_year_with_linebreak') : I18n.t('dates.long_date_with_year_without_time')
); );
} }

View file

@ -1,6 +1,6 @@
<button {{action enterTop}} class='btn full no-text jump-top'> <button {{action enterTop}} class='btn full no-text jump-top'>
<i class='fa fa-caret-up'></i> {{topDate}} <i class='fa fa-caret-up'></i> {{{topDate}}}
</button> </button>
<button {{action enterBottom}} class='btn full no-text jump-bottom'> <button {{action enterBottom}} class='btn full no-text jump-bottom'>
{{bottomDate}} <i class='fa fa-caret-down'></i> {{{bottomDate}}} <i class='fa fa-caret-down'></i>
</button> </button>

View file

@ -38,6 +38,8 @@ en:
long_date_with_year: "MMM D, 'YY LT" long_date_with_year: "MMM D, 'YY LT"
long_date_without_year: "MMM D, LT" long_date_without_year: "MMM D, LT"
long_date_with_year_without_time: "MMM D, 'YY" long_date_with_year_without_time: "MMM D, 'YY"
long_date_without_year_with_linebreak: "MMM D <br/>LT"
long_date_with_year_with_linebreak: "MMM D, 'YY <br/>LT"
tiny: tiny:
half_a_minute: "< 1m" half_a_minute: "< 1m"
less_than_x_seconds: less_than_x_seconds: