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-17544 Adjust tool to suppress Mn Ms differences #3913

Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions common/dtd/ldml.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic

<!ELEMENT decimal ( #PCDATA ) >
<!ATTLIST decimal alt NMTOKENS #IMPLIED >
<!--@MATCH:literal/variant-->
<!--@MATCH:literal/variant, us, official-->
<!ATTLIST decimal draft (approved | contributed | provisional | unconfirmed | true | false) #IMPLIED >
<!--@METADATA-->
<!--@DEPRECATED:true, false-->
Expand All @@ -2053,7 +2053,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic

<!ELEMENT group ( #PCDATA ) >
<!ATTLIST group alt NMTOKENS #IMPLIED >
<!--@MATCH:literal/variant-->
<!--@MATCH:literal/variant, us, official-->
<!ATTLIST group draft (approved | contributed | provisional | unconfirmed | true | false) #IMPLIED >
<!--@METADATA-->
<!--@DEPRECATED:true, false-->
Expand Down
15 changes: 13 additions & 2 deletions common/main/en_ZA.xml
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,20 @@ CLDR data files are interpreted according to the LDML specification (http://unic
</dates>
<numbers>
<symbols numberSystem="latn">
<decimal>↑↑↑</decimal>
<group>↑↑↑</group>
<decimal>,</decimal>
<decimal alt="official">,</decimal>
<decimal alt="us">.</decimal>
<group> </group>
<group alt="official"> </group>
<group alt="us">,</group>
</symbols>
<currencyFormats numberSystem="latn">
<currencyFormatLength>
<currencyFormat type="standard">
<pattern alt="alphaNextToNumber">¤#,##0.00</pattern>
</currencyFormat>
</currencyFormatLength>
</currencyFormats>
<currencies>
<currency type="ZAR">
<symbol>R</symbol>
Expand Down
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
Loading