Get Zotero.locale from loaded locale, not from pref
It was previously set from general.useragent.locale, but that's not used by default, meaning that date interpretation and some other things might have been incorrect for everyone who didn't set a locale explicitly and toggle matchOS...
This commit is contained in:
parent
2bd3aa9669
commit
2addf6b27b
46 changed files with 48 additions and 15 deletions
|
@ -224,21 +224,9 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
|
|||
// Browser
|
||||
Zotero.browser = "g";
|
||||
|
||||
// Locale
|
||||
var uaPrefs = Services.prefs.getBranch("general.useragent.");
|
||||
try {
|
||||
this.locale = uaPrefs.getComplexValue("locale", Components.interfaces.nsIPrefLocalizedString);
|
||||
} catch (e) {}
|
||||
|
||||
if(this.locale) {
|
||||
this.locale = this.locale.toString();
|
||||
} else {
|
||||
this.locale = uaPrefs.getCharPref("locale");
|
||||
}
|
||||
|
||||
if (this.locale.length == 2) {
|
||||
this.locale = this.locale + '-' + this.locale.toUpperCase();
|
||||
}
|
||||
// Get resolved locale
|
||||
this.locale = Services.strings.createBundle("chrome://zotero/locale/mozilla/intl.properties")
|
||||
.GetStringFromName("general.useragent.locale");
|
||||
|
||||
_localizedStringBundle = Services.strings.createBundle("chrome://zotero/locale/zotero.properties");
|
||||
// Fix logged error in PluralForm.jsm when numForms() is called before get(), as it is in
|
||||
|
|
1
chrome/locale/af-ZA/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/af-ZA/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=af-ZA
|
1
chrome/locale/ar/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/ar/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=ar
|
1
chrome/locale/bg-BG/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/bg-BG/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=bg-BG
|
1
chrome/locale/ca-AD/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/ca-AD/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=ca-AD
|
1
chrome/locale/cs-CZ/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/cs-CZ/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=cs-CZ
|
1
chrome/locale/da-DK/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/da-DK/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=da-DK
|
1
chrome/locale/de/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/de/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=de
|
1
chrome/locale/el-GR/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/el-GR/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=el-GR
|
1
chrome/locale/en-US/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/en-US/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=en-US
|
1
chrome/locale/es-ES/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/es-ES/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=es-ES
|
1
chrome/locale/et-EE/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/et-EE/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=et-EE
|
1
chrome/locale/eu-ES/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/eu-ES/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=eu-ES
|
1
chrome/locale/fa/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/fa/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=fa
|
1
chrome/locale/fi-FI/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/fi-FI/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=fi-FI
|
1
chrome/locale/fr-FR/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/fr-FR/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=fr-FR
|
1
chrome/locale/gl-ES/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/gl-ES/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=gl-ES
|
1
chrome/locale/he-IL/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/he-IL/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=he-IL
|
1
chrome/locale/hr-HR/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/hr-HR/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=hr-HR
|
1
chrome/locale/hu-HU/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/hu-HU/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=hu-HU
|
1
chrome/locale/id-ID/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/id-ID/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=id-ID
|
1
chrome/locale/is-IS/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/is-IS/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=is-IS
|
1
chrome/locale/it-IT/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/it-IT/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=it-IT
|
1
chrome/locale/ja-JP/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/ja-JP/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=ja-JP
|
1
chrome/locale/km/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/km/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=km
|
1
chrome/locale/ko-KR/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/ko-KR/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=ko-KR
|
1
chrome/locale/lt-LT/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/lt-LT/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=lt-LT
|
1
chrome/locale/mn-MN/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/mn-MN/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=mn-MN
|
1
chrome/locale/nb-NO/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/nb-NO/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=nb-NO
|
1
chrome/locale/nl-NL/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/nl-NL/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=nl-NL
|
1
chrome/locale/nn-NO/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/nn-NO/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=nn-NO
|
1
chrome/locale/pl-PL/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/pl-PL/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=pl-PL
|
1
chrome/locale/pt-BR/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/pt-BR/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=pt-BR
|
1
chrome/locale/pt-PT/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/pt-PT/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=pt-PT
|
1
chrome/locale/ro-RO/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/ro-RO/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=ro-RO
|
1
chrome/locale/ru-RU/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/ru-RU/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=ru-RU
|
1
chrome/locale/sk-SK/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/sk-SK/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=sk-SK
|
1
chrome/locale/sl-SI/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/sl-SI/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=sl-SI
|
1
chrome/locale/sr-RS/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/sr-RS/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=sr-RS
|
1
chrome/locale/sv-SE/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/sv-SE/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=sv-SE
|
1
chrome/locale/th-TH/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/th-TH/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=th-TH
|
1
chrome/locale/tr-TR/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/tr-TR/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=tr-TR
|
1
chrome/locale/uk-UA/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/uk-UA/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=uk-UA
|
1
chrome/locale/vi-VN/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/vi-VN/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=vi-VN
|
1
chrome/locale/zh-CN/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/zh-CN/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=zh-CN
|
1
chrome/locale/zh-TW/zotero/mozilla/intl.properties
Normal file
1
chrome/locale/zh-TW/zotero/mozilla/intl.properties
Normal file
|
@ -0,0 +1 @@
|
|||
general.useragent.locale=zh-TW
|
Loading…
Reference in a new issue