Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-01-08 16:27:22 +0300
committerJoas Schilling <coding@schilljs.com>2021-01-08 16:27:22 +0300
commit4dbf641472529dc7ce55add0cc466f550ee21432 (patch)
tree610e439c0dbba9d3eaff3bc09446ba6b47cd8ec5 /src/js/components/Base
parentfd0918193172fbe47a42bdcd95a2b638270f5d9a (diff)
Improve plural handling
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/js/components/Base')
-rw-r--r--src/js/components/Base/PollInformation.vue10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/js/components/Base/PollInformation.vue b/src/js/components/Base/PollInformation.vue
index 95d48da7..cb5374d6 100644
--- a/src/js/components/Base/PollInformation.vue
+++ b/src/js/components/Base/PollInformation.vue
@@ -43,11 +43,15 @@
<div v-if="poll.voteLimit">
{{ t('polls', 'Your are only allowed to vote for one option.', 'Your votes are limited to %n yes votes.', poll.voteLimit) }}
<span v-if="voteLimitReached"> {{ t('polls', 'You reached the maximum number of allowed votes.') }}</span>
- <span v-else> {{ n('polls', 'You have only one vote left.', 'You have %n votes left.', poll.voteLimit - countYesVotes) }}</span>
+ <span v-else-if="poll.voteLimit - countYesVotes === 1"> {{ t('polls', 'You have only one vote left.') }}</span>
+ <span v-else> {{ n('polls', 'You have %n vote left.', 'You have %n votes left.', poll.voteLimit - countYesVotes) }}</span>
</div>
- <div v-if="poll.optionLimit">
- {{ n('polls', 'This is an exclusive vote, where only one user is allowed to vote for an option.', 'Only %n votes per option are permitted.',poll.optionLimit) }}
+ <div v-if="poll.optionLimit === 1">
+ {{ t('polls', 'This is an exclusive vote, where only one user is allowed to vote for an option.') }}
+ </div>
+ <div v-else-if="poll.optionLimit">
+ {{ n('polls', 'Only %n vote per option is permitted.', 'Only %n votes per option are permitted.', poll.optionLimit) }}
</div>
</div>
</template>