Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-17726 make TestTransform.TestLocales less obscure #3803

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.unicode.cldr.draft.FileUtilities;
import org.unicode.cldr.tool.LikelySubtags;
import org.unicode.cldr.util.CLDRConfig;
Expand Down Expand Up @@ -860,6 +861,8 @@
CLDRTransforms.getInstance().registerModified();
}

Set<Pair<String, String>> badLocaleScript = new TreeSet<>();

for (String locale : modernCldr) {
if (special.contains(locale)) {
continue;
Expand Down Expand Up @@ -900,6 +903,7 @@
+ " code points:\n"
+ badPlusSample);
allMissing.addAll(badPlusSample);
badLocaleScript.add(Pair.of(locale, script));
}
}
if (!allMissing.isEmpty()) {
Expand All @@ -924,7 +928,12 @@
+ allMissing.dataSet.keySet());
for (String script : allMissing.scriptMissing.values()) {
UnicodeSet missingFoScript = allMissing.scriptMissing.getKeys(script);
String localeForScript =
badLocaleScript.stream()
.filter(p -> p.getSecond().equals((script)))
.map(p -> p.getFirst())
.collect(Collectors.joining(","));
errln(

Check failure on line 936 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestTransforms.java

View workflow job for this annotation

GitHub Actions / build

(TestTransforms.java:936) Error: Transliterator for Cyrl missing 4: [ҲҳҶҷ]=[\u04B2\u04B3\u04B6\u04B7] - needed for locales: tg
"Transliterator for\t"
+ script
+ "\tmissing\t"
Expand All @@ -932,7 +941,9 @@
+ ":\t"
+ missingFoScript.toPattern(false)
+ "="
+ missingFoScript);
+ missingFoScript
+ " - needed for locales: "
+ localeForScript);
}
}
}
Expand Down
Loading