Open Bug 1954357 Opened 6 months ago Updated 4 months ago

The translation target language in the context menu is incorrect.

Categories

(Firefox :: Translations, defect)

Firefox 136
defect

Tracking

()

UNCONFIRMED

People

(Reporter: pesho_yes, Unassigned, NeedInfo)

Details

Attachments

(1 file)

Attached image firefox2.png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0

Steps to reproduce:

I have my browser settings set to English everywhere.

Actual results:

When I want to translate some text on a web site, I select the text and right-click and the context menu option to translate the text says "Translate selection to български"
This is incorrect, everything in the browser settings is set to English.
I don't even have this language downloaded for translations.
Actually the language names in the translation settings dialog are also not in English

Expected results:

I want a setting that specifies which language is the target of a translation. Or just use by default the language set in the settings.

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

Component: Untriaged → Translations

This seems like the Intl.DisplayNames API is receiving the wrong locale. Can you provide more information about your language setup?

in about:debugging there is a "Internationalization & Localization" section. Can you share your information from that section? Also the section in about:preferences for "Choose your preferred language for displaying pages".

Flags: needinfo?(pesho_yes)

In about:debugging there is nowhere a section with that name or anything related.
In the settings, the "Choose your preferred language for displaying pages" has two languages: English [en] and English [en-us]

Flags: needinfo?(pesho_yes)

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

For more information, please visit BugBot documentation.

Flags: needinfo?(enordin)

Hi pesho_yes,

In comment 2 I think Greg meant about:support, rather than about:debugging, regarding the "Internationalization & Localization" section.

Can you please tell us what values you see there?

Flags: needinfo?(enordin) → needinfo?(pesho_yes)

Yes, here is a screenshot:
https://imgur.com/a/fEbW1Sk

Flags: needinfo?(pesho_yes)

Sorry, I thought I couldn't copy paste, here is in text:
Looks like it picks up a lot of values solely from my location.

Requested Locales ["en-US","bg"]
Available Locales ["en-US"]
App Locales ["en-US"]
Regional Preferences ["bg-BG"]
Default Locale "en-US"
Operating System
System Locales ["en-US","bg-BG"]
Regional Preferences ["bg-BG"]

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)

It looks like something in the Services.intl.DisplayNames is pulling Bulgarian, while the UI is in English. This requires a bit more investigation, but should have enough details to reproduce with the provided information.

Severity: -- → S3
Flags: needinfo?(gtatum)

Thanks for the reminder on following up on this.

I actually had some changes that landed recently, which may have fixed this indirectly.

In the createLanguageDisplayNames() function, we were previously passing undefined as the locale, which is supposed to do the correct thing as far as I am aware, but for some reason I noticed that it was not using the correct language in a different context from this bug.

Regardless, we are now intentionally passing in Services.locale.appLocaleAsBCP47 to the DisplayNames object, and you should get the correct thing, according to what you pasted in comment 7.


:pesho_yes, would you be able to try this out in the latest Firefox Nightly?

I think the change may have fixed this already.

Flags: needinfo?(pesho_yes)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:epavlov, since the bug has recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(pesho_yes) → needinfo?(epavlov)
Flags: needinfo?(epavlov)

I wasn't able to reproduce the issue in Firefox 139.0.1 on Windows 10, using the en-US build with English set as the default language. The context menu shows "Translate selection to English" as expected. I also changed the system region to Bulgaria in Windows settings. Are you still seeing this issue in the latest Firefox? Thank you.

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

Attachment

General

Creator:
Created:
Updated:
Size: