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 18:58:33 +02:00 committed by GitHub
parent 3c370c6cbc
commit c1420ba126
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 136 additions and 46 deletions

View file

@ -3,7 +3,7 @@
exports[`bodyToHtml does not mistake characters in text presentation mode for emoji 1`] = `
<DocumentFragment>
<span
class="mx_EventTile_body"
class="mx_EventTile_body translate"
dir="auto"
>
↔ ❗︎
@ -22,7 +22,7 @@ exports[`bodyToHtml feature_latex_maths should render inline katex 1`] = `"hello
exports[`bodyToHtml generates big emoji for emoji made of multiple characters 1`] = `
<DocumentFragment>
<span
class="mx_EventTile_body mx_EventTile_bigEmoji"
class="mx_EventTile_body mx_EventTile_bigEmoji translate"
dir="auto"
>
<span
@ -52,7 +52,7 @@ exports[`bodyToHtml generates big emoji for emoji made of multiple characters 1`
exports[`bodyToHtml should generate big emoji for an emoji-only reply to a message 1`] = `
<DocumentFragment>
<span
class="mx_EventTile_body mx_EventTile_bigEmoji"
class="mx_EventTile_body mx_EventTile_bigEmoji translate"
dir="auto"
>
<span