Skip to content

Commit

Permalink
ICU-21333 Port fix from ICU-21258 to internal CLDR API
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc authored and markusicu committed Oct 21, 2020
1 parent eb3bb79 commit 766088d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ public void populate(Map<String, Map<String, String>> powersToPluralsToPatterns)
.entrySet()) {
byte magnitude = (byte) (magnitudeEntry.getKey().length() - 1);
for (Map.Entry<String, String> pluralEntry : magnitudeEntry.getValue().entrySet()) {
StandardPlural plural = StandardPlural.fromString(pluralEntry.getKey().toString());
String pluralString = pluralEntry.getKey().toString();
if ("0".equals(pluralString) || "1".equals(pluralString)) {
// TODO(ICU-21258): Handle this case. For now, skip.
continue;
}
StandardPlural plural = StandardPlural.fromString(pluralString);
String patternString = pluralEntry.getValue().toString();
patterns[getIndex(magnitude, plural)] = patternString;
int numZeros = countZeros(patternString);
Expand Down

0 comments on commit 766088d

Please sign in to comment.