ruby-cldr
ruby-cldr copied to clipboard
Export is missing some subdivisions
Problem?
thor cldr:export --components=subdivisions is missing some subdivisions
In version 35, ruby-cldr exports a data/br/subdivisions.yml file. In v36+, it does not.
This is because the subdivisions have been moved from common/subdivisions/br.xml to common/main/br.xml.
Since ruby-cldr doesn't know about this other location, it drops the information.
Potential Solution?
Look in both locations for subdivision data?
From the spec:
data can be split across multiple files, which can be in multiple directory trees.
For example, the language-dependent data for Japanese in CLDR is present in the following files:
common/collation/ja.xml common/main/ja.xml common/rbnf/ja.xml common/segmentations/ja.xmlThe status of the data is the same, whether or not data is split. That is, for the purpose of validation and lookup, all of the data for the above ja.xml files is treated as if it was in a single file.
So ruby-cldr should be combining these files together before doing the lookup.
#98 is a necessary improvement, but not sufficient for solving this particular instance (br locale).
The <subdivisions> section of common/main/br.xml is being stripped from the output of the upstream CLDR build process for some reason, so it actually doesn't appear in cldr-staging and the releases. 🤔
Turns out that there is also a bug in the upstream CLDR build process: https://unicode-org.atlassian.net/browse/CLDR-15228.
Here's a PR to fix it: https://github.com/unicode-org/cldr/pull/1918