[FORMAT] Run php-cs-fixer in php-gettext

This commit is contained in:
Diogo Cordeiro
2019-06-23 17:36:15 +01:00
parent a1edc2c6a9
commit b408208e4c
12 changed files with 1026 additions and 470 deletions

View File

@@ -0,0 +1,14 @@
#!/bin/sh
TEMPLATE=pigs.pot
xgettext -kT_ngettext:1,2 -kT_ -L PHP -o $TEMPLATE pigs_dropin.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