aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview/spellchecker.js
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-02-22 16:24:32 +0100
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-02-22 16:24:32 +0100
commit550f66ce9155c04eb48af506c8d7832bbce8ac91 (patch)
tree4371dbf0199bc00417face999bbec02afacfab71 /src/webview/spellchecker.js
parentadds flow for deleting workspaces (diff)
parentMerge branch 'master' into develop (diff)
downloadferdium-app-550f66ce9155c04eb48af506c8d7832bbce8ac91.tar.gz
ferdium-app-550f66ce9155c04eb48af506c8d7832bbce8ac91.tar.zst
ferdium-app-550f66ce9155c04eb48af506c8d7832bbce8ac91.zip
Merge branch 'develop' into feature/workspaces
Diffstat (limited to 'src/webview/spellchecker.js')
-rw-r--r--src/webview/spellchecker.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/webview/spellchecker.js b/src/webview/spellchecker.js
index becaed449..9158b3b94 100644
--- a/src/webview/spellchecker.js
+++ b/src/webview/spellchecker.js
@@ -3,6 +3,7 @@ import { SpellCheckerProvider } from 'electron-hunspell';
3import path from 'path'; 3import path from 'path';
4 4
5import { DICTIONARY_PATH } from '../config'; 5import { DICTIONARY_PATH } from '../config';
6import { SPELLCHECKER_LOCALES } from '../i18n/languages';
6 7
7const debug = require('debug')('Franz:spellchecker'); 8const debug = require('debug')('Franz:spellchecker');
8 9
@@ -82,3 +83,13 @@ export function disable() {
82 currentDict = null; 83 currentDict = null;
83 } 84 }
84} 85}
86
87export function getSpellcheckerLocaleByFuzzyIdentifier(identifier) {
88 const locales = Object.keys(SPELLCHECKER_LOCALES).filter(key => key === identifier.toLowerCase() || key.split('-')[0] === identifier.toLowerCase());
89
90 if (locales.length >= 1) {
91 return locales[0];
92 }
93
94 return null;
95}