Allow Chrome page translator to translate messages in rooms (#11113)

* support message translation in chat

* Update src/HtmlUtils.tsx

* update snapshots

* Convert TextualBody-test to use snapshots

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: Richard van der Hoff <richard@matrix.org>
This commit is contained in:
Łukasz Polowczyk
2024-07-25 16:58:33 +00:00
committed by GitHub
co-authored by Richard van der Hoff Richard van der Hoff
parent 3c370c6cbc
commit c1420ba126
9 changed files with 136 additions and 46 deletions
+2
View File
@@ -423,6 +423,8 @@ export function bodyToHtml(content: IContent, highlights: Optional<string[]>, op
"mx_EventTile_body": true,
"mx_EventTile_bigEmoji": emojiBody,
"markdown-body": isHtmlMessage && !emojiBody,
// Override the global `notranslate` class set by the top-level `matrixchat` div.
"translate": true,
});
let emojiBodyElements: JSX.Element[] | undefined;