Bug 1450270 - Special case general.useragent.locale in distributions. r?gandalf draft
authorMichael Kaply <mozilla@kaply.com>
Fri, 30 Mar 2018 10:37:27 -0500
changeset 775210 2ebb44a916c01b9782c0a12639756141a96e335c
parent 775188 9ab0da7f0cfba2599c5826c99fca009d0daf61d3
push id104653
push usermozilla@kaply.com
push dateFri, 30 Mar 2018 15:59:05 +0000
reviewersgandalf
bugs1450270
milestone61.0a1
Bug 1450270 - Special case general.useragent.locale in distributions. r?gandalf MozReview-Commit-ID: Js9UxBCxht3
browser/components/distribution.js
--- 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);