Commit 374dd2c7 authored by Bogdan Tara's avatar Bogdan Tara
Browse files

Merge autoland to mozilla-central. a=merge

parents 84601ca6 a60da103
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -865,7 +865,7 @@ XPCOMUtils.defineConstant(this, "PanelUI", PanelUI);
 * @return  the selected locale
 */
function getLocale() {
  return Services.locale.getAppLocaleAsLangTag();
  return Services.locale.appLocaleAsLangTag;
}

function getNotificationFromElement(aElement) {
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ DistributionCustomizer.prototype = {
  },

  get _locale() {
    const locale = Services.locale.getRequestedLocale() || "en-US";
    const locale = Services.locale.requestedLocale || "en-US";
    this.__defineGetter__("_locale", () => locale);
    return this._locale;
  },
+6 −6
Original line number Diff line number Diff line
@@ -13,11 +13,11 @@
  //
  // In the future, we should provide some way for tests to decouple their
  // language selection from that of Firefox.
  const avLocales = Services.locale.getAvailableLocales();
  const avLocales = Services.locale.availableLocales;

  Services.locale.setAvailableLocales(["en-US", "es-ES"]);
  Services.locale.availableLocales = ["en-US", "es-ES"];
  registerCleanupFunction(() => {
    Services.locale.setAvailableLocales(avLocales);
    Services.locale.availableLocales = avLocales;
  });
}

@@ -152,8 +152,8 @@ async function runTests(options) {
    });
  });

  let reqLoc = Services.locale.getRequestedLocales();
  Services.locale.setRequestedLocales(["es-ES"]);
  let reqLoc = Services.locale.requestedLocales;
  Services.locale.requestedLocales = ["es-ES"];

  await extension.startup();

@@ -161,7 +161,7 @@ async function runTests(options) {

  await extension.unload();

  Services.locale.setRequestedLocales(reqLoc);
  Services.locale.requestedLocales = reqLoc;

  let node = document.getElementById(pageActionId);
  is(node, null, "pageAction image removed from document");
+1 −1
Original line number Diff line number Diff line
@@ -661,7 +661,7 @@ const AutoMigrate = {
      // lead to a an array with 1 empty string in it.
      surveyLocales = new Set(surveyLocales.filter(str => !!str));
      canDoSurveyInLocale =
        surveyLocales.has(Services.locale.getAppLocaleAsLangTag());
        surveyLocales.has(Services.locale.appLocaleAsLangTag);
    } catch (ex) {
      /* ignore exceptions and just don't do the survey. */
    }
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ AboutNewTabService.prototype = {
    return Services.locale.negotiateLanguages(
      // Fix up incorrect BCP47 that are actually lang tags as a workaround for
      // bug 1479606 returning the wrong values in the content process
      Services.locale.getAppLocalesAsBCP47().map(l => l.replace(/^(ja-JP-mac)$/, "$1os")),
      Services.locale.appLocalesAsBCP47.map(l => l.replace(/^(ja-JP-mac)$/, "$1os")),
      ACTIVITY_STREAM_BCP47,
      // defaultLocale's strings aren't necessarily packaged, but en-US' are
      "en-US",
Loading