aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreugenijm <eugenijm@protonmail.com>2021-02-10 15:55:58 +0300
committereugenijm <eugenijm@protonmail.com>2021-02-12 19:43:57 +0300
commit01275fbac0e28d183e761e656a8e7b1c3b9612e9 (patch)
tree55788b52afb54fc57307ed208d233371d1e09641
parent13ff99881b3eff6f69b94d838845a63100a5c234 (diff)
Ensure poll.voters_count doesn't fallback to poll.votes when it's 0
-rw-r--r--src/components/poll/poll.vue2
-rw-r--r--src/i18n/en.json1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue
index 5adcb9c2..187d1829 100644
--- a/src/components/poll/poll.vue
+++ b/src/components/poll/poll.vue
@@ -58,7 +58,7 @@
{{ $t('polls.vote') }}
</button>
<div class="total">
- <template v-if="poll.voters_count">
+ <template v-if="typeof poll.voters_count === 'number'">
{{ $tc("polls.people_voted_count", poll.voters_count, { count: poll.voters_count }) }}&nbsp;ยท&nbsp;
</template>
<template v-else>
diff --git a/src/i18n/en.json b/src/i18n/en.json
index f366445f..78ce0919 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -147,6 +147,7 @@
"add_poll": "Add Poll",
"add_option": "Add Option",
"option": "Option",
+ "votes": "votes",
"people_voted_count": "{count} person voted | {count} people voted",
"votes_count": "{count} vote | {count} votes",
"vote": "Vote",