-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Locale nb not supported on Node versions >= 14.17.1 and <= 16.8.0 #45784
Comments
Node.js 14.17.1 updated to ICU 69.1. This is likely related to https://icu.unicode.org/design/norwegian-locales-changes-in-v39.
Node.js 16.9.0 did not update ICU, but it did update V8 -- I suspect there's a V8 change somewhere that handles a non-"root" parent. |
It seems safe to backport. FWIW this part of the code is still the same in V8's |
Opened #45785. |
I wonder if that is the cause why it only affected the |
Original commit message: [Intl] Fix nb / no fallback ICU 69 moved content of nb resources to no and let nb fallback to no. This break our original design of checking locale availability. Hard wire to check on no if nb fail for now until we come out with a better fix. Bug: chromium:1215606 Change-Id: I831529d29590cc643ee0109fb2ce8948dac75613 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3068010 Commit-Queue: Frank Tang <ftang@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/master@{#76044} Refs: v8/v8@d2db7fa PR-URL: #45785 Fixes: #45784 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Fixed in v14.21.2. |
On Node versions 14.17.1 and greater and versions 16.8.0 and smaller
Intl.NumberFormat.supportedLocalesOf('nb');
returns an empty array, indicating that thenb
locale (Norwegian bokmål) isn't supported. On other versions it correctly returns['nb']
.Not a problem for Node 16, but is still broken on the newest Node 14 version. From the changelogs of 16.9.0 I couldn't find anything that would be related to locales, so I cannot say what fixed it on Node 16. Nor from the 14.7.1 changelogs anything that might have broken it.
I also tested that the locale does not indeed exist, but instead default to the default locale (at least on my system it's
en-US
). Thus, this happens:while it should do, and does on, e.g., 14.17.0, 16.9.0, and 16.18.1:
The same also happens if I use a
nb-NO
locale string.nn
(Norwegian nynorsk) andnn-NO
do work.The text was updated successfully, but these errors were encountered: