mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-22 23:26:31 +00:00
format
This commit is contained in:
parent
6a304df2e8
commit
bcbaf52777
1 changed files with 2 additions and 1 deletions
|
@ -7,7 +7,7 @@ from functools import wraps
|
|||
import argostranslatefiles
|
||||
import pkg_resources
|
||||
from argostranslatefiles import get_supported_formats
|
||||
from flask import Flask, abort, jsonify, render_template, request, url_for, send_from_directory, send_file
|
||||
from flask import Flask, abort, jsonify, render_template, request, url_for, send_file
|
||||
from flask_swagger import swagger
|
||||
from flask_swagger_ui import get_swaggerui_blueprint
|
||||
from translatehtml import translate_html
|
||||
|
@ -584,6 +584,7 @@ def create_app(args):
|
|||
|
||||
translated_file_path = argostranslatefiles.translate_file(src_langs[0].get_translation(tgt_lang), filepath)
|
||||
translated_filename = os.path.basename(translated_file_path)
|
||||
|
||||
return jsonify(
|
||||
{
|
||||
"translatedFileUrl": url_for('download_file', filename=translated_filename, _external=True)
|
||||
|
|
Loading…
Reference in a new issue