Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
PluralRanges data is not included in any npm package
Description
The data included in common/supplemental/pluralRanges.xml is not available in JSON format in any npm package. Most of the rest of the supplemental data is included in cldr-core, where I expected to find the plural-range data as well.
I'm working on a polyfill for the proposed selectRange JS method, which would benefit from having this data easily available.
@Mark Davis if you want to review an example output file from this, one is attached.
Eemeli Aro
October 18, 2020 at 9:59 AM
(edited)
I tried to hack at this myself, and found at least one reason why the plural-range data isn’t included in the JSON data: The current ldml2json rules use the concept of a “distinguishing attribute” when creating output, and the pluralRange nodes each have two distinguishing attributes, the start and end categories of the range. Adding plural ranges would require this concept to be extended to support multiple attributes.
This shows up as this error when plural ranges have otherwise been removed from LdmlConvertRules.IGNORE_FILE_SET and included in CLDRFile.SUPPLEMENTAL_NAMES & JSON_config_supplemental.txt.
Edit: Never mind, that’s actually already supported. Will be submitting a PR with the fix.
The data included in
common/supplemental/pluralRanges.xml
is not available in JSON format in any npm package. Most of the rest of the supplemental data is included incldr-core
, where I expected to find the plural-range data as well.I'm working on a polyfill for the proposed selectRange JS method, which would benefit from having this data easily available.