Remove translation from message reaction tooltip
This commit is contained in:
parent
07b3115eaf
commit
036070227c
1 changed files with 14 additions and 17 deletions
|
@ -360,24 +360,21 @@ function pickEmoji(e, roomId, eventId, roomTimeline) {
|
|||
}
|
||||
|
||||
function genReactionMsg(userIds, reaction, shortcode) {
|
||||
let i18nKey = 'Molecules.Message.user_reacted';
|
||||
|
||||
if (userIds.length <= 3) {
|
||||
i18nKey += `_${userIds.length}`;
|
||||
}
|
||||
|
||||
return (
|
||||
<Trans
|
||||
i18nKey={i18nKey}
|
||||
values={{ count: userIds.length, other_count: userIds.length - 3 }}
|
||||
components={{
|
||||
bold: <b />,
|
||||
user_one: <Twemojify text={getUsername(userIds?.[0])} />,
|
||||
user_two: <Twemojify text={getUsername(userIds?.[1])} />,
|
||||
user_three: <Twemojify text={getUsername(userIds?.[2])} />,
|
||||
emoji: <Twemojify text={shortcode ? `:${shortcode}:` : reaction} />,
|
||||
}}
|
||||
/>
|
||||
<>
|
||||
{userIds.map((userId, index) => (
|
||||
<React.Fragment key={userId}>
|
||||
{twemojify(getUsername(userId))}
|
||||
{index < userIds.length - 1 && (
|
||||
<span style={{ opacity: '.6' }}>
|
||||
{index === userIds.length - 2 ? ' and ' : ', '}
|
||||
</span>
|
||||
)}
|
||||
</React.Fragment>
|
||||
))}
|
||||
<span style={{ opacity: '.6' }}>{' reacted with '}</span>
|
||||
{twemojify(shortcode ? `:${shortcode}:` : reaction, { className: 'react-emoji' })}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue