diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-04-07 12:00:32 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-04-10 16:27:46 +0200 |
commit | fe98a3e3cb3d4c2f53853f097d769c782767f113 (patch) | |
tree | 55358010035d8ef5af4409cbf6bcd4034f6ac3f5 | |
parent | 7979864be3b9d380adbb32aa5d5fa2dfde851805 (diff) | |
download | aurweb-fe98a3e3cb3d4c2f53853f097d769c782767f113.tar.xz |
Add "%.po-update" and "update-po" targets to Makefile.
Those can be used as a shortcut to msgmerge(1) to update one
("$locale.po-update") or all ("update-po") portable object files with
new strings from the message catalog ("aur.pot").
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r-- | po/Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/po/Makefile b/po/Makefile index 18c6357..9b4ff65 100644 --- a/po/Makefile +++ b/po/Makefile @@ -26,6 +26,8 @@ POFILES = \ MOFILES = ${POFILES:.po=.mo} LOCALES = ${MOFILES:.mo=} +UPDATEPOFILES = ${POFILES:.po=.po-update} + MSGID_BUGS_ADDRESS = https://bugs.archlinux.org/index.php?project=2 all: ${MOFILES} @@ -33,6 +35,10 @@ all: ${MOFILES} %.mo: %.po msgfmt -o $@ $< +%.po-update: %.po aur.pot + lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + msgmerge -U --no-location --lang="$$lang" $< aur.pot + update-pot: pkgname=AUR; \ pkgver=`sed -n 's/.*"AUR_VERSION", "\(.*\)".*/\1/p' ../web/lib/version.inc`; \ @@ -42,8 +48,11 @@ update-pot: --msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \ --directory ../web --files-from POTFILES -o aur.pot +update-po: + ${MAKE} ${UPDATEPOFILES} + clean: - rm *.mo + rm *.mo *.po\~ install: all for l in ${LOCALES}; do mkdir -p ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done @@ -52,4 +61,4 @@ install: all uninstall: for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done -.PHONY: all update-pot clean install uninstall +.PHONY: all update-pot update-po clean install uninstall |