Plural group join message

Closes #4535
Fixes #4521
// FREEBIE
This commit is contained in:
Christian Ascheberg 2015-11-14 13:30:33 +01:00 committed by Moxie Marlinspike
parent cca38ddf3f
commit 1d8aef1669
2 changed files with 6 additions and 2 deletions

View File

@ -690,7 +690,10 @@
<string name="MmsPreferencesFragment__invalid_host">The text entered was not a valid host</string>
<!-- GroupUtil -->
<string name="GroupUtil_joined_the_group">%1$s joined the group.</string>
<plurals name="GroupUtil_joined_the_group">
<item quantity="one">%1$s joined the group.</item>
<item quantity="other">%1$s joined the group.</item>
</plurals>
<string name="GroupUtil_group_updated">Group updated.</string>
<string name="GroupUtil_group_name_is_now">Group name is now \'%1$s\'.</string>

View File

@ -74,7 +74,8 @@ public class GroupUtil {
String title = groupContext.getName();
if (members != null) {
description.append(context.getString(R.string.GroupUtil_joined_the_group, members.toShortString()));
description.append(context.getResources().getQuantityString(R.plurals.GroupUtil_joined_the_group,
members.getRecipientsList().size(), members.toShortString()));
}
if (title != null && !title.trim().isEmpty()) {