logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 7f3fd9ca21b1365f3cc6222c18fe700660dd5881
parent b2a96417cf95da5e34f2394835f0790911259182
Author: Shpuld Shpludson <shp@cock.li>
Date:   Fri, 12 Feb 2021 19:15:42 +0000

Merge branch 'multi-choice-poll-wording' into 'develop'

Display 'people voted' instead of 'votes' for multi-answers polls

Closes #993

See merge request pleroma/pleroma-fe!1341

Diffstat:

MCHANGELOG.md2++
Msrc/components/poll/poll.vue7++++++-
Msrc/i18n/en.json2++
3 files changed, 10 insertions(+), 1 deletion(-)

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") }}&nbsp;·&nbsp; + <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> + {{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }}&nbsp;·&nbsp; + </template> </div> <i18n :path="expired ? 'polls.expired' : 'polls.expires_in'"> <Timeago diff --git a/src/i18n/en.json b/src/i18n/en.json @@ -152,6 +152,8 @@ "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",