Skip to content

Commit

Permalink
Regression: Update message reaction text (#26097)
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipe Marins authored and weslley543 committed Jul 8, 2022
1 parent 2f486c5 commit 729de4a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import { MessageReaction as MessageReactionTemplate, MessageReactionEmoji, Messa
import { useTooltipClose, useTooltipOpen, useTranslation, TranslationKey } from '@rocket.chat/ui-contexts';
import React, { FC, useRef } from 'react';

import MarkdownText from '../../../../components/MarkdownText';
import { getEmojiClassNameAndDataTitle } from '../../../../lib/utils/renderEmoji';

const getTranslationKey = (users: string[], mine: boolean): TranslationKey => {
if (users.length === 0) {
if (mine) {
return 'You_have_reacted';
return 'You_reacted_with';
}
}

Expand Down Expand Up @@ -53,13 +54,14 @@ export const MessageReaction: FC<{
e.preventDefault();
ref.current &&
openTooltip(
<>
{t(key, {
<MarkdownText
content={t(key, {
counter: names.length,
users: names.join(', '),
emoji: name,
})}
</>,
variant='inline'
/>,
ref.current,
);
}}
Expand Down
10 changes: 5 additions & 5 deletions apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -5063,11 +5063,11 @@
"yesterday": "yesterday",
"Yesterday": "Yesterday",
"You": "You",
"You_have_reacted": "You have reacted",
"Users_reacted_with": "__users__ have reacted with __emoji__",
"Users_and_more_reacted_with": "__users__ and __count__ more have reacted with __emoji__",
"You_and_users_Reacted_with": "You and __users__ have reacted with __emoji__",
"You_users_and_more_Reacted_with": "You, __users__ and __count__ more have reacted with __emoji__",
"You_reacted_with": "*You* reacted with __emoji__",
"Users_reacted_with": "*__users__* reacted with __emoji__",
"Users_and_more_reacted_with": "*__users__ and __counter__ more* reacted with __emoji__",
"You_and_users_Reacted_with": "*You and __users__* reacted with __emoji__",
"You_users_and_more_Reacted_with": "*You, __users__ and __counter__ more* reacted with __emoji__",
"You_are_converting_team_to_channel": "You are converting this Team to a Channel.",
"you_are_in_preview_mode_of": "You are in preview mode of channel #<strong>__room_name__</strong>",
"you_are_in_preview_mode_of_incoming_livechat": "You are in preview mode of this chat",
Expand Down

0 comments on commit 729de4a

Please sign in to comment.