Skip to content

Conversation

@brendankenny
Copy link
Contributor

@brendankenny brendankenny commented Jul 17, 2019

Node 12.6 is now calling 'mo' deprecated and gives 'ro' as the canonical version for me. mo is already an alias of ro, so that seems fine, but the canonical locale test needs to account for this or it will fail.

Also:

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// Map of deprecated codes to their canonical version. Depending on the ICU
// version used to run Lighthouse/this test, these *may* come back as their
// substitute, not themselves.
const deprecatedCodes = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on locales.js.. it looks like there's also these ones:

'bs': 'hr',
'ln': 'fr',
'nb': 'no',
'tl': 'fil',

this list is spelled out concretely somewhere in the CLDR, too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on locales.js.. it looks like there's also these ones:

the ICU in Chrome Canary (V8 7.7) and Node 12.6 (V8 7.5) stil have these as canonical locales. The intent of the test was just to double check that if someone asks for one of the locales we have strings for that they'll actually get it, and deprecatedCodes was to handle the awkward time when a locale is deprecated on the bleeding edge but not in our earliest supported Chrome/Node.

Since they aren't deprecated in the latest version of V8/Intl yet, and since the switch to deprecated is a nice trigger to double check our locales here, I think we should leave these out for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants