From 1506b97e35c63f9f6ca685ee1a2b61e4580ac134 Mon Sep 17 00:00:00 2001
From: eugenijm <eugenijm@protonmail.com>
Date: Tue, 9 Feb 2021 16:32:33 +0300
Subject: Display 'people voted' instead of 'votes' for multi-choice polls

---
 src/components/poll/poll.vue | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src/components/poll/poll.vue')

diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue
index 42819c19..f1ae8f9c 100644
--- a/src/components/poll/poll.vue
+++ b/src/components/poll/poll.vue
@@ -58,7 +58,12 @@
         {{ $t('polls.vote') }}
       </button>
       <div class="total">
-        {{ totalVotesCount }} {{ $t("polls.votes") }}&nbsp;·&nbsp;
+        <template v-if="poll.multiple">
+          {{ $tc("polls.people_voted_count", poll.voters_count, { count: poll.voters_count }) }}&nbsp;·&nbsp;
+        </template>
+        <template v-else>
+          {{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }}&nbsp;·&nbsp;
+        </template>
       </div>
       <i18n :path="expired ? 'polls.expired' : 'polls.expires_in'">
         <Timeago
-- 
cgit v1.2.3-70-g09d2


From 13ff99881b3eff6f69b94d838845a63100a5c234 Mon Sep 17 00:00:00 2001
From: Eugenij <eugenijm@protonmail.com>
Date: Wed, 10 Feb 2021 12:28:39 +0000
Subject: Apply 1 suggestion(s) to 1 file(s)

---
 src/components/poll/poll.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/poll/poll.vue')

diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue
index f1ae8f9c..5adcb9c2 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.multiple">
+        <template v-if="poll.voters_count">
           {{ $tc("polls.people_voted_count", poll.voters_count, { count: poll.voters_count }) }}&nbsp;·&nbsp;
         </template>
         <template v-else>
-- 
cgit v1.2.3-70-g09d2


From 01275fbac0e28d183e761e656a8e7b1c3b9612e9 Mon Sep 17 00:00:00 2001
From: eugenijm <eugenijm@protonmail.com>
Date: Wed, 10 Feb 2021 15:55:58 +0300
Subject: Ensure poll.voters_count doesn't fallback to poll.votes when it's 0

---
 src/components/poll/poll.vue | 2 +-
 src/i18n/en.json             | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/components/poll/poll.vue')

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",
-- 
cgit v1.2.3-70-g09d2

