aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJocelynDelalande <JocelynDelalande@users.noreply.github.com>2018-08-05 14:59:39 +0200
committerAlexis Metaireau <alexis@notmyidea.org>2018-08-05 14:59:39 +0200
commitfc9781b8c02c36f632eaf23171902523bd7572bb (patch)
tree4bfa0310e8f78af15a159d3c3cad314b960be605 /Makefile
parentc1b5eb1375cef77454973d5345628de1a9fe9ae6 (diff)
downloadihatemoney-mirror-fc9781b8c02c36f632eaf23171902523bd7572bb.zip
ihatemoney-mirror-fc9781b8c02c36f632eaf23171902523bd7572bb.tar.gz
ihatemoney-mirror-fc9781b8c02c36f632eaf23171902523bd7572bb.tar.bz2
Enhance translation tooling (#360)
* Add a `make update-translations` command To collect new strings to be translated from code. Totally cheated on @Glandos commands :-) Ref #336 Ref https://github.com/spiral-project/ihatemoney/issues/336#issue-322069517 * Document translation process Fix #336 * Drop noisy location comments from .po files Fix #339 * Drop .pot header As it serves no purpose with our translation workflow. .po header could be removed also, but pybabel has no option for that. Ref #339
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a9afff9..e273b80 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,10 @@ release: $(DEV_STAMP)
build-translations:
$(VENV)/bin/pybabel compile -d ihatemoney/translations
+update-translations:
+ $(VENV)/bin/pybabel extract --strip-comments --omit-header --no-location --mapping-file ihatemoney/babel.cfg -o ihatemoney/messages.pot ihatemoney
+ $(VENV)/bin/pybabel update -i ihatemoney/messages.pot -d ihatemoney/translations/
+
create-database-revision:
@read -p "Please enter a message describing this revision: " rev_message; \
$(PYTHON) -m ihatemoney.manage db migrate -d ihatemoney/migrations -m "$${rev_message}"