Closed juanperi closed 2 years ago
Thanks for the report and sorry for the inconvenience. Its a bug for sure, and its surfaced because of some changes to the underlying CLDR data. As of CLDR-14493 the RBNF data for locale "nb" was removed. This coincided with a change to the locale hierarchy in which "nb" became a child locale to "no" (where "child" is used in the sense of locale inheritance). It seems it has taken quite some time for that change to ripple through the JSON generator that ultimately produces the majority of the data that ex_cldr
uses.
TLDR; Yes, the RBNF data for "nb" has gone. However I suspect the intent is that the RBNF data for "no" is intended to be used.
Is is reasonable, from a language and linguistic point of view, that the RBNF rules for "no" are also appropriate and applicable for "nb"?
If I assume it is, then most definitely I am not applying any form of inheritance in resolving which RBNF rules to use. It will be a reasonably straight forward change to do so, but it will take a few days to be able to do that work.
@juanperi, as of commit 3ad972, RBNF locale name resolution now inherits from a parent locale if there is one (and the parent for "nb" is "no" which does have RBNF data). Commit 687fb5 regenerates the known language tags and adds a test.
All tests pass so I am ready to release ex_cldr
version 2.29.0
if you are comfortable that the RBNF for "no" is acceptable for locale "nb".
i think it is totally acceptable. in fact, i talked a couple of times with some translators asking if we should use no
directly. nobody could give me a direct answer 😂😃
btw man you were really fast at this. as always, thank you very much for your awesome work!
Turns out it wasn't that difficult to fix. But I greatly appreciate the encouragement, it really helps with motivation.
I have published ex_cldr version 2.29.0 with the following changelog entry:
Cldr.Plug.SetLocale
, Cldr.Plug.AcceptLanguage
and Cldr.Plug.PutSession
have been extracted to their own library, ex_cldr_plug. Therefore adding {:ex_cldr_plug, "~> 1.0"}
to the deps
of any application using these plugs is required.I'll leave this issue open for a little bit in case there is an issue I didn't find in testing.
Appreciate your collaboration!
in production already! working as expected!!
thank you very much!
have a nice day 😊
Great to hear, thanks for the feedback. Closing!
I've updated from 2.25.2 to 2.26.0, and suddenly I started seeing the following error for
nb
locale:This was not happening in the previous version, though, where I would get:
Is this a bug? or is it related to the upgrade to release 41 (Update CLDR to [release 41] as per the changelog) and it is expected that we might lose access to localized numbers after cldr releases update?
Thank you very much for your help figuring this out!!