diff options
Diffstat (limited to 'includes/php-gettext/bin/gettexts.sh')
-rwxr-xr-x | includes/php-gettext/bin/gettexts.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/php-gettext/bin/gettexts.sh b/includes/php-gettext/bin/gettexts.sh new file mode 100755 index 0000000..267f670 --- /dev/null +++ b/includes/php-gettext/bin/gettexts.sh @@ -0,0 +1,12 @@ +#!/bin/sh +xgettext -kT_ngettext:1,2 -kT_ -L PHP -o ../../../locales/messages.po ../../../*.php ../../../services/*.php ../../../templates/*.php + +if [ -f "../../../locales/$1/LC_MESSAGES/messages.po" ] +then +msgmerge -o ../../../locales/$1/LC_MESSAGES/messages.po ../../../locales/$1/LC_MESSAGES/messages.po ../../../locales/messages.po + +msgfmt --statistics "../../../locales/$1/LC_MESSAGES/messages.po" -o "../../../locales/$1/LC_MESSAGES/messages.mo" +else +echo "gettexts.sh LANGUAGE_CODE" +echo "example: 'gettexts fr_FR' to get text for French" +fi |