Skip to content

Commit 2be4ca9

Browse files
author
Arjan Mels
committed
CLDR-11874 Add conversion of subdivisions to json
1 parent ed491cf commit 2be4ca9

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ enum RunType {
102102
annotations,
103103
annotationsDerived,
104104
bcp47(false, false),
105-
transforms(false, false);
105+
transforms(false, false),
106+
subdivisions(false, true);
106107

107108
private final boolean isTiered;
108109
private final boolean hasLocales;
@@ -748,6 +749,8 @@ private int convertCldrItems(
748749
outFilename = filename + ".json";
749750
} else if (type == RunType.transforms) {
750751
outFilename = filename + ".json";
752+
} else if (type == RunType.subdivisions) {
753+
outFilename = filename + ".json";
751754
} else if (js.section.equals("other")) {
752755
// If you see other-___.json, it means items that were missing from
753756
// JSON_config_*.txt
@@ -786,7 +789,8 @@ private int convertCldrItems(
786789
}
787790
} else if (type == RunType.rbnf
788791
|| type == RunType.bcp47
789-
|| type == RunType.transforms) {
792+
|| type == RunType.transforms
793+
|| type == RunType.subdivisions) {
790794
// untiered, just use the name
791795
js.packageName = type.name();
792796
tier = "";
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Processed by LdmlConfigFileReader
2+
3+
# These are earlier in the file to keep the packageDesc in one place.
4+
package=subdivisions ; packageDesc=Translated versions of locale display name elements: subdivisions.
5+
6+
# mapping paths to sections
7+
section=subdivisions ; path=//cldr/subdivisions/[^/]++/localeDisplayNames/subdivisions/.* ; package=subdivisions
8+
9+
# Depedencies
10+
dependency=core ; package=subdivisions

0 commit comments

Comments
 (0)