diff --git a/common/supplemental/likelySubtags.xml b/common/supplemental/likelySubtags.xml index 1cf6e396413..0f0ff297d8a 100644 --- a/common/supplemental/likelySubtags.xml +++ b/common/supplemental/likelySubtags.xml @@ -1,7 +1,7 @@ @@ -1346,7 +1346,7 @@ XXX Code for transations where no currency is involved - + @@ -1861,7 +1861,7 @@ XXX Code for transations where no currency is involved - + @@ -2073,7 +2073,7 @@ XXX Code for transations where no currency is involved - + @@ -2092,7 +2092,7 @@ XXX Code for transations where no currency is involved - + @@ -2165,7 +2165,7 @@ XXX Code for transations where no currency is involved - + @@ -2198,7 +2198,7 @@ XXX Code for transations where no currency is involved - + @@ -2425,7 +2425,7 @@ XXX Code for transations where no currency is involved - + diff --git a/common/testData/localeIdentifiers/likelySubtags.txt b/common/testData/localeIdentifiers/likelySubtags.txt index 3b1261d5247..cd9cfed8fc2 100644 --- a/common/testData/localeIdentifiers/likelySubtags.txt +++ b/common/testData/localeIdentifiers/likelySubtags.txt @@ -1,5 +1,5 @@ # Test data for Likely Subtags -# Copyright © 1991-2024 Unicode, Inc. +# Copyright © 1991-2025 Unicode, Inc. # For terms of use, see http://www.unicode.org/copyright.html # SPDX-License-Identifier: Unicode-3.0 # CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/) 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 b9cee165b2c..dfdc42a6b96 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 @@ -404,6 +404,7 @@ private static void writeNewBasicData2(PrintWriter out, Set sortedInput Set territories = status_territories == null ? null : status_territories.getAll(status); Map scriptsByPopulationAtThisLevel = new TreeMap<>(); + String likelyScript = supplementalData.getDefaultScript(languageSubtag); if (status_scripts != null) { Set scriptsAtThisLevel = status_scripts.getAll(status); if (scriptsAtThisLevel != null) { @@ -414,6 +415,16 @@ private static void writeNewBasicData2(PrintWriter out, Set sortedInput population = scriptsByPopulationAnyLevel.get(script); } scriptsByPopulationAtThisLevel.put(script, population); + + // Artifical add 1 billion population to the current likely subtag. + // This overrides the order for a few languages where there is a good + // reason for the likely subtag to not match the population. For + // instance, Azeribaijani's online presence is focused in Latin. This + // also orders the scripts when we don't have population data but have a + // distinct likely subtag. + if (script.equals(likelyScript)) { + scriptsByPopulationAtThisLevel.put(script, 1000000000); + } } } }