summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-08 08:23:37 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-08 08:23:37 +0100
commit40bb0830aa5c761cffc7706517445518affecc21 (patch)
tree1dbb0e6d8e0d783d59ebbc9bc92c224974fc98bb /Makefile
parent17b634a847f0bc0f3204c3c6bd5dcdfbbf9466f2 (diff)
downloadwww-40bb0830aa5c761cffc7706517445518affecc21.tar.gz
www-40bb0830aa5c761cffc7706517445518affecc21.tar.bz2
www-40bb0830aa5c761cffc7706517445518affecc21.zip
add documentation, missing licensing statements, some DE fixes
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c73498c..24f3de5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,15 @@
+# This file is in the public domain.
+
+# All: build HTML pages in all languages and compile the
+# TypeScript logic in web-common.
all: locale template
cd web-common && tsc
+# Extract translateable strings from jinga2 templates.
locale/messages.pot: *.j2
pybabel extract -F locale/babel.map -o locale/messages.pot .
+# Update translation (.po) files with new strings.
locale-update: locale/messages.pot
pybabel update -i locale/messages.pot -d locale -l en --previous
pybabel update -i locale/messages.pot -d locale -l de --previous
@@ -13,6 +19,7 @@ locale-update: locale/messages.pot
if grep -nA1 '#-#-#-#-#' locale/*/LC_MESSAGES/messages.po; then echo -e "\nERROR: Conflicts encountered in PO files.\n"; exit 1; fi
+# Compile translation files for use.
locale-compile:
pybabel compile -d locale -l en --use-fuzzy
pybabel compile -d locale -l de --use-fuzzy
@@ -20,7 +27,10 @@ locale-compile:
pybabel compile -d locale -l it --use-fuzzy
pybabel compile -d locale -l es --use-fuzzy
+# Process everything related to gettext translations.
locale: locale-update locale-compile
+# Run the jinga2 templating engine to expand templates to HTML
+# incorporating translations.
template: locale-compile
./template.sh