diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/emoji_reactions/emoji_reactions.js | 11 | ||||
| -rw-r--r-- | src/components/emoji_reactions/emoji_reactions.vue | 2 | ||||
| -rw-r--r-- | src/i18n/en.json | 3 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/components/emoji_reactions/emoji_reactions.js b/src/components/emoji_reactions/emoji_reactions.js index 74cb844c..b4936424 100644 --- a/src/components/emoji_reactions/emoji_reactions.js +++ b/src/components/emoji_reactions/emoji_reactions.js @@ -77,6 +77,17 @@ const EmojiReactions = { } else { this.reactWith(emoji) } + }, + counterTriggerAttrs (reaction) { + return { + class: [ + 'btn', + 'button-default', + 'emoji-reaction-count-button', + { '-picked-reaction': this.reactedWith(reaction.name) } + ], + 'aria-label': this.$tc('status.reaction_count_label', reaction.count, { num: reaction.count }) + } } } } diff --git a/src/components/emoji_reactions/emoji_reactions.vue b/src/components/emoji_reactions/emoji_reactions.vue index d475d5dc..20a1f4a1 100644 --- a/src/components/emoji_reactions/emoji_reactions.vue +++ b/src/components/emoji_reactions/emoji_reactions.vue @@ -53,7 +53,7 @@ <UserListPopover :users="accountsForEmoji[reaction.name]" class="emoji-reaction-popover" - :trigger-attrs="{ class: ['btn', 'button-default', 'emoji-reaction-count-button', { '-picked-reaction': reactedWith(reaction.name) }] }" + :trigger-attrs="counterTriggerAttrs(reaction)" @show="fetchEmojiReactionsByIfMissing()" > <span class="emoji-reaction-counts">{{ reaction.count }}</span> diff --git a/src/i18n/en.json b/src/i18n/en.json index b051f088..01309d0e 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -933,7 +933,8 @@ "show_all_conversation_with_icon": "{icon} {text}", "show_all_conversation": "Show full conversation ({numStatus} other status) | Show full conversation ({numStatus} other statuses)", "show_only_conversation_under_this": "Only show replies to this status", - "status_history": "Status history" + "status_history": "Status history", + "reaction_count_label": "{num} person reacted | {num} people reacted" }, "user_card": { "approve": "Approve", |
