mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 03:12:27 +12:00
Fix 860 languagetool get locale language (#861)
* Fix #860 missing get_locale_language on languagetool * Update spellchecker.py Co-authored-by: Tobias Frisch <thejackimonster@gmail.com>
This commit is contained in:
parent
49f0c298c3
commit
4107c48ea9
|
@ -530,6 +530,12 @@ def get_languagetool_languages():
|
|||
else:
|
||||
return languagetool.LanguageTool()._get_languages()
|
||||
|
||||
def get_languagetool_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):
|
||||
|
@ -577,7 +583,7 @@ class LanguageToolDictionary(BasicDictionary):
|
|||
if not LanguageToolDictionary.isInstalled():
|
||||
return None
|
||||
|
||||
default_locale = languagetool.get_locale_language()
|
||||
default_locale = get_languagetool_locale_language()
|
||||
|
||||
if default_locale and not default_locale in get_languagetool_languages():
|
||||
default_locale = None
|
||||
|
|
Loading…
Reference in a new issue