diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckCLDR.java b/tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckCLDR.java index 2c8fd1540ad..96d6a049c3b 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckCLDR.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckCLDR.java @@ -936,7 +936,8 @@ public enum Subtype { shortDateFieldInconsistentLength, illegalParameterValue, illegalAnnotationCode, - illegalCharacter; + illegalCharacter, + missingEnglishName; @Override public String toString() { diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckCoverage.java b/tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckCoverage.java index 0e5e8ea96da..06088e7d1e1 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckCoverage.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckCoverage.java @@ -10,6 +10,7 @@ import org.unicode.cldr.test.CheckCLDR.CheckStatus.Subtype; import org.unicode.cldr.util.CLDRFile; import org.unicode.cldr.util.CLDRFile.Status; +import org.unicode.cldr.util.CLDRLocale; import org.unicode.cldr.util.Factory; import org.unicode.cldr.util.InternalCldrException; import org.unicode.cldr.util.LanguageTagParser; @@ -157,6 +158,25 @@ public CheckCLDR handleSetCldrFileToCheck( setSkipTest(false); latin = ValuePathStatus.isLatinScriptLocale(cldrFileToCheck); + // check whether the English name is present. See {@link + // LikelySubtagsTest#TestMissingInfoForLanguage} + { + final CLDRLocale locale = CLDRLocale.getInstance(localeID); + String path = CLDRFile.getKey(CLDRFile.LANGUAGE_NAME, locale.getLanguage()); + // getEnglishFile() returns a resolved file, so just check isHere. + boolean englishName = getEnglishFile().isHere(path); + if (!englishName) { + possibleErrors.add( + new CheckStatus() + .setCause(this) + .setMainType(CheckStatus.warningType) + .setSubtype(Subtype.missingEnglishName) + .setMessage( + "Missing English translation for " + locale.getLanguage(), + new Object[] {})); + } + } + return this; } diff --git a/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/LikelySubtagsTest.java b/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/LikelySubtagsTest.java index 6bfa2a607ff..efc44b2acff 100644 --- a/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/LikelySubtagsTest.java +++ b/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/LikelySubtagsTest.java @@ -340,12 +340,7 @@ public void TestMissingInfoForLanguage() { if (englishName == null) { Level covLevel = ccl.getEffectiveCoverageLevel(language); if (covLevel == null || !covLevel.isAtLeast(Level.BASIC)) { - // https://unicode-org.atlassian.net/browse/CLDR-15663 - if (logKnownIssue( - "CLDR-15663", - "English translation should not be required for sub-basic language name")) { - continue; // skip error - } + continue; // skip error if locale is not at least basic. (null means sub-basic) } errln("Missing English translation for: " + language + " which is at " + covLevel); }