aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2018-01-01 19:04:25 +0000
committerng0 <ng0@n0.is>2018-01-01 19:04:25 +0000
commit417282851998f292b2c17e3a18ba0525efd077b2 (patch)
tree42f03b06c2af4b670da60f2494879e32e504cfb5
parent23ffffb51ce54b9f2e55da4f097be82d32a614c5 (diff)
downloadwww-417282851998f292b2c17e3a18ba0525efd077b2.tar.gz
www-417282851998f292b2c17e3a18ba0525efd077b2.zip
Makefile
-rw-r--r--Makefile9
1 files changed, 3 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 8dc4bae6..c7e61447 100644
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,9 @@
3# All: build HTML pages in all languages and compile the 3# All: build HTML pages in all languages and compile the
4# TypeScript logic in web-common. 4# TypeScript logic in web-common.
5all: locale template 5all: locale template
6 cd web-common && tsc
7 6
8# Extract translateable strings from jinja2 templates. 7# Extract translateable strings from jinga2 templates.
9locale/messages.pot: *.j2 common/*.j2 common/*.j2.inc 8locale/messages.pot: *.j2 common/*.j2.inc
10 env PYTHONPATH="." pybabel extract -F locale/babel.map -o locale/messages.pot . 9 env PYTHONPATH="." pybabel extract -F locale/babel.map -o locale/messages.pot .
11 10
12# Update translation (.po) files with new strings. 11# Update translation (.po) files with new strings.
@@ -16,7 +15,6 @@ locale-update: locale/messages.pot
16 msgmerge -U -m --previous locale/fr/LC_MESSAGES/messages.po locale/messages.pot 15 msgmerge -U -m --previous locale/fr/LC_MESSAGES/messages.po locale/messages.pot
17 msgmerge -U -m --previous locale/es/LC_MESSAGES/messages.po locale/messages.pot 16 msgmerge -U -m --previous locale/es/LC_MESSAGES/messages.po locale/messages.pot
18 msgmerge -U -m --previous locale/it/LC_MESSAGES/messages.po locale/messages.pot 17 msgmerge -U -m --previous locale/it/LC_MESSAGES/messages.po locale/messages.pot
19 msgmerge -U -m --previous locale/ru/LC_MESSAGES/messages.po locale/messages.pot
20 18
21 if grep -nA1 '#-#-#-#-#' locale/*/LC_MESSAGES/messages.po; then echo -e "\nERROR: Conflicts encountered in PO files.\n"; exit 1; fi 19 if grep -nA1 '#-#-#-#-#' locale/*/LC_MESSAGES/messages.po; then echo -e "\nERROR: Conflicts encountered in PO files.\n"; exit 1; fi
22 20
@@ -27,12 +25,11 @@ locale-compile:
27 pybabel compile -d locale -l fr --use-fuzzy 25 pybabel compile -d locale -l fr --use-fuzzy
28 pybabel compile -d locale -l it --use-fuzzy 26 pybabel compile -d locale -l it --use-fuzzy
29 pybabel compile -d locale -l es --use-fuzzy 27 pybabel compile -d locale -l es --use-fuzzy
30 pybabel compile -d locale -l ru --use-fuzzy
31 28
32# Process everything related to gettext translations. 29# Process everything related to gettext translations.
33locale: locale-update locale-compile 30locale: locale-update locale-compile
34 31
35# Run the jinja2 templating engine to expand templates to HTML 32# Run the jinga2 templating engine to expand templates to HTML
36# incorporating translations. 33# incorporating translations.
37template: locale-compile 34template: locale-compile
38 ./template.py 35 ./template.py