Closed Bug 1829687 Opened 3 years ago Closed 3 years ago

Add the "translate page" function to the app menu

Categories

(Firefox :: Translations, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

References

Details

Attachments

(12 files, 3 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

The process is currently automatic, but there should be a way to trigger it manually. This is not ready to be worked on as a decision needs to be made by product and UX on this.

When this is implemented, we'll need to handle the error screen for when RemoteSettings can't download the language list. Search for the TODO(Bug 1829687)

Priority: P3 → P2
Assignee: nobody → gtatum

This was missed in a previous refactor of the mock system.

This abstracts out the restricted page check. I duplicated the logic in
both the parent and the child since a later patch needs it. It also
adds another check when translating the page that we're not actually
attempting to translate a restricted page. This guards against cases
where the translation is mistakenly invoked on a page that shouldn't be
translated.

Depends on D179082

This cleans up some duplication, especially as I refactor the type in a
following patch.

Depends on D179083

This is a big logic change, but with switching the views and adding the
translations command to the app menu, it's much easier to invoke the
translations panel in uncontrolled situations. This patch adds a
best-effort approach to deducing an appropriate language for the user.

Depends on D179084

This reworks how the detect language mechanism is done since the
translations panel can now be manually invoked. It makes the docLangTag
be optional. Note that this patch may not work cleanly unless run with
the next patch. The following patch aggressively reworks the panel
structure, but the detected language logic seemed worth breaking out
separately as it was a different concern.

Depends on D179085

UX changed their mind on how the default translation panel should work.
I originally pushed back against getting this done for MVP, but the
logic is much easier when the translation panel can be manually invoked
by the user.

Depends on D179086

This adds the translations panel to the app menu, per UX's
recommendation. The menu is hidden by default until the translations
pref is enabled.

Depends on D179087

Attachment #9336145 - Attachment description: WIP: Bug 1829687 - Improve page effects for menuitem checkboxes → Bug 1829687 - Improve page action logic for menuitem checkboxes r=gregtatum!

Depends on D179245

I was getting a weird intermittent locally, and I believe this was the
cause.

Depends on D179246

Comment on attachment 9336160 [details]
Bug 1829687 - Remove duplicate ids in translations code; r?nordzilla!

Revision D179246 was moved to bug 1831963. Setting attachment 9336160 [details] to obsolete.

Attachment #9336160 - Attachment is obsolete: true

Comment on attachment 9336161 [details]
Bug 1829687 - Ensure new TranslationParent actors are created for each test; r?nordzilla!

Revision D179247 was moved to bug 1831963. Setting attachment 9336161 [details] to obsolete.

Attachment #9336161 - Attachment is obsolete: true

Comment on attachment 9336195 [details]
Bug 1829687 - Use a lazy pref getter for translations chaos mode; r?nordzilla!

Revision D179264 was moved to bug 1831963. Setting attachment 9336195 [details] to obsolete.

Attachment #9336195 - Attachment is obsolete: true
Depends on: 1821046
Blocks: 1821046
No longer depends on: 1821046
Blocks: 1825801
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/817027439757 Drive by removal of unused #getLanguageIdEngineMockedPayload; r=nordzilla https://hg.mozilla.org/integration/autoland/rev/992a5dceac2d Drive by make downloads use the chaos mode timer; r=nordzilla https://hg.mozilla.org/integration/autoland/rev/2e0704e571cc Fix small logic issue with auto translation; r=nordzilla https://hg.mozilla.org/integration/autoland/rev/c250a62301a2 Add isRestrictedPage methods; r=nordzilla https://hg.mozilla.org/integration/autoland/rev/5bc1043fa8d7 Prefer the LangTags type in doc comments; r=nordzilla https://hg.mozilla.org/integration/autoland/rev/6a44f24cc6be Add a mechanism for deducing the preferred languages for a user; r=nordzilla https://hg.mozilla.org/integration/autoland/rev/661d884b2b94 Rework detected languages; r=nordzilla,fluent-reviewers,flod https://hg.mozilla.org/integration/autoland/rev/b4848f8b0248 Apply UX feedback to consolidate translation panel views; r=nordzilla,fluent-reviewers,flod https://hg.mozilla.org/integration/autoland/rev/547f2bbf41bc Add translations command to app menu; r=nordzilla,fluent-reviewers,flod https://hg.mozilla.org/integration/autoland/rev/63e2eded4b91 Fix tests for the new translations panel design; r=nordzilla https://hg.mozilla.org/integration/autoland/rev/bb0b94520fae Add tests for the preferred languages; r=nordzilla https://hg.mozilla.org/integration/autoland/rev/d5a39414ce70 Improve page action logic for menuitem checkboxes r=gregtatum
Blocks: 1835571
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: