aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2015-03-24 21:54:26 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2015-03-24 21:54:26 -0400
commit96a9ce15614139d25c6daf0a542797c4314f8240 (patch)
tree5db4a9a72e5ed8cffca22e2d3a5e7a4fa6b7f11c
parent2695b63c611e36b53764eeadc1d5c8516f21de46 (diff)
downloadwedding-website-96a9ce15614139d25c6daf0a542797c4314f8240.tar.gz
add Makefile to handle the translations
-rw-r--r--Makefile13
-rw-r--r--babel.cfg4
2 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..40067c3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,13 @@
+extract:
+ pybabel extract -F babel.cfg -o messages.pot .
+
+init: extract
+ pybabel init -i messages.pot -d translations -l fr
+ pybabel init -i messages.pot -d translations -l fr
+
+update: extract
+ pybabel update -i messages.pot -d translations -l fr
+ pybabel update -i messages.pot -d translations -l sr
+
+compile:
+ pybabel compile -d translations
diff --git a/babel.cfg b/babel.cfg
new file mode 100644
index 0000000..cd2157f
--- /dev/null
+++ b/babel.cfg
@@ -0,0 +1,4 @@
+[python: **.py]
+[jinja2: **/templates/**.html]
+encoding = utf-8
+extensions=jinja2.ext.autoescape,jinja2.ext.with_