summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-04-07 11:45:07 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2011-04-10 16:27:45 +0200
commite24f82f476bc3c445fd0722b5aa55cc18095cab6 (patch)
tree4e3cba32de6ad1752bf4cee76153829e8314422d
parentb10c7fb86b366b74422e44a143d4a8c8ad2eda88 (diff)
downloadaur-e24f82f476bc3c445fd0722b5aa55cc18095cab6.tar.gz
aur-e24f82f476bc3c445fd0722b5aa55cc18095cab6.tar.xz
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 <archlinux@cryptocrack.de>
-rw-r--r--po/Makefile13
-rw-r--r--po/POTFILES25
2 files changed, 37 insertions, 1 deletions
diff --git a/po/Makefile b/po/Makefile
index 365c5fd2..18c63578 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
diff --git a/po/POTFILES b/po/POTFILES
new file mode 100644
index 00000000..75384276
--- /dev/null
+++ b/po/POTFILES
@@ -0,0 +1,25 @@
+html/index.php
+html/packages.php
+html/account.php
+html/tu.php
+html/addvote.php
+html/passreset.php
+html/pkgsubmit.php
+lib/pkgfuncs.inc
+lib/acctfuncs.inc
+lib/translator.inc
+template/pkg_details.php
+template/template.phps
+template/tu_list.php
+template/tu_details.php
+template/header.php
+template/actions_form.php
+template/search_accounts_form.php
+template/pkg_comment_form.php
+template/login_form.php
+template/stats/updates_table.php
+template/stats/user_table.php
+template/stats/general_stats_table.php
+template/pkg_search_results.php
+template/pkg_comments.php
+template/pkg_search_form.php