Unverified Commit b5a85fcf authored by Per Classon's avatar Per Classon Committed by GitHub

Allow plural localized strings to not specify every case (#45168)

* Allow plural localized strings to not specify every case
parent e2361960
......@@ -241,7 +241,7 @@ String genPluralMethod(Map<String, dynamic> bundle, String key) {
for(String pluralKey in pluralIds.keys) {
final RegExp expRE = RegExp('($pluralKey){([^}]+)}');
final RegExpMatch match = expRE.firstMatch(message);
if (match.groupCount == 2) {
if (match != null && match.groupCount == 2) {
String argValue = match.group(2);
for (String placeholder in placeholders)
argValue = argValue.replaceAll('#$placeholder#', '\$$placeholder');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment