mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
Topic list dates formatting changes: use Dec '12 and Jan 21
This commit is contained in:
parent
946e837542
commit
b5d0031105
18 changed files with 35 additions and 16 deletions
|
@ -96,7 +96,7 @@ Discourse.Formatter = (function(){
|
|||
};
|
||||
|
||||
shortDateNoYear = function(date) {
|
||||
return moment(date).shortDateNoYear();
|
||||
return moment(date).format(I18n.t("dates.tiny.date_month"));
|
||||
};
|
||||
|
||||
tinyDateYear = function(date) {
|
||||
|
@ -261,7 +261,7 @@ Discourse.Formatter = (function(){
|
|||
if ((new Date()).getFullYear() !== date.getFullYear()) {
|
||||
displayDate = shortDate(date);
|
||||
} else {
|
||||
displayDate = moment(date).shortDateNoYear();
|
||||
displayDate = shortDateNoYear(date);
|
||||
}
|
||||
} else {
|
||||
displayDate = relativeAgeMediumSpan(distance, leaveAgo);
|
||||
|
|
|
@ -59,7 +59,8 @@ cs:
|
|||
one: "1r"
|
||||
few: "%{count}r"
|
||||
other: "%{count}let"
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1 minuta"
|
||||
|
|
|
@ -49,6 +49,8 @@ da:
|
|||
almost_x_years:
|
||||
one: "1å"
|
||||
other: "%{count}å"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1 min"
|
||||
|
|
|
@ -49,7 +49,8 @@ de:
|
|||
almost_x_years:
|
||||
one: "1J"
|
||||
other: "%{count}J"
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1 Minute"
|
||||
|
|
|
@ -49,7 +49,8 @@ en:
|
|||
almost_x_years:
|
||||
one: "1y"
|
||||
other: "%{count}y"
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1 min"
|
||||
|
|
|
@ -51,7 +51,8 @@ es:
|
|||
almost_x_years:
|
||||
one: "1a"
|
||||
other: "%{count}a"
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1 minuto"
|
||||
|
|
|
@ -53,7 +53,8 @@ fr:
|
|||
almost_x_years:
|
||||
one: "1y"
|
||||
other: "%{count}a"
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1 min"
|
||||
|
|
|
@ -49,7 +49,8 @@ it:
|
|||
almost_x_years:
|
||||
one: "1a"
|
||||
other: "%{count}a"
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1 minuto"
|
||||
|
|
|
@ -49,7 +49,8 @@ ja:
|
|||
almost_x_years:
|
||||
one: "1y"
|
||||
other: "%{count}y"
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1分"
|
||||
|
|
|
@ -50,6 +50,7 @@ ko:
|
|||
one: "거의 1년"
|
||||
other: "거의 %{count}년"
|
||||
date_year: "'YY M/D"
|
||||
date_month: "MMM D"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1분"
|
||||
|
|
|
@ -53,7 +53,8 @@ nl:
|
|||
almost_x_years:
|
||||
one: 1j
|
||||
other: "%{count}j"
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: 1 min
|
||||
|
|
|
@ -43,6 +43,8 @@ pseudo:
|
|||
almost_x_years:
|
||||
one: '[[ 1ý ]]'
|
||||
other: '[[ %{count}ý ]]'
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: '[[ 1 ɱíɳ ]]'
|
||||
|
|
|
@ -49,7 +49,8 @@ pt_BR:
|
|||
almost_x_years:
|
||||
one: "1y"
|
||||
other: "%{count}y"
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1 minuto"
|
||||
|
|
|
@ -72,7 +72,8 @@ ru:
|
|||
other: '%{count}лет'
|
||||
few: '%{count}лет'
|
||||
many: '%{count}лет'
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: '1 минута'
|
||||
|
|
|
@ -49,7 +49,8 @@ sv:
|
|||
almost_x_years:
|
||||
one: "1y"
|
||||
other: "%{count}y"
|
||||
date_year: "D MMM 'YY"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1 min"
|
||||
|
|
|
@ -49,6 +49,7 @@ zh_CN:
|
|||
almost_x_years:
|
||||
one: "1年"
|
||||
other: "%{count}年"
|
||||
date_month: "MMM-D"
|
||||
date_year: "YY-MM-D"
|
||||
medium:
|
||||
x_minutes:
|
||||
|
|
|
@ -49,6 +49,8 @@ zh_TW:
|
|||
almost_x_years:
|
||||
one: "1 年"
|
||||
other: "%{count} 年"
|
||||
date_month: "MMM D"
|
||||
date_year: "MMM 'YY"
|
||||
medium:
|
||||
x_minutes:
|
||||
one: "1 分鐘"
|
||||
|
|
|
@ -29,7 +29,7 @@ var formatDays = function(days) {
|
|||
};
|
||||
|
||||
var shortDate = function(days){
|
||||
return moment().subtract('days', days).format('D MMM');
|
||||
return moment().subtract('days', days).format('MMM D');
|
||||
};
|
||||
|
||||
test("formating medium length dates", function() {
|
||||
|
@ -65,7 +65,7 @@ test("formating medium length dates", function() {
|
|||
equal(strip(formatDays(4.85)), "4 days");
|
||||
|
||||
equal(strip(formatDays(6)), shortDate(6));
|
||||
equal(strip(formatDays(100)), shortDate(100)); // eg: 23 Jan
|
||||
equal(strip(formatDays(100)), shortDate(100)); // eg: Jan 23
|
||||
equal(strip(formatDays(500)), shortDateYear(500));
|
||||
|
||||
equal($(formatDays(0)).attr("title"), moment().format('MMMM D, YYYY h:mma'));
|
||||
|
@ -81,7 +81,7 @@ test("formating medium length dates", function() {
|
|||
|
||||
test("formating tiny dates", function() {
|
||||
var shortDateYear = function(days){
|
||||
return moment().subtract('days', days).format("D MMM 'YY");
|
||||
return moment().subtract('days', days).format("MMM 'YY");
|
||||
};
|
||||
|
||||
format = "tiny";
|
||||
|
|
Loading…
Reference in a new issue