Skip to content
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

Closed
13 of 36 tasks
paulirish opened this issue Feb 13, 2019 · 4 comments
Closed
13 of 36 tasks

Internationalization of Lighthouse (Phase 2) #7238

paulirish opened this issue Feb 13, 2019 · 4 comments
Assignees
Labels
i18n internationalization thangs P1.5

Comments

@paulirish
Copy link
Member

paulirish commented Feb 13, 2019

Picking up after #5719

Known work

finish complete l10n of lighthouse

ship it

  • [ ] ship l10n'd lighthouse to extension
  • ship l10n'd lighthouse in devtools audits panel
  • enable web.dev to use full l10n'd lhrs if they want

Plz add anything else here

@paulirish paulirish added the i18n internationalization thangs label Feb 13, 2019
@exterkamp
Copy link
Member

Added some things that are todo

@brendankenny
Copy link
Member

brendankenny commented Nov 17, 2019

Number.toLocaleString all numbers in report

Answer to this is
https://v8.dev/features/intl-numberformat#units

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.

@brendankenny
Copy link
Member

We should also investigate what of our ICU polyfills can be dropped now that nodejs/node#29522 has landed.

@connorjclark
Copy link
Collaborator

@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 swap locales logic in the report (done based on user locale initally, but also exposed via a setting within the report).

wins:

  • allows for the same report to be shared in multiple languages
  • allows for the user to easily override what the channel thought their preferred language was
  • would allow us to drop the RendererFormattedStrings in the proto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n internationalization thangs P1.5
Projects
None yet
Development

No branches or pull requests

5 participants