Bug 1493313 - Port Bug 1491394: Replace getAppLocalesAsBCP47() with appLocalesAsBCP47. r=jorgk DONTBUILD
authoraceman <acelists@atlas.sk>
Fri, 21 Sep 2018 19:00:00 +0200
changeset 33206 ed984c4258e99aacdeaae73ba7a63f2719178516
parent 33205 a01d1481ef18bb394581e01a9c5950829aae22a4
child 33207 5bb80260d09b0b3a0ace92e27444f5f9ec7eef11
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersjorgk
bugs1493313, 1491394
Bug 1493313 - Port Bug 1491394: Replace getAppLocalesAsBCP47() with appLocalesAsBCP47. r=jorgk 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
@@ -51,17 +51,17 @@ add_task(async function calendarInfo_tes
             properties: [
                 "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.getAppLocalesAsBCP47()[0];
+    let appLocale = Services.locale.appLocalesAsBCP47[0];
     let rsLocale = osprefs.getRegionalPrefsLocales()[0];
 
     let i = 0;
     for (let test of data) {
         i++;
         let info = cal.l10n.calendarInfo(test.input.locale);
         equal(
             Object.keys(info).length,
--- a/mail/components/preferences/advanced.js
+++ b/mail/components/preferences/advanced.js
@@ -471,17 +471,17 @@ var gAdvancedPane = {
     if (AppConstants.MOZ_TELEMETRY_REPORTING)
       this._setupLearnMoreLink("toolkit.telemetry.infoURL", "telemetryLearnMore");
   },
 
   formatLocaleSetLabels() {
     const osprefs =
       Cc["@mozilla.org/intl/ospreferences;1"]
         .getService(Ci.mozIOSPreferences);
-    let appLocale = Services.locale.getAppLocalesAsBCP47()[0];
+    let appLocale = Services.locale.appLocalesAsBCP47[0];
     let rsLocale = osprefs.getRegionalPrefsLocales()[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]]);
--- a/suite/components/pref/content/pref-appearance.js
+++ b/suite/components/pref/content/pref-appearance.js
@@ -90,17 +90,17 @@ function SelectLocale(aElement)
  * and add the respective strings to the prefpane labels.
  */
 function NumberLocales_Load()
 {
   const osprefs =
     Cc["@mozilla.org/intl/ospreferences;1"]
       .getService(Ci.mozIOSPreferences);
 
-  let appLocale = Services.locale.getAppLocalesAsBCP47()[0];
+  let appLocale = Services.locale.appLocalesAsBCP47[0];
   let rsLocale = osprefs.getRegionalPrefsLocales()[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",