2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test PHP support: --add-comments option.
6 cat <<EOF > xg-ph-1.php
8 // This comment will not be extracted.
10 // TRANSLATORS: This is an extracted comment.
12 # TRANSLATORS: This is extracted too.
14 /* Not extracted either. */
17 Nickname of the Beatles
19 echo _("The Fabulous Four");
20 // This will not be extracted.
25 : ${XGETTEXT=xgettext}
26 ${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \
27 -d xg-ph-1.tmp xg-ph-1.php || exit 1
28 LC_ALL=C tr -d '\r' < xg-ph-1.tmp.po > xg-ph-1.po || exit 1
30 cat <<EOF > xg-ph-1.ok
34 #. TRANSLATORS: This is an extracted comment.
38 #. TRANSLATORS: This is extracted too.
46 #. Nickname of the Beatles
48 msgid "The Fabulous Four"
53 ${DIFF} xg-ph-1.ok xg-ph-1.po