diff --git a/chrome/content/zotero/xpcom/intl.js b/chrome/content/zotero/xpcom/intl.js index cfe75f88fa..537618f1fa 100644 --- a/chrome/content/zotero/xpcom/intl.js +++ b/chrome/content/zotero/xpcom/intl.js @@ -35,9 +35,11 @@ Zotero.Intl = new function () { var prevLocale = Zotero.Prefs.get('general.useragent.locale', true); if (prevMatchOS !== undefined || prevLocale !== undefined) { + let restart = false; if (prevMatchOS === false && prevLocale) { try { Services.locale.setRequestedLocales([prevLocale]); + restart = true; } catch (e) { // Don't panic if the value is not a valid locale code @@ -45,6 +47,10 @@ Zotero.Intl = new function () { } Zotero.Prefs.clear('intl.locale.matchOS', true); Zotero.Prefs.clear('general.useragent.locale', true); + if (restart) { + Zotero.Utilities.Internal.quitZotero(true); + return; + } } Components.utils.import("resource://gre/modules/PluralForm.jsm"); diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 67d6b34d70..db46d6151b 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -240,6 +240,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); Zotero.browser = "g"; Zotero.Intl.init(); + if (this.restarting) return; yield Zotero.Prefs.init(); Zotero.Debug.init(options && options.forceDebugLog);