Skip to content

Commit 73317e5

Browse files
committed
CLDR-9774 Enable test for missing/extra English names for BCP47 keys/types
1 parent a21b391 commit 73317e5

File tree

1 file changed

+16
-34
lines changed

1 file changed

+16
-34
lines changed

tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestBCP47.java

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ public static void main(String[] args) {
7878
}
7979

8080
public void TestEnglishKeyTranslations() {
81-
logKnownIssue(
82-
"cldr7631",
83-
"Using just warnings for now, until issues are resolved. Change WARNING/ERROR when removing this.");
8481
ChainedMap.M3<String, String, String> foundEnglish =
8582
ChainedMap.of(
8683
new TreeMap<String, Object>(), new TreeMap<String, Object>(), String.class);
@@ -103,14 +100,11 @@ public void TestEnglishKeyTranslations() {
103100
if (keyTrans != null) {
104101
engKey = keyAlias;
105102
foundEnglish.put(engKey, "", keyTrans);
106-
msg(
103+
warnln(
107104
"Type for English 'key' translation is "
108105
+ engKey
109106
+ ", while bcp47 is "
110-
+ bcp47Key,
111-
WARNING,
112-
true,
113-
true);
107+
+ bcp47Key);
114108
break;
115109
}
116110
}
@@ -125,17 +119,14 @@ public void TestEnglishKeyTranslations() {
125119
Collections.<String>emptySet(),
126120
keyTrans));
127121
} else {
128-
msg(
122+
errln(
129123
showData(
130124
bcp47Key,
131125
"",
132126
SUPPLEMENTAL_DATA_INFO.getBcp47Descriptions().get(keyRow),
133127
keyAliases,
134128
Collections.<String>emptySet(),
135-
"MISSING"),
136-
ERROR,
137-
true,
138-
true);
129+
"MISSING"));
139130
}
140131
if (bcp47Key.equals("tz")) {
141132
continue;
@@ -156,32 +147,29 @@ public void TestEnglishKeyTranslations() {
156147
final String type = extra.get1();
157148
final String trans = extra.get2();
158149
if (foundEnglish.get(key, type) == null) {
159-
if (key.equals("x")) {
160-
msg(
150+
if (key.equals("x") || key.equals("t")) {
151+
logln(
161152
"OK Extra English: "
162153
+ showData(
163154
key,
164155
type,
165156
"MISSING",
166157
Collections.<String>emptySet(),
167158
Collections.<String>emptySet(),
168-
trans),
169-
LOG,
170-
true,
171-
true);
159+
trans));
160+
} else if (type.equals("big5han") || type.equals("gb2312han")) {
161+
logKnownIssue(
162+
"CLDR-18307", "Remove English names for deprecated collation types");
172163
} else {
173-
msg(
164+
errln(
174165
"*Extra English: "
175166
+ showData(
176167
key,
177168
type,
178169
"MISSING",
179170
Collections.<String>emptySet(),
180171
Collections.<String>emptySet(),
181-
trans),
182-
ERROR,
183-
true,
184-
true);
172+
trans));
185173
}
186174
}
187175
}
@@ -223,18 +211,15 @@ private void checkKeyType(
223211
if (trans != null) {
224212
engType = typeAlias;
225213
foundEnglish.put(engKey, engType, trans);
226-
msg(
214+
warnln(
227215
"Type for English 'key+type' translation is "
228216
+ engKey
229217
+ "+"
230218
+ engType
231219
+ ", while bcp47 is "
232220
+ bcp47Key
233221
+ "+"
234-
+ bcp47Type,
235-
WARNING,
236-
true,
237-
true);
222+
+ bcp47Type);
238223
break;
239224
}
240225
}
@@ -260,17 +245,14 @@ private void checkKeyType(
260245
typeAliases,
261246
trans));
262247
} else {
263-
msg(
248+
errln(
264249
showData(
265250
bcp47Key,
266251
bcp47Type,
267252
SUPPLEMENTAL_DATA_INFO.getBcp47Descriptions().get(row),
268253
keyAliases,
269254
typeAliases,
270-
"MISSING"),
271-
ERROR,
272-
true,
273-
true);
255+
"MISSING"));
274256
}
275257
}
276258

0 commit comments

Comments
 (0)