feat(spellcheck): add Ukrainian language for spellcheck (#1382)

This commit is contained in:
Dmitriy Danilov
2020-10-14 18:08:02 +03:00
committed by GitHub
parent 2198244a65
commit 67179c0b31
4 changed files with 27 additions and 1 deletions

View File

@@ -714,7 +714,7 @@ export default class SettingsPage extends React.Component {
{'Check spelling'}
<HelpBlock>
{'Highlight misspelled words in your messages.'}
{' Available for English, French, German, Portuguese, Russian, Spanish, and Dutch.'}
{' Available for English, French, German, Portuguese, Russian, Ukrainian, Spanish, and Dutch.'}
</HelpBlock>
</Checkbox>);

View File

@@ -30,6 +30,7 @@ function getSpellCheckerLocaleMenus(onSelectSpellCheckerLocale) {
{language: 'Polish', locale: 'pl-PL'},
{language: 'Portuguese (BR)', locale: 'pt-BR'},
{language: 'Russian', locale: 'ru-RU'},
{language: 'Ukrainian', locale: 'uk-UA'},
{language: 'Spanish (ES)', locale: 'es-ES'},
{language: 'Spanish (MX)', locale: 'es-MX'},
{language: 'Dutch', locale: 'nl-NL'},

View File

@@ -119,5 +119,8 @@ SpellChecker.getSpellCheckerLocale = (electronLocale) => {
if (electronLocale.match(/^ru-?/)) {
return 'ru-RU';
}
if (electronLocale.match(/^uk-?/)) {
return 'uk-UA';
}
return 'en-US';
};