#!/bin/sh
XGETTEXT_OPTIONS="--keyword=_ -keyword=N_ --keyword=ngettext:1,2 --default-domain=ldapquery --add-comments"

# Allows controlling language option
# (gettext v.0.10.40 = -C, gettext 0.11+ = -L php).
if [ $SM_LANG_PHP ] ; then
 echo 'using -L php for string extraction';
 XGETTEXT_OPTIONS="${XGETTEXT_OPTIONS} -L php";
else
 echo 'using -C for string extraction';
 XGETTEXT_OPTIONS="${XGETTEXT_OPTIONS} -C";
fi

xgettext ${XGETTEXT_OPTIONS} \
    *.php --output=ldapquery.pot
xgettext ${XGETTEXT_OPTIONS} -j \
    schema/*.php --output=ldapquery.pot
