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-9774 Enable test for missing/extra English names for BCP47 keys/types #4364

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@
}

public void TestEnglishKeyTranslations() {
logKnownIssue(
"cldr7631",
"Using just warnings for now, until issues are resolved. Change WARNING/ERROR when removing this.");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLDR-7631 was resolved a while ago

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why my sweep didn't find this. Is this function actually called?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srl295 Maybe because until a day or so ago the tests in this file were not being run (since they were not included in TestAl())?

ChainedMap.M3<String, String, String> foundEnglish =
ChainedMap.of(
new TreeMap<String, Object>(), new TreeMap<String, Object>(), String.class);
Expand All @@ -103,14 +100,11 @@
if (keyTrans != null) {
engKey = keyAlias;
foundEnglish.put(engKey, "", keyTrans);
msg(
warnln(

Check warning on line 103 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBCP47.java

View workflow job for this annotation

GitHub Actions / build

(TestBCP47.java:103) Warning: Type for English 'key' translation is calendar, while bcp47 is ca

Check warning on line 103 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBCP47.java

View workflow job for this annotation

GitHub Actions / build

(TestBCP47.java:103) Warning: Type for English 'key' translation is collation, while bcp47 is co
"Type for English 'key' translation is "
+ engKey
+ ", while bcp47 is "
+ bcp47Key,
WARNING,
true,
true);
+ bcp47Key);
break;
}
}
Expand All @@ -125,17 +119,14 @@
Collections.<String>emptySet(),
keyTrans));
} else {
msg(
errln(
showData(
bcp47Key,
"",
SUPPLEMENTAL_DATA_INFO.getBcp47Descriptions().get(keyRow),
keyAliases,
Collections.<String>emptySet(),
"MISSING"),
ERROR,
true,
true);
"MISSING"));
}
if (bcp47Key.equals("tz")) {
continue;
Expand All @@ -156,32 +147,29 @@
final String type = extra.get1();
final String trans = extra.get2();
if (foundEnglish.get(key, type) == null) {
if (key.equals("x")) {
msg(
if (key.equals("x") || key.equals("t")) {
logln(
"OK Extra English: "
+ showData(
key,
type,
"MISSING",
Collections.<String>emptySet(),
Collections.<String>emptySet(),
trans),
LOG,
true,
true);
trans));
} else if (type.equals("big5han") || type.equals("gb2312han")) {
logKnownIssue(
"CLDR-18307", "Remove English names for deprecated collation types");
} else {
msg(
errln(
"*Extra English: "
+ showData(
key,
type,
"MISSING",
Collections.<String>emptySet(),
Collections.<String>emptySet(),
trans),
ERROR,
true,
true);
trans));
}
}
}
Expand Down Expand Up @@ -223,18 +211,15 @@
if (trans != null) {
engType = typeAlias;
foundEnglish.put(engKey, engType, trans);
msg(
warnln(

Check warning on line 214 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBCP47.java

View workflow job for this annotation

GitHub Actions / build

(TestBCP47.java:214) Warning: Type for English 'key+type' translation is calendar+ethiopic-amete-alem, while bcp47 is ca+ethioaa

Check warning on line 214 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBCP47.java

View workflow job for this annotation

GitHub Actions / build

(TestBCP47.java:214) Warning: Type for English 'key+type' translation is calendar+gregorian, while bcp47 is ca+gregory

Check warning on line 214 in tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBCP47.java

View workflow job for this annotation

GitHub Actions / build

(TestBCP47.java:214) Warning: Type for English 'key+type' translation is collation+dictionary, while bcp47 is co+dict
"Type for English 'key+type' translation is "
+ engKey
+ "+"
+ engType
+ ", while bcp47 is "
+ bcp47Key
+ "+"
+ bcp47Type,
WARNING,
true,
true);
+ bcp47Type);
break;
}
}
Expand All @@ -260,17 +245,14 @@
typeAliases,
trans));
} else {
msg(
errln(
showData(
bcp47Key,
bcp47Type,
SUPPLEMENTAL_DATA_INFO.getBcp47Descriptions().get(row),
keyAliases,
typeAliases,
"MISSING"),
ERROR,
true,
true);
"MISSING"));
}
}

Expand Down
Loading