Allow SelectTranslationsPanel while Full Page Translations is Active
Categories
(Firefox :: Translations, enhancement)
Tracking
()
People
(Reporter: nordzilla, Assigned: nordzilla)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Description
Currently, we disallow the Select Translations Panel from being offered while Full Page Translations is active. Some of these reasons are described in comment 2 of Bug 1901455.
Ultimately, we should allow this to happen, but we will just hide the translate-full-page button from the panel when Full Page Translations is active, to prevent confusing scenarios involving re-translation.
We should probably also add a telemetry event extra key to the panel open event, logging whether full-page translations was active when the panel opened, or not.
Steps to implement
- Remove the restriction disallowing Select Translations on top of Full Page Translations.
- Hide the translate-full-page button from the Select Translations Panel when Full Page Translations is active in the current tab and window.
- Add a telemetry extra key for the open event that covers this distinction.
Tests to implement
- Update all tests and visibility assertions to the new expectations.
- Update telemetry tests to check for this extra key.
- Add a new test case specifically for select translations on top of full page translations.
Comment 1•5 months ago
|
||
The severity field is not set for this bug.
:gregtatum, could you have a look please?
For more information, please visit BugBot documentation.
Assignee | ||
Updated•5 months ago
|
Assignee | ||
Comment 2•4 months ago
|
||
Updated•4 months ago
|
Assignee | ||
Comment 3•4 months ago
|
||
Now that Select Translations is available while Full-Page-Translations (FPT)
is active, this patch ensures that the translate-full-page button in the
Select Translations Panel is hidden and disabled when FPT is currently active,
to avoid complicated UX around what it would mean to re-trigger a FPT request.
Depends on D216106
Assignee | ||
Comment 4•4 months ago
|
||
The Full-Page Translations (FPT) actor listens for translation errors
tied to the innerWindowID when it is active. This way it can show the
FPT panel error state if an error occurs. This patch ensures that the
Select Translations Panel (STP) is decoupled from the innerWindowID,
so that if the STP encounters a translation error while FPT is active
without error, that FPT will not react to the unrelated error state.
Depends on D216424
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
https://hg.mozilla.org/mozilla-central/rev/4d0dd24adb6e
https://hg.mozilla.org/mozilla-central/rev/27b4bc555026
https://hg.mozilla.org/mozilla-central/rev/aef5e88112ec
Assignee | ||
Comment 7•4 months ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]:
The Select Translations Panel (STP) can now be accessed on a page that is actively being translated by the Full-Page Translations (FPT) feature.
For example, if I translate a French page into German using FPT, I can then highlight a selection of the now-German text and use STP to translate that text from German into another language, or back into French to see how well the translation round-trips.
This also affects situations on sites such as https://www.leparisien.fr/, which shows a popup that is marked with notranslate
. The FPT feature respects the notranslate
in the markup and does not translate the popup. Previously, since STP was inaccessible while FPT is active, a user would be stuck with a notranslate
popup that they cannot read if they don't speak French. Now, they can select the text from the popup and use STP to translate the popup text to their desired language even while FPT is actively translating the rest of the page.
[Affects Firefox for Android]:
No
[Suggested wording]:
[Links (documentation, blog post, etc)]:
Comment 8•4 months ago
|
||
Note added to nightly with this wording:
Firefox now allows translating selected text portions to different languages after a full-page translation.
I am keeping the release-note flag request open to keep it on our radar for our beta and final release notes. Thanks.
Updated•4 months ago
|
Comment 9•3 months ago
|
||
I can confirm that the Select Translation feature can be used on pages that were translated using the Full Page Translation feature in Beta v130.0b4 and Nightly v131.0a1 in Windows 10, Mac 11 and Ubuntu 22.
Steps used to test:
- Load a webpage that is in a different language than the browsers and supported:
https://de.wikipedia.org/wiki/Wikipedia:Hauptseite - Use the Full Page Translation feature to translate the page to another supported language, other than the browser's (like Spanish)
- Select a string of text from the page, open the context menu and select the Translate option.
After the implementation: The Select Translation feature is usable on pages that were translated by the Full Page Translation feature.
Before the implementation: The Select Translation option is not available in the context menu on a page that was translated by the Full Page Translation feature.
Updated•3 months ago
|
Description
•