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

i18n: enable local debug locale, en-XL #9192

Merged
merged 6 commits into from
Jun 26, 2019
2 changes: 1 addition & 1 deletion lighthouse-core/lib/i18n/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function _formatIcuMessage(locale, icuMessageId, fallbackMessage, values) {
const messageForMessageFormat = localeMessage || fallbackMessage;
if (messageForMessageFormat === undefined) throw new Error(_ICUMsgNotFoundMsg);
// when using accented english, force the use of a different locale for number formatting
const localeForMessageFormat = locale === 'en-XA' ? 'de-DE' : locale;
const localeForMessageFormat = locale === 'en-XA' || locale === 'en-XL' ? 'de-DE' : locale;
exterkamp marked this conversation as resolved.
Show resolved Hide resolved
// pre-process values for the message format like KB and milliseconds
const valuesForMessageFormat = _preprocessMessageValues(messageForMessageFormat, values);

Expand Down
1 change: 1 addition & 0 deletions lighthouse-core/lib/i18n/locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const locales = {
'de': require('./locales/de.json'), // de-AT, de-CH identical, so they fall back into de
'el': require('./locales/el.json'),
'en-XA': require('./locales/en-XA.json'), // psuedolocalization
'en-XL': require('./locales/en-XL.json'), // local psuedolocalization
'es': require('./locales/es.json'),
'es-419': require('./locales/es-419.json'),
// Aliases of es-419: https://raw.githubusercontent.com/unicode-cldr/cldr-core/master/supplemental/parentLocales.json
Expand Down
Loading