mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-06-20 08:01:00 +00:00
Add option --load-only language codes
The user will not have to install language packages from "argos-translate" that he/she has no use for.
This commit is contained in:
parent
fb031b826a
commit
abeee7e385
3 changed files with 27 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
import argparse
|
||||
import operator
|
||||
from app.app import create_app
|
||||
|
||||
def main():
|
||||
|
@ -29,6 +30,9 @@ def main():
|
|||
help="Use offline")
|
||||
parser.add_argument('--api-keys', default=False, action="store_true",
|
||||
help="Enable API keys database for per-user rate limits lookup")
|
||||
parser.add_argument('--load-only', type=operator.methodcaller('split', ','),
|
||||
metavar='<comma-separated language codes>',
|
||||
help='Set available languages (ar,de,en,es,fr,ga,hi,it,ja,ko,pt,ru,zh)')
|
||||
|
||||
|
||||
args = parser.parse_args()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue