mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
7979864be3
commit
fe98a3e3cb
1 changed files with 11 additions and 2 deletions
13
po/Makefile
13
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
|
||||
|
|
Loading…
Add table
Reference in a new issue