diff options
Diffstat (limited to 'src/webview/spellchecker.ts')
-rw-r--r-- | src/webview/spellchecker.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/webview/spellchecker.ts b/src/webview/spellchecker.ts index bad2bb4ff..8cf16a7ba 100644 --- a/src/webview/spellchecker.ts +++ b/src/webview/spellchecker.ts | |||
@@ -2,7 +2,8 @@ import { ipcRenderer } from 'electron'; | |||
2 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; | 2 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; |
3 | import { isMac } from '../environment'; | 3 | import { isMac } from '../environment'; |
4 | 4 | ||
5 | const debug = require('debug')('Ferdium:spellchecker'); | 5 | // TODO: Go back to 'debug' from 'console.log' when https://github.com/electron/electron/issues/31689 is fixed |
6 | // const debug = require('debug')('Ferdium:spellchecker'); | ||
6 | 7 | ||
7 | export function getSpellcheckerLocaleByFuzzyIdentifier(identifier: string) { | 8 | export function getSpellcheckerLocaleByFuzzyIdentifier(identifier: string) { |
8 | const locales = Object.keys(SPELLCHECKER_LOCALES).filter( | 9 | const locales = Object.keys(SPELLCHECKER_LOCALES).filter( |
@@ -16,14 +17,14 @@ export function getSpellcheckerLocaleByFuzzyIdentifier(identifier: string) { | |||
16 | 17 | ||
17 | export function switchDict(fuzzyLocale: string, serviceId: string) { | 18 | export function switchDict(fuzzyLocale: string, serviceId: string) { |
18 | if (isMac) { | 19 | if (isMac) { |
19 | debug('Ignoring dictionary changes on macOS'); | 20 | console.log('Ignoring dictionary changes on macOS'); |
20 | return; | 21 | return; |
21 | } | 22 | } |
22 | 23 | ||
23 | debug(`Setting spellchecker locale from: ${fuzzyLocale}`); | 24 | console.log(`Setting spellchecker locale from: ${fuzzyLocale}`); |
24 | const locale = getSpellcheckerLocaleByFuzzyIdentifier(fuzzyLocale); | 25 | const locale = getSpellcheckerLocaleByFuzzyIdentifier(fuzzyLocale); |
25 | if (locale) { | 26 | if (locale) { |
26 | debug(`Sending spellcheck locales to host: ${locale}`); | 27 | console.log(`Sending spellcheck locales to host: ${locale}`); |
27 | ipcRenderer.send('set-spellchecker-locales', { locale, serviceId }); | 28 | ipcRenderer.send('set-spellchecker-locales', { locale, serviceId }); |
28 | } | 29 | } |
29 | } | 30 | } |