From 3456b97c6b89657b62bda2ea3389dd9dabc0e1b0 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 27 Oct 2021 11:31:42 -0500 Subject: [PATCH] CLDR-15022 json: split out PACKAGES.md and cldr-packages.json (#1563) - add a new packageDesc= value in the config.txt files to describe packages - pickup the description in package metadata - create a new top level PACKAGES.md that has a generated list of all packages - add npm badges to go to the npm packages - add, in cldr-core a cldr-packages.json with machine readable metadata on the package list - update cldr-json maintainer list --- .../unicode/cldr/json/Ldml2JsonConverter.java | 225 +++++++++++------- .../cldr/json/LdmlConfigFileReader.java | 122 ++++++++++ .../org/unicode/cldr/json/JSON_config.txt | 29 ++- .../cldr/json/JSON_config_annotations.txt | 2 +- .../json/JSON_config_annotationsDerived.txt | 2 +- .../unicode/cldr/json/JSON_config_bcp47.txt | 2 +- .../unicode/cldr/json/JSON_config_rbnf.txt | 2 +- .../cldr/json/JSON_config_segments.txt | 2 +- .../cldr/json/JSON_config_supplemental.txt | 1 + .../cldr/util/data/cldr-json-readme.md | 4 +- 10 files changed, 286 insertions(+), 105 deletions(-) create mode 100644 tools/cldr-code/src/main/java/org/unicode/cldr/json/LdmlConfigFileReader.java diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/json/Ldml2JsonConverter.java b/tools/cldr-code/src/main/java/org/unicode/cldr/json/Ldml2JsonConverter.java index e3ae7d5da92..5cc02d726f0 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/json/Ldml2JsonConverter.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/json/Ldml2JsonConverter.java @@ -41,7 +41,6 @@ import org.unicode.cldr.util.DtdType; import org.unicode.cldr.util.Factory; import org.unicode.cldr.util.FileCopier; -import org.unicode.cldr.util.FileProcessor; import org.unicode.cldr.util.Level; import org.unicode.cldr.util.LocaleIDParser; import org.unicode.cldr.util.Pair; @@ -80,7 +79,7 @@ public class Ldml2JsonConverter { private static final String MODERN_TIER_SUFFIX = "-modern"; private static Logger logger = Logger.getLogger(Ldml2JsonConverter.class.getName()); - private enum RunType { + enum RunType { all, main, supplemental(false, false), // aka 'core' @@ -157,6 +156,8 @@ private class AvailableLocales { "The minimum draft status of the output data") .add("coverage", 'l', "(minimal|basic|moderate|modern|comprehensive|optional)", "optional", "The maximum coverage level of the output data") + .add("packagelist", 'P', "(true|false)", "true", + "Whether to output PACKAGES.md and cldr-core/cldr-packages.json (during supplemental/cldr-core)") .add("fullnumbers", 'n', "(true|false)", "false", "Whether the output JSON should output data for all numbering systems, even those not used in the locale") .add("other", 'o', "(true|false)", "false", @@ -230,7 +231,7 @@ static void processType(final String runType) throws Exception { // Type of run for this converter: main, supplemental, or segments final private RunType type; - private class JSONSection implements Comparable { + static class JSONSection implements Comparable { public String section; public Pattern pattern; public String packageName; @@ -239,7 +240,6 @@ private class JSONSection implements Comparable { public int compareTo(JSONSection other) { return section.compareTo(other.section); } - } private Map dependencies; @@ -248,6 +248,7 @@ public int compareTo(JSONSection other) { final private String pkgVersion; final private boolean strictBcp47; final private boolean skipBcp47LocalesWithSubtags; + private LdmlConfigFileReader configFileReader; public Ldml2JsonConverter(String cldrDir, String outputDir, String runType, boolean fullNumbers, boolean resolve, String coverage, String match, boolean writePackages, String configFile, String pkgVersion, @@ -271,83 +272,11 @@ public Ldml2JsonConverter(String cldrDir, String outputDir, String runType, bool LdmlConvertRules.addVersionHandler(pkgVersion.split("\\.")[0]); - sections = new ArrayList<>(); - packages = new TreeSet<>(); - dependencies = new HashMap<>(); - - FileProcessor myReader = new FileProcessor() { - @Override - protected boolean handleLine(int lineCount, String line) { - String[] lineParts = line.trim().split("\\s*;\\s*"); - String key, value, section = null, path = null, packageName = null, dependency = null; - boolean hasSection = false; - boolean hasPath = false; - boolean hasPackage = false; - boolean hasDependency = false; - for (String linePart : lineParts) { - int pos = linePart.indexOf('='); - if (pos < 0) { - throw new IllegalArgumentException(); - } - key = linePart.substring(0, pos); - value = linePart.substring(pos + 1); - if (key.equals("section")) { - hasSection = true; - section = value; - } else if (key.equals("path")) { - hasPath = true; - path = value; - } else if (key.equals("package")) { - hasPackage = true; - packageName = value; - } else if (key.equals("dependency")) { - hasDependency = true; - dependency = value; - } - } - if (hasSection && hasPath) { - JSONSection j = new JSONSection(); - j.section = section; - j.pattern = PatternCache.get(path); - if (hasPackage) { - j.packageName = packageName; - } - sections.add(j); - } - if (hasDependency && hasPackage) { - dependencies.put(packageName, dependency); - } - return true; - } - }; - - if (configFile != null) { - myReader.process(configFile); - } else { - switch (type) { - case main: - myReader.process(Ldml2JsonConverter.class, "JSON_config.txt"); - break; - case supplemental: - myReader.process(Ldml2JsonConverter.class, "JSON_config_supplemental.txt"); - break; - case segments: - myReader.process(Ldml2JsonConverter.class, "JSON_config_segments.txt"); - break; - case rbnf: - myReader.process(Ldml2JsonConverter.class, "JSON_config_rbnf.txt"); - break; - default: - myReader.process(Ldml2JsonConverter.class, "JSON_config_" + type.name() + ".txt"); - } - } - - // Add a section at the end of the list that will match anything not already matched. - JSONSection j = new JSONSection(); - j.section = "other"; - j.pattern = PatternCache.get(".*"); - sections.add(j); - + configFileReader = new LdmlConfigFileReader(); + configFileReader.read(configFile, type); + this.dependencies = configFileReader.getDependencies(); + this.sections = configFileReader.getSections(); + this.packages = new TreeSet<>(); } /** @@ -1020,7 +949,24 @@ public void writePackagingFiles(String outputDir, String packageName) throws IOE } public void writeReadme(String outputDir, String packageName) throws IOException { + final String basePackageName = getBasePackageName(packageName); try (PrintWriter outf = FileUtilities.openUTF8Writer(outputDir + "/" + packageName, "README.md");) { + outf.println("# " + packageName); + outf.println(); + outf.println(configFileReader.getPackageDescriptions().get(basePackageName)); + outf.println(); + if (packageName.endsWith(FULL_TIER_SUFFIX)) { + outf.println("This package contains the complete set of locales, including what is in the `" + + CLDR_PKG_PREFIX + basePackageName + MODERN_TIER_SUFFIX + "` package."); + outf.println(); + } else if (packageName.endsWith(MODERN_TIER_SUFFIX)) { + outf.println("This package contains the set of locales listed as modern coverage. See also the `" + + CLDR_PKG_PREFIX + basePackageName + FULL_TIER_SUFFIX + "` package."); + outf.println(); + } + outf.println(); + outf.println(getNpmBadge(packageName)); + outf.println(); FileCopier.copy(CldrUtility.getUTF8Data("cldr-json-readme.md"), outf); } try (PrintWriter outf = FileUtilities.openUTF8Writer(outputDir + "/" + packageName, "LICENSE");) { @@ -1028,8 +974,20 @@ public void writeReadme(String outputDir, String packageName) throws IOException } } - public void writeBasicInfo(JsonObject obj, String packageName, boolean isNPM) { + String getBasePackageName(final String packageName) { + String basePackageName = packageName; + if (basePackageName.startsWith(CLDR_PKG_PREFIX)) { + basePackageName = basePackageName.substring(CLDR_PKG_PREFIX.length()); + } + if (basePackageName.endsWith(FULL_TIER_SUFFIX)) { + basePackageName = basePackageName.substring(0, basePackageName.length() - FULL_TIER_SUFFIX.length()); + } else if (basePackageName.endsWith(MODERN_TIER_SUFFIX)) { + basePackageName = basePackageName.substring(0, basePackageName.length() - MODERN_TIER_SUFFIX.length()); + } + return basePackageName; + } + public void writeBasicInfo(JsonObject obj, String packageName, boolean isNPM) { obj.addProperty("name", packageName); obj.addProperty("version", pkgVersion); @@ -1074,15 +1032,30 @@ public void writePackageJson(String outputDir, String packageName) throws IOExce JsonArray maintainers = new JsonArray(); JsonObject primaryMaintainer = new JsonObject(); + JsonObject secondaryMaintainer = new JsonObject(); + + final String basePackageName = getBasePackageName(packageName); + String description = configFileReader.getPackageDescriptions().get(basePackageName); + if (packageName.endsWith(FULL_TIER_SUFFIX)) { + description = description + " (complete)"; + } else if (packageName.endsWith(MODERN_TIER_SUFFIX)) { + description = description + " (modern coverage locales)"; + } + obj.addProperty("description", description); obj.addProperty("homepage", CLDRURLS.CLDR_HOMEPAGE); obj.addProperty("author", CLDRURLS.UNICODE_CONSORTIUM); - primaryMaintainer.addProperty("name", "John Emmons"); - primaryMaintainer.addProperty("email", "emmo@us.ibm.com"); - primaryMaintainer.addProperty("url", "https://github.com/JCEmmons"); + primaryMaintainer.addProperty("name", "Steven R. Loomis"); + primaryMaintainer.addProperty("email", "srloomis@unicode.org"); maintainers.add(primaryMaintainer); + + secondaryMaintainer.addProperty("name", "John Emmons"); + secondaryMaintainer.addProperty("email", "emmo@us.ibm.com"); + secondaryMaintainer.addProperty("url", "https://github.com/JCEmmons"); + + maintainers.add(secondaryMaintainer); obj.add("maintainers", maintainers); JsonObject repository = new JsonObject(); @@ -1162,6 +1135,85 @@ public void writeScriptMetadata(String outputDir) throws IOException { outf.close(); } + public void writePackageList(String outputDir) throws IOException { + PrintWriter outf = FileUtilities.openUTF8Writer(outputDir + "/cldr-core", "cldr-packages.json"); + System.out.println("Creating packaging metadata file => " + outputDir + File.separator + "cldr-core" + File.separator + "cldr-packages.json and PACKAGES.md"); + PrintWriter pkgs = FileUtilities.openUTF8Writer(outputDir + "/..", "PACKAGES.md"); + + pkgs.println("# CLDR JSON Packages"); + pkgs.println(); + + LdmlConfigFileReader uberReader = new LdmlConfigFileReader(); + + for (RunType r : RunType.values()) { + if (r == RunType.all) continue; + uberReader.read(null, r); + } + + TreeMap pkgsToDesc = new TreeMap<>(); + + JsonObject obj = new JsonObject(); + obj.addProperty("license", CLDRURLS.UNICODE_SPDX); + obj.addProperty("bugs", CLDRURLS.CLDR_NEWTICKET_URL); + obj.addProperty("homepage", CLDRURLS.CLDR_HOMEPAGE); + obj.addProperty("version", pkgVersion); + + JsonArray packages = new JsonArray(); + for(Map.Entry e : uberReader.getPackageDescriptions().entrySet()) { + final String baseName = e.getKey(); + + if (baseName.equals("IGNORE") || baseName.equals("cal")) continue; + if (baseName.equals("core") || baseName.equals("rbnf") || baseName.equals("bcp47")) { + JsonObject packageEntry = new JsonObject(); + packageEntry.addProperty("description", e.getValue()); + packageEntry.addProperty("name", CLDR_PKG_PREFIX + baseName); + packages.add(packageEntry); + pkgsToDesc.put(packageEntry.get("name").getAsString(), packageEntry.get("description").getAsString()); + } else { + { + JsonObject packageEntry = new JsonObject(); + packageEntry.addProperty("description", e.getValue() + " (full)"); + packageEntry.addProperty("tier", "full"); + packageEntry.addProperty("name", CLDR_PKG_PREFIX + baseName + FULL_TIER_SUFFIX); + packages.add(packageEntry); + pkgsToDesc.put(packageEntry.get("name").getAsString(), packageEntry.get("description").getAsString()); + } + { + JsonObject packageEntry = new JsonObject(); + packageEntry.addProperty("description", e.getValue() + " (modern only)"); + packageEntry.addProperty("tier", "modern"); + packageEntry.addProperty("name", CLDR_PKG_PREFIX + baseName + MODERN_TIER_SUFFIX); + packages.add(packageEntry); + pkgsToDesc.put(packageEntry.get("name").getAsString(), packageEntry.get("description").getAsString()); + } + } + } + pkgs.println(); + for (Map.Entry e : pkgsToDesc.entrySet()) { + pkgs.println("### [" + + e.getKey() + "](./cldr-json/" + e.getKey() + "/)"); + pkgs.println(); + pkgs.println(" - " + e.getValue()); + pkgs.println(" - " + getNpmBadge(e.getKey())); + pkgs.println(); + } + obj.add("packages", packages); + outf.println(gson.toJson(obj)); + outf.close(); + pkgs.println("## JSON Metadata"); + pkgs.println(); + pkgs.println("Package metadata is available at [`cldr-core`/cldr-packages.json](./cldr-json/cldr-core/cldr-packages.json)"); + pkgs.println(); + + FileCopier.copy(CldrUtility.getUTF8Data("cldr-json-readme.md"), pkgs); + pkgs.close(); + } + + private String getNpmBadge(final String packageName) { + return String.format("[![NPM version](https://img.shields.io/npm/v/%s.svg?style=flat)](https://www.npmjs.org/package/%s)", + packageName, packageName); + } + /** * Process the pending sorting items. * @@ -1667,6 +1719,9 @@ public void processDirectory(String dirName, DraftStatus minimalDraftStatus) writeAvailableLocales(outputDir); } else if (type == RunType.supplemental) { writeScriptMetadata(outputDir); + if (Boolean.parseBoolean(options.get("packagelist").getValue())) { + writePackageList(outputDir); + } } } diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/json/LdmlConfigFileReader.java b/tools/cldr-code/src/main/java/org/unicode/cldr/json/LdmlConfigFileReader.java new file mode 100644 index 00000000000..b5196d3bb6e --- /dev/null +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/json/LdmlConfigFileReader.java @@ -0,0 +1,122 @@ +package org.unicode.cldr.json; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +import org.unicode.cldr.json.Ldml2JsonConverter.JSONSection; +import org.unicode.cldr.json.Ldml2JsonConverter.RunType; +import org.unicode.cldr.util.FileProcessor; +import org.unicode.cldr.util.PatternCache; + +/** + * Reader for the JSON_config.txt type files + */ +public class LdmlConfigFileReader { + final List sections = new ArrayList(); + /** + * Map of package to description + */ + final Map packages = new TreeMap<>(); + final Map dependencies = new HashMap<>(); + + public List getSections() { + return sections; + } + + public Set getPackages() { + return packages.keySet(); + } + + public Map getPackageDescriptions() { + return packages; + } + + public Map getDependencies() { + return dependencies; + } + + public void read(final String configFile, final RunType type) { + FileProcessor myReader = new FileProcessor() { + @Override + protected boolean handleLine(int lineCount, String line) { + String[] lineParts = line.trim().split("\\s*;\\s*"); + String key, value, section = null, path = null, packageName = null, dependency = null; + String packageDesc = "A CLDR package with no packageDesc description."; + boolean hasSection = false; + boolean hasPath = false; + boolean hasPackage = false; + boolean hasDependency = false; + for (String linePart : lineParts) { + int pos = linePart.indexOf('='); + if (pos < 0) { + throw new IllegalArgumentException(); + } + key = linePart.substring(0, pos); + value = linePart.substring(pos + 1); + if (key.equals("section")) { + hasSection = true; + section = value; + } else if (key.equals("path")) { + hasPath = true; + path = value; + } else if (key.equals("package")) { + hasPackage = true; + packageName = value; + } else if (key.equals("packageDesc")) { + packageDesc = value; + } else if (key.equals("dependency")) { + hasDependency = true; + dependency = value; + } + } + if (hasSection && hasPath) { + JSONSection j = new JSONSection(); + j.section = section; + j.pattern = PatternCache.get(path); + if (hasPackage) { + j.packageName = packageName; + } + sections.add(j); + } + if (hasDependency && hasPackage) { + dependencies.put(packageName, dependency); + } + if (hasPackage) { + packages.putIfAbsent(packageName, packageDesc); + } + return true; + } + }; + + if (configFile != null) { + myReader.process(configFile); + } else { + switch (type) { + case main: + myReader.process(Ldml2JsonConverter.class, "JSON_config.txt"); + break; + case supplemental: + myReader.process(Ldml2JsonConverter.class, "JSON_config_supplemental.txt"); + break; + case segments: + myReader.process(Ldml2JsonConverter.class, "JSON_config_segments.txt"); + break; + case rbnf: + myReader.process(Ldml2JsonConverter.class, "JSON_config_rbnf.txt"); + break; + default: + myReader.process(Ldml2JsonConverter.class, "JSON_config_" + type.name() + ".txt"); + } + } + + // Add a section at the end of the list that will match anything not already matched. + JSONSection j = new JSONSection(); + j.section = "other"; + j.pattern = PatternCache.get(".*"); + sections.add(j); + } +} diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config.txt b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config.txt index 2f9274bba78..e9b1e805cdc 100644 --- a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config.txt +++ b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config.txt @@ -1,36 +1,39 @@ +package=localenames ; packageDesc=Translated versions of locale display name elements: languages, scripts, territories, and variants. section=languages ; path=//cldr/main/[^/]++/localeDisplayNames/languages/.* ; package=localenames section=scripts ; path=//cldr/main/[^/]++/localeDisplayNames/scripts/.* ; package=localenames section=territories ; path=//cldr/main/[^/]++/localeDisplayNames/territories/.* ; package=localenames section=variants ; path=//cldr/main/[^/]++/localeDisplayNames/variants/.* ; package=localenames section=transformNames ; path=//cldr/main/[^/]++/localeDisplayNames/transformNames/.* ; package=localenames -section=measurementSystemNames ; path=//cldr/main/[^/]++/localeDisplayNames/measurementSystemNames/.* ; package=units +section=measurementSystemNames ; path=//cldr/main/[^/]++/localeDisplayNames/measurementSystemNames/.* ; package=units ; packageDesc=Data for units formatting. section=localeDisplayNames ; path=//cldr/main/[^/]++/localeDisplayNames/.* ; package=localenames -section=contextTransforms ; path=//cldr/main/[^/]++/contextTransforms/.* ; package=misc +section=contextTransforms ; path=//cldr/main/[^/]++/contextTransforms/.* ; package=misc ; packageDesc=Other CLDR data not defined elsewhere section=layout ; path=//cldr/main/[^/]++/layout/.* ; package=misc section=characters ; path=//cldr/main/[^/]++/characters/.* ; package=misc section=typographic ; path=//cldr/main/[^/]++/typographicNames/.* ; package=misc section=characterLabels ; path=//cldr/main/[^/]++/characterLabel.*/.* ; package=misc section=delimiters ; path=//cldr/main/[^/]++/delimiters/.* ; package=misc -section=ca-buddhist ; path=//cldr/main/[^/]++/dates/calendars/buddhist/.* ; package=cal-buddhist -section=ca-chinese ; path=//cldr/main/[^/]++/dates/calendars/chinese/.* ; package=cal-chinese -section=ca-coptic ; path=//cldr/main/[^/]++/dates/calendars/coptic/.* ; package=cal-coptic -section=ca-dangi ; path=//cldr/main/[^/]++/dates/calendars/dangi/.* ; package=cal-dangi -section=ca-ethiopic ; path=//cldr/main/[^/]++/dates/calendars/ethiopic/.* ; package=cal-ethiopic +section=ca-buddhist ; path=//cldr/main/[^/]++/dates/calendars/buddhist/.* ; package=cal-buddhist ; packageDesc=CLDR data for Buddhist calendars. +section=ca-chinese ; path=//cldr/main/[^/]++/dates/calendars/chinese/.* ; package=cal-chinese ; packageDesc=CLDR data for Chinese calendars. +section=ca-coptic ; path=//cldr/main/[^/]++/dates/calendars/coptic/.* ; package=cal-coptic ; packageDesc=CLDR data for Coptic calendars. +section=ca-dangi ; path=//cldr/main/[^/]++/dates/calendars/dangi/.* ; package=cal-dangi ; packageDesc=CLDR data for Dangi calendars. +section=ca-ethiopic ; path=//cldr/main/[^/]++/dates/calendars/ethiopic/.* ; package=cal-ethiopic ; packageDesc=CLDR data for Ethiopic calendars. section=ca-ethiopic-amete-alem ; path=//cldr/main/[^/]++/dates/calendars/ethiopic-amete-alem/.* ; package=cal-ethiopic +package=dates ; packageDesc=Data for date/time formatting, including data for Gregorian calendar. section=ca-generic ; path=//cldr/main/[^/]++/dates/calendars/generic/.* ; package=dates section=ca-gregorian ; path=//cldr/main/[^/]++/dates/calendars/gregorian/.* ; package=dates -section=ca-hebrew ; path=//cldr/main/[^/]++/dates/calendars/hebrew/.* ; package=cal-hebrew -section=ca-indian ; path=//cldr/main/[^/]++/dates/calendars/indian/.* ; package=cal-indian -section=ca-islamic ; path=//cldr/main/[^/]++/dates/calendars/islamic/.* ; package=cal-islamic +section=ca-hebrew ; path=//cldr/main/[^/]++/dates/calendars/hebrew/.* ; package=cal-hebrew ; packageDesc=CLDR data for Hebrew calendars. +section=ca-indian ; path=//cldr/main/[^/]++/dates/calendars/indian/.* ; package=cal-indian ; packageDesc=CLDR data for Indian calendars. +section=ca-islamic ; path=//cldr/main/[^/]++/dates/calendars/islamic/.* ; package=cal-islamic ; packageDesc=CLDR data for Islamic calendars. section=ca-islamic-civil ; path=//cldr/main/[^/]++/dates/calendars/islamic-civil/.* ; package=cal-islamic section=ca-islamic-rgsa ; path=//cldr/main/[^/]++/dates/calendars/islamic-rgsa/.* ; package=cal-islamic section=ca-islamic-tbla ; path=//cldr/main/[^/]++/dates/calendars/islamic-tbla/.* ; package=cal-islamic section=ca-islamic-umalqura ; path=//cldr/main/[^/]++/dates/calendars/islamic-umalqura/.* ; package=cal-islamic -section=ca-japanese ; path=//cldr/main/[^/]++/dates/calendars/japanese/.* ; package=cal-japanese -section=ca-persian ; path=//cldr/main/[^/]++/dates/calendars/persian/.* ; package=cal-persian -section=ca-roc ; path=//cldr/main/[^/]++/dates/calendars/roc/.* ; package=cal-roc +section=ca-japanese ; path=//cldr/main/[^/]++/dates/calendars/japanese/.* ; package=cal-japanese ; packageDesc=CLDR data for Japanese calendars. +section=ca-persian ; path=//cldr/main/[^/]++/dates/calendars/persian/.* ; package=cal-persian ; packageDesc=CLDR data for Persian calendars. +section=ca-roc ; path=//cldr/main/[^/]++/dates/calendars/roc/.* ; package=cal-roc ; packageDesc=CLDR data for ROC calendars. section=dateFields ; path=//cldr/main/[^/]++/dates/fields/.* ; package=dates section=timeZoneNames ; path=//cldr/main/[^/]++/dates/timeZoneNames/.* ; package=dates +package=numbers ; packageDesc = Data for number formatting. section=currencies ; path=//cldr/main/[^/]++/numbers/currencies/.* ; package=numbers section=numbers ; path=//cldr/main/[^/]++/numbers/.* ; package=numbers section=units ; path=//cldr/main/[^/]++/units/.* ; package=units diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_annotations.txt b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_annotations.txt index 0dc61d69d49..9ad2d189815 100644 --- a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_annotations.txt +++ b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_annotations.txt @@ -1 +1 @@ -section=annotations ; path=//cldr/annotation.* ; package=annotations +section=annotations ; path=//cldr/annotation.* ; package=annotations ; packageDesc=Character annotation data diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_annotationsDerived.txt b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_annotationsDerived.txt index 316a34d0c60..54060a0a6d4 100644 --- a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_annotationsDerived.txt +++ b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_annotationsDerived.txt @@ -1 +1 @@ -section=annotations ; path=//cldr/annotation.* ; package=annotations-derived +section=annotations ; path=//cldr/annotation.* ; package=annotations-derived ; packageDesc=Character annotation data, including derived data. diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_bcp47.txt b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_bcp47.txt index d2884299670..76da595943a 100644 --- a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_bcp47.txt +++ b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_bcp47.txt @@ -1 +1 @@ -section=bcp47 ; path=//ldmlBCP47/keyword/[tu]/.* ; package=bcp47 \ No newline at end of file +section=bcp47 ; path=//ldmlBCP47/keyword/[tu]/.* ; package=bcp47 ; packageDesc=BCP 47 metadata \ No newline at end of file diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_rbnf.txt b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_rbnf.txt index 369548a0c70..b28a48c7ee6 100644 --- a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_rbnf.txt +++ b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_rbnf.txt @@ -1 +1 @@ -section=rbnf ; path=//cldr/rbnf/rbnf/.* ; package=rbnf \ No newline at end of file +section=rbnf ; path=//cldr/rbnf/rbnf/.* ; package=rbnf ; packageDesc=Rule Based Number Formatting data \ No newline at end of file diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_segments.txt b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_segments.txt index 2a73cf8eba2..f23244643cf 100644 --- a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_segments.txt +++ b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_segments.txt @@ -1,2 +1,2 @@ -section=suppressions ; path=//cldr/segments/segmentations/.* ; package=segments +section=suppressions ; path=//cldr/segments/segmentations/.* ; package=segments ; packageDesc=Text Segmentation data dependency=core ; package=segments diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_supplemental.txt b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_supplemental.txt index 5475c57ec76..19f039de441 100644 --- a/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_supplemental.txt +++ b/tools/cldr-code/src/main/resources/org/unicode/cldr/json/JSON_config_supplemental.txt @@ -1,3 +1,4 @@ +package=core ; packageDesc=Basic CLDR supplemental data section=characterFallbacks ; path=//cldr/supplemental/characters/.* ; package=core section=dayPeriods ; path=//cldr/supplemental/(dayPeriodRuleSet).* ; package=core section=gender ; path=//cldr/supplemental/gender/.* ; package=core diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/cldr-json-readme.md b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/cldr-json-readme.md index a4a471318b9..d1111842e1d 100644 --- a/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/cldr-json-readme.md +++ b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/cldr-json-readme.md @@ -1,6 +1,6 @@ -# cldr-json package +## General Info -This package is part of the JSON distribution of [CLDR](http://cldr.unicode.org/) +This is part of the JSON distribution of [CLDR](http://cldr.unicode.org/) locale data for internationalization For full details, please see