Open dolmen opened 2 years ago
CC @mpvl also.
I attempted to fix this, and spent rather more time learning about CLDR than I intended. Documenting what I found so far:
supplemental-temp
directory which needs to be handled in unicode/cldr.Decoder.Decode
.iana/assignments/language-subtag-registry
has an entry where the three letter language code adp
is deprecated in favor of dz
. This results in the generator getting confused (internal/language/gen.go#814) while generating the lang
table because it assumes a three-letter code is never deprecated in favor of a two-letter one. I think the fix is to generate this as adp\x00
.<parentLocale parent="en_IN" locales="hi_Latn"/>
<parentLocale parent="no" locales="nb nn"/>
This confuses writeParents
. I'm not sure what the correct fix for this is.
Still happens with latest code (golang.org/x/text
v0.6.0
) and data (cldr-common-42.0.zip
).
I found a workaround for my use case: use a DirFilter:
cldrDecoder.SetDirFilter("main", "supplemental")
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
golang.org/x/text v0.3.7
What did you do?
Using the latest CLDR release v41.0: http://unicode.org/Public/cldr/41/cldr-common-41.0.zip
Full code: https://github.com/blueboardio/cldr/blob/master/currency/currencies_gen.go#L73
What did you expect to see?
success.
(like with cldr-common-40.0.zip)
What did you see instead?
cldr-common-41.0.zip: supplemental-temp/coverageLevels2: missing identity element