mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-12-23 14:03:35 +00:00
Merge pull request #1675 from thecashewtrader/number-format-respect-settings
Make numberFormat respect language and region settings
This commit is contained in:
commit
99c4d65864
@ -88,7 +88,12 @@ const mixin = {
|
||||
return str;
|
||||
},
|
||||
numberFormat(num) {
|
||||
const formatter = Intl.NumberFormat(undefined, { notation: "compact" });
|
||||
const formatter = Intl.NumberFormat(
|
||||
`${this.getPreferenceString("hl")}-${this.getPreferenceString("region")}`,
|
||||
{
|
||||
notation: "compact",
|
||||
},
|
||||
);
|
||||
return formatter.format(num);
|
||||
},
|
||||
addCommas(num) {
|
||||
|
Loading…
Reference in New Issue
Block a user