mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
Merge pull request #2277 from nextcloud/feature/2265/i18n-singular-and-plural
Use singular and plural for vote(s) string
This commit is contained in:
commit
a906e2c244
@ -136,8 +136,9 @@ class PollMainDialogFragment : DialogFragment() {
|
|||||||
private fun initVotersAmount(showVotersAmount: Boolean, numVoters: Int, showResultSubtitle: Boolean) {
|
private fun initVotersAmount(showVotersAmount: Boolean, numVoters: Int, showResultSubtitle: Boolean) {
|
||||||
if (showVotersAmount) {
|
if (showVotersAmount) {
|
||||||
binding.pollVotesAmount.visibility = View.VISIBLE
|
binding.pollVotesAmount.visibility = View.VISIBLE
|
||||||
binding.pollVotesAmount.text = String.format(
|
binding.pollVotesAmount.text = resources.getQuantityString(
|
||||||
resources.getString(R.string.polls_amount_voters),
|
R.plurals.polls_amount_voters,
|
||||||
|
numVoters,
|
||||||
numVoters
|
numVoters
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
@ -533,7 +533,10 @@
|
|||||||
|
|
||||||
<!-- Polls -->
|
<!-- Polls -->
|
||||||
<string name="message_poll_tap_to_open">Tap to open poll</string>
|
<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_add_option">Add option</string>
|
||||||
<string name="polls_edit_vote">Edit vote</string>
|
<string name="polls_edit_vote">Edit vote</string>
|
||||||
<string name="polls_submit_vote">Vote</string>
|
<string name="polls_submit_vote">Vote</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user