With multi-lingual builds we are going to make intl.locale.requested empty, to match OS locale.
However, we could use a 11.5.7 (localized) release to make it a user pref (in prefs.js).
In this way, when user will switch to the multi-lingual 12.0, they will have their preferred language saved as a user pref, and will override our new value of intl.locale.requested.
If this works as expected, users updating from 11.5.7 to 12.0 will not lose their language preference.
Edited
Designs
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
add sticky to intl.locale.requested (single-locale at the end of defaults/preferences/000-tor-browser.js)
re-zip the extracted files, and replaced the original omni.ja
tried to launch Tor Browser, and see if TorBrowser/Data/Browser/profile.default/prefs.js contained intl.locale.requested.
It doesn't .
I've tried both before and after the first launch.
But setting the pref to the same value as the default from about:config made the trick.
If they work, we'll need to change only tor-browser-build for 11.5.x.
My proposal is to call to Services.prefs.setCharPrefs("intl.locale.requested", Services.locale.requestedLocales.join(",")) in browser/components/BrowserGlue.jsm, either at each startup, or with an if that checks for Services.prefs.prefHasUserValue("intl.locale.requested").
since Services.locale.requestedLocale isn't necessarily the same. E.g. if the user changed the preference to "" then Services.locale.requestedLocale would be the system locale, which we don't want to save into the pref.
The tor-browser-build change is to make intl.locale.requestedsticky in projects/tor-browser/build.
For each lang we append pref("intl.locale.requested", "$lang"); to the defaults/preferences/000-tor-browser.js contained in browser/omni.ja (see line 360).
We need to change that line to pref("intl.locale.requested", "$lang", sticky);.
The change in tor-browser is to make Firefox actually write the old default to prefs.js, because making the pref sticky isn't enough.
But once you write it, it definitely works for our purpose.