Commit | Line | Data |
---|---|---|
4cc7f778 | 1 | # Horde .mo files makefile |
2 | # | |
3 | # $Horde: horde/po/Makefile,v 1.2.2.3 2002/05/20 17:36:22 jan Exp $ | |
4 | # | |
5 | ||
b8e8bb39 | 6 | LANGS:=$(shell ls *.po|sed -e s/\.po$$//) |
b8e8bb39 PHM |
7 | |
8 | all: banana.pot ${LANGS:=.lang} | |
4cc7f778 | 9 | |
d90b3e4a PHM |
10 | clean: |
11 | rm -f *.po~ *.lang | |
4cc7f778 | 12 | |
19fc7e1d | 13 | banana.pot: |
d90b3e4a PHM |
14 | @echo Parsing Tree for new messages |
15 | @echo | |
19fc7e1d | 16 | @echo "<?php " > template.php |
17 | @grep "|b" ../banana/templates/*.tpl | sed 's/\(.*\)\("[^"]*"\)|b\(.*\)/$var = _b_(\2);/g' >> template.php | |
18 | @echo "?>" >> template.php | |
19 | @xgettext --from-code=UTF-8 -j -k_b_ -o banana.pot ../banana/*.php ./template.php | |
20 | @rm template.php | |
d90b3e4a PHM |
21 | |
22 | %.lang: banana.pot ../banana/*.php %.po | |
0a213cc9 | 23 | @echo Generating $(@:.lang=.po) |
d90b3e4a | 24 | @echo -n ' ' |
40114245 | 25 | @mkdir -p ../locale/$(@:.lang=)/LC_MESSAGES/ |
0a213cc9 PHM |
26 | @msgmerge -U $(@:lang=po) $< 2> /dev/null |
27 | @msgfmt --statistics -c -v -o ../locale/$(@:.lang=)/LC_MESSAGES/banana.mo $(@:lang=po) | |
d90b3e4a | 28 | @echo |
0a213cc9 | 29 | @rm -f $(@:lang=po~) |
d90b3e4a | 30 | @touch $@ |
b8e8bb39 | 31 | |
40114245 | 32 |