Skip to content

Commit

Permalink
CLDR-17544 Adjust tool to suppress Mn Mx diffs when those are the onl…
Browse files Browse the repository at this point in the history
…y differences
  • Loading branch information
macchiati committed Jul 29, 2024
1 parent 2e76041 commit 6c4936a
Showing 1 changed file with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<SimplePattern> valueSet = entry.getValue().keySet();
boolean inconsistentValues = valueSet.size() > 1;

// allow Ms to match Mn, if all else equal
// common with Slavics
if (inconsistentValues) {
Set<String> 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<SimplePattern, Collection<PatternData2>> entry2 :
entry.getValue().asMap().entrySet()) {
final SimplePattern valueSP = entry2.getKey();
Expand Down

0 comments on commit 6c4936a

Please sign in to comment.