Make the 'More Encodings' submenus non-localizable. Bug 610638, r=emk, a=bsmedberg
authorSimon Montagu <smontagu@smontagu.org>
Sun, 14 Nov 2010 16:41:43 +0200
changeset 57468 7034c271ebd2d39a6df3f7a9f749601f03ffd3bb
parent 57467 174f235f76ed07519eb580d334a3f26a8a7d9e21
child 57469 7dc151ce96f242451f5e99c623f68b1f96a47d9c
push idunknown
push userunknown
push dateunknown
reviewersemk, bsmedberg
bugs610638
milestone2.0b8pre
Make the 'More Encodings' submenus non-localizable. Bug 610638, r=emk, a=bsmedberg
browser/app/profile/firefox.js
modules/libpref/src/init/all.js
toolkit/components/intl/nsCharsetMenu.cpp
toolkit/locales/en-US/chrome/global/intl.properties
xulrunner/app/xulrunner.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -470,31 +470,16 @@ pref("privacy.cpd.siteSettings",        
 // 4 - Today
 pref("privacy.sanitize.timeSpan", 1);
 pref("privacy.sanitize.sanitizeOnShutdown", false);
 
 pref("privacy.sanitize.migrateFx3Prefs",    false);
 
 pref("network.proxy.share_proxy_settings",  false); // use the same proxy settings for all protocols
 
-// l12n and i18n
-pref("intl.accept_languages", "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.static", "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more1",  "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more2",  "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more3",  "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more4",  "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more5",  "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.unicode",  "UTF-8, UTF-16LE, UTF-16BE, UTF-32, UTF-32LE, UTF-32BE");
-pref("intl.charset.detector", "chrome://global/locale/intl.properties");
-pref("intl.charset.default",  "chrome://global-platform/locale/intl.properties");
-pref("font.language.group", "chrome://global/locale/intl.properties");
-pref("intl.menuitems.alwaysappendaccesskeys","chrome://global/locale/intl.properties");
-pref("intl.menuitems.insertseparatorbeforeaccesskeys","chrome://global/locale/intl.properties");
-
 // simple gestures support
 pref("browser.gesture.swipe.left", "Browser:BackOrBackDuplicate");
 pref("browser.gesture.swipe.right", "Browser:ForwardOrForwardDuplicate");
 pref("browser.gesture.swipe.up", "Browser:HideTabView");
 pref("browser.gesture.swipe.down", "Browser:ShowTabView");
 #ifdef XP_MACOSX
 pref("browser.gesture.pinch.latched", true);
 pref("browser.gesture.pinch.threshold", 150);
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -983,21 +983,21 @@ pref("network.proxy.autoconfig_retry_int
 pref("converter.html2txt.structs",          true); // Output structured phrases (strong, em, code, sub, sup, b, i, u)
 pref("converter.html2txt.header_strategy",  1); // 0 = no indention; 1 = indention, increased with header level; 2 = numbering and slight indention
 
 pref("intl.accept_languages",               "chrome://global/locale/intl.properties");
 pref("intl.accept_charsets",                "iso-8859-1,*,utf-8");
 pref("intl.menuitems.alwaysappendaccesskeys","chrome://global/locale/intl.properties");
 pref("intl.menuitems.insertseparatorbeforeaccesskeys","chrome://global/locale/intl.properties");
 pref("intl.charsetmenu.browser.static",     "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more1",      "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more2",      "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more3",      "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more4",      "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more5",      "chrome://global/locale/intl.properties");
+pref("intl.charsetmenu.browser.more1",      "ISO-8859-1, ISO-8859-15, IBM850, x-mac-roman, windows-1252, ISO-8859-14, ISO-8859-7, x-mac-greek, windows-1253, x-mac-icelandic, ISO-8859-10, ISO-8859-3");
+pref("intl.charsetmenu.browser.more2",      "ISO-8859-4, ISO-8859-13, windows-1257, IBM852, ISO-8859-2, x-mac-ce, windows-1250, x-mac-croatian, IBM855, ISO-8859-5, ISO-IR-111, KOI8-R, x-mac-cyrillic, windows-1251, IBM866, KOI8-U, x-mac-ukrainian, ISO-8859-16, x-mac-romanian");
+pref("intl.charsetmenu.browser.more3",      "GB2312, x-gbk, gb18030, HZ-GB-2312, ISO-2022-CN, Big5, Big5-HKSCS, x-euc-tw, EUC-JP, ISO-2022-JP, Shift_JIS, EUC-KR, x-windows-949, x-johab, ISO-2022-KR");
+pref("intl.charsetmenu.browser.more4",      "armscii-8, GEOSTD8, TIS-620, ISO-8859-11, windows-874, IBM857, ISO-8859-9, x-mac-turkish, windows-1254, x-viet-tcvn5712, VISCII, x-viet-vps, windows-1258, x-mac-devanagari, x-mac-gujarati, x-mac-gurmukhi");
+pref("intl.charsetmenu.browser.more5",      "ISO-8859-6, windows-1256, IBM864, ISO-8859-8-I, windows-1255, ISO-8859-8, IBM862");
 pref("intl.charsetmenu.browser.unicode",    "UTF-8, UTF-16LE, UTF-16BE, UTF-32, UTF-32LE, UTF-32BE");
 pref("intl.charsetmenu.mailedit",           "chrome://global/locale/intl.properties");
 pref("intl.charsetmenu.browser.cache",      "");
 pref("intl.charsetmenu.mailview.cache",     "");
 pref("intl.charsetmenu.composer.cache",     "");
 pref("intl.charsetmenu.browser.cache.size", 5);
 pref("intl.charset.detector",               "chrome://global/locale/intl.properties");
 pref("intl.charset.default",                "chrome://global-platform/locale/intl.properties");
--- a/toolkit/components/intl/nsCharsetMenu.cpp
+++ b/toolkit/components/intl/nsCharsetMenu.cpp
@@ -1265,37 +1265,37 @@ nsresult nsCharsetMenu::InitMoreSubmenus
   const char key3[] = "intl.charsetmenu.browser.more3";
   const char key4[] = "intl.charsetmenu.browser.more4";
   const char key5[] = "intl.charsetmenu.browser.more5";
   const char keyU[] = "intl.charsetmenu.browser.unicode";
 
   res = NewRDFContainer(mInner, kNC_BrowserMore1CharsetMenuRoot, 
     getter_AddRefs(container1));
   if (NS_FAILED(res)) return res;
-  AddFromPrefsToMenu(NULL, container1, key1, aDecs, NULL);
+  AddFromNolocPrefsToMenu(NULL, container1, key1, aDecs, NULL);
 
   res = NewRDFContainer(mInner, kNC_BrowserMore2CharsetMenuRoot, 
     getter_AddRefs(container2));
   if (NS_FAILED(res)) return res;
-  AddFromPrefsToMenu(NULL, container2, key2, aDecs, NULL);
+  AddFromNolocPrefsToMenu(NULL, container2, key2, aDecs, NULL);
 
   res = NewRDFContainer(mInner, kNC_BrowserMore3CharsetMenuRoot, 
     getter_AddRefs(container3));
   if (NS_FAILED(res)) return res;
-  AddFromPrefsToMenu(NULL, container3, key3, aDecs, NULL);
+  AddFromNolocPrefsToMenu(NULL, container3, key3, aDecs, NULL);
 
   res = NewRDFContainer(mInner, kNC_BrowserMore4CharsetMenuRoot, 
     getter_AddRefs(container4));
   if (NS_FAILED(res)) return res;
-  AddFromPrefsToMenu(NULL, container4, key4, aDecs, NULL);
+  AddFromNolocPrefsToMenu(NULL, container4, key4, aDecs, NULL);
 
   res = NewRDFContainer(mInner, kNC_BrowserMore5CharsetMenuRoot, 
     getter_AddRefs(container5));
   if (NS_FAILED(res)) return res;
-  AddFromPrefsToMenu(NULL, container5, key5, aDecs, NULL);
+  AddFromNolocPrefsToMenu(NULL, container5, key5, aDecs, NULL);
 
   res = NewRDFContainer(mInner, kNC_BrowserUnicodeCharsetMenuRoot, 
     getter_AddRefs(containerU));
   if (NS_FAILED(res)) return res;
   AddFromNolocPrefsToMenu(NULL, containerU, keyU, aDecs, NULL);
 
   NS_TIMELINE_STOP_TIMER("nsCharsetMenu::InitMoreSubmenus");
   NS_TIMELINE_MARK_TIMER("nsCharsetMenu::InitMoreSubmenus");
--- a/toolkit/locales/en-US/chrome/global/intl.properties
+++ b/toolkit/locales/en-US/chrome/global/intl.properties
@@ -18,20 +18,15 @@ pluralRule=1
 # menuitems in the "selectLangs" menulist in
 # browser/components/preferences/fonts.xul
 font.language.group=x-western
 # Localization Note: Add the code for your language at the front of this entry,
 # leaving "en-us, en" for fallback. It's recommended to use the same form, e.g.
 # "ja-jp, ja, en-us, en"
 intl.accept_languages=en-us, en
 intl.charsetmenu.browser.static=ISO-8859-1, UTF-8
-intl.charsetmenu.browser.more1=ISO-8859-1, ISO-8859-15, IBM850, x-mac-roman, windows-1252, ISO-8859-14, ISO-8859-7, x-mac-greek, windows-1253, x-mac-icelandic, ISO-8859-10, ISO-8859-3
-intl.charsetmenu.browser.more2=ISO-8859-4, ISO-8859-13, windows-1257, IBM852, ISO-8859-2, x-mac-ce, windows-1250, x-mac-croatian, IBM855, ISO-8859-5, ISO-IR-111, KOI8-R, x-mac-cyrillic, windows-1251, IBM866, KOI8-U, x-mac-ukrainian, ISO-8859-16, x-mac-romanian
-intl.charsetmenu.browser.more3=GB2312, x-gbk, gb18030, HZ-GB-2312, ISO-2022-CN, Big5, Big5-HKSCS, x-euc-tw, EUC-JP, ISO-2022-JP, Shift_JIS, EUC-KR, x-windows-949, x-johab, ISO-2022-KR
-intl.charsetmenu.browser.more4=armscii-8, GEOSTD8, TIS-620, ISO-8859-11, windows-874, IBM857, ISO-8859-9, x-mac-turkish, windows-1254, x-viet-tcvn5712, VISCII, x-viet-vps, windows-1258, x-mac-devanagari, x-mac-gujarati, x-mac-gurmukhi
-intl.charsetmenu.browser.more5=ISO-8859-6, windows-1256, IBM864, ISO-8859-8-I, windows-1255, ISO-8859-8, IBM862
 intl.charset.default=ISO-8859-1
 intl.charset.detector=
 intl.charsetmenu.mailedit=ISO-8859-1, ISO-8859-15, ISO-8859-6, armscii-8, geostd8, ISO-8859-13, ISO-8859-14, ISO-8859-2, GB2312, GB18030, Big5, KOI8-R, windows-1251, KOI8-U, ISO-8859-7, ISO-8859-8-I, windows-1255, ISO-2022-JP, EUC-KR, ISO-8859-10, ISO-8859-3, TIS-620, ISO-8859-9, UTF-8, VISCII
 # valid intl.menuitems.appendedacceskeys are: true or false, <empty string> (missing or empty preference equals false)
 intl.menuitems.alwaysappendaccesskeys=
 # valid intl.menuitems.insertseparatorbeforeaccesskeys are: true or false, <empty string> (missing or empty preference equals false)
 intl.menuitems.insertseparatorbeforeaccesskeys=true
--- a/xulrunner/app/xulrunner.js
+++ b/xulrunner/app/xulrunner.js
@@ -35,29 +35,16 @@
  * ***** END LICENSE BLOCK ***** */
 
 #filter substitution
 
 // We need to override the default values of these preferences since all.js
 // assumes these are in the navigator package, which for us is nonexistent.
 // XXX(darin): perhaps all.js should not be seamonkey specific
 pref("general.useragent.locale", "@AB_CD@");
-pref("font.language.group", "chrome://global/locale/intl.properties");
-pref("intl.accept_languages", "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.static", "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more1",  "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more2",  "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more3",  "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more4",  "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.more5",  "chrome://global/locale/intl.properties");
-pref("intl.charsetmenu.browser.unicode",  "UTF-8, UTF-16LE, UTF-16BE, UTF-32, UTF-32LE, UTF-32BE");
-pref("intl.charset.detector", "chrome://global/locale/intl.properties");
-pref("intl.charset.default",  "chrome://global-platform/locale/intl.properties");
-pref("intl.menuitems.alwaysappendaccesskeys","chrome://global/locale/intl.properties");
-pref("intl.menuitems.insertseparatorbeforeaccesskeys","chrome://global/locale/intl.properties");
 pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul");
 pref("xpinstall.dialog.progress.chrome", "chrome://mozapps/content/extensions/extensions.xul");
 pref("xpinstall.dialog.progress.skin", "chrome://mozapps/content/extensions/extensions.xul");
 pref("xpinstall.dialog.progress.type.chrome", "Extension:Manager");
 pref("xpinstall.dialog.progress.type.skin", "Extension:Manager");
 pref("xpinstall.enabled", true);
 #ifdef XP_WIN
 pref("browser.preferences.instantApply", false);