Add it-IT spell checker (#1139)

This commit is contained in:
Raoul Scarazzini 2020-01-17 04:20:15 +01:00 committed by Dean Whillier
parent 33e24030d1
commit f9b5d64993
3 changed files with 7 additions and 0 deletions

View file

@ -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,

View file

@ -110,5 +110,8 @@ SpellChecker.getSpellCheckerLocale = (electronLocale) => {
if (electronLocale.match(/^pt-?/)) {
return 'pt-BR';
}
if (electronLocale.match(/^it-?/)) {
return 'it-IT';
}
return 'en-US';
};

View file

@ -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');
});
});