mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Convert a11y_polls_percent_of_total to plurals
This commit is contained in:
+3
-1
@@ -56,7 +56,9 @@ internal fun PollAnswerView(
|
|||||||
append(nbVotesText)
|
append(nbVotesText)
|
||||||
if (answerItem.votesCount != 0) {
|
if (answerItem.votesCount != 0) {
|
||||||
append(sentenceDelimiter)
|
append(sentenceDelimiter)
|
||||||
append(stringResource(R.string.a11y_polls_percent_of_total, (answerItem.percentage * 100).toInt()))
|
(answerItem.percentage * 100).toInt().let { percent ->
|
||||||
|
append(pluralStringResource(R.plurals.a11y_polls_percent_of_total, percent, percent))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (answerItem.isWinner) {
|
if (answerItem.isWinner) {
|
||||||
append(sentenceDelimiter)
|
append(sentenceDelimiter)
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
<string name="a11y_polls_percent_of_total">"%1$d percent of total votes"</string>
|
<plurals name="a11y_polls_percent_of_total">
|
||||||
|
<item quantity="one">"%1$d percent of total votes"</item>
|
||||||
|
<item quantity="other">"%1$d percents of total votes"</item>
|
||||||
|
</plurals>
|
||||||
<string name="a11y_polls_winning_answer">"This is the winning answer"</string>
|
<string name="a11y_polls_winning_answer">"This is the winning answer"</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user