Support built-in Firefox Translations in Thunderbird
Categories
(Thunderbird :: General, enhancement, P3)
Tracking
(thunderbird_esr115 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr115 | --- | wontfix |
People
(Reporter: tdulcet, Unassigned)
References
(Depends on 1 open bug, )
Details
(Keywords: design-needed, Whiteboard: [snnot3p])
Attachments
(1 obsolete file)
The official Firefox Translations add-on allows users to translate webpages in their browser, privately, without using the cloud. This should be supported in Thunderbird as well to allow users to translate the subject and body of e-mail messages. Currently the only way for users to do this while preserving their privacy would be by manually copying the email text to Firefox or by opening the webmail UI for their e-mail service in Firefox, but that is very tedious and of course defeats the purpose of using Thunderbird. The other option would be to use the Web Translate add-on directly in Thunderbird, but that (as the name implies) uses cloud services like Google Translate to perform the actual translations, which obviously do not preserve the user's privacy.
For reference, the source code for the Firefox Translation add-on is on GitHub: https://github.com/mozilla/firefox-translations.
Several other users have also requested this:
- GitHub: https://github.com/mozilla/firefox-translations/issues/512 and https://github.com/mozilla/firefox-translations/issues/613
- Mozilla Connect: https://connect.mozilla.org/t5/ideas/firefox-translations-in-thunderbird/idi-p/24890
- Twitter: https://twitter.com/TheW0LVERIN3/status/1542178917817237506
I am CCing this to @sylvestre, as he requested the bug and might be able to provide a better idea of what specifically would be required for the Thunderbird team to support the add-on.
Comment 1•2 years ago
|
||
In order for this add-on to be useful for Thunderbird, it has to use message display scripts and not content scripts. Since our message display is a webpage, this should be the only required change.
Comment 2•2 years ago
|
||
IIRC Rob was poking at this.
Reporter | ||
Comment 3•2 years ago
|
||
(In reply to John Bieling (:TbSync) from comment #1)
Since our message display is a webpage, this should be the only required change.
Unfortunately, I believe it is more complex than that, as this add-on uses 3 experiment APIs, which are of course not available to regular web extensions. I am not sure if these would be work in TB, especially in the message display area. Notably, it uses an API to create a "Translation Bar" banner below the toolbar, which seem somewhat comparable to the currently also privileged TB notification bar API (bug 1674002). It also uses nonstandard WebAssembly features to support SIMD.
I should note that the add-on does partially load into TB as is (with 4 warnings), but it of course does not work. Along with replacing the content scripts with message display scripts as John mentioned above and similarly the page action button with a message display action, it uses the contextMenus
permission and namespace for the context menu API (which TB does not support), so that would also need to be replaced with menus
. This might be enough to get it to at least fully load, but without resolving those above issues, I doubt it would do anything useful.
Anyway, I was hoping @sylvestre or maybe Rob/John now might be able to provide a better idea of what specifically would be required for TB to support this add-on.
Comment 4•2 years ago
|
||
We are moving to an in-tree approach. The addons isn't going to live for much longer.
Comment 5•2 years ago
|
||
I've got the extension working for the most part. I'll post my fork of the extension itself into my Github in the coming days hopefully.
Comment 6•2 years ago
|
||
Comment 7•2 years ago
|
||
Here's what I've got for the extension code: https://github.com/jfx2006/firefox-translations/tree/thunderbird
The prefs UI and some strings are in the "in-tree additions" patch.
It mostly works, but currently some things are rather broken like the adhoc translation popup is not working right. Some items in the notificationbox popup do not work right either, such as the "never translate this website" option which adds "about:message" to the exclude list if selected and disables the extension for reading all messages.
My thinking is to disable/remove the UI pieces that do not make sense for Thunderbird.
Given comment 4 that the extension for Firefox is moving in-tree, it may not make sense to continue working on supporting Thunderbird in the extension. Ongoing is an important consideration as well; personally I do not have the time to keep up with it.
Comment 8•2 years ago
|
||
if I were you, I wouldn't publish it indeed ;)
Reporter | ||
Comment 9•2 years ago
|
||
Thanks Rob for all your work to get the add-on working in TB!
While I would definitely agree that the Firefox Translation functionality should be integrated into TB if that is what FF is going to do (similar to bug 1823005), I would argue that Rob's port of the add-on should still be published on ATN if this integration will not be finished before FF/TB 115 ESR. Rob has already done most of the work and users should not have to wait until the following ESR in late 2024 (TB 128?) for this needed functionality. Actually, considering that most users will likely not automatically get the TB 115 upgrade for over 6 more months, I would further argue that Rob's patch from comment 6 should be uplifted to TB 102 as well if possible, so users can have this functionality immediately.
Comment 10•2 years ago
|
||
Hopefully we'll have this for Supernova. Wrt this bug's whiteboard, [snnot] means "not Supernova 3-pane" related (wasn't me), which helps our queries.
Comment 11•2 years ago
|
||
(In reply to Thomas D. (:thomas8) from comment #10)
Hopefully we'll have this for Supernova. Wrt this bug's whiteboard, [snnot] means "not Supernova 3-pane" related (wasn't me), which helps our queries.
I am not able to commit to maintaining the extension on my own time, and will not be working on it any more.
Comment 12•2 years ago
|
||
Let's refocus this bug given the plans for built-in support. Bug 971044 seems to be tracking it.
Updated•2 years ago
|
Comment 13•2 years ago
|
||
The translations engine support will be available in toolkit: https://searchfox.org/mozilla-central/source/toolkit/components/translations
We're currently working on documentation. We're also integrating the popup logic for web page translations in browser/components/translations
, but that's currently a WIP. In the next few months it should be mature enough to consider for Thunderbird.
Updated•2 years ago
|
Reporter | ||
Comment 14•2 years ago
|
||
This has been enabled by default in Firefox Nightly with Bug 1831963. Maybe it is now time to consider enabling in Thunderbird Daily as well.
Comment 15•2 years ago
|
||
Any update on this?
Comment 16•2 years ago
|
||
We're gonna tackle this during next year cycle.
It's a nice to have addition but we need to properly plan how and where it will integrate.
Comment 17•2 years ago
|
||
Sure thank you :)
Comment 18•2 years ago
|
||
It was also suggested on Matrix that this might be useful in chat, to have translations of chat messages from others. That'd be slightly more involved since we'd probably only want to translate actual message contents, and only for display, not in the actual logs.
Comment 19•11 months ago
|
||
Please, Is there some activity that might bring this to the attention again?
Comment 20•11 months ago
|
||
pvagner@pvagner.sk, if you have something to contribute, there shall be attention. Otherwise, it is correctly triaged, and thus shall worked on by the team when the more important issues have been completed, or if someone else decides to contribute effort.
Description
•