]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blame - Makefile
basic styling talk.ipfire.org
[people/shoehn/ipfire.org.git] / Makefile
CommitLineData
60024cc8
MT
1
2PO_PATH = translations
3POTFILE = $(PO_PATH)/webapp.pot
4POFILES = $(wildcard $(PO_PATH)/*/LC_MESSAGES/*.po)
5
cc3b928d 6ALL_FILES = $(shell find webapp templates /usr/lib*/python*/site-packages/tornado -name "*.py" -or -name "*.html")
60024cc8
MT
7
8.PHONY: pot
9pot: $(POTFILE)
10
11$(POTFILE): $(ALL_FILES)
12 xgettext --language=Python --from-code=UTF-8 --keyword=_:1,2 --keyword=N_ -d pakfire -o $(POTFILE) \
13 $(ALL_FILES)
14
15.PHONY: po
16po: $(POTFILE) $(patsubst %.po, %.mo, $(POFILES))
17
18%.po: $(POTFILE)
19 # Merge the POTFILE.
20 msgmerge $@ $(POTFILE) -o $@
21
22%.mo: %.po
23 # Compile the translations.
24 msgfmt $< -o $@