From a47a99383c36180637651a4241011e315f801cf6 Mon Sep 17 00:00:00 2001 From: macchiati Date: Mon, 29 Jul 2024 00:28:13 +0000 Subject: [PATCH] CLDR-17544 Adjust tool to suppress Mn Ms differences See #3913 --- common/dtd/ldml.dtd | 4 ++-- common/main/en_ZA.xml | 15 +++++++++++++-- .../cldr/tool/ShowInconsistentAvailable.java | 19 +++++++++++++++---- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/common/dtd/ldml.dtd b/common/dtd/ldml.dtd index 32bbd81e30d..2b506607c48 100644 --- a/common/dtd/ldml.dtd +++ b/common/dtd/ldml.dtd @@ -2042,7 +2042,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic - + @@ -2053,7 +2053,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic - + diff --git a/common/main/en_ZA.xml b/common/main/en_ZA.xml index f21d9ecdf64..db9b00e6880 100644 --- a/common/main/en_ZA.xml +++ b/common/main/en_ZA.xml @@ -238,9 +238,20 @@ CLDR data files are interpreted according to the LDML specification (http://unic - ↑↑↑ - ↑↑↑ + , + , + . +   +   + , + + + + ¤#,##0.00 + + + R 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();