3 # Test PHP support: --add-comments option.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles
="$tmpfiles xg-ph-1.php"
9 cat <<EOF > xg-ph-1.php
11 // This comment will not be extracted.
13 // TRANSLATORS: This is an extracted comment.
15 # TRANSLATORS: This is extracted too.
17 /* Not extracted either. */
20 Nickname of the Beatles
22 echo _("The Fabulous Four");
26 tmpfiles
="$tmpfiles xg-ph-1.po"
27 : ${XGETTEXT=xgettext}
28 ${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS
: \
29 xg-ph-1.php
-d xg-ph-1
30 test $?
= 0 ||
{ rm -fr $tmpfiles; exit 1; }
32 tmpfiles
="$tmpfiles xg-ph-1.ok"
33 cat <<EOF > xg-ph-1.ok
37 #. TRANSLATORS: This is an extracted comment.
41 #. TRANSLATORS: This is extracted too.
49 #. Nickname of the Beatles
51 msgid "The Fabulous Four"
56 ${DIFF} xg-ph-1.ok xg-ph-1.po