mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 23:06:57 +08:00
UX: for numbers greater than 100k allow 0 precision
This commit is contained in:
parent
222fab1435
commit
04b8831cde
|
@ -310,8 +310,10 @@ export function number(val) {
|
|||
if (val > 999999) {
|
||||
formattedNumber = I18n.toNumber(val / 1000000, {precision: 1});
|
||||
return I18n.t("number.short.millions", {number: formattedNumber});
|
||||
}
|
||||
if (val > 999) {
|
||||
} else if (val > 99999) {
|
||||
formattedNumber = I18n.toNumber(val / 1000, {precision: 0});
|
||||
return I18n.t("number.short.thousands", {number: formattedNumber});
|
||||
} else if (val > 999) {
|
||||
formattedNumber = I18n.toNumber(val / 1000, {precision: 1});
|
||||
return I18n.t("number.short.thousands", {number: formattedNumber});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user