You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposed solution:
Collect all numbers as string, and try to figure out the format from all of them before the actual parsing takes place (so if there is a single number where we know the format, we can apply it to the others)
If it contains two different separators, format is known
If it contains a single separator multiple times, format is known (the separator is for the thousand, which can be mapped to the fraction separator)
If it contains space, format is known (1 234,567)
If it contains a single separator once, and the number after the separator is not 3 digits long, it is a fraction separator
If we don't know the format we should not display a cost estimate as it could be way off.
Possible additional rules (needs checking):
If the data is bytes (kB, MB, etc.) it might contain only numbers from a specific range before showing it with the next SI prefix (1024 GB -> 1 TB)
If we figure out the locale (browser, or the page itself) we can fall back to the default format of that locale
Cost metrics that are above 1000 can be displayed in various ways, like
1 234,567
1.234,567
1,234.567
And it is not currently handled well.
The text was updated successfully, but these errors were encountered: