Skip to content

Commit

Permalink
Fix an error in string resource (#4997)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Jan 19, 2022
1 parent 491044b commit 953f34f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/4997.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix an error in string resource
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ class MessageItemFactory @Inject constructor(
when {
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)
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)
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion vector/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3693,8 +3693,8 @@
<item quantity="one">Based on %1$d vote</item>
<item quantity="other">Based on %1$d votes</item>
</plurals>
<string name="poll_no_votes_cast">No votes cast</string>
<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="other">%1$d votes cast. Vote to the see the results</item>
</plurals>
Expand Down

0 comments on commit 953f34f

Please sign in to comment.