6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles
="$tmpfiles xg-t-1.tcl"
9 cat <<\EOF
> xg-t-1.tcl
12 proc isValid
{target
} {
14 set address
[valid
$target]
15 # This comment is not extracted.
19 # Second comment line.
20 viMsg
$viScreenId [format
[_
"%s is %s"] $target [string trim
$address]]
22 viMsg
$viScreenId [format
[_
"%s not found"] $target]
27 tmpfiles
="$tmpfiles xg-t-1.err xg-t-1.tmp xg-t-1.pot"
28 : ${XGETTEXT=xgettext}
29 ${XGETTEXT} --add-comments --no-location -k_ -o xg-t-1.tmp xg-t-1.tcl
2>xg-t-1.err
30 test $?
= 0 ||
{ cat xg-t-1.err
; rm -fr $tmpfiles; exit 1; }
31 grep -v 'POT-Creation-Date' < xg-t-1.tmp
> xg-t-1.pot
33 tmpfiles
="$tmpfiles xg-t-1.ok"
34 cat <<\EOF
> xg-t-1.ok
35 # SOME DESCRIPTIVE TITLE.
36 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
37 # This file is distributed under the same license as the PACKAGE package.
38 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
43 "Project-Id-Version: PACKAGE VERSION\n"
44 "Report-Msgid-Bugs-To: \n"
45 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
46 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
47 "Language-Team: LANGUAGE <LL@li.org>\n"
49 "Content-Type: text/plain; charset=CHARSET\n"
50 "Content-Transfer-Encoding: 8bit\n"
52 #. First comment line.
53 #. Second comment line.
64 ${DIFF} xg-t-1.ok xg-t-1.pot