Remove double htmlspecialchars
[aur.git] / po / Makefile
blob8629628f27c079aebd76c49f3ee88fc57339e573
1 DESTDIR = ..
2 PREFIX = /web/locale
4 POFILES = \
5 ca.po \
6 cs.po \
7 da.po \
8 de.po \
9 el.po \
10 es.po \
11 fi.po \
12 fr.po \
13 he.po \
14 hr.po \
15 hu.po \
16 it.po \
17 nb.po \
18 nl.po \
19 pl.po \
20 pt_BR.po \
21 pt_PT.po \
22 ro.po \
23 ru.po \
24 sr.po \
25 tr.po \
26 uk.po \
27 zh_CN.po
29 MOFILES = ${POFILES:.po=.mo}
30 LOCALES = ${MOFILES:.mo=}
32 UPDATEPOFILES = ${POFILES:.po=.po-update}
34 MSGID_BUGS_ADDRESS = https://bugs.archlinux.org/index.php?project=2
36 all: ${MOFILES}
38 %.mo: %.po
39 msgfmt --check -o $@ $<
41 %.po-update: %.po aur.pot
42 lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
43 msgmerge -U --no-location --lang="$$lang" $< aur.pot
45 update-pot:
46 pkgname=AUR; \
47 pkgver=`sed -n 's/.*"AUR_VERSION", "\(.*\)".*/\1/p' ../web/lib/version.inc.php`; \
48 xgettext --default-domain=aur -L php --keyword=__ --no-location \
49 --add-comments=TRANSLATORS: --package-name="$$pkgname" \
50 --package-version="$$pkgver" \
51 --msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \
52 --directory ../web --files-from POTFILES -o aur.pot
54 update-po:
55 ${MAKE} ${UPDATEPOFILES}
57 clean:
58 rm -f *.mo *.po\~
60 install: all
61 for l in ${LOCALES}; do mkdir -p ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done
62 for l in ${LOCALES}; do cp $$l.mo ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/aur.mo; done
64 uninstall:
65 for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done
67 .PHONY: all update-pot update-po clean install uninstall