Adds the functionality for the Select Translations
context menu item to appear when a hyperlink is clicked
even if no text is selected. Selected text takes precedence
if a link is clicked while there is also an active selection.
Depends on D197225
Differential Revision: https://phabricator.services.mozilla.com/D197226
Ensures that the Select Translations context menu
item only appears when there is actively selected text
at the time the context menu is invoked.
Depends on D197224
Differential Revision: https://phabricator.services.mozilla.com/D197225
Adds the Select Translations context menu item
to the right-click context menu with an initial
localized label value.
Depends on D197223
Differential Revision: https://phabricator.services.mozilla.com/D197224
Note that this does not expose the about:translations localization file
since that is a developer-focused view that's not ready or planned for
general usage.
Differential Revision: https://phabricator.services.mozilla.com/D179360
This fixes errors surfaced in:
browser/components/tests/marionette/test_no_errors_clean_profile.py
Visually and functionally the buttons work fine, but it generates a
warning that is caught by this test.
Differential Revision: https://phabricator.services.mozilla.com/D179359
Note that this does not expose the about:translations localization file
since that is a developer-focused view that's not ready or planned for
general usage.
Differential Revision: https://phabricator.services.mozilla.com/D179360
This fixes errors surfaced in:
browser/components/tests/marionette/test_no_errors_clean_profile.py
Visually and functionally the buttons work fine, but it generates a
warning that is caught by this test.
Depends on D179275
Differential Revision: https://phabricator.services.mozilla.com/D179359
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.
Differential Revision: https://phabricator.services.mozilla.com/D179087
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.
Differential Revision: https://phabricator.services.mozilla.com/D179086
Adds new menuitems to the Translations panel settings
menu for always translate language, never translate
language, and never translate site.
Depends on D177855
Differential Revision: https://phabricator.services.mozilla.com/D177856
Adds a new button and panel for managing Translations
settings to the about:preferences panel.
Manages always-translate languages, never-translate
languages, and never-translate sites.
Depends on D178228
Differential Revision: https://phabricator.services.mozilla.com/D177854
Adds new menuitems to the Translations panel settings
menu for always translate language, never translate
language, and never translate site.
Depends on D177855
Differential Revision: https://phabricator.services.mozilla.com/D177856
Adds a new button and panel for managing Translations
settings to the about:preferences panel.
Manages always-translate languages, never-translate
languages, and never-translate sites.
Depends on D178228
Differential Revision: https://phabricator.services.mozilla.com/D177854
Adds new menuitems to the Translations panel settings
menu for always translate language, never translate
language, and never translate site.
Depends on D177855
Differential Revision: https://phabricator.services.mozilla.com/D177856
Adds a new button and panel for managing Translations
settings to the about:preferences panel.
Manages always-translate languages, never-translate
languages, and never-translate sites.
Depends on D178228
Differential Revision: https://phabricator.services.mozilla.com/D177854
This patch creates a custom element that extends the built-in label element to ad some custom styling and handling of accesskeys. This should align with the current functionality provided by the XUL label (which this code intetntionally copies and doesn't differ much from, since the XUL label is definitely battle tested).
More specifically, this patch:
* adds fallbacks/defaults for pref controlled values so this will mostly work as expected even in less privileged contexts (like about:logins, etc.)
* adds tests for the new label element
* creates a Storybook entry for the label element (note that activating the accesskey won't work as expected in Storybook, likely due to Bug 1819469)
We'll likely have to iterate on this a bit as we try to use it in all the places XUL label is currently used, but I think this is at a point where it can unblock the menu work happening in Bug 1801324.
Differential Revision: https://phabricator.services.mozilla.com/D171238
This code is untested since it's stubbing out functionality, which will
eventually use PageActions to open up a popup. The final code with the
popup will get tested, but for now rely on the existing test behavior,
without asserting new behavior.
Differential Revision: https://phabricator.services.mozilla.com/D173196
This code is untested since it's stubbing out functionality, which will
eventually use PageActions to open up a popup. The final code with the
popup will get tested, but for now rely on the existing test behavior,
without asserting new behavior.
Differential Revision: https://phabricator.services.mozilla.com/D173196
Along with bringing us closer to the layout and spacing from Figma, this does the following:
1. Changes the header element to an <h1> and uses CSS to get the expected font size. This should
make the organization of the wizard make more sense to screenreaders.
2. Handles the "single resource" case for Variant 2, where we hide "Select All" and align the
resource list to the left if there's only a single resource to import.
3. Fixes a string to match the spec.
Differential Revision: https://phabricator.services.mozilla.com/D173054
Adds a "Detect language" option which detects the language to translate.
Language detection is enabled when the option is selected and is disabled
when a different language in the dropdown is selected explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D170953
Adds a "Detect language" option which detects the language to translate.
Language detection is enabled when the option is selected and is disabled
when a different language in the dropdown is selected explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D170953
Adds a "Detect language" option which detects the language to translate.
Language detection is enabled when the option is selected and is disabled
when a different language in the dropdown is selected explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D170953