LocaleMatcher debugging #4105
Closed
jamiebuilds-signal
started this conversation in
Ideas
Replies: 1 comment
-
I've completely rewritten the language matching algo so this should be fixed now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've been using the polyfill for
Intl.LocaleMatcher
for a little bit and we've started discovering places where the matching could likely be improved. For example:For
pt-MZ
it would actually make more sense to match againstpt-PT
. And you wouldn't want to remappt-PT
to justpt
because then it would match for something likept-US
which should more commonly map topt-BR
.I'd like to upstream this to the CLDR dataset, but it's useful to know exactly how we got from
pt-MZ
topt-BR
. In this case, I know it's gone frompt-MZ -> pt -> pt-BR
, but sometimes you can get surprising results.It would be useful to be able to get a trace of why the
best fit
matching algorithm decided on a particular locale.I'm wondering if we could make a change to this library, and perhaps the TC39 proposal, to add some debugging facilities. Which could result in CLDR's dataset being improved further.
Beta Was this translation helpful? Give feedback.
All reactions