summaryrefslogtreecommitdiff
path: root/src/php-gettext/examples/update
blob: c8d8b61aa7a9a89bdef52b00cae2a87f2ddcf2bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
TEMPLATE=pigs.pot
xgettext -kT_ngettext:1,2 -kT_ -L PHP -o $TEMPLATE pigs.php
if [ x$1 == 'x-p' ]; then
    msgfmt --statistics $TEMPLATE
else
    if [ -f $1.po ]; then
	msgmerge -o .tmp$1.po $1.po $TEMPLATE
	mv .tmp$1.po $1.po
	msgfmt --statistics $1.po
    else
	echo "Usage: $0 [-p|<basename>]"
    fi
fi