From 859359886aa64270704b138e694cf5000d60a465 Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Thu, 26 Mar 2015 11:29:28 +0200 Subject: [PATCH] Bug 1147311 - Migrate x-central-euro, x-baltic and tr to x-western in the font.language.group pref. r=mak. --- browser/components/nsBrowserGlue.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index 41ec5c9d1d5..5b4d902af56 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -1661,7 +1661,7 @@ BrowserGlue.prototype = { }, _migrateUI: function BG__migrateUI() { - const UI_VERSION = 28; + const UI_VERSION = 29; const BROWSER_DOCURL = "chrome://browser/content/browser.xul"; let currentUIVersion = 0; try { @@ -2016,6 +2016,21 @@ BrowserGlue.prototype = { Services.prefs.clearUserPref("browser.devedition.showCustomizeButton"); } + if (currentUIVersion < 29) { + let group = null; + try { + group = Services.prefs.getComplexValue("font.language.group", + Ci.nsIPrefLocalizedString); + } catch (ex) {} + if (group && + ["tr", "x-baltic", "x-central-euro"].some(g => g == group.data)) { + // Latin groups were consolidated. + group.data = "x-western"; + Services.prefs.setComplexValue("font.language.group", + Ci.nsIPrefLocalizedString, group); + } + } + // Update the migration version. Services.prefs.setIntPref("browser.migration.version", UI_VERSION); },