1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-11-17 04:50:11 +01:00
This commit is contained in:
Piero Toffanin 2023-11-15 14:49:53 -05:00
parent 9bc342a9ae
commit 48464938cb

View File

@ -767,7 +767,7 @@ def create_app(args):
# roughly equivalent to a batch process of N batches assuming # roughly equivalent to a batch process of N batches assuming
# each batch uses all available limits # each batch uses all available limits
if args.char_limit != -1: if args.char_limit != -1:
request.req_cost = max(1, int(os.path.getsize(filepath) / args.char_limit)) request.req_cost = max(1, int(os.path.getsize(filepath) / args.char_limit))
translated_file_path = argostranslatefiles.translate_file(src_lang.get_translation(tgt_lang), filepath) translated_file_path = argostranslatefiles.translate_file(src_lang.get_translation(tgt_lang), filepath)
translated_filename = os.path.basename(translated_file_path) translated_filename = os.path.basename(translated_file_path)