Use plurals in case of 3 or more invited users.

This commit is contained in:
onurays 2020-05-12 14:10:23 +03:00
parent 700fd47f22
commit 04dd13d03b
2 changed files with 6 additions and 2 deletions

View File

@ -70,7 +70,8 @@ class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted
2 -> stringProvider.getString(R.string.invitations_sent_to_two_users,
selectedUsers.first().displayName,
selectedUsers.last().displayName)
else -> stringProvider.getString(R.string.invitations_sent_to_three_and_more_users,
else -> stringProvider.getQuantityString(R.plurals.invitations_sent_to_one_and_more_users,
selectedUsers.size - 1,
selectedUsers.first().displayName,
selectedUsers.size - 1)
}

View File

@ -2374,7 +2374,10 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming
<string name="invite_users_to_room_title">Invite Users</string>
<string name="invitation_sent_to_one_user">Invitation sent to %1$s</string>
<string name="invitations_sent_to_two_users">Invitations sent to %1$s and %2$s</string>
<string name="invitations_sent_to_three_and_more_users">Invitations sent to %1$s and %2$d more</string>
<plurals name="invitations_sent_to_one_and_more_users">
<item quantity="two">Invitations sent to %1$s and 2 more</item>
<item quantity="other">Invitations sent to %1$s and %2$d more</item>
</plurals>
<string name="invite_users_to_room_failure">We could not invite users. Please check the users you want to invite and try again.</string>
</resources>