mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: makes sure [999500..999999] is correctly shown as 999k
This commit is contained in:
parent
642c60c310
commit
6d4ff05cf0
2 changed files with 3 additions and 1 deletions
|
@ -311,7 +311,7 @@ export function number(val) {
|
|||
formattedNumber = I18n.toNumber(val / 1000000, {precision: 1});
|
||||
return I18n.t("number.short.millions", {number: formattedNumber});
|
||||
} else if (val > 99999) {
|
||||
formattedNumber = I18n.toNumber(val / 1000, {precision: 0});
|
||||
formattedNumber = I18n.toNumber(Math.floor(val / 1000), {precision: 0});
|
||||
return I18n.t("number.short.thousands", {number: formattedNumber});
|
||||
} else if (val > 999) {
|
||||
formattedNumber = I18n.toNumber(val / 1000, {precision: 1});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue