-
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
core(i18n): incorporate 52 languages into messages pipeline #5781
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how important it is that the LH.Locale extern is updated, but.. it is.
that's good
Oops those were sizes before our 'minification' step. dist/scripts/lighthouse-background.js went from 349KB to 504KB.
you can't change the locale in the extension or devtools yet. Should we exclude from the bundle for now?
lighthouse-core/lib/locales/index.js
Outdated
'vi': require('./vi.json'), | ||
'zh-CN': require('./zh-CN.json'), | ||
'zh-HK': require('./zh-HK.json'), | ||
'zh-TW': require('./zh-TW.json'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on looking more, it seems like we should have a 'zh'
that uses 'zh-CN'
, but we can investigate more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wooooo!
@@ -64,6 +64,7 @@ function getFlags(manualArgv) { | |||
], | |||
'Configuration:') | |||
.describe({ | |||
// We don't allowlist specific locales. Why? So we can support the user who requests 'es-MX' (unsupported) and we'll fall back to 'es' (supported) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might want a command for listing available locales, but something for another day :)
picking up on #5780...
Overview
en-IE
, which we're treating like aen-GB
(eg. "Minimise" instead of "Minimize"). This makes sure these locales get localized number formatting and not american style.LH.Locale
extern is updated, but.. it is.FWIW:
Our bundle size forThere's a couple optimizations we could make to improve that.lighthouse-background
was 1.5MB before we started i18n. Once we had en-us/en-XA/ar-XB, it was 1.6MB. With all these locales, it's now 2.5MB.Oops those were sizes before our 'minification' step.
dist/scripts/lighthouse-background.js
went from 349KB to 504KB.