fix(composer): detect system language for spellchecking

This commit is contained in:
Evan Morikawa 2015-12-07 19:22:54 -05:00
parent f80921f4ac
commit 632c06dbdd

View file

@ -212,10 +212,12 @@ class NylasEnvConstructor extends Model
@getCurrentWindow().setMenuBarVisibility(false)
# initialize spell checking
require('web-frame').setSpellCheckProvider("en-US", false, {
require('web-frame').setSpellCheckProvider(navigator.language, false, {
spellCheck: (text) ->
!(require('spellchecker').isMisspelled(text))
})
spellchecker = require('spellchecker')
spellchecker.setDictionary(navigator.language)
@subscribe @packages.onDidActivateInitialPackages => @watchThemes()
@windowEventHandler = new WindowEventHandler