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 32bf5429df7..bfe41b679e5 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 @@ -1386,6 +1386,10 @@ public void writePackageJson(String outputDir, String packageName) throws IOExce obj.addProperty("license", CLDRURLS.UNICODE_SPDX); obj.addProperty("bugs", CLDRURLS.CLDR_NEWTICKET_URL); + final SupplementalDataInfo sdi = CLDRConfig.getInstance().getSupplementalDataInfo(); + obj.addProperty("cldrVersion", sdi.getCldrVersionString()); + obj.addProperty("unicodeVersion", sdi.getUnicodeVersionString()); + outf.println(gson.toJson(obj)); outf.close(); } diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/util/SupplementalDataInfo.java b/tools/cldr-code/src/main/java/org/unicode/cldr/util/SupplementalDataInfo.java index b2bb5111875..a5aac3b40e5 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/util/SupplementalDataInfo.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/util/SupplementalDataInfo.java @@ -897,6 +897,9 @@ public enum RBNFGroup { private VersionInfo cldrVersion; + private String cldrVersionString = null; + private String unicodeVersion = null; + private Map territoryToPopulationData = new TreeMap<>(); private Map> territoryToLanguageToPopulationData = @@ -1325,7 +1328,9 @@ public void handlePathValue(String path, String value) { // old format version = parts.getAttributeValue(0, "version"); } + cldrVersionString = version; cldrVersion = VersionInfo.getInstance(version); + unicodeVersion = parts.getAttributeValue(1, "unicodeVersion"); } return; } @@ -4961,6 +4966,18 @@ public VersionInfo getCldrVersion() { return cldrVersion; } + public String getUnicodeVersionString() { + return unicodeVersion; + } + + public VersionInfo getUnicodeVersion() { + return VersionInfo.getInstance(getUnicodeVersionString()); + } + + public String getCldrVersionString() { + return cldrVersionString; + } + public File getDirectory() { return directory; }