From e24f82f476bc3c445fd0722b5aa55cc18095cab6 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 7 Apr 2011 11:45:07 +0200 Subject: Add "update-pot" target to Makefile. Can be used to rebuild the message catalog from our source tree. "po/POTFILES" contains a list of source files to be scanned for translation strings. Signed-off-by: Lukas Fleischer --- po/Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'po/Makefile') diff --git a/po/Makefile b/po/Makefile index 365c5fd..18c6357 100644 --- a/po/Makefile +++ b/po/Makefile @@ -26,11 +26,22 @@ POFILES = \ MOFILES = ${POFILES:.po=.mo} LOCALES = ${MOFILES:.mo=} +MSGID_BUGS_ADDRESS = https://bugs.archlinux.org/index.php?project=2 + all: ${MOFILES} %.mo: %.po msgfmt -o $@ $< +update-pot: + pkgname=AUR; \ + pkgver=`sed -n 's/.*"AUR_VERSION", "\(.*\)".*/\1/p' ../web/lib/version.inc`; \ + xgettext --default-domain=aur -L php --keyword=__ --no-location \ + --add-comments=TRANSLATORS: --package-name="$$pkgname" \ + --package-version="$$pkgver" \ + --msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \ + --directory ../web --files-from POTFILES -o aur.pot + clean: rm *.mo @@ -41,4 +52,4 @@ install: all uninstall: for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done -.PHONY: all clean install uninstall +.PHONY: all update-pot clean install uninstall -- cgit v1.2.3-54-g00ecf