-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
35 lines (31 loc) · 947 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.PHONY: run extract_messages update_messages translate docs show_docs
run:
docker-compose -f build/development.yml up -d
extract_messages:
pybabel extract -F babel.cfg -k lazy_gettext \
--project=sipa \
--msgid-bugs-address='du-bist-gefragt (at) agdsn.de' \
--copyright-holder="AG DSN" \
--version=$(shell git describe) \
--no-location \
--no-wrap \
-o messages.pot ./
update_messages:
pybabel update \
-i messages.pot \
--update-header-comment \
--no-wrap \
-d sipa/translations/
translate: extract_messages update_messages
# dirty hack to set the source language
sed -e '/Generated-By/a "X-Source-Language: de"' \
-i sipa/translations/en/LC_MESSAGES/messages.po
poedit sipa/translations/en/LC_MESSAGES/messages.po
pybabel compile -d sipa/translations/
docs-clean:
$(MAKE) -C docs clean
docs:
sphinx-apidoc -o docs/source/ref sipa
$(MAKE) -C docs html
show_docs:
cd docs/build/html && python -m http.server