Repeat count for format args of plural string.

Fixes #8724
fork-5.53.8
Alan Evans 2019-05-07 12:26:01 -03:00 zatwierdzone przez GitHub
rodzic d1b8e77fdc
commit 06ea000f42
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 7 usunięć

Wyświetl plik

@ -243,13 +243,8 @@ public class IdentityUtil {
if (recipients.size() == 2) { if (recipients.size() == 2) {
return context.getString(resourceTwo, firstName, secondName); return context.getString(resourceTwo, firstName, secondName);
} else { } else {
String nMore; int othersCount = recipients.size() - 2;
String nMore = context.getResources().getQuantityString(R.plurals.identity_others, othersCount, othersCount);
if (recipients.size() == 3) {
nMore = context.getResources().getQuantityString(R.plurals.identity_others, 1);
} else {
nMore = context.getResources().getQuantityString(R.plurals.identity_others, recipients.size() - 2);
}
return context.getString(resourceMany, firstName, secondName, nMore); return context.getString(resourceMany, firstName, secondName, nMore);
} }