Bug 1450270 - Special case general.useragent.locale in distributions. r?gandalf
MozReview-Commit-ID: Js9UxBCxht3
--- a/browser/components/distribution.js
+++ b/browser/components/distribution.js
@@ -367,17 +367,21 @@ DistributionCustomizer.prototype = {
if (usedPreferences.indexOf(key) > -1) {
continue;
}
try {
let value = this._ini.getString("Preferences", key);
if (value) {
value = value.replace(/%LOCALE%/g, this._locale);
value = value.replace(/%LANGUAGE%/g, this._language);
- defaults.set(key, parseValue(value));
+ if (key == "general.useragent.locale") {
+ defaults.set("intl.locale.requested", parseValue(value));
+ } else {
+ defaults.set(key, parseValue(value));
+ }
}
} catch (e) { /* ignore bad prefs and move on */ }
}
}
let localizedStr = Cc["@mozilla.org/pref-localizedstring;1"].
createInstance(Ci.nsIPrefLocalizedString);