-
Notifications
You must be signed in to change notification settings - Fork 412
CLDR-18963 Allow numberSystem attribute for currency element #5205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
-Revise ldml.dtd to allow numberSystem attribute for currency element -Delete the (disabled) check for numberSystem in CheckNumbers.java
-Move numberSystem after draft
-Move numberSystem after references and validSubLocales
|
I think this PR is between essentially the same rock and hard place as the previous PR (#5149). Here we're adding numberSystem for currency not for pattern, but otherwise it's the same problem. Per testAttributeOrder status (distinguished before value before metadata), we need numberSystem (distinguished) before draft (metadata). See: But, per MergeLists, we need draft before numberSystem for consistency with, e.g., A most ingenious paradox. |
|
It is still good that we tripped across this in the first PR, because having (optional) numberSystem attributes for currency elements is the better structure. |
I've just tried that locally. Starting with The item to be added is The two metadata items to be moved are The test result is: That is: Meaning, I think, that MergeLists won't accept It would help if the algorithm and error reporting of MergeLists were less mysterious. Would it be worthwhile to add some comments and debugging output to make it unambiguous what A and B are in "cannot merge if we have [...A...B...] and [...B...A...]"? Here it seems A and B could be |
|
You can leave validSubLocales where it was. Since it is depreciated, it
doesn't matter.
…On Wed, Nov 26, 2025, 14:15 Tom Bishop ***@***.***> wrote:
*btangmu* left a comment (unicode-org/cldr#5205)
<#5205 (comment)>
move the @metadata <https://github.com/metadata> items (keeping their
same relative order) to the end of the items
I've just tried that locally. Starting with
<!ATTLIST currency type NMTOKEN "standard" >
***@***.***:validity/currency-->
<!ATTLIST currency alt NMTOKENS #IMPLIED >
***@***.***:literal/variant-->
<!ATTLIST currency draft (approved | contributed | provisional | unconfirmed | true | false) #IMPLIED >
***@***.***>
***@***.***>
<!ATTLIST currency references CDATA #IMPLIED >
***@***.***>
<!ATTLIST currency validSubLocales CDATA #IMPLIED >
***@***.***>
***@***.***>
The item to be added is
<!ATTLIST currency numberSystem CDATA #IMPLIED >
***@***.***:bcp47/nu-->
The two metadata items to be moved are draft and references. So I have
tried this:
<!ATTLIST currency type NMTOKEN "standard" >
***@***.***:validity/currency-->
<!ATTLIST currency alt NMTOKENS #IMPLIED >
***@***.***:literal/variant-->
<!ATTLIST currency validSubLocales CDATA #IMPLIED >
***@***.***>
***@***.***>
<!ATTLIST currency numberSystem CDATA #IMPLIED >
***@***.***:bcp47/nu-->
<!ATTLIST currency draft (approved | contributed | provisional | unconfirmed | true | false) #IMPLIED >
***@***.***>
***@***.***>
<!ATTLIST currency references CDATA #IMPLIED >
***@***.***>
The test result is:
java.lang.IllegalArgumentException: Inconsistent requested ordering: cannot merge if we have [...A...B...] and [...B...A...]: {references=[draft, references], standard=[draft, standard, references, validSubLocales], validSubLocales=[draft, standard, references, validSubLocales], numberSystem=[draft, validSubLocales, numberSystem], draft=[validSubLocales, numberSystem, draft, references]}
at org.unicode.cldr.util.MergeLists.merge(MergeLists.java:68)
That is:
references =[draft, references]
standard =[draft, standard, references, validSubLocales]
validSubLocales=[draft, standard, references, validSubLocales]
numberSystem =[draft, validSubLocales, numberSystem]
draft =[validSubLocales, numberSystem, draft, references]
Meaning, I think, that MergeLists won't accept validSubLocales before
draft since elsewhere there is validSubLocales after draft. Am I
understanding your instructions and the result correctly?
It would help if the algorithm and error reporting of MergeLists were less
mysterious. Would it be worthwhile to add some comments and debugging
output to make it unambiguous what A and B are in "cannot merge if we have
[...A...B...] and [...B...A...]"? Here it seems A and B could be
validSubLocales and draft, or draft and numberSystem, or references and
validSubLocales...
—
Reply to this email directly, view it on GitHub
<#5205 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJLEMDRR2UWSXNRUT6IN2T36YQ7HAVCNFSM6AAAAACNFQW2SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKOBTGM4DQOBYGE>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
-Revise ldml.dtd to allow numberSystem attribute for currency element
-Delete the (disabled) check for numberSystem in CheckNumbers.java
CLDR-18963
ALLOW_MANY_COMMITS=true