Greg Tatum 7890042033 Bug 1755519 - Add language switching to about:welcome; r=pdahiya,platform-i18n-reviewers,flod,dminor
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

Differential Revision: https://phabricator.services.mozilla.com/D138831
2022-03-02 15:52:43 +00:00
..