diff --git a/Makefile b/Makefile index c8a9796a71..08318220ac 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,6 @@ migrate: cd InvenTree && python3 manage.py migrate cd InvenTree && python3 manage.py migrate --run-syncdb cd InvenTree && python3 manage.py check - cd InvenTree && python3 manage.py makemessages - cd InvenTree && python3 manage.py compilemessages # Collect static files into the correct locations static: @@ -41,6 +39,11 @@ postgresql: 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 + # Run PEP style checks against source code style: flake8 InvenTree @@ -69,4 +72,4 @@ backup: cd InvenTree && python3 manage.py dbbackup cd InvenTree && python3 manage.py mediabackup -.PHONY: clean migrate superuser install mysql postgresql static style test coverage docreqs docs backup update \ No newline at end of file +.PHONY: clean migrate superuser install mysql postgresql translate static style test coverage docreqs docs backup update \ No newline at end of file diff --git a/docs/start.rst b/docs/start.rst index 18bef1bbbd..f45c3a8d14 100644 --- a/docs/start.rst +++ b/docs/start.rst @@ -19,7 +19,8 @@ To install InvenTree you will need the following system components installed: * python3 * python3-pip (pip3) * make -* gettext + +Each of these programs need to be installed (e.g. using apt or similar) before running the ``make install`` script. Installation ------------ @@ -89,6 +90,7 @@ Other shorthand functions are provided for the development and testing process: * ``make migrate`` - Perform database migrations * ``make mysql`` - Install packages required for MySQL database backend * ``make postgresql`` - Install packages required for PostgreSQL database backend +* ``make translate`` - Compile language translation files (requires gettext system package) * ``make backup`` - Backup database tables and media files * ``make test`` - Run all unit tests * ``make coverage`` - Run all unit tests and generate code coverage report diff --git a/docs/translate.rst b/docs/translate.rst index e81ecef7f8..3c2ad0d5f4 100644 --- a/docs/translate.rst +++ b/docs/translate.rst @@ -11,4 +11,6 @@ InvenTree supports multi-language translation using the `Django Translation Fram Translation strings are located in the `InvenTree/locales/` directory, and translation files can be easily added here. -To set the default language, change the `langauge` setting in the `config.yaml` settings file. \ No newline at end of file +To set the default language, change the `langauge` setting in the `config.yaml` settings file. + +To recompile the translation files (after adding new translation strings), run the command ``make translate`` from the root directory.