diff --git a/chrome/content/zotero/components/button.jsx b/chrome/content/zotero/components/button.jsx index 93af1b1dd1..4bc679a985 100644 --- a/chrome/content/zotero/components/button.jsx +++ b/chrome/content/zotero/components/button.jsx @@ -2,7 +2,7 @@ const React = require('react') const { PureComponent, createElement: create } = React -const { injectIntl, intlShape } = require('react-intl') +const { injectIntl } = require('react-intl') const { IconDownChevron } = require('./icons') const cx = require('classnames') const { @@ -108,7 +108,6 @@ class Button extends PureComponent { static propTypes = { className: string, icon: element, - intl: intlShape.isRequired, isActive: bool, isDisabled: bool, isMenu: bool, diff --git a/chrome/content/zotero/preferences/preferences_advanced.js b/chrome/content/zotero/preferences/preferences_advanced.js index 4478d94737..3566dd677f 100644 --- a/chrome/content/zotero/preferences/preferences_advanced.js +++ b/chrome/content/zotero/preferences/preferences_advanced.js @@ -470,22 +470,18 @@ Zotero_Preferences.Advanced = { refreshLocale: function () { - var matchOS = Zotero.Prefs.get('intl.locale.matchOS', true); + var requestedLocale = Services.locale.getRequestedLocale(); var autoLocaleName, currentValue; // If matching OS, get the name of the current locale - if (matchOS) { + if (Zotero.Prefs.get('intl.regional_prefs.use_os_locales', true)) { autoLocaleName = this._getAutomaticLocaleMenuLabel(); currentValue = 'automatic'; } // Otherwise get the name of the locale specified in the pref else { - let branch = Services.prefs.getBranch(""); - let locale = branch.getComplexValue( - 'general.useragent.locale', Components.interfaces.nsIPrefLocalizedString - ); autoLocaleName = Zotero.getString('zotero.preferences.locale.automatic'); - currentValue = locale; + currentValue = requestedLocale; } // Populate menu @@ -503,19 +499,20 @@ Zotero_Preferences.Advanced = { }, onLocaleChange: function () { + var requestedLocale = Services.locale.getRequestedLocale(); var menu = document.getElementById('locale-menu'); if (menu.value == 'automatic') { // Changed if not already set to automatic (unless we have the automatic locale name, // meaning we just switched away to the same manual locale and back to automatic) - var changed = !Zotero.Prefs.get('intl.locale.matchOS', true) - && menu.label != this._getAutomaticLocaleMenuLabel(); - Zotero.Prefs.set('intl.locale.matchOS', true, true); + var changed = requestedLocale && menu.label != this._getAutomaticLocaleMenuLabel(); + Services.locale.setRequestedLocales([]); + Zotero.Prefs.clear('intl.regional_prefs.use_os_locales', true); } else { // Changed if moving to a locale other than the current one var changed = Zotero.locale != menu.value - Zotero.Prefs.set('intl.locale.matchOS', false, true); - Zotero.Prefs.set('general.useragent.locale', menu.value, true); + Services.locale.setRequestedLocales([menu.value]); + Zotero.Prefs.set('intl.regional_prefs.use_os_locales', false, true); } if (!changed) { diff --git a/chrome/content/zotero/xpcom/intl.js b/chrome/content/zotero/xpcom/intl.js index 5ce8174808..13b40ded22 100644 --- a/chrome/content/zotero/xpcom/intl.js +++ b/chrome/content/zotero/xpcom/intl.js @@ -31,6 +31,25 @@ Zotero.Intl = new function () { // Get settings from language pack (extracted by zotero-build/locale/merge_mozilla_files) this.init = function () { + var prevMatchOS = Zotero.Prefs.get('intl.locale.matchOS', true); + var prevLocale = Zotero.Prefs.get('general.useragent.locale', true); + + if (prevMatchOS !== undefined || prevLocale !== undefined) { + if (prevMatchOS) { + Services.locale.setRequestedLocales([]); + } + else if (prevLocale) { + try { + Services.locale.setRequestedLocales([prevLocale]); + } + catch (e) { + // Don't panic if the value is not a valid locale code + } + } + Zotero.Prefs.clear('intl.locale.matchOS', true); + Zotero.Prefs.clear('general.useragent.locale', true); + } + Components.utils.import("resource://gre/modules/PluralForm.jsm"); bundle = Services.strings.createBundle('chrome://zotero/locale/zotero.properties'); @@ -39,7 +58,7 @@ Zotero.Intl = new function () { [pluralFormGet, pluralFormNumForms] = PluralForm.makeGetter(parseInt(getIntlProp('pluralRule', 1))); setOrClearIntlPref('intl.accept_languages', 'string'); - Zotero.locale = getIntlProp('general.useragent.locale', 'en-US'); + Zotero.locale = Services.locale.getRequestedLocale(); // Also load the brand as appName Zotero.appName = Services.strings diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index a7cff89ccb..562724d1b5 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -565,16 +565,12 @@ Zotero.Schema = new function(){ if (!data) { throw new Error("Data not provided"); } - var locale = data.locales[Zotero.locale]; - if (!locale) { - Zotero.warn(`Locale ${Zotero.locale} not found in global schema locales`); - locale = data.locales['en-US']; - if (!locale) { - throw new Error("en-US locale not found in global schema locales"); - } - } Zotero.Schema.globalSchemaVersion = data.version; - Zotero.Schema.globalSchemaLocale = locale; + var locale = Zotero.Utilities.Internal.resolveLocale( + Zotero.locale, + Object.keys(data.locales) + ); + Zotero.Schema.globalSchemaLocale = data.locales[locale]; Zotero.Schema.globalSchemaMeta = data.meta; Zotero.Schema.CSL_TYPE_MAPPINGS = {}; Zotero.Schema.CSL_TYPE_MAPPINGS_REVERSE = {}; diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js index 8ffb12fe44..4162d79881 100644 --- a/chrome/content/zotero/xpcom/utilities_internal.js +++ b/chrome/content/zotero/xpcom/utilities_internal.js @@ -1385,6 +1385,48 @@ Zotero.Utilities.Internal = { }, + resolveLocale: function (locale, locales) { + // If the locale exists as-is, use it + if (locales.includes(locale)) { + return locale; + } + + // If there's a locale with just the language, use that + var langCode = locale.substr(0, 2); + if (locales.includes(langCode)) { + return langCode; + } + + // Find locales matching language + var possibleLocales = locales.filter(x => x.substr(0, 2) == langCode); + + // If none, use en-US + if (!possibleLocales.length) { + if (!locales.includes('en-US')) { + throw new Error("Locales not available"); + } + Zotero.logError(`Locale ${locale} not found`); + return 'en-US'; + } + + possibleLocales.sort(function (a, b) { + if (a == 'en-US') return -1; + if (b == 'en-US') return 1; + + // Prefer canonical country (e.g., pt-PT over pt-BR) + if (a.substr(0, 2) == a.substr(3, 2).toLowerCase()) { + return -1; + } + if (b.substr(0, 2) == b.substr(3, 2).toLowerCase()) { + return 1; + } + + return a.substr(3, 2).localeCompare(b.substr(3, 2)); + }); + return possibleLocales[0]; + }, + + /** * Get the next available numbered name that matches a base name, for use when duplicating * diff --git a/chrome/locale/af-ZA/zotero/mozilla/browser.dtd b/chrome/locale/af-ZA/zotero/mozilla/browser.dtd index 1e9824831f..fe700540d7 100644 --- a/chrome/locale/af-ZA/zotero/mozilla/browser.dtd +++ b/chrome/locale/af-ZA/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/af-ZA/zotero/mozilla/intl.properties b/chrome/locale/af-ZA/zotero/mozilla/intl.properties index 38bf515da8..128825f5e4 100644 --- a/chrome/locale/af-ZA/zotero/mozilla/intl.properties +++ b/chrome/locale/af-ZA/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=af-ZA intl.accept_languages=af, en-ZA, en-GB, en-US, en pluralRule=1 diff --git a/chrome/locale/ar/zotero/mozilla/browser.dtd b/chrome/locale/ar/zotero/mozilla/browser.dtd index 374dd8c1bf..3f6cf88730 100644 --- a/chrome/locale/ar/zotero/mozilla/browser.dtd +++ b/chrome/locale/ar/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/ar/zotero/mozilla/intl.properties b/chrome/locale/ar/zotero/mozilla/intl.properties index 7e0d579c35..30b702b44b 100644 --- a/chrome/locale/ar/zotero/mozilla/intl.properties +++ b/chrome/locale/ar/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=ar intl.accept_languages=ar, en-us, en pluralRule=12 diff --git a/chrome/locale/bg-BG/zotero/mozilla/browser.dtd b/chrome/locale/bg-BG/zotero/mozilla/browser.dtd index aa86701cea..398b0282aa 100644 --- a/chrome/locale/bg-BG/zotero/mozilla/browser.dtd +++ b/chrome/locale/bg-BG/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/bg-BG/zotero/mozilla/intl.properties b/chrome/locale/bg-BG/zotero/mozilla/intl.properties index fd1b87537b..b3a89a35d7 100644 --- a/chrome/locale/bg-BG/zotero/mozilla/intl.properties +++ b/chrome/locale/bg-BG/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=bg-BG intl.accept_languages=bg, en-US, en pluralRule=1 diff --git a/chrome/locale/br/zotero/mozilla/browser.dtd b/chrome/locale/br/zotero/mozilla/browser.dtd new file mode 100644 index 0000000000..3ee70c4f5a --- /dev/null +++ b/chrome/locale/br/zotero/mozilla/browser.dtd @@ -0,0 +1,2 @@ + + diff --git a/chrome/locale/br/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/br/zotero/mozilla/editMenuOverlay.dtd new file mode 100644 index 0000000000..39fd44db57 --- /dev/null +++ b/chrome/locale/br/zotero/mozilla/editMenuOverlay.dtd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chrome/locale/br/zotero/mozilla/intl.properties b/chrome/locale/br/zotero/mozilla/intl.properties new file mode 100644 index 0000000000..131d94a03d --- /dev/null +++ b/chrome/locale/br/zotero/mozilla/intl.properties @@ -0,0 +1,2 @@ +intl.accept_languages=en-US, en +pluralRule=1 diff --git a/chrome/locale/ca-AD/zotero/mozilla/browser.dtd b/chrome/locale/ca-AD/zotero/mozilla/browser.dtd index 4fead9cb26..87c07c4668 100644 --- a/chrome/locale/ca-AD/zotero/mozilla/browser.dtd +++ b/chrome/locale/ca-AD/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/ca-AD/zotero/mozilla/intl.properties b/chrome/locale/ca-AD/zotero/mozilla/intl.properties index 6707a43f49..5e6dcca936 100644 --- a/chrome/locale/ca-AD/zotero/mozilla/intl.properties +++ b/chrome/locale/ca-AD/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=ca-AD intl.accept_languages=ca, en-us, en pluralRule=1 diff --git a/chrome/locale/cs-CZ/zotero/mozilla/browser.dtd b/chrome/locale/cs-CZ/zotero/mozilla/browser.dtd index 9017e0e461..f46abea787 100644 --- a/chrome/locale/cs-CZ/zotero/mozilla/browser.dtd +++ b/chrome/locale/cs-CZ/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/cs-CZ/zotero/mozilla/intl.properties b/chrome/locale/cs-CZ/zotero/mozilla/intl.properties index e403a704a4..9dd99cc715 100644 --- a/chrome/locale/cs-CZ/zotero/mozilla/intl.properties +++ b/chrome/locale/cs-CZ/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=cs-CZ +intl.accept_languages=cs, sk, en-US, en pluralRule=8 -intl.accept_languages=cs, en-us, en diff --git a/chrome/locale/da-DK/zotero/mozilla/intl.properties b/chrome/locale/da-DK/zotero/mozilla/intl.properties index 29b8550aa1..0d405d2686 100644 --- a/chrome/locale/da-DK/zotero/mozilla/intl.properties +++ b/chrome/locale/da-DK/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=da-DK -pluralRule=1 intl.accept_languages=da, en-us, en +pluralRule=1 diff --git a/chrome/locale/de/zotero/mozilla/browser.dtd b/chrome/locale/de/zotero/mozilla/browser.dtd index 4dcfa52ef1..6bd1e866b0 100644 --- a/chrome/locale/de/zotero/mozilla/browser.dtd +++ b/chrome/locale/de/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + - + diff --git a/chrome/locale/de/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/de/zotero/mozilla/editMenuOverlay.dtd index 0038257bd4..47ec99376b 100644 --- a/chrome/locale/de/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/de/zotero/mozilla/editMenuOverlay.dtd @@ -1,3 +1,7 @@ + + @@ -17,9 +21,9 @@ - + - + diff --git a/chrome/locale/de/zotero/mozilla/intl.properties b/chrome/locale/de/zotero/mozilla/intl.properties index 2e2a063a54..41e5cfa4eb 100644 --- a/chrome/locale/de/zotero/mozilla/intl.properties +++ b/chrome/locale/de/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=de intl.accept_languages=de, en-US, en pluralRule=1 diff --git a/chrome/locale/el-GR/zotero/mozilla/browser.dtd b/chrome/locale/el-GR/zotero/mozilla/browser.dtd index 5a5f62bc06..49f88e6e43 100644 --- a/chrome/locale/el-GR/zotero/mozilla/browser.dtd +++ b/chrome/locale/el-GR/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/el-GR/zotero/mozilla/intl.properties b/chrome/locale/el-GR/zotero/mozilla/intl.properties index d14ef1ae67..1063f72602 100644 --- a/chrome/locale/el-GR/zotero/mozilla/intl.properties +++ b/chrome/locale/el-GR/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=el-GR intl.accept_languages=el-GR, el, en-US, en pluralRule=1 diff --git a/chrome/locale/en-GB/zotero/mozilla/browser.dtd b/chrome/locale/en-GB/zotero/mozilla/browser.dtd index 2a9218ae2f..559be8d7e7 100644 --- a/chrome/locale/en-GB/zotero/mozilla/browser.dtd +++ b/chrome/locale/en-GB/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/en-GB/zotero/mozilla/intl.properties b/chrome/locale/en-GB/zotero/mozilla/intl.properties index eba1be5dd1..758800c344 100644 --- a/chrome/locale/en-GB/zotero/mozilla/intl.properties +++ b/chrome/locale/en-GB/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=en-GB intl.accept_languages=en-GB, en pluralRule=1 diff --git a/chrome/locale/en-US/zotero/mozilla/intl.properties b/chrome/locale/en-US/zotero/mozilla/intl.properties index cd8ec221a9..131d94a03d 100644 --- a/chrome/locale/en-US/zotero/mozilla/intl.properties +++ b/chrome/locale/en-US/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=en-US intl.accept_languages=en-US, en pluralRule=1 diff --git a/chrome/locale/es-ES/zotero/mozilla/browser.dtd b/chrome/locale/es-ES/zotero/mozilla/browser.dtd index a407967d0a..fe477795d6 100644 --- a/chrome/locale/es-ES/zotero/mozilla/browser.dtd +++ b/chrome/locale/es-ES/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@ - - - - + + + + diff --git a/chrome/locale/es-ES/zotero/mozilla/intl.properties b/chrome/locale/es-ES/zotero/mozilla/intl.properties index 130cd6697b..2b4b69bc7d 100644 --- a/chrome/locale/es-ES/zotero/mozilla/intl.properties +++ b/chrome/locale/es-ES/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale =es-ES intl.accept_languages = es-ES, es, en-US, en pluralRule = 1 diff --git a/chrome/locale/et-EE/zotero/mozilla/browser.dtd b/chrome/locale/et-EE/zotero/mozilla/browser.dtd index 94edfcf39f..166d12aafd 100644 --- a/chrome/locale/et-EE/zotero/mozilla/browser.dtd +++ b/chrome/locale/et-EE/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@ - - - - + + + + diff --git a/chrome/locale/et-EE/zotero/mozilla/intl.properties b/chrome/locale/et-EE/zotero/mozilla/intl.properties index 8d6770d01b..7b989ff1f3 100644 --- a/chrome/locale/et-EE/zotero/mozilla/intl.properties +++ b/chrome/locale/et-EE/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=et-EE -pluralRule=1 intl.accept_languages=et, et-ee, en-us, en +pluralRule=1 diff --git a/chrome/locale/eu-ES/zotero/mozilla/browser.dtd b/chrome/locale/eu-ES/zotero/mozilla/browser.dtd index 5fbb7615eb..59d375711e 100644 --- a/chrome/locale/eu-ES/zotero/mozilla/browser.dtd +++ b/chrome/locale/eu-ES/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/eu-ES/zotero/mozilla/intl.properties b/chrome/locale/eu-ES/zotero/mozilla/intl.properties index a49355dc99..9b447cd5e1 100644 --- a/chrome/locale/eu-ES/zotero/mozilla/intl.properties +++ b/chrome/locale/eu-ES/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=eu-ES intl.accept_languages=eu, en-us, en pluralRule=1 diff --git a/chrome/locale/fa/zotero/mozilla/browser.dtd b/chrome/locale/fa/zotero/mozilla/browser.dtd index b9cbfeabe6..efdf667ddb 100644 --- a/chrome/locale/fa/zotero/mozilla/browser.dtd +++ b/chrome/locale/fa/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/fa/zotero/mozilla/intl.properties b/chrome/locale/fa/zotero/mozilla/intl.properties index c5f4b7dd84..bad989f6a4 100644 --- a/chrome/locale/fa/zotero/mozilla/intl.properties +++ b/chrome/locale/fa/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=fa intl.accept_languages=fa-ir, fa, en-us, en -pluralRule=0 +pluralRule=2 diff --git a/chrome/locale/fi-FI/zotero/mozilla/browser.dtd b/chrome/locale/fi-FI/zotero/mozilla/browser.dtd index 16f37c6d2b..3634a5a9e2 100644 --- a/chrome/locale/fi-FI/zotero/mozilla/browser.dtd +++ b/chrome/locale/fi-FI/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/fi-FI/zotero/mozilla/intl.properties b/chrome/locale/fi-FI/zotero/mozilla/intl.properties index 8668c637b4..472dcaffe2 100644 --- a/chrome/locale/fi-FI/zotero/mozilla/intl.properties +++ b/chrome/locale/fi-FI/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=fi-FI intl.accept_languages=fi-fi, fi, en-us, en pluralRule=1 diff --git a/chrome/locale/fr-FR/zotero/mozilla/intl.properties b/chrome/locale/fr-FR/zotero/mozilla/intl.properties index d937a4ceb6..7f1aa2b654 100644 --- a/chrome/locale/fr-FR/zotero/mozilla/intl.properties +++ b/chrome/locale/fr-FR/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=fr-FR -pluralRule=2 intl.accept_languages=fr, fr-fr, en-us, en +pluralRule=2 diff --git a/chrome/locale/gl-ES/zotero/mozilla/browser.dtd b/chrome/locale/gl-ES/zotero/mozilla/browser.dtd index 2a9218ae2f..3ee70c4f5a 100644 --- a/chrome/locale/gl-ES/zotero/mozilla/browser.dtd +++ b/chrome/locale/gl-ES/zotero/mozilla/browser.dtd @@ -1,4 +1,2 @@  - - diff --git a/chrome/locale/gl-ES/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/gl-ES/zotero/mozilla/editMenuOverlay.dtd index 44185616bb..39fd44db57 100644 --- a/chrome/locale/gl-ES/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/gl-ES/zotero/mozilla/editMenuOverlay.dtd @@ -31,5 +31,3 @@ - - diff --git a/chrome/locale/gl-ES/zotero/mozilla/intl.properties b/chrome/locale/gl-ES/zotero/mozilla/intl.properties index cd8ec221a9..131d94a03d 100644 --- a/chrome/locale/gl-ES/zotero/mozilla/intl.properties +++ b/chrome/locale/gl-ES/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=en-US intl.accept_languages=en-US, en pluralRule=1 diff --git a/chrome/locale/he-IL/zotero/mozilla/browser.dtd b/chrome/locale/he-IL/zotero/mozilla/browser.dtd index b18717b64e..8d239f2657 100644 --- a/chrome/locale/he-IL/zotero/mozilla/browser.dtd +++ b/chrome/locale/he-IL/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/he-IL/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/he-IL/zotero/mozilla/editMenuOverlay.dtd index 044484e034..d9e485ece9 100644 --- a/chrome/locale/he-IL/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/he-IL/zotero/mozilla/editMenuOverlay.dtd @@ -7,24 +7,24 @@ - + - + - + - + - + - + - + diff --git a/chrome/locale/he-IL/zotero/mozilla/intl.properties b/chrome/locale/he-IL/zotero/mozilla/intl.properties index bf7fe4d6f3..0373df6437 100644 --- a/chrome/locale/he-IL/zotero/mozilla/intl.properties +++ b/chrome/locale/he-IL/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=he-IL intl.accept_languages=he, he-IL, en-US, en pluralRule=1 diff --git a/chrome/locale/hr-HR/zotero/mozilla/browser.dtd b/chrome/locale/hr-HR/zotero/mozilla/browser.dtd index 6d7aa3a94b..b40c95bce1 100644 --- a/chrome/locale/hr-HR/zotero/mozilla/browser.dtd +++ b/chrome/locale/hr-HR/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/hr-HR/zotero/mozilla/intl.properties b/chrome/locale/hr-HR/zotero/mozilla/intl.properties index b7bb04c028..a0f69a0800 100644 --- a/chrome/locale/hr-HR/zotero/mozilla/intl.properties +++ b/chrome/locale/hr-HR/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=hr-HR intl.accept_languages=hr-hr, hr, en-us, en -pluralRule=7 +pluralRule=19 diff --git a/chrome/locale/hu-HU/zotero/mozilla/browser.dtd b/chrome/locale/hu-HU/zotero/mozilla/browser.dtd index 232a4d3367..75c398985b 100644 --- a/chrome/locale/hu-HU/zotero/mozilla/browser.dtd +++ b/chrome/locale/hu-HU/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/hu-HU/zotero/mozilla/intl.properties b/chrome/locale/hu-HU/zotero/mozilla/intl.properties index be3f7ff249..ae202b8909 100644 --- a/chrome/locale/hu-HU/zotero/mozilla/intl.properties +++ b/chrome/locale/hu-HU/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=hu-HU intl.accept_languages=hu-hu, hu, en-US, en pluralRule=1 diff --git a/chrome/locale/id-ID/zotero/mozilla/browser.dtd b/chrome/locale/id-ID/zotero/mozilla/browser.dtd index d2604afff7..dd212a6b95 100644 --- a/chrome/locale/id-ID/zotero/mozilla/browser.dtd +++ b/chrome/locale/id-ID/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/id-ID/zotero/mozilla/intl.properties b/chrome/locale/id-ID/zotero/mozilla/intl.properties index ba4d8c6f5b..064878fcf2 100644 --- a/chrome/locale/id-ID/zotero/mozilla/intl.properties +++ b/chrome/locale/id-ID/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=id-ID intl.accept_languages=id, en-us, en pluralRule=0 diff --git a/chrome/locale/is-IS/zotero/mozilla/browser.dtd b/chrome/locale/is-IS/zotero/mozilla/browser.dtd index 0775d38f3c..a2fab70ca4 100644 --- a/chrome/locale/is-IS/zotero/mozilla/browser.dtd +++ b/chrome/locale/is-IS/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/is-IS/zotero/mozilla/intl.properties b/chrome/locale/is-IS/zotero/mozilla/intl.properties index 9a911c46d8..7edccc67f8 100644 --- a/chrome/locale/is-IS/zotero/mozilla/intl.properties +++ b/chrome/locale/is-IS/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=is-IS intl.accept_languages=is, en-us, en pluralRule=15 diff --git a/chrome/locale/it-IT/zotero/mozilla/intl.properties b/chrome/locale/it-IT/zotero/mozilla/intl.properties index 5634f8291d..c9e7c4aaf3 100644 --- a/chrome/locale/it-IT/zotero/mozilla/intl.properties +++ b/chrome/locale/it-IT/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale =it-IT intl.accept_languages = it-IT, it, en-US, en pluralRule = 1 diff --git a/chrome/locale/ja-JP/zotero/mozilla/intl.properties b/chrome/locale/ja-JP/zotero/mozilla/intl.properties index 241ce55d57..82e361950c 100644 --- a/chrome/locale/ja-JP/zotero/mozilla/intl.properties +++ b/chrome/locale/ja-JP/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale =ja-JP -intl.accept_languages = ja, en-us, en +intl.accept_languages = ja, en-US, en pluralRule = 0 diff --git a/chrome/locale/km/zotero/mozilla/browser.dtd b/chrome/locale/km/zotero/mozilla/browser.dtd index eb268396ce..5843ebbf39 100644 --- a/chrome/locale/km/zotero/mozilla/browser.dtd +++ b/chrome/locale/km/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + - + diff --git a/chrome/locale/km/zotero/mozilla/intl.properties b/chrome/locale/km/zotero/mozilla/intl.properties index 15443e23d9..9097a8194e 100644 --- a/chrome/locale/km/zotero/mozilla/intl.properties +++ b/chrome/locale/km/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=km intl.accept_languages=km, en-US, en -pluralRule=1 +pluralRule=0 diff --git a/chrome/locale/ko-KR/zotero/mozilla/browser.dtd b/chrome/locale/ko-KR/zotero/mozilla/browser.dtd index a7d85cac6f..b6c9c36374 100644 --- a/chrome/locale/ko-KR/zotero/mozilla/browser.dtd +++ b/chrome/locale/ko-KR/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/ko-KR/zotero/mozilla/intl.properties b/chrome/locale/ko-KR/zotero/mozilla/intl.properties index c08282d0ed..f200c2482c 100644 --- a/chrome/locale/ko-KR/zotero/mozilla/intl.properties +++ b/chrome/locale/ko-KR/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=ko-KR -intl.accept_languages=ko-kr, ko, en-us, en +intl.accept_languages=ko-KR, ko, en-US, en pluralRule=0 diff --git a/chrome/locale/lt-LT/zotero/mozilla/browser.dtd b/chrome/locale/lt-LT/zotero/mozilla/browser.dtd index 990cd74dd7..031b9aa3a2 100644 --- a/chrome/locale/lt-LT/zotero/mozilla/browser.dtd +++ b/chrome/locale/lt-LT/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/lt-LT/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/lt-LT/zotero/mozilla/editMenuOverlay.dtd index 516058bb84..c3fc1cf926 100644 --- a/chrome/locale/lt-LT/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/lt-LT/zotero/mozilla/editMenuOverlay.dtd @@ -28,7 +28,7 @@ - + diff --git a/chrome/locale/lt-LT/zotero/mozilla/intl.properties b/chrome/locale/lt-LT/zotero/mozilla/intl.properties index bb153953a5..9f9e5741ea 100644 --- a/chrome/locale/lt-LT/zotero/mozilla/intl.properties +++ b/chrome/locale/lt-LT/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=lt-LT intl.accept_languages=lt, en-us, en, ru, pl pluralRule=6 diff --git a/chrome/locale/mn-MN/zotero/mozilla/browser.dtd b/chrome/locale/mn-MN/zotero/mozilla/browser.dtd index 2a9218ae2f..3ee70c4f5a 100644 --- a/chrome/locale/mn-MN/zotero/mozilla/browser.dtd +++ b/chrome/locale/mn-MN/zotero/mozilla/browser.dtd @@ -1,4 +1,2 @@  - - diff --git a/chrome/locale/mn-MN/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/mn-MN/zotero/mozilla/editMenuOverlay.dtd index 44185616bb..39fd44db57 100644 --- a/chrome/locale/mn-MN/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/mn-MN/zotero/mozilla/editMenuOverlay.dtd @@ -31,5 +31,3 @@ - - diff --git a/chrome/locale/mn-MN/zotero/mozilla/intl.properties b/chrome/locale/mn-MN/zotero/mozilla/intl.properties index cd8ec221a9..131d94a03d 100644 --- a/chrome/locale/mn-MN/zotero/mozilla/intl.properties +++ b/chrome/locale/mn-MN/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=en-US intl.accept_languages=en-US, en pluralRule=1 diff --git a/chrome/locale/nb-NO/zotero/mozilla/browser.dtd b/chrome/locale/nb-NO/zotero/mozilla/browser.dtd index a5f36dc47c..dd28e70d5c 100644 --- a/chrome/locale/nb-NO/zotero/mozilla/browser.dtd +++ b/chrome/locale/nb-NO/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/nb-NO/zotero/mozilla/intl.properties b/chrome/locale/nb-NO/zotero/mozilla/intl.properties index feb857e7d4..e28e7ffc9c 100644 --- a/chrome/locale/nb-NO/zotero/mozilla/intl.properties +++ b/chrome/locale/nb-NO/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=nb-NO intl.accept_languages=nb-no, nb, no-no, no, nn-no, nn, en-us, en pluralRule=1 diff --git a/chrome/locale/nl-NL/zotero/mozilla/browser.dtd b/chrome/locale/nl-NL/zotero/mozilla/browser.dtd index 3af68eeba3..56093ad7da 100644 --- a/chrome/locale/nl-NL/zotero/mozilla/browser.dtd +++ b/chrome/locale/nl-NL/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/nl-NL/zotero/mozilla/intl.properties b/chrome/locale/nl-NL/zotero/mozilla/intl.properties index 1c236fc048..7016caa9e4 100644 --- a/chrome/locale/nl-NL/zotero/mozilla/intl.properties +++ b/chrome/locale/nl-NL/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=nl-NL intl.accept_languages=nl, en-US, en pluralRule=1 diff --git a/chrome/locale/nn-NO/zotero/mozilla/browser.dtd b/chrome/locale/nn-NO/zotero/mozilla/browser.dtd index b20469d820..85164c0df0 100644 --- a/chrome/locale/nn-NO/zotero/mozilla/browser.dtd +++ b/chrome/locale/nn-NO/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/nn-NO/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/nn-NO/zotero/mozilla/editMenuOverlay.dtd index 31c56fc133..b3d7d0d08b 100644 --- a/chrome/locale/nn-NO/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/nn-NO/zotero/mozilla/editMenuOverlay.dtd @@ -4,7 +4,7 @@ - + @@ -31,5 +31,5 @@ - + diff --git a/chrome/locale/nn-NO/zotero/mozilla/intl.properties b/chrome/locale/nn-NO/zotero/mozilla/intl.properties index 9a3d52436f..6d7e4eb954 100644 --- a/chrome/locale/nn-NO/zotero/mozilla/intl.properties +++ b/chrome/locale/nn-NO/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=nn-NO intl.accept_languages=nn-no, nn, no-no, no, nb-no, nb, en-us, en pluralRule=1 diff --git a/chrome/locale/pl-PL/zotero/mozilla/browser.dtd b/chrome/locale/pl-PL/zotero/mozilla/browser.dtd index 68ce3af998..e2d2e830ee 100644 --- a/chrome/locale/pl-PL/zotero/mozilla/browser.dtd +++ b/chrome/locale/pl-PL/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@ - - + + - + diff --git a/chrome/locale/pl-PL/zotero/mozilla/intl.properties b/chrome/locale/pl-PL/zotero/mozilla/intl.properties index 4b8067eb82..f996643e24 100644 --- a/chrome/locale/pl-PL/zotero/mozilla/intl.properties +++ b/chrome/locale/pl-PL/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=pl-PL intl.accept_languages=pl, en-US, en pluralRule=9 diff --git a/chrome/locale/pt-BR/zotero/mozilla/browser.dtd b/chrome/locale/pt-BR/zotero/mozilla/browser.dtd index e0c9885618..f7aa1e8860 100644 --- a/chrome/locale/pt-BR/zotero/mozilla/browser.dtd +++ b/chrome/locale/pt-BR/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/pt-BR/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/pt-BR/zotero/mozilla/editMenuOverlay.dtd index 92034f6027..d514d557be 100644 --- a/chrome/locale/pt-BR/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/pt-BR/zotero/mozilla/editMenuOverlay.dtd @@ -11,25 +11,25 @@ - + - + - + - + - - - - - + + + + + - - + + diff --git a/chrome/locale/pt-BR/zotero/mozilla/intl.properties b/chrome/locale/pt-BR/zotero/mozilla/intl.properties index 2ae5d08d8e..de84995db6 100644 --- a/chrome/locale/pt-BR/zotero/mozilla/intl.properties +++ b/chrome/locale/pt-BR/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=pt-BR intl.accept_languages=pt-BR, pt, en-US, en pluralRule=1 diff --git a/chrome/locale/pt-PT/zotero/mozilla/browser.dtd b/chrome/locale/pt-PT/zotero/mozilla/browser.dtd index 75a5ace1fc..5eb7d46b40 100644 --- a/chrome/locale/pt-PT/zotero/mozilla/browser.dtd +++ b/chrome/locale/pt-PT/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/pt-PT/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/pt-PT/zotero/mozilla/editMenuOverlay.dtd index 736a155fcf..0978186434 100644 --- a/chrome/locale/pt-PT/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/pt-PT/zotero/mozilla/editMenuOverlay.dtd @@ -9,7 +9,7 @@ - + diff --git a/chrome/locale/pt-PT/zotero/mozilla/intl.properties b/chrome/locale/pt-PT/zotero/mozilla/intl.properties index 58d02f8ea6..0abd54241a 100644 --- a/chrome/locale/pt-PT/zotero/mozilla/intl.properties +++ b/chrome/locale/pt-PT/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=pt-PT -intl.accept_languages=pt-pt, pt, en, en-us +intl.accept_languages=pt-PT, pt, en, en-US pluralRule=1 diff --git a/chrome/locale/ro-RO/zotero/mozilla/browser.dtd b/chrome/locale/ro-RO/zotero/mozilla/browser.dtd index 2a9218ae2f..6a9e9b360e 100644 --- a/chrome/locale/ro-RO/zotero/mozilla/browser.dtd +++ b/chrome/locale/ro-RO/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@ - + - - + + diff --git a/chrome/locale/ro-RO/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/ro-RO/zotero/mozilla/editMenuOverlay.dtd index 20907c05a9..dd7e8991f2 100644 --- a/chrome/locale/ro-RO/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/ro-RO/zotero/mozilla/editMenuOverlay.dtd @@ -1,15 +1,7 @@ - - + + @@ -34,12 +26,10 @@ - - + + - - - - - + + + diff --git a/chrome/locale/ro-RO/zotero/mozilla/intl.properties b/chrome/locale/ro-RO/zotero/mozilla/intl.properties index 62082103a3..a6fcd641fc 100644 --- a/chrome/locale/ro-RO/zotero/mozilla/intl.properties +++ b/chrome/locale/ro-RO/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=ro-RO -pluralRule=1 -intl.accept_languages=ro-ro, ro, en-us, en-gb, en +intl.accept_languages=ro-RO, ro, en-US, en-GB, en +pluralRule=5 diff --git a/chrome/locale/ru-RU/zotero/mozilla/browser.dtd b/chrome/locale/ru-RU/zotero/mozilla/browser.dtd index 68f704df72..398b0282aa 100644 --- a/chrome/locale/ru-RU/zotero/mozilla/browser.dtd +++ b/chrome/locale/ru-RU/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@ - - - - + + + + diff --git a/chrome/locale/ru-RU/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/ru-RU/zotero/mozilla/editMenuOverlay.dtd index 79924dd7bf..04966f89f5 100644 --- a/chrome/locale/ru-RU/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/ru-RU/zotero/mozilla/editMenuOverlay.dtd @@ -2,34 +2,34 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chrome/locale/ru-RU/zotero/mozilla/intl.properties b/chrome/locale/ru-RU/zotero/mozilla/intl.properties index 41a747963c..05600251aa 100644 --- a/chrome/locale/ru-RU/zotero/mozilla/intl.properties +++ b/chrome/locale/ru-RU/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale =ru-RU -intl.accept_languages = ru-RU, ru, en-US, en -pluralRule = 7 +intl.accept_languages=ru-RU, ru, en-US, en +pluralRule=7 diff --git a/chrome/locale/sk-SK/zotero/mozilla/browser.dtd b/chrome/locale/sk-SK/zotero/mozilla/browser.dtd index 3d778a9fcc..ba59e4f54b 100644 --- a/chrome/locale/sk-SK/zotero/mozilla/browser.dtd +++ b/chrome/locale/sk-SK/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/sk-SK/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/sk-SK/zotero/mozilla/editMenuOverlay.dtd index 9b4be7cfb4..a9f1662293 100644 --- a/chrome/locale/sk-SK/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/sk-SK/zotero/mozilla/editMenuOverlay.dtd @@ -2,34 +2,34 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chrome/locale/sk-SK/zotero/mozilla/intl.properties b/chrome/locale/sk-SK/zotero/mozilla/intl.properties index ec44ec130c..111bf31e84 100644 --- a/chrome/locale/sk-SK/zotero/mozilla/intl.properties +++ b/chrome/locale/sk-SK/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=sk-SK intl.accept_languages=sk, cs, en-US, en pluralRule=8 diff --git a/chrome/locale/sl-SI/zotero/mozilla/browser.dtd b/chrome/locale/sl-SI/zotero/mozilla/browser.dtd index ed20193a82..5f99b1d6ed 100644 --- a/chrome/locale/sl-SI/zotero/mozilla/browser.dtd +++ b/chrome/locale/sl-SI/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + - + diff --git a/chrome/locale/sl-SI/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/sl-SI/zotero/mozilla/editMenuOverlay.dtd index ea8de611d7..d017f919f5 100644 --- a/chrome/locale/sl-SI/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/sl-SI/zotero/mozilla/editMenuOverlay.dtd @@ -2,8 +2,8 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - + + diff --git a/chrome/locale/sl-SI/zotero/mozilla/intl.properties b/chrome/locale/sl-SI/zotero/mozilla/intl.properties index 7a3f029bc0..6f0092ba71 100644 --- a/chrome/locale/sl-SI/zotero/mozilla/intl.properties +++ b/chrome/locale/sl-SI/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=sl-SI intl.accept_languages=sl, en-gb, en pluralRule=10 diff --git a/chrome/locale/sr-RS/zotero/mozilla/browser.dtd b/chrome/locale/sr-RS/zotero/mozilla/browser.dtd index e95c48343e..97c78e6c75 100644 --- a/chrome/locale/sr-RS/zotero/mozilla/browser.dtd +++ b/chrome/locale/sr-RS/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/sr-RS/zotero/mozilla/intl.properties b/chrome/locale/sr-RS/zotero/mozilla/intl.properties index 9ced27e82a..8c5ef89526 100644 --- a/chrome/locale/sr-RS/zotero/mozilla/intl.properties +++ b/chrome/locale/sr-RS/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=sr-RS intl.accept_languages=sr, sr-rs, sr-cs, en-us, en -pluralRule=7 +pluralRule=19 diff --git a/chrome/locale/sv-SE/zotero/mozilla/browser.dtd b/chrome/locale/sv-SE/zotero/mozilla/browser.dtd index 8db36f06d0..5088c2c971 100644 --- a/chrome/locale/sv-SE/zotero/mozilla/browser.dtd +++ b/chrome/locale/sv-SE/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/sv-SE/zotero/mozilla/intl.properties b/chrome/locale/sv-SE/zotero/mozilla/intl.properties index 3e412c4917..8db3f79be1 100644 --- a/chrome/locale/sv-SE/zotero/mozilla/intl.properties +++ b/chrome/locale/sv-SE/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=sv-SE intl.accept_languages=sv-SE, sv, en-US, en pluralRule=1 diff --git a/chrome/locale/th-TH/zotero/mozilla/browser.dtd b/chrome/locale/th-TH/zotero/mozilla/browser.dtd index f8ab6e8d9c..175933d7fa 100644 --- a/chrome/locale/th-TH/zotero/mozilla/browser.dtd +++ b/chrome/locale/th-TH/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - - - + + + diff --git a/chrome/locale/th-TH/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/th-TH/zotero/mozilla/editMenuOverlay.dtd index b49c490d43..6fb5f401ac 100644 --- a/chrome/locale/th-TH/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/th-TH/zotero/mozilla/editMenuOverlay.dtd @@ -6,7 +6,7 @@ - + @@ -20,16 +20,16 @@ - + - + - + - + - + diff --git a/chrome/locale/th-TH/zotero/mozilla/intl.properties b/chrome/locale/th-TH/zotero/mozilla/intl.properties index f88efdd159..4f472161ae 100644 --- a/chrome/locale/th-TH/zotero/mozilla/intl.properties +++ b/chrome/locale/th-TH/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=th-TH -intl.accept_languages=th-th, th, en-us, en-gb, en +intl.accept_languages=th, en-US, en pluralRule=0 diff --git a/chrome/locale/tr-TR/zotero/mozilla/browser.dtd b/chrome/locale/tr-TR/zotero/mozilla/browser.dtd index 5a972624df..7a18f5d705 100644 --- a/chrome/locale/tr-TR/zotero/mozilla/browser.dtd +++ b/chrome/locale/tr-TR/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/tr-TR/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/tr-TR/zotero/mozilla/editMenuOverlay.dtd index 062d2e3b45..a10e4bfa5f 100644 --- a/chrome/locale/tr-TR/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/tr-TR/zotero/mozilla/editMenuOverlay.dtd @@ -9,7 +9,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/chrome/locale/tr-TR/zotero/mozilla/intl.properties b/chrome/locale/tr-TR/zotero/mozilla/intl.properties index 555379f7f1..872d6480e5 100644 --- a/chrome/locale/tr-TR/zotero/mozilla/intl.properties +++ b/chrome/locale/tr-TR/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=tr-TR intl.accept_languages=tr-TR, tr, en-US, en -pluralRule=0 +pluralRule=1 diff --git a/chrome/locale/uk-UA/zotero/mozilla/browser.dtd b/chrome/locale/uk-UA/zotero/mozilla/browser.dtd index d2fd70b91e..535ae8fb2f 100644 --- a/chrome/locale/uk-UA/zotero/mozilla/browser.dtd +++ b/chrome/locale/uk-UA/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/uk-UA/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/uk-UA/zotero/mozilla/editMenuOverlay.dtd index 64ed7765fa..4f148f8e28 100644 --- a/chrome/locale/uk-UA/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/uk-UA/zotero/mozilla/editMenuOverlay.dtd @@ -12,7 +12,7 @@ - + @@ -27,9 +27,9 @@ - + - - + + diff --git a/chrome/locale/uk-UA/zotero/mozilla/intl.properties b/chrome/locale/uk-UA/zotero/mozilla/intl.properties index 3afe1cc26f..26cca71b87 100644 --- a/chrome/locale/uk-UA/zotero/mozilla/intl.properties +++ b/chrome/locale/uk-UA/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=uk-UA -intl.accept_languages=uk, ru, en-us, en +intl.accept_languages=uk-UA, uk, en-US, en pluralRule=7 diff --git a/chrome/locale/vi-VN/zotero/mozilla/browser.dtd b/chrome/locale/vi-VN/zotero/mozilla/browser.dtd index 8c0e6b8b63..fce12e066c 100644 --- a/chrome/locale/vi-VN/zotero/mozilla/browser.dtd +++ b/chrome/locale/vi-VN/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@ - - + + - + diff --git a/chrome/locale/vi-VN/zotero/mozilla/editMenuOverlay.dtd b/chrome/locale/vi-VN/zotero/mozilla/editMenuOverlay.dtd index 67e4845f51..a526245f1e 100644 --- a/chrome/locale/vi-VN/zotero/mozilla/editMenuOverlay.dtd +++ b/chrome/locale/vi-VN/zotero/mozilla/editMenuOverlay.dtd @@ -3,33 +3,33 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + - + - + - + - + - + - - + + - + - + - + - + diff --git a/chrome/locale/vi-VN/zotero/mozilla/intl.properties b/chrome/locale/vi-VN/zotero/mozilla/intl.properties index 9c8184068c..05195a18b8 100644 --- a/chrome/locale/vi-VN/zotero/mozilla/intl.properties +++ b/chrome/locale/vi-VN/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=vi-VN intl.accept_languages=vi-vn, vi, en-us, en -pluralRule=1 +pluralRule=0 diff --git a/chrome/locale/zh-CN/zotero/mozilla/browser.dtd b/chrome/locale/zh-CN/zotero/mozilla/browser.dtd index 79eb842408..6a652b156d 100644 --- a/chrome/locale/zh-CN/zotero/mozilla/browser.dtd +++ b/chrome/locale/zh-CN/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/zh-CN/zotero/mozilla/intl.properties b/chrome/locale/zh-CN/zotero/mozilla/intl.properties index 082e59dc31..84d3522c75 100644 --- a/chrome/locale/zh-CN/zotero/mozilla/intl.properties +++ b/chrome/locale/zh-CN/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=zh-CN -intl.accept_languages=zh-cn, zh, en-us, en -pluralRule=1 +intl.accept_languages=zh-CN, zh, zh-TW, zh-HK, en-US, en +pluralRule=0 diff --git a/chrome/locale/zh-TW/zotero/mozilla/browser.dtd b/chrome/locale/zh-TW/zotero/mozilla/browser.dtd index 3b37c19d05..41d9083087 100644 --- a/chrome/locale/zh-TW/zotero/mozilla/browser.dtd +++ b/chrome/locale/zh-TW/zotero/mozilla/browser.dtd @@ -1,4 +1,4 @@  - + diff --git a/chrome/locale/zh-TW/zotero/mozilla/intl.properties b/chrome/locale/zh-TW/zotero/mozilla/intl.properties index 9dbdd01fb1..b5d51192c7 100644 --- a/chrome/locale/zh-TW/zotero/mozilla/intl.properties +++ b/chrome/locale/zh-TW/zotero/mozilla/intl.properties @@ -1,3 +1,2 @@ -general.useragent.locale=zh-TW intl.accept_languages=zh-tw, zh, en-us, en pluralRule=0 diff --git a/package-lock.json b/package-lock.json index 28994fa5fc..1fff4413e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -734,6 +734,27 @@ } } }, + "@formatjs/intl-relativetimeformat": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-4.2.1.tgz", + "integrity": "sha512-NIrK1jgDStuR9DEoJV8Iju6cj1Ffa7qr8qJ46nQGGH6c/222rZSdlEqd0qoX7AFMRpu2Br8OrSwNLX4IUo0nuw==", + "requires": { + "@formatjs/intl-utils": "^1.4.0" + } + }, + "@formatjs/intl-unified-numberformat": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-2.1.0.tgz", + "integrity": "sha512-0zL5DKRe4KiaupyiwT8ckTmE1aPlb2fsR0deMGN4QVlkdCxsCDMrLykrLyrhBa9fthTDaGR4Qh+bALk/sa4Vcg==", + "requires": { + "@formatjs/intl-utils": "^1.4.0" + } + }, + "@formatjs/intl-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@formatjs/intl-utils/-/intl-utils-1.4.0.tgz", + "integrity": "sha512-z5HyJumGzORM+5SpvkAlp/hu0AHDeZcUNKSmj9NjS7kWxOGZMuAdS3X1K5XiE0j5I8r8s8SIaz0IQOdMA1WFeA==" + }, "@sinonjs/commons": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", @@ -778,6 +799,34 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "requires": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, + "@types/invariant": { + "version": "2.2.30", + "resolved": "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.30.tgz", + "integrity": "sha512-98fB+yo7imSD2F7PF7GIpELNgtLNgo5wjivu0W5V4jx+KVVJxo6p/qN4zdzSTBWy4/sN3pPyXwnhRSD28QX+ag==" + }, + "@types/prop-types": { + "version": "15.7.3", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz", + "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==" + }, + "@types/react": { + "version": "16.9.9", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.9.tgz", + "integrity": "sha512-L+AudFJkDukk+ukInYvpoAPyJK5q1GanFOINOJnM0w6tUgITuWvJ4jyoBPFL7z4/L8hGLd+K/6xR5uUjXu0vVg==", + "requires": { + "@types/prop-types": "*", + "csstype": "^2.2.0" + } + }, "@zotero/eslint-config": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@zotero/eslint-config/-/eslint-config-1.0.3.tgz", @@ -2003,6 +2052,11 @@ "randomfill": "^1.0.3" } }, + "csstype": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.7.tgz", + "integrity": "sha512-9Mcn9sFbGBAdmimWb2gLVDtFJzeKtDGIr76TUqmjZrw9LFXBMSU70lcs+C0/7fyCd6iBDqmksUcCOUIkisPHsQ==" + }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -3751,9 +3805,12 @@ } }, "hoist-non-react-statics": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", - "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz", + "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==", + "requires": { + "react-is": "^16.7.0" + } }, "hosted-git-info": { "version": "2.8.4", @@ -3983,30 +4040,28 @@ } }, "intl-format-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-2.1.0.tgz", - "integrity": "sha1-BKNp/sv61tpgBbrh8UMzMy3PkxY=" + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-4.2.3.tgz", + "integrity": "sha512-9UMBxp/SduF9BESfuWaZqv61tT/s4RkD13MGmG/tmUHPdue201nU5R571stWSsOA87Z5gT4b1L4JzZXhO0IY+g==" + }, + "intl-locales-supported": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/intl-locales-supported/-/intl-locales-supported-1.6.0.tgz", + "integrity": "sha512-n8J5v2oBjaOu065/HXeDFU3huv76Ehwj6YovPI7IJ3DCf0EvvwL1lncRj/qobmlyDh0LumwxpU+pVhFR34xjEA==" }, "intl-messageformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-2.2.0.tgz", - "integrity": "sha1-NFvNRt5jC3aDMwwuUhd/9eq0hPw=", + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-7.3.3.tgz", + "integrity": "sha512-LfYzzoUYjDtdZDDmntOAEYkub816ZWpWFqv2pXXNv7Ea5WUUltljHOxwQXEly54rNk6whkn97rxfu3LPFRzmFw==", "requires": { - "intl-messageformat-parser": "1.4.0" + "intl-format-cache": "^4.2.3", + "intl-messageformat-parser": "^3.2.2" } }, "intl-messageformat-parser": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz", - "integrity": "sha1-tD1FqXRoytvkQzHXS7Ho3qRPwHU=" - }, - "intl-relativeformat": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/intl-relativeformat/-/intl-relativeformat-2.1.0.tgz", - "integrity": "sha1-AQ8RBYAiUfQKxH0OPhogE0iiVd8=", - "requires": { - "intl-messageformat": "^2.0.0" - } + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-3.2.2.tgz", + "integrity": "sha512-ax9639ST77YimAddTH/0Q9qhXuYS8ZVsoqOZinqnS90MbXaNuIq+KIdifaIndwI+lMEv3o+qNaGycXYvlh17rw==" }, "invariant": { "version": "2.2.2", @@ -5491,17 +5546,28 @@ } }, "react-intl": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-2.7.2.tgz", - "integrity": "sha512-3dcNGLqEw2FKkX+1L2WYLgjP0MVJkvWuVd1uLcnwifIQe8JQvnd9Bss4hb4Gvg/YhBIRcs4LM6C2bAgyklucjw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-3.4.0.tgz", + "integrity": "sha512-pW+z0ngVtPzICQeBrvoxk/YOotjFjVMvqxf/q0hjfM4CLvzIWJW/7MQcOz8ujD0Agf146mYOUv0//a9JM4H6Tg==", "requires": { - "hoist-non-react-statics": "^2.5.5", - "intl-format-cache": "^2.0.5", - "intl-messageformat": "^2.1.0", - "intl-relativeformat": "^2.1.0", - "invariant": "^2.1.1" + "@formatjs/intl-relativetimeformat": "^4.2.1", + "@formatjs/intl-unified-numberformat": "^2.1.0", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/invariant": "^2.2.30", + "hoist-non-react-statics": "^3.3.0", + "intl-format-cache": "^4.2.3", + "intl-locales-supported": "^1.6.0", + "intl-messageformat": "^7.3.3", + "intl-messageformat-parser": "^3.2.2", + "invariant": "^2.1.1", + "shallow-equal": "^1.1.0" } }, + "react-is": { + "version": "16.11.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.11.0.tgz", + "integrity": "sha512-gbBVYR2p8mnriqAwWx9LbuUrShnAuSCNnuPGyc7GJrMVQtPDAh8iLpv7FRuMPFb56KkaVZIYSz1PrjI9q0QPCw==" + }, "react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", @@ -5883,6 +5949,11 @@ "safe-buffer": "^5.0.1" } }, + "shallow-equal": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.2.0.tgz", + "integrity": "sha512-Z21pVxR4cXsfwpMKMhCEIO1PCi5sp7KEp+CmOpBQ+E8GpHwKOw2sEzk7sgblM3d/j4z4gakoWEoPcjK0VJQogA==" + }, "shasum": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", diff --git a/package.json b/package.json index f66be075ef..d50739e9ce 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "prop-types": "^15.6.2", "react": "^16.8.6", "react-dom": "^16.8.6", - "react-intl": "^2.7.2", + "react-intl": "^3.4.0", "url": "^0.11.0" }, "devDependencies": { diff --git a/test/tests/utilities_internalTest.js b/test/tests/utilities_internalTest.js index 7a770bfe46..73191131d1 100644 --- a/test/tests/utilities_internalTest.js +++ b/test/tests/utilities_internalTest.js @@ -338,6 +338,54 @@ describe("Zotero.Utilities.Internal", function () { }); }); + describe("#resolveLocale()", function () { + var availableLocales; + + before(function () { + availableLocales = Services.locale.getAvailableLocales(); + }); + + function resolve(locale) { + return Zotero.Utilities.Internal.resolveLocale(locale, availableLocales); + } + + it("should return en-US for en-US", function () { + assert.equal(resolve('en-US'), 'en-US'); + }); + + it("should return en-US for en", function () { + assert.equal(resolve('en'), 'en-US'); + }); + + it("should return fr-FR for fr-FR", function () { + assert.equal(resolve('fr-FR'), 'fr-FR'); + }); + + it("should return fr-FR for fr", function () { + assert.equal(resolve('fr'), 'fr-FR'); + }); + + it("should return ar for ar", function () { + assert.equal(resolve('ar'), 'ar'); + }); + + it("should return pt-PT for pt", function () { + assert.equal(resolve('pt'), 'pt-PT'); + }); + + it("should return zh-CN for zh-CN", function () { + assert.equal(resolve('zh-CN'), 'zh-CN'); + }); + + it("should return zh-TW for zh-TW", function () { + assert.equal(resolve('zh-TW'), 'zh-TW'); + }); + + it("should return zh-CN for zh", function () { + assert.equal(resolve('zh'), 'zh-CN'); + }); + }); + describe("#getNextName()", function () { it("should get the next available numbered name", function () { var existing = ['Name', 'Name 1', 'Name 3'];