Migrate "translate" command

This commit is contained in:
Oliver Walters 2020-08-21 21:13:28 +10:00
parent ec1e646de0
commit af50e29e2c
2 changed files with 12 additions and 6 deletions

View File

@ -21,12 +21,6 @@ postgresql:
sudo apt-get install postgresql postgresql-contrib libpq-dev sudo apt-get install postgresql postgresql-contrib libpq-dev
pip3 install psycopg2 pip3 install psycopg2
# Update translation files
translate:
cd InvenTree && python3 manage.py makemessages
cd InvenTree && python3 manage.py compilemessages
# Install packages required to generate code docs # Install packages required to generate code docs
docreqs: docreqs:
pip3 install -U -r docs/requirements.txt pip3 install -U -r docs/requirements.txt

View File

@ -145,6 +145,18 @@ def update(c):
""" """
pass pass
@task
def translate(c):
"""
Regenerate translation files.
Run this command after added new translatable strings,
or after adding translations for existing strings.
"""
manage(c, "makemigrations")
manage(c, "compilemessages")
@task @task
def style(c): def style(c):
""" """