Closed Bug 1755519 Opened 3 years ago Closed 3 years ago

Language mismatch screen for about:welcome

Categories

(Core :: Internationalization, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(2 files)

As part of live language switching we want to present users with the option to match their Firefox installation with their system locale. This screen will be presented to a small number of users who have a language mismatch. About twice as many people also have a region mismatch, but they will not currently be presented with this dialog.

This current implementation is not going to use the Nimbus experimentation platform, but will be preffed off until it is ready to ship to users. It affects a small enough set of users that it's probably not very significant to test against.

The TestUtils file is broken out as it will be shared with the
about:welcome browser chrome tests.

This patch ended up adding some complexity to about:welcome, as the
language switching needs to eagerly perform fallible asynchronous
actions. Specifically it needs to get the list of addons and
pre-emptively install the langpack, which can take time, and can fail.

This necessitated building a custom React components and custom hooks to
be able to deal with these requirements.

The following command will allow for the testing of this feature.

./mach run
--temp-profile
--setpref "extensions.getAddons.langpacks.url=https://mock-amo-language-tools.glitch.me/?app=firefox&type=language&appversion=%VERSION%"
--setpref "intl.multilingual.aboutWelcome.languageMismatchEnabled=true"
--setpref "intl.multilingual.aboutWelcome.systemLocaleOverride=es-ES" #(optional)
-- --new-tab about:welcome

Depends on D138830

Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ef83387c0ceb Add JSM for langpack matching logic; r=platform-i18n-reviewers,nordzilla https://hg.mozilla.org/integration/autoland/rev/90d6da07a4aa Add language switching to about:welcome; r=pdahiya,platform-i18n-reviewers,flod,dminor
Regressions: 1757237
Regressions: 1757254

Backed out 2 changesets (bug 1755519) for causing assertion failure in widget/cocoa/nsMacDockSupport.mm

Backout link: https://hg.mozilla.org/integration/autoland/rev/4e3cd8fcfa8c9ac735da58db6510ab40099b9434

Push with failures

Failure log

Flags: needinfo?(gtatum)
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/873d83eaa24e Add JSM for langpack matching logic; r=platform-i18n-reviewers,nordzilla https://hg.mozilla.org/integration/autoland/rev/67e6561012ad Add language switching to about:welcome; r=pdahiya,platform-i18n-reviewers,flod,dminor

Backed out for causing node test failures (About:welcome bundle out of date).
and also this failure reappeared, it's not perma but maybe you could check it out.

Push with failures

Failure log

Backout link

[task 2022-03-02T14:20:52.902Z] + cd /builds/worker/checkouts/gecko/browser/components/newtab
[task 2022-03-02T14:20:52.903Z] + npm install
[task 2022-03-02T14:21:06.223Z] 
[task 2022-03-02T14:21:06.223Z] > core-js@2.6.11 postinstall /builds/worker/checkouts/gecko/browser/components/newtab/node_modules/core-js
[task 2022-03-02T14:21:06.223Z] > node -e "try{require('./postinstall')}catch(e){}"
[task 2022-03-02T14:21:06.223Z] 
[task 2022-03-02T14:21:06.270Z] Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
[task 2022-03-02T14:21:06.270Z] 
[task 2022-03-02T14:21:06.270Z] The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
[task 2022-03-02T14:21:06.270Z] > https://opencollective.com/core-js 
[task 2022-03-02T14:21:06.270Z] > https://www.patreon.com/zloirock 
[task 2022-03-02T14:21:06.270Z] 
[task 2022-03-02T14:21:06.270Z] Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
[task 2022-03-02T14:21:06.270Z] 
[task 2022-03-02T14:21:06.956Z] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/watchpack/node_modules/fsevents):
[task 2022-03-02T14:21:06.956Z] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[task 2022-03-02T14:21:06.962Z] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
[task 2022-03-02T14:21:06.962Z] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[task 2022-03-02T14:21:06.969Z] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/chokidar/node_modules/fsevents):
[task 2022-03-02T14:21:06.969Z] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
[task 2022-03-02T14:21:06.969Z] 
[task 2022-03-02T14:21:06.973Z] added 1088 packages from 1180 contributors and audited 1166 packages in 13.123s
[task 2022-03-02T14:21:07.326Z] 
[task 2022-03-02T14:21:07.326Z] 88 packages are looking for funding
[task 2022-03-02T14:21:07.326Z]   run `npm fund` for details
[task 2022-03-02T14:21:07.326Z] 
[task 2022-03-02T14:21:07.326Z] found 29 vulnerabilities (17 moderate, 12 high)
[task 2022-03-02T14:21:07.326Z]   run `npm audit fix` to fix them, or `npm audit` for details
[task 2022-03-02T14:21:07.725Z] + node bin/try-runner.js
[task 2022-03-02T14:21:07.755Z] TEST START | checkBundles
[task 2022-03-02T14:21:15.573Z] TEST-UNEXPECTED-FAIL checkBundles | About:welcome bundle out of date
[task 2022-03-02T14:21:15.575Z] { checkBundles: false }
[task 2022-03-02T14:21:15.575Z] CODE 1
[taskcluster 2022-03-02 14:21:17.037Z] === Task Finished ===
[taskcluster 2022-03-02 14:21:17.037Z] Unsuccessful task run with exit code: 1 completed in 789.371 seconds
Flags: needinfo?(gtatum)
Flags: needinfo?(gtatum)
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/46653e26cadb Add JSM for langpack matching logic; r=platform-i18n-reviewers,nordzilla https://hg.mozilla.org/integration/autoland/rev/759fd4816180 Add language switching to about:welcome; r=pdahiya,platform-i18n-reviewers,flod,dminor
Flags: needinfo?(gtatum)
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Regressions: 1757875
Blocks: 1728848
Blocks: 1762308
Regressions: 1764535
Regressions: 1764681
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: