Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

[FIX] Auto Translate not working on new message template

Open filipemarins opened this issue 3 years ago • 3 comments

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 Screenshot 2022-11-22 at 11 07 34

Multilevel quote attachments get translated as well: Screenshot 2022-11-22 at 11 13 21

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

Screenshot 2022-11-23 at 14 32 32

filipemarins avatar Nov 22 '22 13:11 filipemarins

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.

lgtm-com[bot] avatar Nov 22 '22 14:11 lgtm-com[bot]

Codecov Report

Merging #27317 (f0c0b16) into develop (69c7248) will decrease coverage by 0.02%. The diff coverage is 47.76%.

Impacted file tree graph

@@             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.

codecov[bot] avatar Nov 22 '22 19:11 codecov[bot]

When sending an attachment, the description was not translated in the main room, but was in the thread. image

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.

filipemarins avatar Nov 23 '22 12:11 filipemarins