summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-12-23 00:32:00 +0100
committerChristian Grothoff <christian@grothoff.org>2019-12-23 00:32:00 +0100
commit3ee715d8a08dbbbef35cdcd55613a35755f77c24 (patch)
tree96a5d65f93d5f64a8e10c7129009df67ae48d679 /Makefile
parente41c34f1cbe38db6e5a6234fb520f8fe054f4177 (diff)
downloadwww-3ee715d8a08dbbbef35cdcd55613a35755f77c24.tar.gz
www-3ee715d8a08dbbbef35cdcd55613a35755f77c24.tar.bz2
www-3ee715d8a08dbbbef35cdcd55613a35755f77c24.zip
fix language generation
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 1221a1b..4973952 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,9 @@
include config.mk
+# List of all supported languages, add new languages here!
+LANGUAGES="en de fr es it ru pt"
+
# All: build HTML pages in all languages and compile the
# TypeScript logic in web-common.
.PHONY: all
@@ -9,24 +12,24 @@ all: locale template
(cd web-common && $(tsc))
($(cp) rendered/static/robots.txt rendered/robots.txt)
($(cp) rendered/static/robots.txt rendered/dist/robots.txt)
- (for lang in en de fr it es ru pt ; do \
+ (for lang in `echo $(LANGUAGES)` ; do \
$(cp) rendered/static/robots.txt rendered/$$lang/robots.txt; \
done)
($(python) inc/make_sitemap.py -i rendered)
($(cp) sitemap.xml rendered/sitemap.xml)
($(cp) sitemap.xml rendered/en/sitemap.xml)
- (for lang in en de fr it es ru pt ; do \
+ (for lang in `echo $(LANGUAGES)` ; do \
$(cp) rendered/sitemap.xml rendered/$$lang ; \
done)
($(cp) -R images rendered/static/)
- (for lang in en de fr it es ru pt ; \
+ (for lang in `echo $(LANGUAGES)` ; \
do $(cp) -R images rendered/$$lang ; \
done)
- (for lang in en de fr it es ru pt ; do \
+ (for lang in `echo $(LANGUAGES)` ; do \
$(cp) -R web-common rendered/$$lang ; \
done)
(cd rendered; \
- for lang in en de fr it es ru pt; do \
+ for lang in `echo $(LANGUAGES)`; do \
$(cp) $$lang/rss.xml $$lang/news/rss.xml; \
done)
(for d in dist icons papers presentations ; do \
@@ -41,7 +44,7 @@ locale/messages.pot: template/*.j2 common/*.j2 common/*.j2.inc
# Update translation (.po) files with new strings.
.PHONY: locale-update
locale-update: locale/messages.pot
- (for lang in de fr es it ru pt; do \
+ (for lang in `echo $(LANGUAGES)`; do \
$(msgmerge) -q -U -m --previous locale/$$lang/LC_MESSAGES/messages.po locale/messages.pot ; \
done)
@@ -50,7 +53,7 @@ locale-update: locale/messages.pot
# Compile translation files for use.
.PHONY: locale-compile
locale-compile:
- (for lang in de fr it es ru pt; do \
+ (for lang in `echo $(LANGUAGES)`; do \
$(pybabel) -q compile -d locale -l $$lang --use-fuzzy ; \
done)
@@ -84,7 +87,6 @@ uninstall:
.PHONY: clean
clean:
$(rm) -rf __pycache__ *.pyc *~ \.*~ \#*\#
- $(rm) -rf en/ de/ fr/ it/ es/ ru/
$(rm) -rf rendered/
submodules/update: