[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-backoffice] branch master updated: locale-building M
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-backoffice] branch master updated: locale-building Makefile |
Date: |
Tue, 31 Jul 2018 11:59:47 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository backoffice.
The following commit(s) were added to refs/heads/master by this push:
new eaf5588 locale-building Makefile
eaf5588 is described below
commit eaf5588d97fce55f15c78c56ecf1317565fd45e3
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Jul 31 11:59:33 2018 +0200
locale-building Makefile
---
.gitignore | 1 +
talerbackoffice/backoffice/templates/Makefile | 40 +++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/.gitignore b/.gitignore
index c1cce9c..40b2f6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
Makefile
+!talerbackoffice/backoffice/templates/Makefile
aclocal.m4
autom4te.cache/
compile
diff --git a/talerbackoffice/backoffice/templates/Makefile
b/talerbackoffice/backoffice/templates/Makefile
new file mode 100644
index 0000000..d3513b7
--- /dev/null
+++ b/talerbackoffice/backoffice/templates/Makefile
@@ -0,0 +1,40 @@
+# 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
+ true
+
+# Extract translateable strings from jinja2 templates.
+locale/messages.pot: *.j2 common/*.j2 common/*.j2.inc
+ env PYTHONPATH="." pybabel extract -F locale/babel.map -o
locale/messages.pot .
+
+# Update translation (.po) files with new strings.
+locale-update: locale/messages.pot
+ msgmerge -U -m --previous locale/en/LC_MESSAGES/messages.po
locale/messages.pot
+ msgmerge -U -m --previous locale/de/LC_MESSAGES/messages.po
locale/messages.pot
+ msgmerge -U -m --previous locale/fr/LC_MESSAGES/messages.po
locale/messages.pot
+ msgmerge -U -m --previous locale/es/LC_MESSAGES/messages.po
locale/messages.pot
+ msgmerge -U -m --previous locale/it/LC_MESSAGES/messages.po
locale/messages.pot
+ msgmerge -U -m --previous locale/ru/LC_MESSAGES/messages.po
locale/messages.pot
+ msgmerge -U -m --previous locale/pt/LC_MESSAGES/messages.po
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
+ pybabel compile -d locale -l fr --use-fuzzy
+ pybabel compile -d locale -l it --use-fuzzy
+ pybabel compile -d locale -l es --use-fuzzy
+ pybabel compile -d locale -l ru --use-fuzzy
+ pybabel compile -d locale -l pt --use-fuzzy
+
+# Process everything related to gettext translations.
+locale: locale-update locale-compile
+
+# Run the jinja2 templating engine to expand templates to HTML
+# incorporating translations.
+template: locale-compile
+ ./template.py
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-backoffice] branch master updated: locale-building Makefile,
gnunet <=