commit: 1506b97e35c63f9f6ca685ee1a2b61e4580ac134
parent 647d75f27c89b0972a58c62e7ab741d339c545d0
Author: eugenijm <eugenijm@protonmail.com>
Date: Tue, 9 Feb 2021 16:32:33 +0300
Display 'people voted' instead of 'votes' for multi-choice polls
Diffstat:
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Button to remove uploaded media in post status form is now properly placed and sized.
- Fixed shoutbox not working in mobile layout
+### Changed
+- Display 'people voted' instead of 'votes' for multi-choice polls
## [2.2.3] - 2021-01-18
### Added
diff --git 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") }} ·
+ <template v-if="poll.multiple">
+ {{ $tc("polls.people_voted_count", poll.voters_count, { count: poll.voters_count }) }} ·
+ </template>
+ <template v-else>
+ {{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }} ·
+ </template>
</div>
<i18n :path="expired ? 'polls.expired' : 'polls.expires_in'">
<Timeago
diff --git a/src/i18n/en.json b/src/i18n/en.json
@@ -147,7 +147,8 @@
"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",
"type": "Poll type",
"single_choice": "Single choice",