Skip to content

Commit

Permalink
CLDR-17719 update v46 charts
Browse files Browse the repository at this point in the history
  • Loading branch information
macchiati committed Jun 12, 2024
1 parent 6252d0d commit 591f6a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<String> names = Iso639Data.getNames(languageCode);
if (names != null && names.size() != 0) {
Expand All @@ -1372,37 +1373,18 @@ private String getLanguageName(String languageCode) {
}

static final Set<Organization> 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
// "<p>" +
// "The following show default coverage goals for larger
// organizations. " +
// "<i>[n/a]</i> shows where there is no specific value for a
// given organization, " +
// "while <i>(...)</i> 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 "
// +
// "<a
// href='http://www.unicode.org/reports/tr35/#Coverage_Levels'>Appendix M: Coverage Levels</a>. " +
// +
// "</p>"
,
null));
null, "Coverage Goals", null, SUPPLEMENTAL_INDEX_ANCHORS));

TablePrinter tablePrinter =
new TablePrinter()
Expand Down Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 591f6a8

Please sign in to comment.