Bug 1493374 - Port bug 1493220: Replace getRegionalPrefsLocales() with regionalPrefsLocales. r=aceman,MakeMyDay DONTBUILD
authorJorg K <jorgk@jorgk.com>
Mon, 24 Sep 2018 11:53:39 +0200
changeset 33220 86e1a9121b5d5bf67043e611b356462214a67dba
parent 33219 149dde1772d65e32046d704401cda8acc69c4c86
child 33221 32f0ea906e38c2916eb4f45f92babe129d71dc08
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersaceman, MakeMyDay
bugs1493374, 1493220
Bug 1493374 - Port bug 1493220: Replace getRegionalPrefsLocales() with regionalPrefsLocales. r=aceman,MakeMyDay DONTBUILD
calendar/test/unit/test_l10n_utils.js
mail/components/preferences/advanced.js
suite/components/pref/content/pref-appearance.js
--- a/calendar/test/unit/test_l10n_utils.js
+++ b/calendar/test/unit/test_l10n_utils.js
@@ -52,17 +52,17 @@ add_task(async function calendarInfo_tes
                 "firstDayOfWeek", "minDays", "weekendStart", "weekendEnd",
                 "calendar", "locale"
             ]
         }
     }];
     let useOSLocaleFormat = Preferences.get("intl.regional_prefs.use_os_locales", false);
     let osprefs = Cc["@mozilla.org/intl/ospreferences;1"].getService(Ci.mozIOSPreferences);
     let appLocale = Services.locale.appLocalesAsBCP47[0];
-    let rsLocale = osprefs.getRegionalPrefsLocales()[0];
+    let rsLocale = osprefs.regionalPrefsLocales[0];
 
     let i = 0;
     for (let test of data) {
         i++;
         let info = cal.l10n.calendarInfo(test.input.locale);
         equal(
             Object.keys(info).length,
             test.expected.properties.length,
--- a/mail/components/preferences/advanced.js
+++ b/mail/components/preferences/advanced.js
@@ -472,17 +472,17 @@ var gAdvancedPane = {
       this._setupLearnMoreLink("toolkit.telemetry.infoURL", "telemetryLearnMore");
   },
 
   formatLocaleSetLabels() {
     const osprefs =
       Cc["@mozilla.org/intl/ospreferences;1"]
         .getService(Ci.mozIOSPreferences);
     let appLocale = Services.locale.appLocalesAsBCP47[0];
-    let rsLocale = osprefs.getRegionalPrefsLocales()[0];
+    let rsLocale = osprefs.regionalPrefsLocales[0];
     let names = Services.intl.getLocaleDisplayNames(undefined, [appLocale, rsLocale]);
     let appLocaleRadio = document.getElementById("appLocale");
     let rsLocaleRadio = document.getElementById("rsLocale");
     let appLocaleLabel = this.mBundle.getFormattedString("appLocale.label",
                                                          [names[0]]);
     let rsLocaleLabel = this.mBundle.getFormattedString("rsLocale.label",
                                                         [names[1]]);
     appLocaleRadio.setAttribute("label", appLocaleLabel);
--- a/suite/components/pref/content/pref-appearance.js
+++ b/suite/components/pref/content/pref-appearance.js
@@ -91,17 +91,17 @@ function SelectLocale(aElement)
  */
 function NumberLocales_Load()
 {
   const osprefs =
     Cc["@mozilla.org/intl/ospreferences;1"]
       .getService(Ci.mozIOSPreferences);
 
   let appLocale = Services.locale.appLocalesAsBCP47[0];
-  let rsLocale = osprefs.getRegionalPrefsLocales()[0];
+  let rsLocale = osprefs.regionalPrefsLocales[0];
   let names = Services.intl.getLocaleDisplayNames(undefined, [appLocale, rsLocale]);
 
   let appLocaleRadio = document.getElementById("appLocale");
   let rsLocaleRadio = document.getElementById("rsLocale");
   let prefutilitiesBundle = document.getElementById("bundle_prefutilities");
 
   let appLocaleLabel = prefutilitiesBundle.getFormattedString("appLocale.label",
                                                               [names[0]]);