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) {
|
function genReactionMsg(userIds, reaction, shortcode) {
|
||||||
let i18nKey = 'Molecules.Message.user_reacted';
|
|
||||||
|
|
||||||
if (userIds.length <= 3) {
|
|
||||||
i18nKey += `_${userIds.length}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Trans
|
<>
|
||||||
i18nKey={i18nKey}
|
{userIds.map((userId, index) => (
|
||||||
values={{ count: userIds.length, other_count: userIds.length - 3 }}
|
<React.Fragment key={userId}>
|
||||||
components={{
|
{twemojify(getUsername(userId))}
|
||||||
bold: <b />,
|
{index < userIds.length - 1 && (
|
||||||
user_one: <Twemojify text={getUsername(userIds?.[0])} />,
|
<span style={{ opacity: '.6' }}>
|
||||||
user_two: <Twemojify text={getUsername(userIds?.[1])} />,
|
{index === userIds.length - 2 ? ' and ' : ', '}
|
||||||
user_three: <Twemojify text={getUsername(userIds?.[2])} />,
|
</span>
|
||||||
emoji: <Twemojify text={shortcode ? `:${shortcode}:` : reaction} />,
|
)}
|
||||||
}}
|
</React.Fragment>
|
||||||
/>
|
))}
|
||||||
|
<span style={{ opacity: '.6' }}>{' reacted with '}</span>
|
||||||
|
{twemojify(shortcode ? `:${shortcode}:` : reaction, { className: 'react-emoji' })}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue