forked from mirrors/LibreTranslate
Merge pull request #206 from dingedi/feature/set-default-language
set default language instead of raise error
This commit is contained in:
commit
0d122c5d53
1 changed files with 6 additions and 6 deletions
12
app/app.py
12
app/app.py
|
@ -133,13 +133,13 @@ def create_app(args):
|
||||||
|
|
||||||
# Raise AttributeError to prevent app startup if user input is not valid.
|
# Raise AttributeError to prevent app startup if user input is not valid.
|
||||||
if frontend_argos_language_source is None:
|
if frontend_argos_language_source is None:
|
||||||
raise AttributeError(
|
frontend_argos_language_source = languages[0]
|
||||||
f"{args.frontend_language_source} as frontend source language is not supported."
|
|
||||||
)
|
|
||||||
if frontend_argos_language_target is None:
|
if frontend_argos_language_target is None:
|
||||||
raise AttributeError(
|
if languages[1]:
|
||||||
f"{args.frontend_language_target} as frontend target language is not supported."
|
frontend_argos_language_target = languages[1]
|
||||||
)
|
else:
|
||||||
|
frontend_argos_language_target = languages[0]
|
||||||
|
|
||||||
|
|
||||||
api_keys_db = None
|
api_keys_db = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue