diff --git a/Makefile b/Makefile index 085c55ebf7..1927dcbf03 100644 --- a/Makefile +++ b/Makefile @@ -21,12 +21,6 @@ postgresql: sudo apt-get install postgresql postgresql-contrib libpq-dev 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 docreqs: pip3 install -U -r docs/requirements.txt diff --git a/tasks.py b/tasks.py index 0e369a9254..9c9bc25c6e 100644 --- a/tasks.py +++ b/tasks.py @@ -145,6 +145,18 @@ def update(c): """ 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 def style(c): """