diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-13 00:45:01 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-08-13 00:45:01 +0530 |
commit | 2d27d5e66649d4f5baf127a53ee5ae524eae3a59 (patch) | |
tree | c592ea219ac8cd987fc367f57b54034c450ab2ab /src/webview/spellchecker.js | |
parent | Ferdi v5.6.0 (diff) | |
parent | 5.6.1-nightly.24 [skip ci] (diff) | |
download | ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.gz ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.zst ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.zip |
chore: merge from nightly branch into release branch in prep for next beta
Diffstat (limited to 'src/webview/spellchecker.js')
-rw-r--r-- | src/webview/spellchecker.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/webview/spellchecker.js b/src/webview/spellchecker.js index 58a04b728..0f4715207 100644 --- a/src/webview/spellchecker.js +++ b/src/webview/spellchecker.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import { getCurrentWebContents } from '@electron/remote'; | 1 | import { getCurrentWebContents } from '@electron/remote'; |
2 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; | 2 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; |
3 | import { isMac } from '../environment'; | 3 | import { DEFAULT_APP_SETTINGS, isMac } from '../environment'; |
4 | 4 | ||
5 | const debug = require('debug')('Ferdi:spellchecker'); | 5 | const debug = require('debug')('Ferdi:spellchecker'); |
6 | 6 | ||
@@ -9,7 +9,7 @@ const [defaultLocale] = webContents.session.getSpellCheckerLanguages(); | |||
9 | debug('Spellchecker default locale is', defaultLocale); | 9 | debug('Spellchecker default locale is', defaultLocale); |
10 | 10 | ||
11 | export function getSpellcheckerLocaleByFuzzyIdentifier(identifier) { | 11 | export function getSpellcheckerLocaleByFuzzyIdentifier(identifier) { |
12 | const locales = Object.keys(SPELLCHECKER_LOCALES).filter(key => key.toLocaleLowerCase() === identifier.toLowerCase() || key.split('-')[0] === identifier.toLowerCase()); | 12 | const locales = Object.keys(SPELLCHECKER_LOCALES).filter((key) => key.toLocaleLowerCase() === identifier.toLowerCase() || key.split('-')[0] === identifier.toLowerCase()); |
13 | 13 | ||
14 | if (locales.length >= 1) { | 14 | if (locales.length >= 1) { |
15 | return locales[0]; | 15 | return locales[0]; |
@@ -33,7 +33,7 @@ export function switchDict(locale) { | |||
33 | locales.push(foundLocale); | 33 | locales.push(foundLocale); |
34 | } | 34 | } |
35 | 35 | ||
36 | locales.push(defaultLocale, 'de'); | 36 | locales.push(defaultLocale, DEFAULT_APP_SETTINGS.fallbackLocale); |
37 | 37 | ||
38 | webContents.session.setSpellCheckerLanguages(locales); | 38 | webContents.session.setSpellCheckerLanguages(locales); |
39 | } | 39 | } |