From 5ab4c86252c061559213460cc007667ea164bd3a Mon Sep 17 00:00:00 2001 From: John Emmons Date: Wed, 22 Apr 2020 16:48:00 -0500 Subject: [PATCH] CLDR-13725 Skip units/grammaticalFeatures and add subdivisionAliases (#439) (cherry picked from commit f95e9995b3a35dcc799cedcc44ab3362825c5589) --- .../java/org/unicode/cldr/json/JSON_config_supplemental.txt | 3 +-- tools/java/org/unicode/cldr/json/LdmlConvertRules.java | 5 +++-- tools/java/org/unicode/cldr/util/CLDRFile.java | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/java/org/unicode/cldr/json/JSON_config_supplemental.txt b/tools/java/org/unicode/cldr/json/JSON_config_supplemental.txt index b0d862c9d58..6cd5b55c6c7 100644 --- a/tools/java/org/unicode/cldr/json/JSON_config_supplemental.txt +++ b/tools/java/org/unicode/cldr/json/JSON_config_supplemental.txt @@ -17,7 +17,6 @@ section=languageMatching ; path=//cldr/supplemental/languageMatching/.* ; packag section=territoryInfo ; path=//cldr/supplemental/territoryInfo/.* ; package=core section=calendarData ; path=//cldr/supplemental/calendarData/.* ; package=core section=calendarPreferenceData ; path=//cldr/supplemental/calendarPreferenceData/.* ; package=core -section=unitPreferenceData ; path=//cldr/supplemental/unitPreferenceData/.* ; package=core section=weekData ; path=//cldr/supplemental/weekData/.* ; package=core section=timeData ; path=//cldr/supplemental/timeData/.* ; package=core section=measurementData ; path=//cldr/supplemental/measurementData/.* ; package=core @@ -26,4 +25,4 @@ section=parentLocales ; path=//cldr/supplemental/parentLocales/.* ; package=core section=references ; path=//cldr/supplemental/references/.* ; package=core section=telephoneCodeData ; path=//cldr/supplemental/telephoneCodeData/.* ; package=core section=windowsZones ; path=//cldr/supplemental/windowsZones/.* ; package=core -section=aliases ; path=//cldr/supplemental/metadata/alias/(language|script|territory|variant|zone)Alias.* ; package=core +section=aliases ; path=//cldr/supplemental/metadata/alias/(language|script|subdivision|territory|variant|zone)Alias.* ; package=core diff --git a/tools/java/org/unicode/cldr/json/LdmlConvertRules.java b/tools/java/org/unicode/cldr/json/LdmlConvertRules.java index e0b58e4ba24..932b74fb17e 100644 --- a/tools/java/org/unicode/cldr/json/LdmlConvertRules.java +++ b/tools/java/org/unicode/cldr/json/LdmlConvertRules.java @@ -13,8 +13,8 @@ class LdmlConvertRules { /** File sets that will not be processed in JSON transformation. */ - public static final ImmutableSet IGNORE_FILE_SET = ImmutableSet.of("attributeValueValidity", "coverageLevels", "postalCodeData", "pluralRanges", - "subdivisions"); + public static final ImmutableSet IGNORE_FILE_SET = ImmutableSet.of("attributeValueValidity", "coverageLevels", "grammaticalFeatures", "postalCodeData", "pluralRanges", + "subdivisions", "units"); /** * The attribute list that should become part of the name in form of @@ -423,6 +423,7 @@ public static class PathTransformSpec { new PathTransformSpec("(.*/languageAlias)\\[@type=\"([^\"]*)\"\\](.*)", "$1/$2$3"), new PathTransformSpec("(.*/scriptAlias)\\[@type=\"([^\"]*)\"\\](.*)", "$1/$2$3"), new PathTransformSpec("(.*/territoryAlias)\\[@type=\"([^\"]*)\"\\](.*)", "$1/$2$3"), + new PathTransformSpec("(.*/subdivisionAlias)\\[@type=\"([^\"]*)\"\\](.*)", "$1/$2$3"), new PathTransformSpec("(.*/variantAlias)\\[@type=\"([^\"]*)\"\\](.*)", "$1/$2$3"), new PathTransformSpec("(.*/zoneAlias)\\[@type=\"([^\"]*)\"\\](.*)", "$1/$2$3"), new PathTransformSpec("(.*/alias)(.*)", "$1/alias$2"), diff --git a/tools/java/org/unicode/cldr/util/CLDRFile.java b/tools/java/org/unicode/cldr/util/CLDRFile.java index ae5850ab179..2bdae75f250 100644 --- a/tools/java/org/unicode/cldr/util/CLDRFile.java +++ b/tools/java/org/unicode/cldr/util/CLDRFile.java @@ -124,10 +124,9 @@ public class CLDRFile implements Freezable, Iterable { public static final String SUPPLEMENTAL_METADATA = "supplementalMetadata"; public static final String SUPPLEMENTAL_PREFIX = "supplemental"; public static final String GEN_VERSION = "37"; - public static final List SUPPLEMENTAL_NAMES = Arrays.asList("characters", "coverageLevels", "dayPeriods", "genderList", "languageInfo", + public static final List SUPPLEMENTAL_NAMES = Arrays.asList("characters", "coverageLevels", "dayPeriods", "genderList", "grammaticalFeatures", "languageInfo", "languageGroup", "likelySubtags", "metaZones", "numberingSystems", "ordinals", "plurals", "postalCodeData", "rgScope", "supplementalData", - "supplementalMetadata", - "telephoneCodeData", "windowsZones"); + "supplementalMetadata", "telephoneCodeData", "units", "windowsZones"); private Collection extraPaths = null;