mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-18 05:58:11 +08:00
fix(composer): detect system language for spellchecking
This commit is contained in:
parent
f80921f4ac
commit
632c06dbdd
1 changed files with 3 additions and 1 deletions
|
@ -212,10 +212,12 @@ class NylasEnvConstructor extends Model
|
||||||
@getCurrentWindow().setMenuBarVisibility(false)
|
@getCurrentWindow().setMenuBarVisibility(false)
|
||||||
|
|
||||||
# initialize spell checking
|
# initialize spell checking
|
||||||
require('web-frame').setSpellCheckProvider("en-US", false, {
|
require('web-frame').setSpellCheckProvider(navigator.language, false, {
|
||||||
spellCheck: (text) ->
|
spellCheck: (text) ->
|
||||||
!(require('spellchecker').isMisspelled(text))
|
!(require('spellchecker').isMisspelled(text))
|
||||||
})
|
})
|
||||||
|
spellchecker = require('spellchecker')
|
||||||
|
spellchecker.setDictionary(navigator.language)
|
||||||
|
|
||||||
@subscribe @packages.onDidActivateInitialPackages => @watchThemes()
|
@subscribe @packages.onDidActivateInitialPackages => @watchThemes()
|
||||||
@windowEventHandler = new WindowEventHandler
|
@windowEventHandler = new WindowEventHandler
|
||||||
|
|
Loading…
Reference in a new issue