Fix an error in string resource (#4997)

This commit is contained in:
Benoit Marty 2022-01-19 21:39:09 +01:00
parent 491044b0c5
commit 953f34f5e3
3 changed files with 7 additions and 2 deletions

1
changelog.d/4997.bugfix Normal file
View File

@ -0,0 +1 @@
Fix an error in string resource

View File

@ -190,7 +190,11 @@ class MessageItemFactory @Inject constructor(
when { when {
isEnded -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_after_ended, it, it) isEnded -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_after_ended, it, it)
didUserVoted -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_voted, it, it) didUserVoted -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_voted, it, it)
else -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_not_voted, it, it) else -> if (it == 0) {
stringProvider.getString(R.string.poll_no_votes_cast)
} else {
stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_not_voted, it, it)
}
} }
} }

View File

@ -3693,8 +3693,8 @@
<item quantity="one">Based on %1$d vote</item> <item quantity="one">Based on %1$d vote</item>
<item quantity="other">Based on %1$d votes</item> <item quantity="other">Based on %1$d votes</item>
</plurals> </plurals>
<string name="poll_no_votes_cast">No votes cast</string>
<plurals name="poll_total_vote_count_before_ended_and_not_voted"> <plurals name="poll_total_vote_count_before_ended_and_not_voted">
<item quantity="zero">No votes cast</item>
<item quantity="one">%1$d vote cast. Vote to the see the results</item> <item quantity="one">%1$d vote cast. Vote to the see the results</item>
<item quantity="other">%1$d votes cast. Vote to the see the results</item> <item quantity="other">%1$d votes cast. Vote to the see the results</item>
</plurals> </plurals>