2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-12 10:05:39 +00:00

Fix escape codes in translated strings (#6234)

* Fix escape codes in translated strings

- Only add escape characters for javascript files

* import fix

* more import fix
This commit is contained in:
Oliver
2024-01-14 13:29:36 +11:00
committed by GitHub
parent d2d59e0709
commit f396642d16
7 changed files with 16 additions and 11 deletions

View File

@ -292,23 +292,24 @@ def translate_stats(c):
@task(post=[translate_stats])
def translate(c):
def translate(c, ignore_static=False, no_frontend=False):
"""Rebuild translation source files. Advanced use only!
Note: This command should not be used on a local install,
it is performed as part of the InvenTree translation toolchain.
"""
# Translate applicable .py / .html / .js / .tsx files
# Translate applicable .py / .html / .js files
manage(c, 'makemessages --all -e py,html,js --no-wrap')
manage(c, 'compilemessages')
if node_available():
if not no_frontend and node_available():
frontend_install(c)
frontend_trans(c)
frontend_build(c)
# Update static files
static(c)
if not ignore_static:
static(c)
@task