Use plurals for message_reaction_show_more. Fixes #5227

This commit is contained in:
Benoit Marty 2022-02-22 16:08:08 +01:00
parent 17fa463bc8
commit 1ce65d7f87
2 changed files with 5 additions and 2 deletions

View File

@ -124,7 +124,7 @@ abstract class AbsBaseMessageItem<H : AbsBaseMessageItem.Holder> : BaseEventItem
showReactionsTextView.onClick { reactionsSummary.onShowLessClicked() } showReactionsTextView.onClick { reactionsSummary.onShowLessClicked() }
} else { } else {
val moreCount = reactions.count() - MAX_REACTIONS_TO_SHOW val moreCount = reactions.count() - MAX_REACTIONS_TO_SHOW
showReactionsTextView.text = holder.view.resources.getString(R.string.message_reaction_show_more, moreCount) showReactionsTextView.text = holder.view.resources.getQuantityString(R.plurals.message_reaction_show_more, moreCount, moreCount)
showReactionsTextView.onClick { reactionsSummary.onShowMoreClicked() } showReactionsTextView.onClick { reactionsSummary.onShowMoreClicked() }
} }
holder.reactionsContainer.addView(showReactionsTextView) holder.reactionsContainer.addView(showReactionsTextView)

View File

@ -3761,7 +3761,10 @@
<string name="tooltip_attachment_location">Share location</string> <string name="tooltip_attachment_location">Share location</string>
<string name="message_reaction_show_less">Show less</string> <string name="message_reaction_show_less">Show less</string>
<string name="message_reaction_show_more">"%1$d more"</string> <plurals name="message_reaction_show_more">
<item quantity="one">"%1$d more"</item>
<item quantity="other">"%1$d more"</item>
</plurals>
<string name="room_message_notify_everyone">Notify the whole room</string> <string name="room_message_notify_everyone">Notify the whole room</string>
<string name="room_message_autocomplete_users">Users</string> <string name="room_message_autocomplete_users">Users</string>