mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 01:03:41 +08:00
FEATURE: Make abbreviated numbers (k, M) localizable
- Make the decimal separator and thousands delimiter localizable - Add translations for all languages, otherwise this will look very ugly
This commit is contained in:
@ -258,14 +258,18 @@ relativeAge = function(date, options) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var number = function(val) {
|
var number = function(val) {
|
||||||
|
var formattedNumber;
|
||||||
|
|
||||||
val = parseInt(val, 10);
|
val = parseInt(val, 10);
|
||||||
if (isNaN(val)) val = 0;
|
if (isNaN(val)) val = 0;
|
||||||
|
|
||||||
if (val > 999999) {
|
if (val > 999999) {
|
||||||
return (val / 1000000).toFixed(1) + "M";
|
formattedNumber = I18n.toNumber(val / 1000000, {precision: 1});
|
||||||
|
return I18n.t("number.short.millions", {number: formattedNumber});
|
||||||
}
|
}
|
||||||
if (val > 999) {
|
if (val > 999) {
|
||||||
return (val / 1000).toFixed(1) + "K";
|
formattedNumber = I18n.toNumber(val / 1000, {precision: 1});
|
||||||
|
return I18n.t("number.short.thousands", {number: formattedNumber});
|
||||||
}
|
}
|
||||||
return val.toString();
|
return val.toString();
|
||||||
};
|
};
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
ar:
|
ar:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -23,6 +26,9 @@ ar:
|
|||||||
kb: كيلو بايت
|
kb: كيلو بايت
|
||||||
mb: ميجا
|
mb: ميجا
|
||||||
tb: تيرا
|
tb: تيرا
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
bs_BA:
|
bs_BA:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -16,6 +19,9 @@ bs_BA:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
cs:
|
cs:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -20,6 +23,9 @@ cs:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
da:
|
da:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ da:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
de:
|
de:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: ","
|
||||||
|
delimiter: "."
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ de:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "HH:mm"
|
time: "HH:mm"
|
||||||
long_no_year: "DD. MMM HH:mm"
|
long_no_year: "DD. MMM HH:mm"
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
en:
|
en:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -29,6 +32,9 @@ en:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
es:
|
es:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ es:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
fa_IR:
|
fa_IR:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -18,6 +21,9 @@ fa_IR:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
fi:
|
fi:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ fi:
|
|||||||
kb: Kt
|
kb: Kt
|
||||||
mb: Mt
|
mb: Mt
|
||||||
tb: Tt
|
tb: Tt
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "H:mm"
|
time: "H:mm"
|
||||||
long_no_year: "D. MMMM[ta] H:mm"
|
long_no_year: "D. MMMM[ta] H:mm"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
fr:
|
fr:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ fr:
|
|||||||
kb: Ko
|
kb: Ko
|
||||||
mb: Mo
|
mb: Mo
|
||||||
tb: To
|
tb: To
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "H:mm"
|
time: "H:mm"
|
||||||
long_no_year: "DD MMM H:mm"
|
long_no_year: "DD MMM H:mm"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
he:
|
he:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ he:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
id:
|
id:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -18,6 +21,9 @@ id:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "j:mm a"
|
time: "j:mm a"
|
||||||
long_no_year: "BBB H j:mm a"
|
long_no_year: "BBB H j:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
it:
|
it:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ it:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "D MMM h:mm a"
|
long_no_year: "D MMM h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
ja:
|
ja:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -18,6 +21,9 @@ ja:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
ko:
|
ko:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -18,6 +21,9 @@ ko:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "a h:mm"
|
time: "a h:mm"
|
||||||
long_no_year: "MMM D a h:mm "
|
long_no_year: "MMM D a h:mm "
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
nb_NO:
|
nb_NO:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ nb_NO:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "D MMM h:mm a"
|
long_no_year: "D MMM h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
nl:
|
nl:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ nl:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
pl_PL:
|
pl_PL:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -20,6 +23,9 @@ pl_PL:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "H:mm"
|
time: "H:mm"
|
||||||
long_no_year: "D MMM H:mm"
|
long_no_year: "D MMM H:mm"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
pt:
|
pt:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ pt:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "hh:mm"
|
time: "hh:mm"
|
||||||
long_no_year: "DD MMM hh:mm"
|
long_no_year: "DD MMM hh:mm"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
pt_BR:
|
pt_BR:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ pt_BR:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
ro:
|
ro:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -20,6 +23,9 @@ ro:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "HH:mm"
|
time: "HH:mm"
|
||||||
long_no_year: "DD MMM HH:mm"
|
long_no_year: "DD MMM HH:mm"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
ru:
|
ru:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -21,6 +24,9 @@ ru:
|
|||||||
kb: КБ
|
kb: КБ
|
||||||
mb: МБ
|
mb: МБ
|
||||||
tb: ТБ
|
tb: ТБ
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}тыс."
|
||||||
|
millions: "{{number}}млн"
|
||||||
dates:
|
dates:
|
||||||
time: "HH:mm"
|
time: "HH:mm"
|
||||||
long_no_year: "D MMM HH:mm"
|
long_no_year: "D MMM HH:mm"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
sq:
|
sq:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ sq:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
sv:
|
sv:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ sv:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
te:
|
te:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -19,6 +22,9 @@ te:
|
|||||||
kb: కేబీ
|
kb: కేబీ
|
||||||
mb: యంబీ
|
mb: యంబీ
|
||||||
tb: టీబీ
|
tb: టీబీ
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
tr_TR:
|
tr_TR:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -18,6 +21,9 @@ tr_TR:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
long_no_year: "D MMM h:mm a"
|
long_no_year: "D MMM h:mm a"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
uk:
|
uk:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -20,6 +23,9 @@ uk:
|
|||||||
kb: КБ
|
kb: КБ
|
||||||
mb: МБ
|
mb: МБ
|
||||||
tb: ТБ
|
tb: ТБ
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "HH:mm"
|
time: "HH:mm"
|
||||||
tiny:
|
tiny:
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
zh_CN:
|
zh_CN:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -18,6 +21,9 @@ zh_CN:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "ah:mm"
|
time: "ah:mm"
|
||||||
long_no_year: "MMMDoah:mm"
|
long_no_year: "MMMDoah:mm"
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
zh_TW:
|
zh_TW:
|
||||||
js:
|
js:
|
||||||
number:
|
number:
|
||||||
|
format:
|
||||||
|
separator: "."
|
||||||
|
delimiter: ","
|
||||||
human:
|
human:
|
||||||
storage_units:
|
storage_units:
|
||||||
format: '%n %u'
|
format: '%n %u'
|
||||||
@ -18,6 +21,9 @@ zh_TW:
|
|||||||
kb: KB
|
kb: KB
|
||||||
mb: MB
|
mb: MB
|
||||||
tb: TB
|
tb: TB
|
||||||
|
short:
|
||||||
|
thousands: "{{number}}k"
|
||||||
|
millions: "{{number}}M"
|
||||||
dates:
|
dates:
|
||||||
time: "h:mm"
|
time: "h:mm"
|
||||||
long_no_year: "MMM D h:mm a"
|
long_no_year: "MMM D h:mm a"
|
||||||
|
@ -203,6 +203,7 @@ test("breakUp", function(){
|
|||||||
test("number", function() {
|
test("number", function() {
|
||||||
equal(Discourse.Formatter.number(123), "123", "it returns a string version of the number");
|
equal(Discourse.Formatter.number(123), "123", "it returns a string version of the number");
|
||||||
equal(Discourse.Formatter.number("123"), "123", "it works with a string command");
|
equal(Discourse.Formatter.number("123"), "123", "it works with a string command");
|
||||||
equal(Discourse.Formatter.number(NaN), "0", "it reeturns 0 for NaN");
|
equal(Discourse.Formatter.number(NaN), "0", "it returns 0 for NaN");
|
||||||
equal(Discourse.Formatter.number(3333), "3.3K", "it abbreviates thousands");
|
equal(Discourse.Formatter.number(3333), "3.3k", "it abbreviates thousands");
|
||||||
|
equal(Discourse.Formatter.number(2499999), "2.5M", "it abbreviates millions");
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user