[FIX] Auto Translate not working on new message template
Proposed changes (including videos or screenshots)
- Fix auto translate not working on new message template;
- Fix a bug that the auto-translate icon was showing for users who didn't have enabled.
- Show translated quote messages;
- Remove translation provider for end users.
- Translate the ThreadMessagePreview component
Issue(s)
closes #27567
Steps to test or reproduce
Further comments
I had to move useAutoTranslate and useKatex to a separate hook cause on MessageList component the context isn't fulfilled yet.
Quote attachment

Multilevel quote attachments get translated as well:

But if you try to translate a message that wasn't translated yet and has multiple levels of quote message it will only translate the first quote message...
ThreadMessagePreview component translated

This pull request introduces 1 alert when merging b90ea6301ee308e21096195c128a15c517d9ce47 into b8168038e1fbc5a9c711f9538fe2ab38f8b6a749 - view on LGTM.com
new alerts:
- 1 for Syntax error
Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.
Codecov Report
Merging #27317 (f0c0b16) into develop (69c7248) will decrease coverage by
0.02%. The diff coverage is47.76%.
@@ Coverage Diff @@
## develop #27317 +/- ##
===========================================
- Coverage 42.90% 42.88% -0.03%
===========================================
Files 814 817 +3
Lines 17199 17234 +35
Branches 1923 1934 +11
===========================================
+ Hits 7380 7391 +11
- Misses 9563 9579 +16
- Partials 256 264 +8
| Flag | Coverage Δ | |
|---|---|---|
| e2e | 42.88% <47.76%> (-0.03%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
When sending an attachment, the description was not translated in the main room, but was in the thread.
Inside the thread, we are having the wrong behavior, we should not translate our own message. I was only focused on the main message list but nice catch, I will fix it on the thread.
