mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-16 21:20:23 +08:00
Merge pull request #1145 from mbilker/fix-linux-spellchecker
Fix logic for en_US default dictionary on Linux
This commit is contained in:
commit
87a1fc6d29
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ class NylasSpellchecker
|
|||
isLanguageAvailable: (lang) =>
|
||||
return false unless lang
|
||||
dicts = @getAvailableDictionaries()
|
||||
return (lang in dicts) or (lang.split(/[-_]/)[0] in dicts)
|
||||
return (lang in dicts) or (lang.split(/[-_]/)[0] in dicts) or (lang.replace('_', '-') in dicts) or (lang.replace('-', '_') in dicts)
|
||||
|
||||
isSpelledCorrectly: (args...) => not @isMisspelled(args...)
|
||||
|
||||
|
@ -76,7 +76,7 @@ class NylasSpellchecker
|
|||
getAvailableDictionaries: ->
|
||||
if process.platform is 'linux'
|
||||
arr = spellchecker.getAvailableDictionaries()
|
||||
if not "en_US" in arr
|
||||
if "en_US" not in arr
|
||||
arr.push('en_US') # Installed by default in node-spellchecker's vendor directory
|
||||
arr
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue