aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 3 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index 84d88d39..3b891920 100644
--- a/Makefile
+++ b/Makefile
@@ -2,40 +2,11 @@
2 2
3include build-system/config.mk 3include build-system/config.mk
4 4
5# List of all supported languages, add new languages here!
6LANGUAGES="ar de en es fr hi it ja ko pt zh_Hant"
7
8# All: build HTML pages in all languages and compile the 5# All: build HTML pages in all languages and compile the
9.PHONY: all 6.PHONY: all
10all: locale template 7all:
11 env BASEURL=$(opt_baseurl) ./inc/make_site.py 8 ./inc/update-messages
12 9 env "BASEURL=$(opt_baseurl)" ./inc/build-site
13# Extract translateable strings from jinja2 templates.
14locale/messages.pot: template/*.j2 template/news/*.j2 common/*.j2 common/*.j2.inc
15 env PYTHONPATH=$$PWD/inc:$$PYTHONPATH $(pybabel) extract -F locale/babel.map -o locale/messages.pot .
16
17# Update translation (.po) files with new strings.
18.PHONY: locale-update
19locale-update: locale/messages.pot
20 for lang in `echo $(LANGUAGES)`; do \
21 $(msgmerge) -q -U -m --previous locale/$$lang/LC_MESSAGES/messages.po locale/messages.pot ; \
22 done
23 if $(grep) -nA1 '#-#-#-#-#' locale/*/LC_MESSAGES/messages.po; then \
24 $(echo) -e "\nERROR: Conflicts encountered in PO files.\n"; \
25 exit 1; \
26 fi
27
28# Compile translation files for use.
29.PHONY: locale-compile
30locale-compile:
31 for lang in `echo $(LANGUAGES)`; do \
32 echo compiling $$lang; \
33 $(pybabel) -q compile -d locale -l $$lang --use-fuzzy ; \
34 done
35
36# Process everything related to gettext translations.
37.PHONY: locale
38locale: locale-update locale-compile
39 10
40.PHONY: run 11.PHONY: run
41run: all 12run: all