Closed Bug 1558775 Opened 5 years ago Closed 5 years ago

The "Confirm and Restart" button on the Preference tab for switching to another locale doesn't work

Categories

(Thunderbird :: Preferences, defect)

defect
Not set
normal

Tracking

(thunderbird68+ fixed, thunderbird69 fixed)

RESOLVED FIXED
Thunderbird 69.0
Tracking Status
thunderbird68 + fixed
thunderbird69 --- fixed

People

(Reporter: nONoNonO, Assigned: jorgk-bmo)

References

(Regression)

Details

(Keywords: regression)

When you have an extra language pack installed and exposed the GUI by toggling the pref intl.multilingual.enabled to true, the button to change to new locale doesn't work. See the following message in the errorconsole:
TypeError: event is undefined
confirmLanguageChange chrome://messenger/content/preferences/advanced.js:728
showConfirmLanguageChangeMessageBar chrome://messenger/content/preferences/advanced.js:705

When looking at the code, I see that in addEventListener no event is passed to the function:
https://searchfox.org/comm-central/source/mail/components/preferences/advanced.js#746
button.addEventListener("command", () => gAdvancedPane.confirmLanguageChange());

Maybe something like this fixes it?
button.addEventListener("command", (event) => gAdvancedPane.confirmLanguageChange(event));

I didn't say "Assign to Richard", I said, NI him. That stuff is ported from M-C and it looks different there:
https://searchfox.org/mozilla-central/rev/c606cdd6d014fee4034da1702d484c0d41b604c9/browser/components/preferences/in-content/main.js#810

Flags: needinfo?(richard.marti)

I'm pushing a fix now, sadly I can't test it on trunk, but it won't get any worse ;-) - Richard, can you please look whether it's still working on trunk.

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/08f782cdbba0
Revert part of rev 423c3668781b (bug 1547581) to fix new language 'confirm and restart' button. a=backout DONTBUILD

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Assignee: richard.marti → jorgk
Target Milestone: --- → Thunderbird 69.0
Flags: needinfo?(richard.marti)

(In reply to Jorg K (GMT+2) from comment #2)

I'm pushing a fix now, sadly I can't test it on trunk, but it won't get any worse ;-) - Richard, can you please look whether it's still working on trunk.

Axel mentioned on IRC that it's broken and he'll file a bug for it. Apparently some Fluent "no bundle was loaded" error.

Regressed by: 1547581

Thanks, the change may work but reverting this goes against the idea of bug 1547581.
Can we rather add the event argument as in comment 0?

Well, that code needs to be kept 100% in sync with M-C for easier porting. If they don't do it, we don't do it. You can apply your new goodness anywhere else ;-)

Hmm, I can't test this since I'm running into bug 1558859. How did you manage to install the additional message in the first place? Is it fixed in beta 1 build 2?

Flags: needinfo?(o.e.ekker)

A installed language should be shown already in the menulist on Advanced itself. And here you can select your language.

I tried it on tip and this works, it asks for restart. I see bug 1558859 too. This dialog is to sort/add/remove the languages.

Flags: needinfo?(o.e.ekker)

Sure, but to set a new language you run into bug 1558859. Anyway, I'll put that on the beta and then we'll see.

EDIT: Sorry, comment #9, the languages are already on the menu list. Case closed. I verified the beta patch on a try build.

Keywords: regression
You need to log in before you can comment on or make changes to this bug.