mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-05-03 01:15:48 -04:00
Merge pull request #3569 from gschlager/i18n
FEATURE: Make abbreviated numbers (k, M) localizable
This commit is contained in:
commit
c4b685469e
31 changed files with 183 additions and 4 deletions
app/assets/javascripts/discourse/lib
config/locales
client.ar.ymlclient.bs_BA.ymlclient.cs.ymlclient.da.ymlclient.de.ymlclient.en.ymlclient.es.ymlclient.fa_IR.ymlclient.fi.ymlclient.fr.ymlclient.he.ymlclient.id.ymlclient.it.ymlclient.ja.ymlclient.ko.ymlclient.nb_NO.ymlclient.nl.ymlclient.pl_PL.ymlclient.pt.ymlclient.pt_BR.ymlclient.ro.ymlclient.ru.ymlclient.sq.ymlclient.sv.ymlclient.te.ymlclient.tr_TR.ymlclient.uk.ymlclient.zh_CN.ymlclient.zh_TW.yml
test/javascripts/lib
|
@ -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'
|
||||||
|
@ -20,6 +23,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");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue