-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
22 lines (16 loc) · 721 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
VENV = ./venv
PYBABEL = $(VENV)/bin/pybabel
LANGUAGES = it
TRANSLATIONS_DIR = qstode/translations
all: messages.pot $(patsubst %,$(TRANSLATIONS_DIR)/%/LC_MESSAGES,$(LANGUAGES)) compile
messages.pot: $(PYBABEL)
$(PYBABEL) extract -F babel.cfg -k lazy_gettext -o $@ -c "Translators:" .
$(PYBABEL) update -i $@ -d $(TRANSLATIONS_DIR)
$(PYBABEL):
virtualenv $(VENV)
$(VENV)/bin/python setup.py develop
$(TRANSLATIONS_DIR)/%/LC_MESSAGES: messages.pot
$(PYBABEL) init -i $^ -d $(TRANSLATIONS_DIR) -l $(patsubst $(TRANSLATIONS_DIR)/%/LC_MESSAGES,%,$@)
compile: $(patsubst %,$(TRANSLATIONS_DIR)/%/LC_MESSAGES/messages.po,$(LANGUAGES)) $(PYBABEL)
$(PYBABEL) compile --statistics -d $(TRANSLATIONS_DIR)
.PHONY: compile