-
Notifications
You must be signed in to change notification settings - Fork 52
FEATURE: Allow untranslated posts in inline-translation mode to be manually translated #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| @service modal; | ||
| @service translator; | ||
| @service siteSettings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to use this in showButton maybe? It's not used elsewhere in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I had originally done some implementation in this file but removed it. Thanks!
| {{i18n | ||
| "translator.translated_from" | ||
| language=this.post.detectedLang | ||
| translator=this.siteSettings.translator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly a succinct setting name! :D I thought this was a mistake, I know you didn't add this and it's too late now anyway, but translator_provider or something would be better, it doesn't look like an actual setting ATM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will likely rename the setting together with the "inline" thing we talked about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thank you!
Currently the 🌐 only appears in dual-text mode (not inline translation mode) when the
experimental_topic_translationfeature is disabled. This means we are unable to translate old posts when inexperimental_topic_translation.This PR allows 🌐 to show up when
experimental_topic_translationis enabled, and does not show the dual-text translation below (the old method) but replaces the content inline instead.In addition in this PR, when
experimental_topic_translationis enabled, it takes the response from /translate and updates the post cooked and topic title for inline replacement. (in other scenarios, translation updates are done by messagebus)(also backfills many untested js files)
Videos to indicate how function works with this PR:
Parallel
parallel.mp4
Inline
inline.mp4
(This isn't really a FIX since it was never a real feature...)