Store co-maintainer priorities
[aur.git] / po / Makefile
blob1659f83828559ee2c080455e9ca70dabc1426289
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 ja.po \
18 nb.po \
19 nl.po \
20 pl.po \
21 pt_BR.po \
22 pt_PT.po \
23 ro.po \
24 ru.po \
25 sk.po \
26 sr.po \
27 tr.po \
28 uk.po \
29 zh_CN.po
31 MOFILES = ${POFILES:.po=.mo}
32 LOCALES = ${MOFILES:.mo=}
34 UPDATEPOFILES = ${POFILES:.po=.po-update}
36 MSGID_BUGS_ADDRESS = https://bugs.archlinux.org/index.php?project=2
38 all: ${MOFILES}
40 %.mo: %.po
41 msgfmt --check -o $@ $<
43 %.po-update: %.po aur.pot
44 lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
45 msgmerge -U --no-location --lang="$$lang" $< aur.pot
47 POTFILES:
48 find ../web -type f -name '*.php' -printf '%P\n' | sort >POTFILES
50 update-pot: POTFILES
51 pkgname=AUR; \
52 pkgver=`sed -n 's/.*"AURWEB_VERSION", "\(.*\)".*/\1/p' ../web/lib/version.inc.php`; \
53 xgettext --default-domain=aur -L php --keyword=__ --keyword=_n:1,2 \
54 --no-location --add-comments=TRANSLATORS: \
55 --package-name="$$pkgname" --package-version="$$pkgver" \
56 --msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \
57 --directory ../web --files-from POTFILES -o aur.pot
59 update-po:
60 ${MAKE} ${UPDATEPOFILES}
62 clean:
63 rm -f *.mo *.po\~ POTFILES
65 install: all
66 for l in ${LOCALES}; do mkdir -p ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done
67 for l in ${LOCALES}; do cp $$l.mo ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/aur.mo; done
69 uninstall:
70 for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done
72 .PHONY: all update-pot update-po clean install uninstall POTFILES