Use singular and plural for vote(s) string

Resolves: #2265

Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
Tim Krüger 2022-08-05 10:27:03 +02:00
parent 23e3f323f7
commit 84f2cf432c
No known key found for this signature in database
GPG Key ID: FECE3A7222C52A4E
2 changed files with 7 additions and 3 deletions

View File

@ -136,8 +136,9 @@ class PollMainDialogFragment : DialogFragment() {
private fun initVotersAmount(showVotersAmount: Boolean, numVoters: Int, showResultSubtitle: Boolean) {
if (showVotersAmount) {
binding.pollVotesAmount.visibility = View.VISIBLE
binding.pollVotesAmount.text = String.format(
resources.getString(R.string.polls_amount_voters),
binding.pollVotesAmount.text = resources.getQuantityString(
R.plurals.polls_amount_voters,
numVoters,
numVoters
)
} else {

View File

@ -533,7 +533,10 @@
<!-- Polls -->
<string name="message_poll_tap_to_open">Tap to open poll</string>
<string name="polls_amount_voters">%1$s votes</string>
<plurals name="polls_amount_voters">
<item quantity="one">%d vote</item>
<item quantity="other">%d votes</item>
</plurals>
<string name="polls_add_option">Add option</string>
<string name="polls_edit_vote">Edit vote</string>
<string name="polls_submit_vote">Vote</string>