Closed Bug 1855839 Opened 2 years ago Closed 4 months ago

Installed languages list for translations does not respect new display language

Categories

(Firefox :: Translations, defect, P2)

Firefox 118
defect

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: neal.van.meerbeek, Assigned: keanucuco, Mentored)

References

Details

(Keywords: good-first-bug)

Attachments

(3 files, 2 obsolete files)

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

Steps to reproduce:

After changing Firefox display languages from Dutch to English(US), the languages shown under "Install languages for offline translation" remain displayed in the old display language.

Please find attached the screenshot for my Language settings.

Steps to reproduce:

  1. Change Display Language
  2. Go to Language settings

Actual results:

Languages for offline translation are displayed in the old Display Language.

Expected results:

Languages for offline translation are displayed in the new Display Language.

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

Indeed after changing the display language the old one still persisted until first Firefox restart on Mac12.6 using FF build 118.0b3.
Neal, can you please confirm whether the issue persists after Firefox restart. Thank you so much.

Flags: needinfo?(neal.van.meerbeek)

It does persist after multiple Firefox restarts on Firefox 118.0.1 and Windows 11, even after reinstalling Firefox. Interestingly, creating a new profile fixes the issue for said new profile.

Flags: needinfo?(neal.van.meerbeek)

The fix here is to listen to the "intl:app-locales-changed" and re-build the language list. For me restarting the browser fixes it, so I'm not reproducing on macOS either. We should verify on Windows.

This searchfox link shows how to add an observer and listen to it.

The this object for the observer should be the TranslationsState instance. The language list is built here: https://searchfox.org/mozilla-central/rev/95787423bc1c7ba895ef9c6918feb054866d9f41/browser/components/preferences/main.js#1031-1061

Mentor: enordin, gtatum
Severity: -- → S3
Keywords: good-first-bug
Priority: -- → P2

Hi, i am an outreachy applicant and wanted to solve this issue. Could you please assign it to me.

Duplicate of this bug: 1857449
Assignee: nobody → nzaih18
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #9357073 - Attachment is obsolete: true
Attachment #9357337 - Attachment description: Bug 1855839 add an observer to the TranslationInstance in the getLanguageList function to make sure the translations are up to date in the language settings r=Gijs → WIP: Bug 1855839 add an observer to the TranslationInstance in the getLanguageList function to make sure the translations are up to date in the language settings r=Gijs
Attachment #9357337 - Attachment description: WIP: Bug 1855839 add an observer to the TranslationInstance in the getLanguageList function to make sure the translations are up to date in the language settings r=Gijs → Bug 1855839 add an observer to the TranslationInstance in the getLanguageList function to make sure the translations are up to date in the language settings r=Gijs
Attachment #9357337 - Attachment description: Bug 1855839 add an observer to the TranslationInstance in the getLanguageList function to make sure the translations are up to date in the language settings r=Gijs → WIP: Bug 1855839 add an observer to the TranslationInstance in the getLanguageList function to make sure the translations are up to date in the language settings r=Gijs
Attachment #9357337 - Attachment description: WIP: Bug 1855839 add an observer to the TranslationInstance in the getLanguageList function to make sure the translations are up to date in the language settings r=Gijs → Bug 1855839 add an observer to the TranslationInstance in the getLanguageList function to make sure the translations are up to date in the language settings r=Gijs

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.

Assignee: nzaih18 → nobody
Status: ASSIGNED → NEW

Is this bug appropriate any more? The current Nightly doesn't let you choose a UI language.

I can't seem to attach a screenshot from the nightly build to show this.

Hi Kenan, thanks for asking.

This is still an issue.

Firefox Nightly only has the single language that you chose when you downloaded it by default. Adding another language to Nightly is a manual process, which is why you don't see the option in the settings.

If you were to change your language in Release Firefox, however, the language display names would not be updated with the rest of the UI.

This is somewhat of a lower-urgency issue because simply reloading the page fixes the names, which is probably why it has gone unfixed for so long.

However, it remains a good first bug. Are you interested in implementing a fix for this?

Flags: needinfo?(koenigseggcc)

Yeah, I'd be interested in taking a crack at this, but I'm first getting some groundwork done.

I'm compiling the Nightly from Mercurial, and I see a note that if you are using a Nightly you have to download the appropriate version. How can I compile more than one language into my Mercurial builds?

Flags: needinfo?(koenigseggcc)

So would this change be as simple as the following?

  1. add an 'intl:app-locales-changed' observer to init()
  2. call buildLanguagesList in observe()
Assignee: nobody → keanucuco
Status: NEW → ASSIGNED
Attachment #9474660 - Attachment is obsolete: true
Pushed by enordin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/804a6a9f00c7 [Translations] Update offline translation language list display on locale change. r=nordzilla,settings-reviewers,translations-reviewers,Gijs
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
QA Whiteboard: [qa-triage-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: