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