Add it-IT spell checker (#1139)
This commit is contained in:
parent
33e24030d1
commit
f9b5d64993
|
@ -30,6 +30,7 @@ function getSpellCheckerLocaleMenus(onSelectSpellCheckerLocale) {
|
|||
{language: 'Spanish (ES)', locale: 'es-ES'},
|
||||
{language: 'Spanish (MX)', locale: 'es-MX'},
|
||||
{language: 'Dutch', locale: 'nl-NL'},
|
||||
{language: 'Italian', locale: 'it-IT'},
|
||||
];
|
||||
return locales.map((l) => ({
|
||||
label: l.language,
|
||||
|
|
|
@ -110,5 +110,8 @@ SpellChecker.getSpellCheckerLocale = (electronLocale) => {
|
|||
if (electronLocale.match(/^pt-?/)) {
|
||||
return 'pt-BR';
|
||||
}
|
||||
if (electronLocale.match(/^it-?/)) {
|
||||
return 'it-IT';
|
||||
}
|
||||
return 'en-US';
|
||||
};
|
||||
|
|
|
@ -28,6 +28,9 @@ describe('main/Spellchecker.js', function() {
|
|||
|
||||
SpellChecker.getSpellCheckerLocale('ja').should.equal('en-US');
|
||||
SpellChecker.getSpellCheckerLocale('ja-JP').should.equal('en-US');
|
||||
|
||||
SpellChecker.getSpellCheckerLocale('it').should.equal('it-IT');
|
||||
SpellChecker.getSpellCheckerLocale('it-IT').should.equal('it-IT');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue