mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-23 03:31:56 +00:00
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.
This commit is contained in:
committed by
Akash Nimare
parent
4f65c36a72
commit
eaecc92055
@@ -32,14 +32,7 @@ class SetupSpellChecker {
|
||||
|
||||
const userLanguage = ConfigUtil.getConfigItem('spellcheckerLanguage');
|
||||
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
process.platform === 'darwin' ?
|
||||
// On macOS, spellchecker fails to auto-detect the lanugage user is typing in
|
||||
// that's why we need to mention it explicitly
|
||||
this.SpellCheckHandler.switchLanguage(userLanguage) :
|
||||
// On Linux and Windows, spellchecker can automatically detects the language the user is typing in
|
||||
// and silently switches on the fly; thus we can start off as US English
|
||||
this.SpellCheckHandler.switchLanguage('en-US');
|
||||
this.SpellCheckHandler.switchLanguage(userLanguage);
|
||||
}
|
||||
|
||||
const contextMenuBuilder = new ContextMenuBuilder(this.SpellCheckHandler);
|
||||
|
Reference in New Issue
Block a user