From 591f6a80aaa2f76a8b63977a75ee9a54434718db Mon Sep 17 00:00:00 2001 From: macchiati Date: Tue, 11 Jun 2024 18:30:55 -0700 Subject: [PATCH] CLDR-17719 update v46 charts --- .../org/unicode/cldr/tool/ShowLanguages.java | 42 ++++++------------- .../unicode/cldr/tool/ShowLocaleCoverage.java | 2 +- 2 files changed, 13 insertions(+), 31 deletions(-) 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 8433d9e72b1..06485590f02 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 @@ -8,9 +8,10 @@ import com.google.common.base.Joiner; import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; +import com.google.common.collect.Sets; import com.google.common.collect.TreeMultimap; import com.ibm.icu.impl.Relation; import com.ibm.icu.impl.Row.R2; @@ -1362,7 +1363,7 @@ private String getLanguagePluralMessage(String msg, String languageCode) { } private String getLanguageName(String languageCode) { - String result = english.getName(languageCode); + String result = english.getName(languageCode, true, CLDRFile.SHORT_ALTS); if (!result.equals(languageCode)) return result; Set names = Iso639Data.getNames(languageCode); if (names != null && names.size() != 0) { @@ -1372,37 +1373,18 @@ private String getLanguageName(String languageCode) { } static final Set TC_Vendors = - ImmutableSet.of( - Organization.apple, - Organization.google, - Organization.microsoft, - Organization.cldr); + Sets.union( + // this is a slightly odd construction, to add airbnb into the sorted items, + // but then end with cldr + ImmutableSortedSet.copyOf( + Sets.union(Organization.getTCOrgs(), Set.of(Organization.airbnb))), + Set.of(Organization.cldr)); private void showCoverageGoals(PrintWriter pw) throws IOException { PrintWriter pw2 = new PrintWriter( new FormattedFileWriter( - null, - "Coverage Goals", - null - // "

" + - // "The following show default coverage goals for larger - // organizations. " + - // "[n/a] shows where there is no specific value for a - // given organization, " + - // "while (...) indicates that the goal is inherited from - // the parent. " + - // "A * is added if the goal differs from the parent locale's - // goal. " + - // "For information on what these goals mean (comprehensive, - // modern, moderate,...), see the LDML specification " - // + - // "Appendix M: Coverage Levels. " + - // + - // "

" - , - null)); + null, "Coverage Goals", null, SUPPLEMENTAL_INDEX_ANCHORS)); TablePrinter tablePrinter = new TablePrinter() @@ -1461,8 +1443,8 @@ private void showCoverageGoals(PrintWriter pw) throws IOException { throw new IllegalArgumentException( "Should use canonical form: " + locale + " => " + alias); } - String baseLang = ltp.set(localeCode).getLanguage(); - String baseLangName = getLanguageName(baseLang); + // String baseLang = ltp.set(localeCode).getLanguage(); + String baseLangName = getLanguageName(localeCode); list.add("und".equals(localeCode) ? "other" : baseLangName); list.add(locale); int defaultVotes = diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowLocaleCoverage.java b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowLocaleCoverage.java index 01c700eadf5..34cad8853db 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowLocaleCoverage.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowLocaleCoverage.java @@ -887,7 +887,7 @@ private static void showCoverage( tablePrinter .addRow() .addCell(language) - .addCell(ENGLISH.getName(language)) + .addCell(ENGLISH.getName(language, true, CLDRFile.SHORT_ALTS)) .addCell(file.getName(language)) .addCell(script) .addCell(defRegion)