Skip to content

Commit

Permalink
Fix olivierkes#860 missing get_locale_language on languagetool
Browse files Browse the repository at this point in the history
  • Loading branch information
belug23 committed Apr 11, 2021
1 parent 49f0c29 commit b72098d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion manuskript/functions/spellchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,12 @@ def get_languagetool_languages():
else:
return languagetool.LanguageTool()._get_languages()

def get_locale_language():
if use_language_check:
return languagetool.get_locale_language()
else:
return languagetool.utils.get_locale_language()

class LanguageToolDictionary(BasicDictionary):

def __init__(self, name):
Expand Down Expand Up @@ -577,7 +583,7 @@ def getDefaultDictionary():
if not LanguageToolDictionary.isInstalled():
return None

default_locale = languagetool.get_locale_language()
default_locale = get_locale_language()

if default_locale and not default_locale in get_languagetool_languages():
default_locale = None
Expand Down

0 comments on commit b72098d

Please sign in to comment.