mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-14 14:02:52 +00:00
ISO lang code support for --load-only
Some checks are pending
Build and Publish Docker Image / main (push) Waiting to run
Run tests / tests_python (3.9) (push) Waiting to run
Run tests / test_docker_build (push) Waiting to run
Run tests / tests_python (3.10) (push) Waiting to run
Run tests / tests_python (3.8) (push) Waiting to run
Some checks are pending
Build and Publish Docker Image / main (push) Waiting to run
Run tests / tests_python (3.9) (push) Waiting to run
Run tests / test_docker_build (push) Waiting to run
Run tests / tests_python (3.10) (push) Waiting to run
Run tests / tests_python (3.8) (push) Waiting to run
This commit is contained in:
parent
29c9f39e8f
commit
182f6063f0
2 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,9 @@ aliases = {
|
|||
rev_aliases = {v.lower(): k for k, v in aliases.items()}
|
||||
|
||||
def iso2model(lang):
|
||||
if isinstance(lang, list):
|
||||
return [iso2model(l) for l in lang]
|
||||
|
||||
if not isinstance(lang, str):
|
||||
return lang
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue