Add pl-PL as spellchecker (#1155)

* Update contextMenu.js

* Update SpellChecker.js

* Update spellchecker_test.js

* Update test/specs/spellchecker_test.js

Co-Authored-By: Dean Whillier <deanwhillier@users.noreply.github.com>

Co-authored-by: Dean Whillier <deanwhillier@users.noreply.github.com>
This commit is contained in:
JtheBAB
2020-01-21 15:08:50 +01:00
committed by Dean Whillier
parent 4804f12535
commit f6129c8253
3 changed files with 6 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ function getSpellCheckerLocaleMenus(onSelectSpellCheckerLocale) {
{language: 'English (US)', locale: 'en-US'},
{language: 'French', locale: 'fr-FR'},
{language: 'German', locale: 'de-DE'},
{language: 'Polish', locale: 'pl-PL'},
{language: 'Portuguese (BR)', locale: 'pt-BR'},
{language: 'Spanish (ES)', locale: 'es-ES'},
{language: 'Spanish (MX)', locale: 'es-MX'},

View File

@@ -107,6 +107,9 @@ SpellChecker.getSpellCheckerLocale = (electronLocale) => {
if (electronLocale.match(/^nl-?/)) {
return 'nl-NL';
}
if (electronLocale.match(/^pl-?/)) {
return 'pl-PL';
}
if (electronLocale.match(/^pt-?/)) {
return 'pt-BR';
}

View File

@@ -23,6 +23,8 @@ describe('main/Spellchecker.js', function() {
SpellChecker.getSpellCheckerLocale('nl').should.equal('nl-NL');
SpellChecker.getSpellCheckerLocale('nl-NL').should.equal('nl-NL');
SpellChecker.getSpellCheckerLocale('pl').should.equal('pl-PL');
SpellChecker.getSpellCheckerLocale('pl-PL').should.equal('pl-PL');
SpellChecker.getSpellCheckerLocale('pt').should.equal('pt-BR');
SpellChecker.getSpellCheckerLocale('pt-BR').should.equal('pt-BR');