1#!/bin/sh 2 3# Test Smalltalk support: --add-comments option. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles xg-st-1.st" 9cat <<EOF > xg-st-1.st 10"This comment will not be extracted." 11Transcript showCr: (NLS ? 'help'). 12" TRANSLATORS: This is an extracted comment." 13Transcript showCr: (NLS ? 'me'). 14"Not extracted either." 15Transcript showCr: (NLS ? 'Hey Jude'). 16"TRANSLATORS: 17 Nickname of the Beatles 18" 19Transcript showCr: (NLS ? 'The Fabulous Four'). 20EOF 21 22tmpfiles="$tmpfiles xg-st-1.po" 23: ${XGETTEXT=xgettext} 24${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \ 25 -d xg-st-1 xg-st-1.st 26test $? = 0 || { rm -fr $tmpfiles; exit 1; } 27 28tmpfiles="$tmpfiles xg-st-1.ok" 29cat <<EOF > xg-st-1.ok 30msgid "help" 31msgstr "" 32 33#. TRANSLATORS: This is an extracted comment. 34msgid "me" 35msgstr "" 36 37msgid "Hey Jude" 38msgstr "" 39 40#. TRANSLATORS: 41#. Nickname of the Beatles 42#. 43msgid "The Fabulous Four" 44msgstr "" 45EOF 46 47: ${DIFF=diff} 48${DIFF} xg-st-1.ok xg-st-1.po 49result=$? 50 51rm -fr $tmpfiles 52 53exit $result 54