Repository navigation
CLDR-19943 Include explicit root numbering systems in cldr-json - #6304
Open
Manishearth wants to merge 1 commit into
Open
Manishearth wants to merge 1 commit into
Manishearth wants to merge 1 commit into
Conversation
Manishearth
marked this pull request as ready for review
December 4, 2026 01:01
Member
Author
|
r? @srl295 Not sure if this is the right place for the fix |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes CLDR-19943.
PR body and code is LLM generated:
common/main/root.xmldefines explicit non-alias elements forarab(<symbols>,<percentFormats>,<currencyFormats>) andarabext(<symbols>), while all other non-latnnumbering systems inroot.xmlare pure<alias>elements pointing tolatn. Becauseroot.xmlonly listslatnunder<defaultNumberingSystem>and<otherNumberingSystems>,Ldml2JsonConverter.getActiveNumberingSystemsonly returned["latn"]forroot. As a result,cldr-jsondroppedarabandarabextfromcldr-numbers-full/main/und/numbers.jsonwheneverfullNumbers=false, causing downstream consumers such as ICU4X to lose rootarab/arabextsymbols (e.g.,٫/٬foren-US-u-nu-arab).Changes:
Ldml2JsonConverter.getActiveNumberingSystems(CLDRFile)so that forroot(XMLSource.ROOT_ID), it also scans the unresolved//ldml/numbers/paths and includes any numbering system that has explicit non-alias data. This applies to bothLdml2JsonConverterandVerifyJson(which calls the same method), while leaving non-root locales unchanged so stray or legacy non-active numbering systems in other locales are not pulled in.Ldml2JsonConverterTestcoveringgetActiveNumberingSystemsforroot(resolved and unresolved) and non-root locales (en,ar,am), as well as end-to-end resolved JSON generation forroot.Sample generated
cldr-numbers-full/main/und/numbers.jsonexcerpt (withresolved=true,fullNumbers=false):Pure-alias numbering systems in
root.xml(such asadlm,beng,deva, etc.) remain excluded whenfullNumbers=false.Testing:
mvn test -pl cldr-code -Dtest="LdmlConvertRulesTest,Ldml2JsonConverterTest"Ldml2JsonConverter -t main -r true -p true -n false -m rootandVerifyJson -t main -m root, verifyingcldr-numbers-full/main/und/numbers.jsonand zero missing number values inVerifyJson.