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