Skip to content
This repository was archived by the owner on Jun 3, 2020. It is now read-only.

Commit eaecc92

Browse files
rhythm-sharmaakashnimare
authored andcommitted
spellchecker: Use server language for spellchecker for all platforms.
This is an experimental fix for spellchecker. Previously, we were only using this on macOS since on other platforms, the spellcheck-module claimed to auto-detect + switch language on the fly but looks like it's not working as expected.
1 parent 4f65c36 commit eaecc92

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

app/renderer/js/spellchecker.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,7 @@ class SetupSpellChecker {
3232

3333
const userLanguage = ConfigUtil.getConfigItem('spellcheckerLanguage');
3434

35-
// eslint-disable-next-line no-unused-expressions
36-
process.platform === 'darwin' ?
37-
// On macOS, spellchecker fails to auto-detect the lanugage user is typing in
38-
// that's why we need to mention it explicitly
39-
this.SpellCheckHandler.switchLanguage(userLanguage) :
40-
// On Linux and Windows, spellchecker can automatically detects the language the user is typing in
41-
// and silently switches on the fly; thus we can start off as US English
42-
this.SpellCheckHandler.switchLanguage('en-US');
35+
this.SpellCheckHandler.switchLanguage(userLanguage);
4336
}
4437

4538
const contextMenuBuilder = new ContextMenuBuilder(this.SpellCheckHandler);

0 commit comments

Comments
 (0)