mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Make translation compilation a separate step
- Must be run after a translation file is updated
This commit is contained in:
parent
fcb47fce09
commit
b56a1ade24
9
Makefile
9
Makefile
@ -15,8 +15,6 @@ migrate:
|
|||||||
cd InvenTree && python3 manage.py migrate
|
cd InvenTree && python3 manage.py migrate
|
||||||
cd InvenTree && python3 manage.py migrate --run-syncdb
|
cd InvenTree && python3 manage.py migrate --run-syncdb
|
||||||
cd InvenTree && python3 manage.py check
|
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
|
# Collect static files into the correct locations
|
||||||
static:
|
static:
|
||||||
@ -41,6 +39,11 @@ postgresql:
|
|||||||
apt-get install postgresql postgresql-contrib libpq-dev
|
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
|
||||||
|
|
||||||
# Run PEP style checks against source code
|
# Run PEP style checks against source code
|
||||||
style:
|
style:
|
||||||
flake8 InvenTree
|
flake8 InvenTree
|
||||||
@ -69,4 +72,4 @@ backup:
|
|||||||
cd InvenTree && python3 manage.py dbbackup
|
cd InvenTree && python3 manage.py dbbackup
|
||||||
cd InvenTree && python3 manage.py mediabackup
|
cd InvenTree && python3 manage.py mediabackup
|
||||||
|
|
||||||
.PHONY: clean migrate superuser install mysql postgresql static style test coverage docreqs docs backup update
|
.PHONY: clean migrate superuser install mysql postgresql translate static style test coverage docreqs docs backup update
|
@ -19,7 +19,8 @@ To install InvenTree you will need the following system components installed:
|
|||||||
* python3
|
* python3
|
||||||
* python3-pip (pip3)
|
* python3-pip (pip3)
|
||||||
* make
|
* make
|
||||||
* gettext
|
|
||||||
|
Each of these programs need to be installed (e.g. using apt or similar) before running the ``make install`` script.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
@ -89,6 +90,7 @@ Other shorthand functions are provided for the development and testing process:
|
|||||||
* ``make migrate`` - Perform database migrations
|
* ``make migrate`` - Perform database migrations
|
||||||
* ``make mysql`` - Install packages required for MySQL database backend
|
* ``make mysql`` - Install packages required for MySQL database backend
|
||||||
* ``make postgresql`` - Install packages required for PostgreSQL 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 backup`` - Backup database tables and media files
|
||||||
* ``make test`` - Run all unit tests
|
* ``make test`` - Run all unit tests
|
||||||
* ``make coverage`` - Run all unit tests and generate code coverage report
|
* ``make coverage`` - Run all unit tests and generate code coverage report
|
||||||
|
@ -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.
|
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.
|
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.
|
||||||
|
Loading…
Reference in New Issue
Block a user