-
Notifications
You must be signed in to change notification settings - Fork 424
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
Changes from 3 commits
4fb24ff
d67ac2c
5ad4713
425710a
8061f5e
34728cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -237,34 +237,15 @@ public CheckCLDR handleCheck( | |
| } | ||
| } | ||
|
|
||
| // Check that symbols are for an explicit number system; | ||
| // note that symbols are skipped for checks after this point. | ||
| if (path.indexOf("/symbols") >= 0) { | ||
| XPathParts symbolParts = XPathParts.getFrozenInstance(path); | ||
| if (symbolParts.getAttributeValue(2, "numberSystem") == null) { | ||
| result.add( | ||
| new CheckStatus() | ||
| .setCause(this) | ||
| .setMainType(CheckStatus.errorType) | ||
| .setSubtype(Subtype.missingNumberingSystem) | ||
| .setMessage( | ||
| "Symbols must have an explicit numberSystem attribute.")); | ||
| } | ||
| } | ||
|
|
||
| // quick bail from all other cases (including symbols) | ||
| NumericType type = NumericType.getNumericType(path); | ||
| if (type == NumericType.NOT_NUMERIC || type == NumericType.RATIONAL) { | ||
| return this; // skip | ||
| } | ||
| XPathParts parts = XPathParts.getFrozenInstance(path); | ||
|
|
||
| // TODO: re-enable this commented-out check | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm. Rather than disable the following for all cases in order for currency to have it be optional, we probably want to just disable it for currency. Sorry, should have caught this earlier.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Done in the 6th commit |
||
| // Reference: https://unicode-org.atlassian.net/browse/CLDR-18722 | ||
| /* | ||
| // Check that number formats are for an explicit number system. | ||
| String numberSystem = parts.getAttributeValue(2, "numberSystem"); | ||
| if (numberSystem == null) { | ||
| if (!parts.containsAttribute("numberSystem")) { | ||
| result.add( | ||
| new CheckStatus() | ||
| .setCause(this) | ||
|
|
@@ -273,7 +254,6 @@ public CheckCLDR handleCheck( | |
| .setMessage( | ||
| "Number formats must have an explicit numberSystem attribute.")); | ||
| } | ||
| */ | ||
|
|
||
| // Do tests that need to split the values | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being dropped? We still want to ensure that .../symbols has a numberSystem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake! I confused this section with the one below that's deleted. I'll fix that now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by the 5th commit.