diff --git a/app/javascript/mastodon/components/poll.js b/app/javascript/mastodon/components/poll.js
index 4c9b23b7704..dd7e2fcd3f8 100644
--- a/app/javascript/mastodon/components/poll.js
+++ b/app/javascript/mastodon/components/poll.js
@@ -14,6 +14,7 @@ import Icon from 'mastodon/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' },
});
const makeEmojiMap = record => record.get('emojis').reduce((obj, emoji) => {
@@ -100,11 +101,11 @@ class Poll extends ImmutablePureComponent {
};
renderOption (option, optionIndex, showResults) {
- const { poll, disabled } = this.props;
- const percent = poll.get('votes_count') === 0 ? 0 : (option.get('votes_count') / poll.get('votes_count')) * 100;
- const leading = poll.get('options').filterNot(other => other.get('title') === option.get('title')).every(other => option.get('votes_count') > other.get('votes_count'));
- const active = !!this.state.selected[`${optionIndex}`];
- const voted = option.get('voted') || (poll.get('own_votes') && poll.get('own_votes').includes(optionIndex));
+ const { poll, disabled, intl } = this.props;
+ const percent = poll.get('votes_count') === 0 ? 0 : (option.get('votes_count') / poll.get('votes_count')) * 100;
+ const leading = poll.get('options').filterNot(other => other.get('title') === option.get('title')).every(other => option.get('votes_count') > other.get('votes_count'));
+ const active = !!this.state.selected[`${optionIndex}`];
+ const voted = option.get('voted') || (poll.get('own_votes') && poll.get('own_votes').includes(optionIndex));
let titleEmojified = option.get('title_emojified');
if (!titleEmojified) {
@@ -134,7 +135,7 @@ class Poll extends ImmutablePureComponent {
{!showResults && }
{showResults &&
- {!!voted && }
+ {!!voted && }
{Math.round(percent)}%
}
diff --git a/app/javascript/styles/mastodon/polls.scss b/app/javascript/styles/mastodon/polls.scss
index 85ba138b411..f59a9d693a0 100644
--- a/app/javascript/styles/mastodon/polls.scss
+++ b/app/javascript/styles/mastodon/polls.scss
@@ -95,18 +95,18 @@
&__number {
display: inline-block;
- width: 48px;
+ width: 52px;
font-weight: 700;
padding: 0 10px;
+ padding-left: 8px;
text-align: right;
margin-top: auto;
margin-bottom: auto;
- flex: 0 0 48px;
+ flex: 0 0 52px;
}
&__vote__mark {
float: left;
- color: $valid-value-color;
line-height: 18px;
}