Fx60: Fix localization

Also fixes #1690 (at least on Catalina), and possibly other things

general.useragent.locale and intl.locale.matchOS are no longer used.
This commit is contained in:
Dan Stillman 2019-10-23 19:02:50 -04:00
parent 0061ffeb56
commit 513f7d6555
114 changed files with 466 additions and 317 deletions

View file

@ -2,7 +2,7 @@
const React = require('react') const React = require('react')
const { PureComponent, createElement: create } = React const { PureComponent, createElement: create } = React
const { injectIntl, intlShape } = require('react-intl') const { injectIntl } = require('react-intl')
const { IconDownChevron } = require('./icons') const { IconDownChevron } = require('./icons')
const cx = require('classnames') const cx = require('classnames')
const { const {
@ -108,7 +108,6 @@ class Button extends PureComponent {
static propTypes = { static propTypes = {
className: string, className: string,
icon: element, icon: element,
intl: intlShape.isRequired,
isActive: bool, isActive: bool,
isDisabled: bool, isDisabled: bool,
isMenu: bool, isMenu: bool,

View file

@ -470,22 +470,18 @@ Zotero_Preferences.Advanced = {
refreshLocale: function () { refreshLocale: function () {
var matchOS = Zotero.Prefs.get('intl.locale.matchOS', true); var requestedLocale = Services.locale.getRequestedLocale();
var autoLocaleName, currentValue; var autoLocaleName, currentValue;
// If matching OS, get the name of the current locale // 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(); autoLocaleName = this._getAutomaticLocaleMenuLabel();
currentValue = 'automatic'; currentValue = 'automatic';
} }
// Otherwise get the name of the locale specified in the pref // Otherwise get the name of the locale specified in the pref
else { else {
let branch = Services.prefs.getBranch("");
let locale = branch.getComplexValue(
'general.useragent.locale', Components.interfaces.nsIPrefLocalizedString
);
autoLocaleName = Zotero.getString('zotero.preferences.locale.automatic'); autoLocaleName = Zotero.getString('zotero.preferences.locale.automatic');
currentValue = locale; currentValue = requestedLocale;
} }
// Populate menu // Populate menu
@ -503,19 +499,20 @@ Zotero_Preferences.Advanced = {
}, },
onLocaleChange: function () { onLocaleChange: function () {
var requestedLocale = Services.locale.getRequestedLocale();
var menu = document.getElementById('locale-menu'); var menu = document.getElementById('locale-menu');
if (menu.value == 'automatic') { if (menu.value == 'automatic') {
// Changed if not already set to automatic (unless we have the automatic locale name, // 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) // meaning we just switched away to the same manual locale and back to automatic)
var changed = !Zotero.Prefs.get('intl.locale.matchOS', true) var changed = requestedLocale && menu.label != this._getAutomaticLocaleMenuLabel();
&& menu.label != this._getAutomaticLocaleMenuLabel(); Services.locale.setRequestedLocales([]);
Zotero.Prefs.set('intl.locale.matchOS', true, true); Zotero.Prefs.clear('intl.regional_prefs.use_os_locales', true);
} }
else { else {
// Changed if moving to a locale other than the current one // Changed if moving to a locale other than the current one
var changed = Zotero.locale != menu.value var changed = Zotero.locale != menu.value
Zotero.Prefs.set('intl.locale.matchOS', false, true); Services.locale.setRequestedLocales([menu.value]);
Zotero.Prefs.set('general.useragent.locale', menu.value, true); Zotero.Prefs.set('intl.regional_prefs.use_os_locales', false, true);
} }
if (!changed) { if (!changed) {

View file

@ -31,6 +31,25 @@ Zotero.Intl = new function () {
// Get settings from language pack (extracted by zotero-build/locale/merge_mozilla_files) // Get settings from language pack (extracted by zotero-build/locale/merge_mozilla_files)
this.init = function () { 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"); Components.utils.import("resource://gre/modules/PluralForm.jsm");
bundle = Services.strings.createBundle('chrome://zotero/locale/zotero.properties'); 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))); [pluralFormGet, pluralFormNumForms] = PluralForm.makeGetter(parseInt(getIntlProp('pluralRule', 1)));
setOrClearIntlPref('intl.accept_languages', 'string'); setOrClearIntlPref('intl.accept_languages', 'string');
Zotero.locale = getIntlProp('general.useragent.locale', 'en-US'); Zotero.locale = Services.locale.getRequestedLocale();
// Also load the brand as appName // Also load the brand as appName
Zotero.appName = Services.strings Zotero.appName = Services.strings

View file

@ -565,16 +565,12 @@ Zotero.Schema = new function(){
if (!data) { if (!data) {
throw new Error("Data not provided"); 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.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.globalSchemaMeta = data.meta;
Zotero.Schema.CSL_TYPE_MAPPINGS = {}; Zotero.Schema.CSL_TYPE_MAPPINGS = {};
Zotero.Schema.CSL_TYPE_MAPPINGS_REVERSE = {}; Zotero.Schema.CSL_TYPE_MAPPINGS_REVERSE = {};

View file

@ -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 * Get the next available numbered name that matches a base name, for use when duplicating
* *

View file

@ -1,3 +1,2 @@
general.useragent.locale=af-ZA
intl.accept_languages=af, en-ZA, en-GB, en-US, en intl.accept_languages=af, en-ZA, en-GB, en-US, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=ar
intl.accept_languages=ar, en-us, en intl.accept_languages=ar, en-us, en
pluralRule=12 pluralRule=12

View file

@ -1,3 +1,2 @@
general.useragent.locale=bg-BG
intl.accept_languages=bg, en-US, en intl.accept_languages=bg, en-US, en
pluralRule=1 pluralRule=1

View file

@ -0,0 +1,2 @@
<!ENTITY preferencesCmd2.label "Options">
<!ENTITY preferencesCmdUnix.label "Preferences">

View file

@ -0,0 +1,33 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!ENTITY editMenu.label "Edit">
<!ENTITY editMenu.accesskey "e">
<!ENTITY undoCmd.label "Undo">
<!ENTITY undoCmd.key "Z">
<!ENTITY undoCmd.accesskey "u">
<!ENTITY redoCmd.label "Redo">
<!ENTITY redoCmd.key "Y">
<!ENTITY redoCmd.accesskey "r">
<!ENTITY cutCmd.label "Cut">
<!ENTITY cutCmd.key "X">
<!ENTITY cutCmd.accesskey "t">
<!ENTITY copyCmd.label "Copy">
<!ENTITY copyCmd.key "C">
<!ENTITY copyCmd.accesskey "c">
<!ENTITY pasteCmd.label "Paste">
<!ENTITY pasteCmd.key "V">
<!ENTITY pasteCmd.accesskey "p">
<!ENTITY deleteCmd.label "Delete">
<!ENTITY deleteCmd.accesskey "d">
<!ENTITY selectAllCmd.label "Select All">
<!ENTITY selectAllCmd.key "A">
<!ENTITY selectAllCmd.accesskey "a">
<!ENTITY findCmd.label "Find">
<!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey "F">
<!ENTITY findAgainCmd.label "Find Again">
<!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey "g">

View file

@ -0,0 +1,2 @@
intl.accept_languages=en-US, en
pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=ca-AD
intl.accept_languages=ca, en-us, en intl.accept_languages=ca, en-us, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=cs-CZ intl.accept_languages=cs, sk, en-US, en
pluralRule=8 pluralRule=8
intl.accept_languages=cs, en-us, en

View file

@ -1,3 +1,2 @@
general.useragent.locale=da-DK
pluralRule=1
intl.accept_languages=da, en-us, en intl.accept_languages=da, en-us, en
pluralRule=1

View file

@ -1,3 +1,7 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!ENTITY editMenu.label "Bearbeiten"> <!ENTITY editMenu.label "Bearbeiten">
<!ENTITY editMenu.accesskey "B"> <!ENTITY editMenu.accesskey "B">
<!ENTITY undoCmd.label "Rückgängig"> <!ENTITY undoCmd.label "Rückgängig">
@ -17,9 +21,9 @@
<!ENTITY pasteCmd.accesskey "E"> <!ENTITY pasteCmd.accesskey "E">
<!ENTITY deleteCmd.label "Löschen"> <!ENTITY deleteCmd.label "Löschen">
<!ENTITY deleteCmd.accesskey "L"> <!ENTITY deleteCmd.accesskey "L">
<!ENTITY selectAllCmd.label "Alles markieren"> <!ENTITY selectAllCmd.label "Alles auswählen">
<!ENTITY selectAllCmd.key "A"> <!ENTITY selectAllCmd.key "A">
<!ENTITY selectAllCmd.accesskey "m"> <!ENTITY selectAllCmd.accesskey "u">
<!ENTITY findCmd.label "Suchen"> <!ENTITY findCmd.label "Suchen">
<!ENTITY findCmd.key "F"> <!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey "S"> <!ENTITY findCmd.accesskey "S">

View file

@ -1,3 +1,2 @@
general.useragent.locale=de
intl.accept_languages=de, en-US, en intl.accept_languages=de, en-US, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=el-GR
intl.accept_languages=el-GR, el, en-US, en intl.accept_languages=el-GR, el, en-US, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=en-GB
intl.accept_languages=en-GB, en intl.accept_languages=en-GB, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=en-US
intl.accept_languages=en-US, en intl.accept_languages=en-US, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale =es-ES
intl.accept_languages = es-ES, es, en-US, en intl.accept_languages = es-ES, es, en-US, en
pluralRule = 1 pluralRule = 1

View file

@ -1,3 +1,2 @@
general.useragent.locale=et-EE
pluralRule=1
intl.accept_languages=et, et-ee, en-us, en intl.accept_languages=et, et-ee, en-us, en
pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=eu-ES
intl.accept_languages=eu, en-us, en intl.accept_languages=eu, en-us, en
pluralRule=1 pluralRule=1

View file

@ -1,4 +1,4 @@
<!ENTITY preferencesCmd2.label "گزینه‌ها"> <!ENTITY preferencesCmd2.label "گزینه‌ها">
<!ENTITY preferencesCmd2.accesskey "گ"> <!ENTITY preferencesCmd2.accesskey "گ">
<!ENTITY preferencesCmdUnix.label "ترجیحات"> <!ENTITY preferencesCmdUnix.label "ترجیحات">
<!ENTITY preferencesCmdUnix.accesskey "ح"> <!ENTITY preferencesCmdUnix.accesskey "ت">

View file

@ -1,3 +1,2 @@
general.useragent.locale=fa
intl.accept_languages=fa-ir, fa, en-us, en intl.accept_languages=fa-ir, fa, en-us, en
pluralRule=0 pluralRule=2

View file

@ -1,3 +1,2 @@
general.useragent.locale=fi-FI
intl.accept_languages=fi-fi, fi, en-us, en intl.accept_languages=fi-fi, fi, en-us, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=fr-FR
pluralRule=2
intl.accept_languages=fr, fr-fr, en-us, en intl.accept_languages=fr, fr-fr, en-us, en
pluralRule=2

View file

@ -1,4 +1,2 @@
<!ENTITY preferencesCmd2.label "Options"> <!ENTITY preferencesCmd2.label "Options">
<!ENTITY preferencesCmd2.accesskey "O">
<!ENTITY preferencesCmdUnix.label "Preferences"> <!ENTITY preferencesCmdUnix.label "Preferences">
<!ENTITY preferencesCmdUnix.accesskey "n">

View file

@ -31,5 +31,3 @@
<!ENTITY findAgainCmd.key "G"> <!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3"> <!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey "g"> <!ENTITY findAgainCmd.accesskey "g">
<!ENTITY findPreviousCmd.label "Find Previous">
<!ENTITY findPreviousCmd.accesskey "v">

View file

@ -1,3 +1,2 @@
general.useragent.locale=en-US
intl.accept_languages=en-US, en intl.accept_languages=en-US, en
pluralRule=1 pluralRule=1

View file

@ -7,24 +7,24 @@
<!ENTITY undoCmd.label "בטל"> <!ENTITY undoCmd.label "בטל">
<!ENTITY undoCmd.key "Z"> <!ENTITY undoCmd.key "Z">
<!ENTITY undoCmd.accesskey "ל"> <!ENTITY undoCmd.accesskey "ל">
<!ENTITY redoCmd.label צע שוב"> <!ENTITY redoCmd.label יצוע שוב">
<!ENTITY redoCmd.key "Y"> <!ENTITY redoCmd.key "Y">
<!ENTITY redoCmd.accesskey "צ"> <!ENTITY redoCmd.accesskey "צ">
<!ENTITY cutCmd.label "גזור"> <!ENTITY cutCmd.label "גזירה">
<!ENTITY cutCmd.key "X"> <!ENTITY cutCmd.key "X">
<!ENTITY cutCmd.accesskey "ג"> <!ENTITY cutCmd.accesskey "ג">
<!ENTITY copyCmd.label "העתק"> <!ENTITY copyCmd.label "העתקה">
<!ENTITY copyCmd.key "C"> <!ENTITY copyCmd.key "C">
<!ENTITY copyCmd.accesskey "ת"> <!ENTITY copyCmd.accesskey "ת">
<!ENTITY pasteCmd.label "הדבק"> <!ENTITY pasteCmd.label "הדבקה">
<!ENTITY pasteCmd.key "V"> <!ENTITY pasteCmd.key "V">
<!ENTITY pasteCmd.accesskey "ה"> <!ENTITY pasteCmd.accesskey "ה">
<!ENTITY deleteCmd.label "מחק"> <!ENTITY deleteCmd.label "מחיקה">
<!ENTITY deleteCmd.accesskey "מ"> <!ENTITY deleteCmd.accesskey "מ">
<!ENTITY selectAllCmd.label "בחר הכול"> <!ENTITY selectAllCmd.label "בחירת הכל">
<!ENTITY selectAllCmd.key "A"> <!ENTITY selectAllCmd.key "A">
<!ENTITY selectAllCmd.accesskey "ב"> <!ENTITY selectAllCmd.accesskey "ב">
<!ENTITY findCmd.label פש"> <!ENTITY findCmd.label יפוש">
<!ENTITY findCmd.key "F"> <!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey "פ"> <!ENTITY findCmd.accesskey "פ">
<!ENTITY findAgainCmd.label "מצא שוב"> <!ENTITY findAgainCmd.label "מצא שוב">

View file

@ -1,3 +1,2 @@
general.useragent.locale=he-IL
intl.accept_languages=he, he-IL, en-US, en intl.accept_languages=he, he-IL, en-US, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=hr-HR
intl.accept_languages=hr-hr, hr, en-us, en intl.accept_languages=hr-hr, hr, en-us, en
pluralRule=7 pluralRule=19

View file

@ -1,3 +1,2 @@
general.useragent.locale=hu-HU
intl.accept_languages=hu-hu, hu, en-US, en intl.accept_languages=hu-hu, hu, en-US, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=id-ID
intl.accept_languages=id, en-us, en intl.accept_languages=id, en-us, en
pluralRule=0 pluralRule=0

View file

@ -1,3 +1,2 @@
general.useragent.locale=is-IS
intl.accept_languages=is, en-us, en intl.accept_languages=is, en-us, en
pluralRule=15 pluralRule=15

View file

@ -1,3 +1,2 @@
general.useragent.locale =it-IT
intl.accept_languages = it-IT, it, en-US, en intl.accept_languages = it-IT, it, en-US, en
pluralRule = 1 pluralRule = 1

View file

@ -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 pluralRule = 0

View file

@ -1,4 +1,4 @@
<!ENTITY preferencesCmd2.label "ជម្រើស"> <!ENTITY preferencesCmd2.label "ជម្រើស">
<!ENTITY preferencesCmd2.accesskey ""> <!ENTITY preferencesCmd2.accesskey "O">
<!ENTITY preferencesCmdUnix.label "ចំណូលចិត្ត"> <!ENTITY preferencesCmdUnix.label "ចំណូលចិត្ត">
<!ENTITY preferencesCmdUnix.accesskey "ច"> <!ENTITY preferencesCmdUnix.accesskey "n">

View file

@ -1,3 +1,2 @@
general.useragent.locale=km
intl.accept_languages=km, en-US, en intl.accept_languages=km, en-US, en
pluralRule=1 pluralRule=0

View file

@ -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 pluralRule=0

View file

@ -28,7 +28,7 @@
<!ENTITY findCmd.key "F"> <!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey "I"> <!ENTITY findCmd.accesskey "I">
<!ENTITY findAgainCmd.label "Ieškoti toliau"> <!ENTITY findAgainCmd.label "Ieškoti toliau">
<!ENTITY findAgainCmd.key "o"> <!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3"> <!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey "o"> <!ENTITY findAgainCmd.accesskey "o">
<!ENTITY findPreviousCmd.label "Ieškoti ankstesnio"> <!ENTITY findPreviousCmd.label "Ieškoti ankstesnio">

View file

@ -1,3 +1,2 @@
general.useragent.locale=lt-LT
intl.accept_languages=lt, en-us, en, ru, pl intl.accept_languages=lt, en-us, en, ru, pl
pluralRule=6 pluralRule=6

View file

@ -1,4 +1,2 @@
<!ENTITY preferencesCmd2.label "Options"> <!ENTITY preferencesCmd2.label "Options">
<!ENTITY preferencesCmd2.accesskey "O">
<!ENTITY preferencesCmdUnix.label "Preferences"> <!ENTITY preferencesCmdUnix.label "Preferences">
<!ENTITY preferencesCmdUnix.accesskey "n">

View file

@ -31,5 +31,3 @@
<!ENTITY findAgainCmd.key "G"> <!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3"> <!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey "g"> <!ENTITY findAgainCmd.accesskey "g">
<!ENTITY findPreviousCmd.label "Find Previous">
<!ENTITY findPreviousCmd.accesskey "v">

View file

@ -1,3 +1,2 @@
general.useragent.locale=en-US
intl.accept_languages=en-US, en intl.accept_languages=en-US, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=nb-NO
intl.accept_languages=nb-no, nb, no-no, no, nn-no, nn, en-us, en intl.accept_languages=nb-no, nb, no-no, no, nn-no, nn, en-us, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=nl-NL
intl.accept_languages=nl, en-US, en intl.accept_languages=nl, en-US, en
pluralRule=1 pluralRule=1

View file

@ -4,7 +4,7 @@
<!ENTITY editMenu.label "Rediger"> <!ENTITY editMenu.label "Rediger">
<!ENTITY editMenu.accesskey "R"> <!ENTITY editMenu.accesskey "R">
<!ENTITY undoCmd.label "Angra"> <!ENTITY undoCmd.label "Angre">
<!ENTITY undoCmd.key "Z"> <!ENTITY undoCmd.key "Z">
<!ENTITY undoCmd.accesskey "A"> <!ENTITY undoCmd.accesskey "A">
<!ENTITY redoCmd.label "Gjer om"> <!ENTITY redoCmd.label "Gjer om">
@ -31,5 +31,5 @@
<!ENTITY findAgainCmd.key "G"> <!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3"> <!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey "i"> <!ENTITY findAgainCmd.accesskey "i">
<!ENTITY findPreviousCmd.label "Søk etter førre"> <!ENTITY findPreviousCmd.label "Søk etter føregåande">
<!ENTITY findPreviousCmd.accesskey "f"> <!ENTITY findPreviousCmd.accesskey "f">

View file

@ -1,3 +1,2 @@
general.useragent.locale=nn-NO
intl.accept_languages=nn-no, nn, no-no, no, nb-no, nb, en-us, en intl.accept_languages=nn-no, nn, no-no, no, nb-no, nb, en-us, en
pluralRule=1 pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=pl-PL
intl.accept_languages=pl, en-US, en intl.accept_languages=pl, en-US, en
pluralRule=9 pluralRule=9

View file

@ -11,25 +11,25 @@
<!ENTITY redoCmd.key "Y"> <!ENTITY redoCmd.key "Y">
<!ENTITY redoCmd.accesskey "R"> <!ENTITY redoCmd.accesskey "R">
<!ENTITY cutCmd.label "Cortar"> <!ENTITY cutCmd.label "Cortar">
<!ENTITY cutCmd.key "x"> <!ENTITY cutCmd.key "X">
<!ENTITY cutCmd.accesskey "t"> <!ENTITY cutCmd.accesskey "t">
<!ENTITY copyCmd.label "Copiar"> <!ENTITY copyCmd.label "Copiar">
<!ENTITY copyCmd.key "c"> <!ENTITY copyCmd.key "C">
<!ENTITY copyCmd.accesskey "C"> <!ENTITY copyCmd.accesskey "C">
<!ENTITY pasteCmd.label "Colar"> <!ENTITY pasteCmd.label "Colar">
<!ENTITY pasteCmd.key "v"> <!ENTITY pasteCmd.key "V">
<!ENTITY pasteCmd.accesskey "o"> <!ENTITY pasteCmd.accesskey "o">
<!ENTITY deleteCmd.label "Excluir"> <!ENTITY deleteCmd.label "Excluir">
<!ENTITY deleteCmd.accesskey "x"> <!ENTITY deleteCmd.accesskey "x">
<!ENTITY selectAllCmd.label "Selecionar tudo"> <!ENTITY selectAllCmd.label "Selecionar tudo">
<!ENTITY selectAllCmd.key "a"> <!ENTITY selectAllCmd.key "A">
<!ENTITY selectAllCmd.accesskey "S"> <!ENTITY selectAllCmd.accesskey "S">
<!ENTITY findCmd.label "Localizar"> <!ENTITY findCmd.label "Procurar">
<!ENTITY findCmd.key "f"> <!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey "z"> <!ENTITY findCmd.accesskey "P">
<!ENTITY findAgainCmd.label "Localizar próxima"> <!ENTITY findAgainCmd.label "Procurar próximo">
<!ENTITY findAgainCmd.key "g"> <!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3"> <!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey "L"> <!ENTITY findAgainCmd.accesskey "x">
<!ENTITY findPreviousCmd.label "Localizar anterior"> <!ENTITY findPreviousCmd.label "Procurar anterior">
<!ENTITY findPreviousCmd.accesskey "a"> <!ENTITY findPreviousCmd.accesskey "a">

View file

@ -1,3 +1,2 @@
general.useragent.locale=pt-BR
intl.accept_languages=pt-BR, pt, en-US, en intl.accept_languages=pt-BR, pt, en-US, en
pluralRule=1 pluralRule=1

View file

@ -9,7 +9,7 @@
<!ENTITY undoCmd.accesskey "D"> <!ENTITY undoCmd.accesskey "D">
<!ENTITY redoCmd.label "Refazer"> <!ENTITY redoCmd.label "Refazer">
<!ENTITY redoCmd.key "Y"> <!ENTITY redoCmd.key "Y">
<!ENTITY redoCmd.accesskey "r"> <!ENTITY redoCmd.accesskey "R">
<!ENTITY cutCmd.label "Cortar"> <!ENTITY cutCmd.label "Cortar">
<!ENTITY cutCmd.key "X"> <!ENTITY cutCmd.key "X">
<!ENTITY cutCmd.accesskey "t"> <!ENTITY cutCmd.accesskey "t">

View file

@ -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 pluralRule=1

View file

@ -1,4 +1,4 @@
<!ENTITY preferencesCmd2.label "Options"> <!ENTITY preferencesCmd2.label "Opțiuni">
<!ENTITY preferencesCmd2.accesskey "O"> <!ENTITY preferencesCmd2.accesskey "O">
<!ENTITY preferencesCmdUnix.label "Preferences"> <!ENTITY preferencesCmdUnix.label "Preferințe">
<!ENTITY preferencesCmdUnix.accesskey "n"> <!ENTITY preferencesCmdUnix.accesskey "n">

View file

@ -1,15 +1,7 @@
<!-- <!-- This Source Code Form is subject to the terms of the Mozilla Public
# Translator(s): - 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/. -->
# nicubunu <nicubunu@gmail.com>
#
-->
<!--
# Reviewer(s):
#
# alexxed <alexxed@gmail.com>
#
-->
<!ENTITY editMenu.label "Editare"> <!ENTITY editMenu.label "Editare">
<!ENTITY editMenu.accesskey "E"> <!ENTITY editMenu.accesskey "E">
<!ENTITY undoCmd.label "Anulează"> <!ENTITY undoCmd.label "Anulează">
@ -34,12 +26,10 @@
<!ENTITY selectAllCmd.accesskey "a"> <!ENTITY selectAllCmd.accesskey "a">
<!ENTITY findCmd.label "Caută"> <!ENTITY findCmd.label "Caută">
<!ENTITY findCmd.key "F"> <!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey "C"> <!ENTITY findCmd.accesskey "F">
<!ENTITY findAgainCmd.label "Caută din nou"> <!ENTITY findAgainCmd.label "Găsește din nou">
<!ENTITY findAgainCmd.key "G"> <!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3"> <!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey "d"> <!ENTITY findAgainCmd.accesskey "G">
<!ENTITY findPreviousCmd.label "Caută înapoi"> <!ENTITY findPreviousCmd.label "Găsește anterior">
<!ENTITY findPreviousCmd.accesskey "p"> <!ENTITY findPreviousCmd.accesskey "n">

View file

@ -1,3 +1,2 @@
general.useragent.locale=ro-RO intl.accept_languages=ro-RO, ro, en-US, en-GB, en
pluralRule=1 pluralRule=5
intl.accept_languages=ro-ro, ro, en-us, en-gb, en

View file

@ -1,3 +1,2 @@
general.useragent.locale =ru-RU intl.accept_languages=ru-RU, ru, en-US, en
intl.accept_languages = ru-RU, ru, en-US, en pluralRule=7
pluralRule = 7

View file

@ -20,7 +20,7 @@
<!ENTITY pasteCmd.key "V"> <!ENTITY pasteCmd.key "V">
<!ENTITY pasteCmd.accesskey "P"> <!ENTITY pasteCmd.accesskey "P">
<!ENTITY deleteCmd.label "Odstrániť"> <!ENTITY deleteCmd.label "Odstrániť">
<!ENTITY deleteCmd.accesskey "O"> <!ENTITY deleteCmd.accesskey "d">
<!ENTITY selectAllCmd.label "Vybrať všetko"> <!ENTITY selectAllCmd.label "Vybrať všetko">
<!ENTITY selectAllCmd.key "A"> <!ENTITY selectAllCmd.key "A">
<!ENTITY selectAllCmd.accesskey "a"> <!ENTITY selectAllCmd.accesskey "a">

View file

@ -1,3 +1,2 @@
general.useragent.locale=sk-SK
intl.accept_languages=sk, cs, en-US, en intl.accept_languages=sk, cs, en-US, en
pluralRule=8 pluralRule=8

View file

@ -1,4 +1,4 @@
<!ENTITY preferencesCmd2.label "Možnosti"> <!ENTITY preferencesCmd2.label "Možnosti">
<!ENTITY preferencesCmd2.accesskey "o"> <!ENTITY preferencesCmd2.accesskey "M">
<!ENTITY preferencesCmdUnix.label "Nastavitve"> <!ENTITY preferencesCmdUnix.label "Nastavitve">
<!ENTITY preferencesCmdUnix.accesskey "n"> <!ENTITY preferencesCmdUnix.accesskey "n">

View file

@ -2,8 +2,8 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this - 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/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY editMenu.label "Urejanje"> <!ENTITY editMenu.label "Uredi">
<!ENTITY editMenu.accesskey "e"> <!ENTITY editMenu.accesskey "U">
<!ENTITY undoCmd.label "Razveljavi"> <!ENTITY undoCmd.label "Razveljavi">
<!ENTITY undoCmd.key "Z"> <!ENTITY undoCmd.key "Z">
<!ENTITY undoCmd.accesskey "z"> <!ENTITY undoCmd.accesskey "z">

View file

@ -1,3 +1,2 @@
general.useragent.locale=sl-SI
intl.accept_languages=sl, en-gb, en intl.accept_languages=sl, en-gb, en
pluralRule=10 pluralRule=10

View file

@ -1,3 +1,2 @@
general.useragent.locale=sr-RS
intl.accept_languages=sr, sr-rs, sr-cs, en-us, en intl.accept_languages=sr, sr-rs, sr-cs, en-us, en
pluralRule=7 pluralRule=19

View file

@ -1,3 +1,2 @@
general.useragent.locale=sv-SE
intl.accept_languages=sv-SE, sv, en-US, en intl.accept_languages=sv-SE, sv, en-US, en
pluralRule=1 pluralRule=1

View file

@ -1,4 +1,4 @@
<!ENTITY preferencesCmd2.label "ตัวเลือก"> <!ENTITY preferencesCmd2.label "ตัวเลือก">
<!ENTITY preferencesCmd2.accesskey "O"> <!ENTITY preferencesCmd2.accesskey "">
<!ENTITY preferencesCmdUnix.label "การตั้งค่า"> <!ENTITY preferencesCmdUnix.label "ค่ากำหนด">
<!ENTITY preferencesCmdUnix.accesskey "n"> <!ENTITY preferencesCmdUnix.accesskey "ด">

View file

@ -6,7 +6,7 @@
<!ENTITY editMenu.accesskey "ก"> <!ENTITY editMenu.accesskey "ก">
<!ENTITY undoCmd.label "เลิกทำ"> <!ENTITY undoCmd.label "เลิกทำ">
<!ENTITY undoCmd.key "Z"> <!ENTITY undoCmd.key "Z">
<!ENTITY undoCmd.accesskey ""> <!ENTITY undoCmd.accesskey "">
<!ENTITY redoCmd.label "ทำซ้ำ"> <!ENTITY redoCmd.label "ทำซ้ำ">
<!ENTITY redoCmd.key "Y"> <!ENTITY redoCmd.key "Y">
<!ENTITY redoCmd.accesskey "ท"> <!ENTITY redoCmd.accesskey "ท">
@ -20,16 +20,16 @@
<!ENTITY pasteCmd.key "V"> <!ENTITY pasteCmd.key "V">
<!ENTITY pasteCmd.accesskey "ว"> <!ENTITY pasteCmd.accesskey "ว">
<!ENTITY deleteCmd.label "ลบ"> <!ENTITY deleteCmd.label "ลบ">
<!ENTITY deleteCmd.accesskey ""> <!ENTITY deleteCmd.accesskey "">
<!ENTITY selectAllCmd.label "เลือกทั้งหมด"> <!ENTITY selectAllCmd.label "เลือกทั้งหมด">
<!ENTITY selectAllCmd.key "A"> <!ENTITY selectAllCmd.key "A">
<!ENTITY selectAllCmd.accesskey ""> <!ENTITY selectAllCmd.accesskey "">
<!ENTITY findCmd.label "ค้นหา"> <!ENTITY findCmd.label "ค้นหา">
<!ENTITY findCmd.key "F"> <!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey ""> <!ENTITY findCmd.accesskey "">
<!ENTITY findAgainCmd.label "ค้นหาอีกครั้ง"> <!ENTITY findAgainCmd.label "ค้นหาอีกครั้ง">
<!ENTITY findAgainCmd.key "G"> <!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3"> <!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey ""> <!ENTITY findAgainCmd.accesskey "">
<!ENTITY findPreviousCmd.label "ค้นหาก่อนหน้า"> <!ENTITY findPreviousCmd.label "ค้นหาก่อนหน้า">
<!ENTITY findPreviousCmd.accesskey ""> <!ENTITY findPreviousCmd.accesskey "">

View file

@ -1,3 +1,2 @@
general.useragent.locale=th-TH intl.accept_languages=th, en-US, en
intl.accept_languages=th-th, th, en-us, en-gb, en
pluralRule=0 pluralRule=0

View file

@ -9,7 +9,7 @@
<!ENTITY undoCmd.accesskey "G"> <!ENTITY undoCmd.accesskey "G">
<!ENTITY redoCmd.label "Yinele"> <!ENTITY redoCmd.label "Yinele">
<!ENTITY redoCmd.key "Y"> <!ENTITY redoCmd.key "Y">
<!ENTITY redoCmd.accesskey "Y"> <!ENTITY redoCmd.accesskey "n">
<!ENTITY cutCmd.label "Kes"> <!ENTITY cutCmd.label "Kes">
<!ENTITY cutCmd.key "X"> <!ENTITY cutCmd.key "X">
<!ENTITY cutCmd.accesskey "K"> <!ENTITY cutCmd.accesskey "K">
@ -23,7 +23,7 @@
<!ENTITY deleteCmd.accesskey "S"> <!ENTITY deleteCmd.accesskey "S">
<!ENTITY selectAllCmd.label "Tümünü seç"> <!ENTITY selectAllCmd.label "Tümünü seç">
<!ENTITY selectAllCmd.key "A"> <!ENTITY selectAllCmd.key "A">
<!ENTITY selectAllCmd.accesskey "T"> <!ENTITY selectAllCmd.accesskey "ü">
<!ENTITY findCmd.label "Bul"> <!ENTITY findCmd.label "Bul">
<!ENTITY findCmd.key "F"> <!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey "B"> <!ENTITY findCmd.accesskey "B">

View file

@ -1,3 +1,2 @@
general.useragent.locale=tr-TR
intl.accept_languages=tr-TR, tr, en-US, en intl.accept_languages=tr-TR, tr, en-US, en
pluralRule=0 pluralRule=1

View file

@ -12,7 +12,7 @@
<!ENTITY redoCmd.accesskey "т"> <!ENTITY redoCmd.accesskey "т">
<!ENTITY cutCmd.label "Вирізати"> <!ENTITY cutCmd.label "Вирізати">
<!ENTITY cutCmd.key "X"> <!ENTITY cutCmd.key "X">
<!ENTITY cutCmd.accesskey "р"> <!ENTITY cutCmd.accesskey "и">
<!ENTITY copyCmd.label "Копіювати"> <!ENTITY copyCmd.label "Копіювати">
<!ENTITY copyCmd.key "C"> <!ENTITY copyCmd.key "C">
<!ENTITY copyCmd.accesskey "п"> <!ENTITY copyCmd.accesskey "п">
@ -27,9 +27,9 @@
<!ENTITY findCmd.label "Знайти"> <!ENTITY findCmd.label "Знайти">
<!ENTITY findCmd.key "F"> <!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey "З"> <!ENTITY findCmd.accesskey "З">
<!ENTITY findAgainCmd.label "Шукати далі"> <!ENTITY findAgainCmd.label "Знайти знову">
<!ENTITY findAgainCmd.key "G"> <!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3"> <!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey "д"> <!ENTITY findAgainCmd.accesskey "т">
<!ENTITY findPreviousCmd.label "Шукати попереднє"> <!ENTITY findPreviousCmd.label "Знайти попереднє">
<!ENTITY findPreviousCmd.accesskey "п"> <!ENTITY findPreviousCmd.accesskey "п">

View file

@ -1,3 +1,2 @@
general.useragent.locale=uk-UA intl.accept_languages=uk-UA, uk, en-US, en
intl.accept_languages=uk, ru, en-us, en
pluralRule=7 pluralRule=7

View file

@ -1,4 +1,4 @@
<!ENTITY preferencesCmd2.label "Tùy chỉnh"> <!ENTITY preferencesCmd2.label "Tùy chọn">
<!ENTITY preferencesCmd2.accesskey "y"> <!ENTITY preferencesCmd2.accesskey "O">
<!ENTITY preferencesCmdUnix.label "Tùy chỉnh"> <!ENTITY preferencesCmdUnix.label "Tùy chỉnh">
<!ENTITY preferencesCmdUnix.accesskey "y"> <!ENTITY preferencesCmdUnix.accesskey "n">

View file

@ -3,33 +3,33 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY editMenu.label "Chỉnh sửa"> <!ENTITY editMenu.label "Chỉnh sửa">
<!ENTITY editMenu.accesskey "s"> <!ENTITY editMenu.accesskey "e">
<!ENTITY undoCmd.label "Hoàn tác"> <!ENTITY undoCmd.label "Hoàn tác">
<!ENTITY undoCmd.key "Z"> <!ENTITY undoCmd.key "Z">
<!ENTITY undoCmd.accesskey "H"> <!ENTITY undoCmd.accesskey "u">
<!ENTITY redoCmd.label "Làm lại"> <!ENTITY redoCmd.label "Làm lại">
<!ENTITY redoCmd.key "Y"> <!ENTITY redoCmd.key "Y">
<!ENTITY redoCmd.accesskey "L"> <!ENTITY redoCmd.accesskey "r">
<!ENTITY cutCmd.label "Cắt"> <!ENTITY cutCmd.label "Cắt">
<!ENTITY cutCmd.key "X"> <!ENTITY cutCmd.key "X">
<!ENTITY cutCmd.accesskey "t"> <!ENTITY cutCmd.accesskey "t">
<!ENTITY copyCmd.label "Chép"> <!ENTITY copyCmd.label "Sao chép">
<!ENTITY copyCmd.key "C"> <!ENTITY copyCmd.key "C">
<!ENTITY copyCmd.accesskey "C"> <!ENTITY copyCmd.accesskey "c">
<!ENTITY pasteCmd.label "Dán"> <!ENTITY pasteCmd.label "Dán">
<!ENTITY pasteCmd.key "V"> <!ENTITY pasteCmd.key "V">
<!ENTITY pasteCmd.accesskey "D"> <!ENTITY pasteCmd.accesskey "p">
<!ENTITY deleteCmd.label "Xóa"> <!ENTITY deleteCmd.label "Xóa">
<!ENTITY deleteCmd.accesskey "X"> <!ENTITY deleteCmd.accesskey "d">
<!ENTITY selectAllCmd.label "Chọn toàn bộ"> <!ENTITY selectAllCmd.label "Chọn tất cả">
<!ENTITY selectAllCmd.key "A"> <!ENTITY selectAllCmd.key "A">
<!ENTITY selectAllCmd.accesskey "b"> <!ENTITY selectAllCmd.accesskey "a">
<!ENTITY findCmd.label "Tìm"> <!ENTITY findCmd.label "Tìm">
<!ENTITY findCmd.key "F"> <!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey "m"> <!ENTITY findCmd.accesskey "F">
<!ENTITY findAgainCmd.label "Tìm tiếp"> <!ENTITY findAgainCmd.label "Tìm tiếp">
<!ENTITY findAgainCmd.key "G"> <!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3"> <!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey "p"> <!ENTITY findAgainCmd.accesskey "g">
<!ENTITY findPreviousCmd.label "Tìm phía trước"> <!ENTITY findPreviousCmd.label "Tìm phía trước">
<!ENTITY findPreviousCmd.accesskey "r"> <!ENTITY findPreviousCmd.accesskey "v">

View file

@ -1,3 +1,2 @@
general.useragent.locale=vi-VN
intl.accept_languages=vi-vn, vi, en-us, en intl.accept_languages=vi-vn, vi, en-us, en
pluralRule=1 pluralRule=0

View file

@ -1,3 +1,2 @@
general.useragent.locale=zh-CN intl.accept_languages=zh-CN, zh, zh-TW, zh-HK, en-US, en
intl.accept_languages=zh-cn, zh, en-us, en pluralRule=0
pluralRule=1

View file

@ -1,3 +1,2 @@
general.useragent.locale=zh-TW
intl.accept_languages=zh-tw, zh, en-us, en intl.accept_languages=zh-tw, zh, en-us, en
pluralRule=0 pluralRule=0

129
package-lock.json generated
View file

@ -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": { "@sinonjs/commons": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz",
@ -778,6 +799,34 @@
"integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==",
"dev": true "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": { "@zotero/eslint-config": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/@zotero/eslint-config/-/eslint-config-1.0.3.tgz", "resolved": "https://registry.npmjs.org/@zotero/eslint-config/-/eslint-config-1.0.3.tgz",
@ -2003,6 +2052,11 @@
"randomfill": "^1.0.3" "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": { "currently-unhandled": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
@ -3751,9 +3805,12 @@
} }
}, },
"hoist-non-react-statics": { "hoist-non-react-statics": {
"version": "2.5.5", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz",
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==",
"requires": {
"react-is": "^16.7.0"
}
}, },
"hosted-git-info": { "hosted-git-info": {
"version": "2.8.4", "version": "2.8.4",
@ -3983,30 +4040,28 @@
} }
}, },
"intl-format-cache": { "intl-format-cache": {
"version": "2.1.0", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-2.1.0.tgz", "resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-4.2.3.tgz",
"integrity": "sha1-BKNp/sv61tpgBbrh8UMzMy3PkxY=" "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": { "intl-messageformat": {
"version": "2.2.0", "version": "7.3.3",
"resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-2.2.0.tgz", "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-7.3.3.tgz",
"integrity": "sha1-NFvNRt5jC3aDMwwuUhd/9eq0hPw=", "integrity": "sha512-LfYzzoUYjDtdZDDmntOAEYkub816ZWpWFqv2pXXNv7Ea5WUUltljHOxwQXEly54rNk6whkn97rxfu3LPFRzmFw==",
"requires": { "requires": {
"intl-messageformat-parser": "1.4.0" "intl-format-cache": "^4.2.3",
"intl-messageformat-parser": "^3.2.2"
} }
}, },
"intl-messageformat-parser": { "intl-messageformat-parser": {
"version": "1.4.0", "version": "3.2.2",
"resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz", "resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-3.2.2.tgz",
"integrity": "sha1-tD1FqXRoytvkQzHXS7Ho3qRPwHU=" "integrity": "sha512-ax9639ST77YimAddTH/0Q9qhXuYS8ZVsoqOZinqnS90MbXaNuIq+KIdifaIndwI+lMEv3o+qNaGycXYvlh17rw=="
},
"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"
}
}, },
"invariant": { "invariant": {
"version": "2.2.2", "version": "2.2.2",
@ -5491,17 +5546,28 @@
} }
}, },
"react-intl": { "react-intl": {
"version": "2.7.2", "version": "3.4.0",
"resolved": "https://registry.npmjs.org/react-intl/-/react-intl-2.7.2.tgz", "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-3.4.0.tgz",
"integrity": "sha512-3dcNGLqEw2FKkX+1L2WYLgjP0MVJkvWuVd1uLcnwifIQe8JQvnd9Bss4hb4Gvg/YhBIRcs4LM6C2bAgyklucjw==", "integrity": "sha512-pW+z0ngVtPzICQeBrvoxk/YOotjFjVMvqxf/q0hjfM4CLvzIWJW/7MQcOz8ujD0Agf146mYOUv0//a9JM4H6Tg==",
"requires": { "requires": {
"hoist-non-react-statics": "^2.5.5", "@formatjs/intl-relativetimeformat": "^4.2.1",
"intl-format-cache": "^2.0.5", "@formatjs/intl-unified-numberformat": "^2.1.0",
"intl-messageformat": "^2.1.0", "@types/hoist-non-react-statics": "^3.3.1",
"intl-relativeformat": "^2.1.0", "@types/invariant": "^2.2.30",
"invariant": "^2.1.1" "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": { "react-lifecycles-compat": {
"version": "3.0.4", "version": "3.0.4",
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
@ -5883,6 +5949,11 @@
"safe-buffer": "^5.0.1" "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": { "shasum": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz",

View file

@ -20,7 +20,7 @@
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"react": "^16.8.6", "react": "^16.8.6",
"react-dom": "^16.8.6", "react-dom": "^16.8.6",
"react-intl": "^2.7.2", "react-intl": "^3.4.0",
"url": "^0.11.0" "url": "^0.11.0"
}, },
"devDependencies": { "devDependencies": {

View file

@ -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 () { describe("#getNextName()", function () {
it("should get the next available numbered name", function () { it("should get the next available numbered name", function () {
var existing = ['Name', 'Name 1', 'Name 3']; var existing = ['Name', 'Name 1', 'Name 3'];