3 # Test Smalltalk support: --add-comments option.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-st-1.st"
10 "This comment will not be extracted."
11 Transcript showCr: (NLS ? 'help').
12 " TRANSLATORS: This is an extracted comment."
13 Transcript showCr: (NLS ? 'me').
14 "Not extracted either."
15 Transcript showCr: (NLS ? 'Hey Jude').
17 Nickname of the Beatles
19 Transcript showCr: (NLS ? 'The Fabulous Four').
22 tmpfiles="$tmpfiles xg-st-1.tmp.po xg-st-1.po"
23 : ${XGETTEXT=xgettext}
24 ${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \
25 -d xg-st-1.tmp xg-st-1.st
26 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
27 LC_ALL=C tr -d '\r' < xg-st-1.tmp.po > xg-st-1.po
28 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
30 tmpfiles="$tmpfiles xg-st-1.ok"
31 cat <<EOF > xg-st-1.ok
35 #. TRANSLATORS: This is an extracted comment.
43 #. Nickname of the Beatles
45 msgid "The Fabulous Four"
50 ${DIFF} xg-st-1.ok xg-st-1.po