-
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
Internationalization of Lighthouse (Phase 2) #7238
Comments
Added some things that are todo |
Answer to this is const formatter = new Intl.NumberFormat('en', {
style: 'unit',
unit: 'kilobyte',
});
formatter.format(1.234); // en
// → '1.234 kB'
const formatter2 = new Intl.NumberFormat('ru', {style: 'unit', unit: 'kilobyte'})
formatter2.format(123.4); // ru
// → '123,4 кБ' Conveniently it's in V8 7.7, which is the version shipping with the new Node 12.13, which became the LTS release in October. When we switch to node 12 as the new minimum in the spring or whenever, we can start using that. |
We should also investigate what of our ICU polyfills can be dropped now that nodejs/node#29522 has landed. |
@exterkamp and I discussed a desire to move the localization into the report renderer. Involves the LHR strings always being english, bundling all the locales in the report renderer (we could look into code splitting too), and doing the wins:
|
Picking up after #5719
Known work
Number.toLocaleString
appears to always use'en-US'
- Travis failure)Intl.NumberFormat.supportedLocalesOf(['no', 'tl']) === []
, so even though we support those locales in translations they get the wrong (?) number formatting, plurals, etc by falling back to a default locale (en
, probably). Why do these in particular fail but all the others work?header metadataNumber.toLocaleString
all numbers in reportfinish complete l10n of lighthouse
audits/pwa
folderaudits/best-practices
lang
attribute report(i18n): setlang
attribute according to locale #5805proto
refactor i18n section. @past-shane you really messed this one up.ship it
[ ] ship l10n'd lighthouse to extensionPlz add anything else here
The text was updated successfully, but these errors were encountered: