summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--po/Makefile13
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