Blob Blame History Raw
diff -Nrup -U 4 seamonkey-2.53.3/suite/components/pref/content/pref-appearance.js seamonkey-2.53.3-OK/suite/components/pref/content/pref-appearance.js
--- seamonkey-2.53.3/suite/components/pref/content/pref-appearance.js	2020-02-18 02:36:20.000000000 +0300
+++ seamonkey-2.53.3-OK/suite/components/pref/content/pref-appearance.js	2020-07-28 22:01:39.571612425 +0300
@@ -9,8 +9,16 @@ ChromeUtils.import("resource://gre/modul
 function Startup()
 {
   SwitchLocales_Load();
   NumberLocales_Load();
+
+  var localeMatchOS = document.getElementById("intl.locale.matchOS");
+  EnableSwitchLocales(!localeMatchOS.value);
+}
+
+function EnableSwitchLocales(aEnable)
+{
+  EnableElementById("switchLocales", aEnable, false);
 }
 
 /**
  * From locale switcher's switch.js:
@@ -96,21 +104,31 @@ function NumberLocales_Load()
       .getService(Ci.mozIOSPreferences);
 
   let appLocale = Services.locale.getAppLocalesAsBCP47()[0];
   let rsLocale = osprefs.getRegionalPrefsLocales()[0];
+  let sysLocale = osprefs.getSystemLocales()[0];
+
   let spellChecker = new InlineSpellChecker();
   appLocale = spellChecker.getDictionaryDisplayName(appLocale);
   rsLocale = spellChecker.getDictionaryDisplayName(rsLocale);
+  sysLocale = spellChecker.getDictionaryDisplayName(sysLocale);
 
   let appLocaleRadio = document.getElementById("appLocale");
   let rsLocaleRadio = document.getElementById("rsLocale");
+  let sysLocaleCheckbox = document.getElementById("localeMatchOS");
+
   let prefutilitiesBundle = document.getElementById("bundle_prefutilities");
 
   let appLocaleLabel = prefutilitiesBundle.getFormattedString("appLocale.label",
                                                               [appLocale]);
   let rsLocaleLabel = prefutilitiesBundle.getFormattedString("rsLocale.label",
                                                              [rsLocale]);
+  let sysLocaleLabel = prefutilitiesBundle.getFormattedString("sysLocale.label",
+                                                             [sysLocale]);
   appLocaleRadio.setAttribute("label", appLocaleLabel);
   rsLocaleRadio.setAttribute("label", rsLocaleLabel);
+  sysLocaleCheckbox.setAttribute("label", sysLocaleLabel);
+
   appLocaleRadio.accessKey = prefutilitiesBundle.getString("appLocale.accesskey");
   rsLocaleRadio.accessKey = prefutilitiesBundle.getString("rsLocale.accesskey");
+  sysLocaleCheckbox.accessKey = prefutilitiesBundle.getString("sysLocale.accesskey");
 }
diff -Nrup -U 4 seamonkey-2.53.3/suite/components/pref/content/pref-appearance.xul seamonkey-2.53.3-OK/suite/components/pref/content/pref-appearance.xul
--- seamonkey-2.53.3/suite/components/pref/content/pref-appearance.xul	2020-06-06 23:01:30.000000000 +0300
+++ seamonkey-2.53.3-OK/suite/components/pref/content/pref-appearance.xul	2020-07-28 22:04:13.411377258 +0300
@@ -29,8 +29,12 @@
                   type="bool"/>
       <preference id="general.useragent.locale"
                   name="general.useragent.locale"
                   type="string"/>
+      <preference id="intl.locale.matchOS"
+                  name="intl.locale.matchOS"
+                  type="bool"
+                  onchange="EnableSwitchLocales(!this.value);"/>
       <preference id="intl.regional_prefs.use_os_locales"
                   name="intl.regional_prefs.use_os_locales"
                   type="bool"/>
     </preferences>
@@ -81,8 +85,11 @@
     <groupbox id="switchLocaleBox" align="start">
       <caption label="&pref.locales.title;"/>
       <description>&selectLocale.label;</description>
 
+      <checkbox id="localeMatchOS"
+                preference="intl.locale.matchOS"/>
+                <!-- label and accesskey will be set dynamically -->
       <menulist id="switchLocales"
                 preference="general.useragent.locale"
                 onsyncfrompreference="return document.getElementById('appearance_pane').SelectLocale(this);"/>
 
diff -Nrup -U 4 seamonkey-2.53.3/suite/locales/en-US/chrome/common/pref/prefutilities.properties seamonkey-2.53.3-OK/suite/locales/en-US/chrome/common/pref/prefutilities.properties
--- seamonkey-2.53.3/suite/locales/en-US/chrome/common/pref/prefutilities.properties	2020-02-18 02:36:20.000000000 +0300
+++ seamonkey-2.53.3-OK/suite/locales/en-US/chrome/common/pref/prefutilities.properties	2020-07-28 22:05:10.413919602 +0300
@@ -38,8 +38,12 @@ appLocale.accesskey=n
 # LOCALIZATION NOTE (rsLocale.label): %S = Name of the locale chosen in regional settings,
 # e.g. German (Germany)
 rsLocale.label=Regional settings locale: %S
 rsLocale.accesskey=R
+# LOCALIZATION NOTE (sysLocale.label): %S = Name of the system locale,
+# e.g. Russian (Russia)
+sysLocale.label=Use system locale: %S
+sysLocale.accesskey=s
 
 syncUnlink.title=Do you want to unlink your device?
 syncUnlink.label=This device will no longer be associated with your Sync account. All of your personal data, both on this device and in your Sync account, will remain intact.
 syncUnlinkConfirm.label=Unlink