Closed Bug 1423532 Opened 7 years ago Closed 7 years ago

Port |Bug 1414390 - Add intl.locale.requested locale list to replace general.useragent.locale| to TB

Categories

(Thunderbird :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 59.0

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

Details

(Whiteboard: [Thunderbird-testfailure: Z all])

Attachments

(1 file, 3 obsolete files)

As per bug 1414390 comment #28 and further down, we need to port the migration code: https://hg.mozilla.org/mozilla-central/rev/8d88b85d93be#l3.13 We also need to port -pref("general.useragent.locale", "@AB_CD@"); +pref("intl.locale.requested", "@AB_CD@"); Let's see how much is busted in https://treeherder.mozilla.org/#/jobs?repo=comm-central&revision=8cd26835235c2356404eab8643a14d0193ffed58 without it.
Seems to cause TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\newmailaccount\test-newmailaccount.js | test-newmailaccount.js::test_provider_language_wildcard
Whiteboard: [Thunderbird-testfailure: Z all]
INFO - SUMMARY-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\newmailaccount\test-newmailaccount.js | test-newmailaccount.js::test_provider_language_wildcard INFO - EXCEPTION: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [mozILocaleService.setRequestedLocales] INFO - at: nonesuch line 1169 INFO - test_provider_language_wildcard test-newmailaccount.js:1169 3
OK, I've looked into the test failure. The test does Services.locale.setRequestedLocales(["foo"]); https://dxr.mozilla.org/comm-central/rev/492ec0687aad00eb74afb0eaefe6f40d368e3fa3/mail/test/mozmill/newmailaccount/test-newmailaccount.js#1130 and Services.locale.setRequestedLocales(["foo-bar"]); https://dxr.mozilla.org/comm-central/rev/492ec0687aad00eb74afb0eaefe6f40d368e3fa3/mail/test/mozmill/newmailaccount/test-newmailaccount.js#1169. The latter fails. Zibi says on the subject in bug 1410738 comment #8 that both "foo" and "foo-bar" are valid locales. So I'm not sure why the test fails now, especially why line 1169 fails and not 1130. Zibi?
Flags: needinfo?(gandalf)
Attached patch 1423532-locale-migrate-TB.patch (obsolete) — Splinter Review
This is the required copy/paste job. I'm not sure how to repair the test. Help!
Attachment #8935083 - Flags: review?(acelists)
Attachment #8935083 - Flags: feedback?(gandalf)
I guess so, I'll do it in the next round.
More noise :-(
Attachment #8935083 - Attachment is obsolete: true
Attachment #8935083 - Flags: review?(acelists)
Attachment #8935083 - Flags: feedback?(gandalf)
Attachment #8935095 - Flags: review?(acelists)
Attachment #8935095 - Flags: feedback?(gandalf)
Comment on attachment 8935095 [details] [diff] [review] 1423532-locale-migrate-TB.patch (v1b) Review of attachment 8935095 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/app/profile/all-thunderbird.js @@ +15,1 @@ > pref("general.skins.selectedSkin", "classic/1.0"); I think you can now remove the `pref("intl.locale.requested", "@AB_CD@");` from all-thunderbird.js. I'm doing this for Firefox in a follow-up in bug 1423618.
Attachment #8935095 - Flags: feedback?(gandalf) → feedback+
(In reply to Jorg K (GMT+1) from comment #3) > OK, I've looked into the test failure. > > The test does > Services.locale.setRequestedLocales(["foo"]); > https://dxr.mozilla.org/comm-central/rev/ > 492ec0687aad00eb74afb0eaefe6f40d368e3fa3/mail/test/mozmill/newmailaccount/ > test-newmailaccount.js#1130 > > and > Services.locale.setRequestedLocales(["foo-bar"]); > https://dxr.mozilla.org/comm-central/rev/ > 492ec0687aad00eb74afb0eaefe6f40d368e3fa3/mail/test/mozmill/newmailaccount/ > test-newmailaccount.js#1169. > > The latter fails. > > Zibi says on the subject in bug 1410738 comment #8 that both "foo" and > "foo-bar" are valid locales. So I'm not sure why the test fails now, > especially why line 1169 fails and not 1130. > > Zibi? It was my fault. I apologize. "foo-bar" is not a BCP47 well-formed language tag as per https://tools.ietf.org/html/bcp47#section-2.1 `foo-ba` is or `und` (commonly used for `undefined` locale) is.
Flags: needinfo?(gandalf)
This makes the test pass. It will be PLR in a few hours ;-)
Attachment #8935095 - Attachment is obsolete: true
Attachment #8935095 - Flags: review?(acelists)
Attachment #8935108 - Flags: review?(acelists)
Comment on attachment 8935108 [details] [diff] [review] 1423532-locale-migrate-TB.patch (v1c) Review of attachment 8935108 [details] [diff] [review]: ----------------------------------------------------------------- Thanks. Why doesn't the Firefox patch bump the UI_VERSION? ::: mail/test/mozmill/newmailaccount/test-newmailaccount.js @@ +1165,5 @@ > * is not set to "*". > */ > function test_provider_language_wildcard() { > let originalReqLocales = Services.locale.getRequestedLocales(); > + Services.locale.setRequestedLocales(["foo"]); I would prefer the "foo-ba" version, as "foo" is already tested above.
Attachment #8935108 - Flags: review?(acelists) → review+
(In reply to :aceman from comment #11) > Why doesn't the Firefox patch bump the UI_VERSION? Because they already added an upgrade step for 59, so they just added the code into it. > I would prefer the "foo-ba" version, as "foo" is already tested above. Yep, bug foo-bar makes the test fail.
Zibi proposed "foo-ba", not "foo-bar".
Damn, I missed that. Coming up.
foo-ba it is ;-)
Assignee: nobody → jorgk
Attachment #8935108 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8935127 - Flags: review+
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/1dd5743524e5 Port bug 1414390 to TB: Migrate general.useragent.locale to intl.locale.requested. r=aceman
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 59.0
FRG, maybe it's best for you to do a separate SM bug.
Flags: needinfo?(frgrahl)
Summary: Port |Bug 1414390 - Add intl.locale.requested locale list to replace general.useragent.locale| to TB and SM → Port |Bug 1414390 - Add intl.locale.requested locale list to replace general.useragent.locale| to TB
No problemo. Needs some migration code and pref changes different from TB anyway.
Filed bug 1441016 for SM. Btw. I still see the pref listed in calendar/locales/en-US/lightning-l10n.js
Flags: needinfo?(frgrahl)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: