Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/dtd/ldml.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -2510,6 +2510,8 @@ CLDR data files are interpreted according to the LDML specification (http://unic
<!ATTLIST currency validSubLocales CDATA #IMPLIED >
<!--@VALUE-->
<!--@DEPRECATED-->
<!ATTLIST currency numberSystem CDATA #IMPLIED >
<!--@MATCH:bcp47/nu-->

<!ELEMENT symbol ( #PCDATA ) >
<!ATTLIST symbol choice (true | false) #IMPLIED >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,34 +237,15 @@ public CheckCLDR handleCheck(
}
}

// Check that symbols are for an explicit number system;
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

// 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
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just disable it for currency

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)
Expand All @@ -273,7 +254,6 @@ public CheckCLDR handleCheck(
.setMessage(
"Number formats must have an explicit numberSystem attribute."));
}
*/

// Do tests that need to split the values

Expand Down
Loading