Skip to content

Commit

Permalink
CLDR-17680 fix spurious CheckConsistentCasing and CheckCoverage (#3767)
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 authored May 31, 2024
1 parent bcbb490 commit c1dc8c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tools/cldr-apps/js/src/views/GeneralInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Open Dashboard
</button>

<cldr-overall-errors />
<!-- <cldr-overall-errors /> -->
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ public CheckCLDR handleSetCldrFileToCheck(
} catch (Exception e) {
types = Collections.emptyMap();
}
if ((types == null || types.isEmpty()) && !SpecialLocales.isScratchLocale(locale)) {
possibleErrors.add(
new CheckStatus()
.setCause(this)
.setMainType(CheckStatus.warningType)
.setSubtype(Subtype.incorrectCasing)
.setMessage("Could not load casing info for {0}", locale));
}
} else {
// no casing info - since the types Map is global, and null checks aren't done,
// we are better off with an empty map here
types = Collections.emptyMap();
}
if ((types == null || types.isEmpty()) && !SpecialLocales.isScratchLocale(locale)) {
possibleErrors.add(
new CheckStatus()
.setCause(this)
.setMainType(CheckStatus.warningType)
.setSubtype(Subtype.incorrectCasing)
.setMessage("Could not load casing info for {0}", locale));
}
// types may be null, avoid NPE
hasCasingInfo = (types == null) ? false : types.size() > 0;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ public CheckCLDR handleSetCldrFileToCheck(
supplementalData =
SupplementalDataInfo.getInstance(cldrFileToCheck.getSupplementalDirectory());
coverageLevel = CoverageLevel2.getInstance(supplementalData, localeID);
PluralInfo pluralInfo = supplementalData.getPlurals(PluralType.cardinal, localeID);
if (pluralInfo == supplementalData.getPlurals(PluralType.cardinal, LocaleNames.ROOT)
&& !SpecialLocales.isScratchLocale(localeID)) {
PluralInfo pluralInfo =
supplementalData.getPlurals(PluralType.cardinal, localeID, false);
if (pluralInfo == null && !SpecialLocales.isScratchLocale(localeID)) {
possibleErrors.add(
new CheckStatus()
.setCause(this)
Expand Down

0 comments on commit c1dc8c7

Please sign in to comment.