From 5ab2653ad03bfd2411a1b3dc794f40f5c9f16cd4 Mon Sep 17 00:00:00 2001 From: Mark Davis Date: Tue, 30 Jul 2024 13:01:19 -0700 Subject: [PATCH] CLDR-17544 Adjust tool to suppress Mn Ms differences (#3913) --- .../cldr/tool/ShowInconsistentAvailable.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowInconsistentAvailable.java b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowInconsistentAvailable.java index 4d15c043c8f..0ab5db231c1 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowInconsistentAvailable.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/ShowInconsistentAvailable.java @@ -42,9 +42,6 @@ import org.unicode.cldr.util.XPathParts; public class ShowInconsistentAvailable { - private static final boolean SHOW_ORDERING = true; - private static final boolean SHOW_ROOT = false; - private static final CLDRConfig CONFIG = CLDRConfig.getInstance(); static boolean INCLUDE_ERA = true; static boolean SHOW_PROGRESS_RAW = false; @@ -377,8 +374,22 @@ static void showInconsistenciesInLocale(String locale) { final SimplePattern skeletonSP = entry.getKey(); // if the multimap has multiple keys, then we have a problem // that means that similar skeletons map to dissimilar values - boolean inconsistentValues = entry.getValue().keySet().size() > 1; + final Set valueSet = entry.getValue().keySet(); + boolean inconsistentValues = valueSet.size() > 1; + + // allow Ms to match Mn, if all else equal + // common with Slavics + if (inconsistentValues) { + Set neuteredMonths = new TreeSet<>(); + for (SimplePattern p : valueSet) { + neuteredMonths.add(p.toString().replace("Mⁿ", "Mˢ")); + } + if (neuteredMonths.size() == 1) { + inconsistentValues = false; + } + } + // show the errors for (Entry> entry2 : entry.getValue().asMap().entrySet()) { final SimplePattern valueSP = entry2.getKey();