summaryrefslogtreecommitdiffstats
path: root/po
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2018-05-17 22:05:01 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2018-05-17 22:58:54 +0200
commitf7a57c82bceeeae33b3244ba33b4844f5b692298 (patch)
tree7a9fe06bdc0cb97dc122e99cdba0fc949916c66c /po
parentf3b4c5c6bc6cd1f7320505ca725c46c78e1362f3 (diff)
downloadaur-f7a57c82bceeeae33b3244ba33b4844f5b692298.tar.gz
aur-f7a57c82bceeeae33b3244ba33b4844f5b692298.tar.xz
Localize notification emails
Add support for translating notification emails and send localized notifications, based on the user's language preferences. Also, update the translations Makefile to add strings from the notification script to the message catalog. Implements FS#31850. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'po')
-rw-r--r--po/Makefile21
1 files changed, 15 insertions, 6 deletions
diff --git a/po/Makefile b/po/Makefile
index d0ed7418..78073f86 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -48,23 +48,32 @@ all: ${MOFILES}
lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
msgmerge -U --no-location --lang="$$lang" $< aur.pot
-POTFILES:
- find ../web -type f -name '*.php' -printf '%P\n' | sort >POTFILES
+POTFILES-php:
+ find ../web -type f -name '*.php' -printf '%P\n' | sort >POTFILES-php
-update-pot: POTFILES
+POTFILES-py:
+ find ../aurweb -type f -name '*.py' -printf '%P\n' | sort >POTFILES-py
+
+update-pot: POTFILES-php POTFILES-py
pkgname=AUR; \
pkgver=`sed -n 's/.*"AURWEB_VERSION", "\(.*\)".*/\1/p' ../web/lib/version.inc.php`; \
xgettext --default-domain=aur -L php --keyword=__ --keyword=_n:1,2 \
--add-location=file --add-comments=TRANSLATORS: \
--package-name="$$pkgname" --package-version="$$pkgver" \
--msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \
- --directory ../web --files-from POTFILES -o aur.pot
+ --directory ../web --files-from POTFILES-php -o aur.pot; \
+ xgettext --default-domain=aur -L python --join-existing \
+ --keyword=translate \
+ --add-location=file --add-comments=TRANSLATORS: \
+ --package-name="$$pkgname" --package-version="$$pkgver" \
+ --msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \
+ --directory ../aurweb --files-from POTFILES-py -o aur.pot
update-po:
${MAKE} ${UPDATEPOFILES}
clean:
- rm -f *.mo *.po\~ POTFILES
+ rm -f *.mo *.po\~ POTFILES-php POTFILES-py
install: all
for l in ${LOCALES}; do mkdir -p ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done
@@ -73,4 +82,4 @@ install: all
uninstall:
for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done
-.PHONY: all update-pot update-po clean install uninstall POTFILES
+.PHONY: all update-pot update-po clean install uninstall POTFILES-php POTFILES-py