mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-06-21 08:30:58 +00:00
Fix language detection error
The root cause was load_installed_languages() of argostranslate being called at the top of the file instead of inside a function, this caused the list of installed languages to incorrectly be returned as an empty list.
This commit is contained in:
parent
bcf051b7ff
commit
e23b96f1da
2 changed files with 9 additions and 4 deletions
|
@ -102,7 +102,7 @@ def create_app(args):
|
|||
|
||||
boot(args.load_only)
|
||||
|
||||
from app.language import languages
|
||||
from app.language import load_languages
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
|
@ -111,6 +111,7 @@ def create_app(args):
|
|||
|
||||
if not args.disable_files_translation:
|
||||
remove_translated_files.setup(get_upload_dir())
|
||||
languages = load_languages()
|
||||
|
||||
# Map userdefined frontend languages to argos language object.
|
||||
if args.frontend_language_source == "auto":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue