-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Localize all numbers in report renderer #3115
Comments
This is a good find :) this seems more like an issue with the node locale not matching the Chrome locale to me though. For the CLI, some of the numbers are converted into strings in node and others are put into the report as numbers and only turned into strings by the report renderer in the browser. The browser ones appear to be fine but the node ones are erroneously english due to the lack of node i18n support. |
Node doesn't have If anyone has a method to get the right locale in |
My point is that the in-browser strings are already being handled properly in the report and the fix is not to pass From MDN
|
Ah, missed that part reading over MDN's details. Thanks for pointing it out. |
p2 fix is forcing 'en-us'. |
mostly done! Moving over to #5719 for the rest. |
As a question on StackOverflow brings up, the number formatting within Lighthouse isn't locale specific. Currently
undefined
is passed as the locale which essentially translates to''
. As far as what happens from there I'm not too sure sifting through the ECMAScript specification.Either way, one solution for rendering it out properly would be to pass in the navigator's current locale if defined. So something like:
The text was updated successfully, but these errors were encountered: