ttrss/update-translations.sh

20 lines
387 B
Bash
Raw Normal View History

2007-03-05 08:37:13 +00:00
#!/bin/sh
TEMPLATE=messages.pot
2007-03-05 09:04:55 +00:00
xgettext -kT_ngettext:1,2 -k__ -L PHP -o $TEMPLATE *.php modules/*.php
2007-03-05 08:37:13 +00:00
if [ "$1" = "-p" ]; then
msgfmt --statistics $TEMPLATE
else
if [ -f $1.po ]; then
TMPFILE=/tmp/update-translations.$$
msgmerge -o $TMPFILE $1.po $TEMPLATE
mv $TMPFILE $1.po
msgfmt --statistics $1.po
msgfmt -o $1.mo $1.po
else
echo "Usage: $0 [-p|<basename>]"
fi
fi