mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-06-19 23:51:01 +00:00
PoC translation working
This commit is contained in:
parent
05900ff556
commit
50c9b62595
3 changed files with 46 additions and 2 deletions
|
@ -1022,6 +1022,9 @@ def create_app(args):
|
|||
# TODO: populate from available locales
|
||||
return request.accept_languages.best_match(['en', 'it'])
|
||||
|
||||
def gettext_escaped(*args, **kwargs):
|
||||
return _(*args, **kwargs).replace("'", "\\'")
|
||||
app.jinja_env.globals.update(_e=gettext_escaped)
|
||||
|
||||
# Call factory function to create our blueprint
|
||||
swaggerui_blueprint = get_swaggerui_blueprint(SWAGGER_URL, API_URL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue