Closed Bug 1976006 Opened 1 year ago Closed 1 year ago

about:settings localization retains strings from previous locale

Categories

(Firefox :: Settings UI, defect, P3)

Firefox 140
defect

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox-esr140 --- fixed
firefox140 --- wontfix
firefox141 + wontfix
firefox142 --- wontfix
firefox143 --- fixed

People

(Reporter: Xanatos, Assigned: mstriemer)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [recomp])

Attachments

(7 files, 2 obsolete files)

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

Steps to reproduce:

  1. Open Firefox settings
  2. Go to the General Tab
  3. Select another language
  4. Scroll down to "Browsing"
  5. See old language still there mixed within the newly selected language.

Actual results:

Language on certain settings are not correctly changed if language is switched

Expected results:

The translations should be correct.

Attached image MixedTranslations.png
Attached image MoreMixup.png

The issue get's worse if you change the language multiple times back and forth.

I did test it with German and Englisch it does not matter which one was used as a inital language.

Component: Untriaged → Translations

Just did another quick test using the private mode, I did want to confirm that this is not an issue triggered by any addon.

The problem persists.

Attached video english-to-german.webm

Hi Simon,

I just tried this out, but I am unfortunately not able to reproduce.

User-Agent     Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Betriebssystem Linux 6.11.0-26-generic #26~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 17 19:20:47 UTC 2

I've attached a video of switching from English to German with a fresh install of Firefox, and it looks like all of the strings change correctly for me.


Can you try this again on a fresh profile, instead of just private browsing mode, to see if it still reproduces?

Flags: needinfo?(w69a1zlfi)

Also, I'm moving this to the Firefox :: Settings UI component, since this bug is more related to the Localization of the about:settings page, rather than the Translations feature within Firefox.

Component: Translations → Settings UI

Hi Erik,

If you watch your video closly, checking the last 4 entries which are boxed the languages are mixed up. Some parts are still in German while others are Englisch.

I still did try the test you did want me to do and I got the same error as noted. I will render the video and attach it as well to the ticket.

Flags: needinfo?(w69a1zlfi)
Attached video Fresh_profile_translation_issue.mkv (obsolete) —
Attachment #9499042 - Attachment is obsolete: true

Simon, thank you for following up with this!

I misunderstood, thinking that the issue was with text simply remaining fully in the originally selected language prior to the locale change, but I see now that even in my video it has a mixture of both languages. I apologize for not paying more attention to that.

I am confirming this as a defect. Thank you for reporting it.


I've used mozregression to pin the issue down to the following change set:

:mstriemer, it looks like this may have been regressed by Bug 1964824.

Could you take a look?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(mstriemer)
Keywords: regression
Regressed by: 1964824
Summary: Translation in settings not updating correctly if language changed → about:settings localization retains strings from previous locale

Set release status flags based on info from the regressing bug 1964824

We don't have any more releases scheduled for Fx140.
:mstriemer, this is the final week of beta for Fx141. There is little time to fix and uplift before RC week. Hopefully, you can find a fix that is safe to uplift.

Set release status flags based on info from the regressing bug 1964824

Duplicate of this bug: 1978003
Assignee: nobody → mstriemer
Status: NEW → ASSIGNED

I believe Lit was rendering the text into a Text node, then when the label would change it would replace that node's textContent. However moz-label would have split that node into 2 (or 3 really) to insert the accesskey underline

Here's an example patch that will set the label using .textContent so Lit isn't expecting to handle a node directly (I think this will only happen when the label changes, but that's maybe worth checking). I also noticed that we weren't handling the MutationObserver case properly if the accesskey hasn't changed so refactored that a little (this was needed in an earlier version that used a ref but I wonder if it's no longer necessary--seems like a good thing to fix either way)

This should probably get a test at some point

Flags: needinfo?(mstriemer)
Whiteboard: [recomp]

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

For more information, please visit BugBot documentation.

Flags: needinfo?(mstriemer)
Severity: -- → S3
Flags: needinfo?(mstriemer)
Priority: -- → P3
Pushed by mstriemer@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a6c8d13e2546 https://hg.mozilla.org/integration/autoland/rev/9fffc4c30df3 Fix moz- input labels when localisation changes r=reusable-components-reviewers,tgiles
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
Flags: in-testsuite+

The patch landed in nightly and beta is affected.
:mstriemer, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(mstriemer)
Flags: needinfo?(mstriemer)

Should we uplift this to ESR140? Please nominate if yes.

Flags: needinfo?(mstriemer)
Blocks: 1986568
Attachment #9510995 - Flags: approval-mozilla-esr140?
Attachment #9510996 - Flags: approval-mozilla-esr140?

firefox-esr140 Uplift Approval Request

  • User impact if declined: Strings in the Browsing section of preferences will be incorrect until the page is refreshed after the user changes their Firefox Language
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: See bug description
  • Risk associated with taking this patch: Low/medium
  • Explanation of risk level: Patch has been on central for 25 days, it has tests
  • String changes made/needed: No
  • Is Android affected?: no

Note that the bug is not entirely fixed with the changes in this patch after further testing, but it is still an improvement from the original bug (the strings are now correct, but accesskeys are missing if they changed)

I filed bug 1986568 to fix the accesskey issue

Flags: needinfo?(mstriemer)

Also the original bug doesn't seem like it would be happening very often since it requires the user to change the Firefox language, and the bug only persists until the Preferences page is refreshed/reloaded

Doesn't feel like a huge priority to be uplifted to me, but it would be nice to not have the bug around for a year on ESR...

firefox-esr140 Uplift Approval Request

  • User impact if declined: Strings in the Browsing section of preferences will be incorrect until the page is refreshed after the user changes their Firefox Language
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: See bug description
  • Risk associated with taking this patch: Low/medium
  • Explanation of risk level: Patch has been on central for 25 days, it has tests
  • String changes made/needed: No
  • Is Android affected?: no
Attachment #9510996 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+
Attachment #9510995 - Attachment is obsolete: true
Attachment #9510995 - Flags: approval-mozilla-esr140?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: