-
Notifications
You must be signed in to change notification settings - Fork 106
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
Editorial: Refactor Locale and Parameter Negotiation to better align with BCP 47 #871
Conversation
...in anticipation of improving AO names.
...in anticipation of improving AO names.
…te BCP 47 "lookup"
3f34988
to
6aac79e
Compare
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 love this -- much better documented than before. I've made some wording suggestions/tweaks, but otherwise I approve.
Co-authored-by: Ben Allen <[email protected]>
8902e11
to
069c5f3
Compare
@ben-allen Accepted the suggestions with a few tweaks. I'm ready to land as soon as you approve. |
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.
LGTM!
Best reviewed commit-by-commit.
RFC 4647 section 2.3 defines "language priority list" as "a prioritized or weighted list of language ranges", and corresponds to requestedLocales in various ECMA-402 operations.
RFC 4647 section 3 differentiates "matching schemes" applying such lists against available locales into "filtering" (producing zero or more matches) and "lookup" (producing exactly one match). Language Tags and Locale Identifiers for the World Wide Web reinforces their significance ("Specifications that define operations on language tags or locale values using matching MUST specify whether the resulting language priority list contains a single result (lookup as defined in [RFC 4647]), or a possible empty set of results (filtering as defined in [RFC 4647])").
This PR incorporates those terms and refactors the algorithms to better align with BCP 47, consolidating many of them and establishing clear entry points at ResolveLocale for lookup and FilterLocales (née SupportedLocales) and filtering.