Description
Is this a feature request or a bug?
Feature request
What is the current behavior?
Testing a localization of a web-extension is currently finicky. While modifying intl.locale.requested is pretty straightforward (and works via --pref and localizes the about:addons display), modifying the UI language requires to add that language to the available languages in the locale service. For example by installing said langpack, too. You can also fake it, though, see the WIP docs in https://reviewboard.mozilla.org/r/231002/diff/1#index_header.
What is the expected or desired behavior?
It'd be great if we could just do web-ext run --locale=de
Version information (for bug reports)
- Firefox version: 59 and newer
- Your OS and version: all
- Paste the output of these commands:
node --version && npm --version && web-ext --version
v10.0.0
5.6.0
2.5.0
The fix is two-fold, setting the pref and adding the locale to the available locales. The first is easy, the latter has two ways of doing it:
- add a dummy language pack to the test profile
- talk to
Services.locale
Is the latter possible? If so, that'd be probably the most straightforward way of doing it.
CC @zbraniecki