From 5e618a6499dbf771665f5b69f8879e8a8c7dc1c8 Mon Sep 17 00:00:00 2001 From: Jocelyn Delalande Date: Mon, 16 Jul 2018 23:17:24 +0200 Subject: [PATCH] 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 --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index a9afff91..15f84f95 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 --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}"