From eaec79c98f975cfe8eb9041ad99d89a1aef164bb Mon Sep 17 00:00:00 2001 From: Conrad Nied Date: Wed, 22 Oct 2025 08:43:12 -0700 Subject: [PATCH] CLDR-18451 Update TerritoryInfo references after v48 changes https://unicode-org.atlassian.net/browse/CLDR-18451 --- docs/site/downloads/cldr-48.md | 6 ++---- .../java/org/unicode/cldr/tool/ConvertLanguageData.java | 6 ++++-- .../src/main/java/org/unicode/cldr/tool/ShowLanguages.java | 2 +- .../java/org/unicode/cldr/util/SupplementalDataInfo.java | 5 ++--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/site/downloads/cldr-48.md b/docs/site/downloads/cldr-48.md index 149be10f65f..cd38b1fb6da 100644 --- a/docs/site/downloads/cldr-48.md +++ b/docs/site/downloads/cldr-48.md @@ -25,9 +25,7 @@ This data is also a factor in determining which languages are supported on mobil Some of the most significant changes in this release are: - Updated for Unicode 17, including new names and search terms for new emoji, new sort-order, Han → Latin romanization additions for many characters. -- Many additions to language data including: - - Likely Subtags, for deriving the likely script and region from the language (used in many processes). - - Language populations in countries: significant updates to improve accuracy and maintainability. +- Many additions to language data supporting Likely Subtags, for deriving the likely script and region from the language (used in many processes). - Updated to the latest external standards and data sources, such as the language subtag registry, UN M49 macro regions, ISO 4217 currencies, etc. - New formatting options - Rational number formats added, allowing for formats like 5½. @@ -313,7 +311,7 @@ The following files are new in the release: ## Migration - Number patterns that did not have a specific numberSystem (such as `latn` or `arab`) had been deprecated for many releases, and were finally removed. -- Additionally, language and territory data in `languageData` and `territoryInfo` data received significant updates to improve accuracy and maintainability [CLDR-18087] +- Additionally, language and territory data in `languageData` and `territoryInfo` data received significant updates to improve accuracy and maintainability [CLDR-18087] In particular, the `territories` attribute in `languageData` was deprecated and removed, as it was unclear and prone to misunderstanding. Implementations that used this data may need to adjust accordingly, using `territoryInfo`. - The likely language for Belarus changed to Russian [CLDR-14479] - [Using Time Zone Names](https://www.unicode.org/reports/tr35/dev/tr35-dates.html#using-time-zone-names) Removed the "specific location format" and modified the fallback behavior of 'z'. - [Unit Identifier Normalization](https://www.unicode.org/reports/tr35/dev/#tr35-general.html) Modified the normalization process. diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ConvertLanguageData.java b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ConvertLanguageData.java index bacbbb11ddf..4dbc877d980 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ConvertLanguageData.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ConvertLanguageData.java @@ -352,14 +352,16 @@ private static void writeBasicLanguageData(PrintWriter out, Set sortedI TreeSet.class)); } if (languageInCountryData.officialStatus.isMajor()) { - // Output will look like + // This is no longer saved to output + // It used to appear like: status_territories.put( BasicLanguageData.Type.primary, languageInCountryData.countryCode); } else if (languageInCountryData.officialStatus.isOfficial() || languageInCountryData.getLanguagePopulation() >= cutoff * languageInCountryData.countryPopulation || languageInCountryData.getLanguagePopulation() >= 1000000) { - // Output will look like + // This is no longer saved to output + // It used to appear like: status_territories.put( BasicLanguageData.Type.secondary, languageInCountryData.countryCode); } diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowLanguages.java b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowLanguages.java index 808fe69ebfd..952dac191ac 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowLanguages.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowLanguages.java @@ -918,7 +918,7 @@ public LanguageInfo(Factory cldrFactory) throws IOException { ; // nothing else if ("secondary".equals(alt)) language += "*"; else language += "*" + alt; - // + // addTokens(language, attributes.get("territories"), " ", language_territories); continue; } 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 bac10114482..1d475ec488f 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 @@ -2456,10 +2456,9 @@ private void handleSubdivisionContainment(XPathValue parts) { private void handleLanguageData(XPathValue parts) { // - // - // + // String language = parts.getAttributeValue(2, "type"); BasicLanguageData languageData = new BasicLanguageData(); languageData.setType(