From 88d35e13e8f396d7fac161908fb6a1f3702c32e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Fri, 22 Oct 2021 15:23:07 +0200 Subject: [PATCH] Add single option votes tooltip in polls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/poll.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/soapbox/components/poll.js b/app/soapbox/components/poll.js index ee22a9d1e..d0498af2a 100644 --- a/app/soapbox/components/poll.js +++ b/app/soapbox/components/poll.js @@ -14,7 +14,8 @@ import Icon from 'soapbox/components/icon'; const messages = defineMessages({ closed: { id: 'poll.closed', defaultMessage: 'Closed' }, - voted: { id: 'poll.voted', defaultMessage: 'You voted for this answer', description: 'Tooltip of the "voted" checkmark in polls' }, + voted: { id: 'poll.voted', defaultMessage: 'You voted for this answer' }, + votes: { id: 'poll.votes', defaultMessage: '{votes, plural, one {# vote} other {# votes}}' }, }); const makeEmojiMap = record => record.get('emojis').reduce((obj, emoji) => { @@ -126,7 +127,7 @@ class Poll extends ImmutablePureComponent { data-index={optionIndex} /> )} - {showResults && + {showResults && {!!voted && } {Math.round(percent)}% }