diff options
author | ng0 <ng0@n0.is> | 2019-01-25 17:31:36 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-01-25 17:33:11 +0000 |
commit | a3765775b8a657cb93e378fb0b5338807450233d (patch) | |
tree | 93c9213c9ca90d3c86f50710afb818a83f7bfca6 | |
parent | 72ecba51868ddc6695c6e47d2dd20f75a25148fd (diff) | |
download | www-a3765775b8a657cb93e378fb0b5338807450233d.tar.gz www-a3765775b8a657cb93e378fb0b5338807450233d.zip |
configurable babel
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | config.mk | 1 |
2 files changed, 7 insertions, 6 deletions
@@ -9,7 +9,7 @@ all: locale template | |||
9 | 9 | ||
10 | # Extract translateable strings from jinja2 templates. | 10 | # Extract translateable strings from jinja2 templates. |
11 | locale/messages.pot: *.j2 common/*.j2.inc | 11 | locale/messages.pot: *.j2 common/*.j2.inc |
12 | pybabel extract -F locale/babel.map -o locale/messages.pot . | 12 | $(BABEL) extract -F locale/babel.map -o locale/messages.pot . |
13 | 13 | ||
14 | # Update translation (.po) files with new strings. | 14 | # Update translation (.po) files with new strings. |
15 | locale-update: locale/messages.pot | 15 | locale-update: locale/messages.pot |
@@ -23,11 +23,11 @@ locale-update: locale/messages.pot | |||
23 | 23 | ||
24 | # Compile translation files for use. | 24 | # Compile translation files for use. |
25 | locale-compile: | 25 | locale-compile: |
26 | pybabel compile -d locale -l en --use-fuzzy | 26 | $(BABEL) compile -d locale -l en --use-fuzzy |
27 | pybabel compile -d locale -l de --use-fuzzy | 27 | $(BABEL) compile -d locale -l de --use-fuzzy |
28 | pybabel compile -d locale -l fr --use-fuzzy | 28 | $(BABEL) compile -d locale -l fr --use-fuzzy |
29 | pybabel compile -d locale -l it --use-fuzzy | 29 | $(BABEL) compile -d locale -l it --use-fuzzy |
30 | pybabel compile -d locale -l es --use-fuzzy | 30 | $(BABEL) compile -d locale -l es --use-fuzzy |
31 | 31 | ||
32 | # Process everything related to gettext translations. | 32 | # Process everything related to gettext translations. |
33 | locale: locale-update locale-compile | 33 | locale: locale-update locale-compile |
@@ -3,5 +3,6 @@ | |||
3 | DEBUG=0 | 3 | DEBUG=0 |
4 | 4 | ||
5 | PYTHON=python3 | 5 | PYTHON=python3 |
6 | BABEL=pybabel | ||
6 | 7 | ||
7 | RUN_BROWSER=$(BROWSER) | 8 | RUN_BROWSER=$(BROWSER) |