using code from locales that help to run xgettext with different gettext versions.
[squirrelmail.git] / po / xgetpo
index cc54e2b..295ee19 100755 (executable)
--- a/po/xgetpo
+++ b/po/xgetpo
@@ -7,7 +7,17 @@
 # ** 
 # **  $Id$
 #
-XGETTEXT_OPTIONS="--keyword=_ -keyword=N_ --keyword=ngettext:1,2 --default-domain=squirrelmail --no-location -C"
+XGETTEXT_OPTIONS="--keyword=_ -keyword=N_ --keyword=ngettext:1,2 --default-domain=squirrelmail --no-location --add-comments"
+
+# Allows controlling language option
+# (gettext v.0.10.40 = -C, gettext 0.11+ = -L php).
+if [ $SM_LANG_PHP ] ; then
+ XGETTEXT_OPTIONS="${XGETTEXT_OPTIONS} -L php";
+else
+ XGETTEXT_OPTIONS="${XGETTEXT_OPTIONS} -C";
+fi
+  
+
 cd ..
 xgettext ${XGETTEXT_OPTIONS} \
     src/*.php --output=po/squirrelmail.pot