Open Bug 1876287 Opened 2 years ago Updated 11 months ago

Show Translate button in URL bar even if web page is in language that appears in user’s preferences

Categories

(Firefox :: Translations, enhancement)

Firefox 124
Desktop
All
enhancement

Tracking

()

Tracking Status
firefox122 --- affected
firefox123 --- affected
firefox124 --- affected

People

(Reporter: sime.vidas, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0

Steps to reproduce:

In Firefox Settings > Language > Website language settings, I have three languages listed in this order: English, German, Croatian.

While I understand both English and German, I still prefer to read articles about certain topics in English, so when I navigate to an article that is written in German, I sometimes want to translate it to English.

However, Firefox’s Translate button in the URL bar is not shown on such web pages.

Example URL: https://www.peterkroener.de/natives-gzip-in-browsern-node-und-deno/

I assume that Firefox does not show the Translate button because I have German listed in my Website language settings. But since I have English listed above German in that list, I may still sometimes want to translate the page to English, so the button should be shown.

For now, I open Firefox’s menu to access the Translate option, but it did take me a while to figure out this workaround, and other users may not find this option and be confused by the button is missing from the URL bar.

The Bugbug bot thinks this bug should belong to the 'Firefox::Translation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Translation

Hello! thank you for submitting this issue unfortunately I wasn't able to reproduce the issue using firefox 124.0a1 (2024-01-29) on Ubuntu 22.04. Could you please answer the following questions in order to further investigate this issue

  1. Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
  2. Does this issue happen in the latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
  3. Do you have any addons installed? If yes could you please list them?
Flags: needinfo?(sime.vidas)

I tested in Nightly with a clean profile, and I can now confirm that the issue occurs because the German language is added to Website language settings.

Steps to reproduce:

  1. Navigate to https://www.peterkroener.de/natives-gzip-in-browsern-node-und-deno/
  2. Observe that the Translate icon button is present in the URL bar
  3. Go to Settings > General > Language, click the “Choose” button. In the dialog, add “German [de]” and move it below your primary language (I assume that’s English).
  4. Navigate to the URL from step 1 and observe that the Translate button is no longer present in the URL bar
Flags: needinfo?(sime.vidas)

Hello! Thank you for the additional steps on how to reproduce the issue. I have managed to reproduce the issue with firefox 124.0a1(2024-02-08), 123.0b8 and 122.0.1 on Ubuntu 22.04 and macOS 12.6

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → Desktop

The severity field is not set for this bug.
:gregtatum, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gtatum)

This is not a defect, but a behavior change. I'll bring it up for discussion.

Type: defect → enhancement
Flags: needinfo?(gtatum)

For now, I open Firefox’s menu to access the Translate option, but it did take me a while to figure out this workaround, and other users may not find this option and be confused by the button is missing from the URL bar.

This has been a trade-off on discoverability for users needing translations, and getting in the way and cluttering up the UI for users who do not. It's somewhat hard to get right.

I support the idea of offering the Translations Button in the case that the page language is a supported, preferred language and there is an available translation to a higher-ranked, supported, preferred language.


I think improved behavior would be the following:

Case 1

Language List

  • SupportedLang1
  • SupportedLang2

Expected Behavior
Open page in SupportedLang1, no translation is offered.
Open page in SupportedLang2, offer translation for SupportedLang1.

Case 2

Language List

  • SupportedLang1
  • SupportedLang2
  • SupportedLang3

Expected Behavior
Open page in SupportedLang1, no translation is offered.
Open page in SupportedLang2, offer translation to SupportedLang1.
Open page in SupportedLang3, offer translation to SupportedLang1.

Case 3

Language List

  • UnsupportedLang1
  • SupportedLang2
  • SupportedLang3

Expected Behavior
Open page in SupportedLang1, no translation is offered.
Open page in SupportedLang2, no translation is offered.
Open page in SupportedLang3, offer translation to SupportedLang2.


Particularly with this change, if users do not want to see the translation from their lower-ranked, supported language, then they can disable translations for that language in the settings.


Greg, Šime, thoughts?

Flags: needinfo?(sime.vidas)
Flags: needinfo?(gtatum)

Seems reasonable, and without diving into telemetry, I would assume we have a much smaller fraction of users setting multiple languages. This may even remove the awkward logic around ignore English that we have, since it's always in the list as a second language in non-English locales.

Flags: needinfo?(gtatum)

Sounds good to me.

Flags: needinfo?(sime.vidas)
You need to log in before you can comment on or make changes to this bug.