Skip to content

Commit d1cef83

Browse files
authored
CLDR-18956 json: rbnf: for now just skip the 'new' format content (#5047)
1 parent 8b3718c commit d1cef83

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

tools/cldr-code/src/main/java/org/unicode/cldr/json/CldrItem.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,10 @@ public int compareTo(CldrItem otherItem) {
385385
}
386386

387387
void adjustRbnfPath() {
388+
if (getFullPath().contains("/rbnfRules")) {
389+
System.err.println("TODO CLDR-18956: skipping NEW rules.");
390+
return;
391+
}
388392
XPathParts xpp = XPathParts.getFrozenInstance(getFullPath());
389393
final String sub = xpp.findAttributeValue("rbnfrule", "value");
390394
if (sub != null) {

tools/cldr-code/src/main/java/org/unicode/cldr/json/Ldml2JsonConverter.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,8 @@ private int convertCldrItems(
759759
} else {
760760
outFilename = js.section + ".json";
761761
}
762+
final String location = filename + " section " + js.packageName + "/" + js.section;
763+
762764
String tier = "";
763765
boolean writeOther = Boolean.parseBoolean(options.get("other").getValue());
764766
if (js.section.equals("other") && !writeOther) {
@@ -864,16 +866,18 @@ private int convertCldrItems(
864866
String previousIdentityPath = null;
865867
for (CldrItem item : theItems) {
866868
if (item.getPath().isEmpty()) {
867-
throw new IllegalArgumentException(
868-
"empty xpath in "
869-
+ filename
870-
+ " section "
871-
+ js.packageName
872-
+ "/"
873-
+ js.section);
869+
throw new IllegalArgumentException("empty xpath in " + location);
874870
}
875871
if (type == RunType.rbnf) {
876-
item.adjustRbnfPath();
872+
if (item.getFullPath().contains("/rbnfRules")) {
873+
System.err.println("TODO CLDR-18956: skipping NEW rules.");
874+
continue;
875+
}
876+
try {
877+
item.adjustRbnfPath();
878+
} catch (Throwable t) {
879+
throw new RuntimeException(location + ": " + item.getPath(), t);
880+
}
877881
}
878882

879883
// items in the identity section of a file should only ever contain the

0 commit comments

Comments
 (0)