mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Make numberFormat respect language and region settings
This commit is contained in:
parent
01fb40463d
commit
33bb381035
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue