1 1.1 christos #!/bin/sh 2 1.1 christos 3 1.1 christos # Test of Perl support with ISO-8859-1 encoded input. 4 1.1 christos 5 1.1 christos tmpfiles="" 6 1.1 christos trap 'rm -fr $tmpfiles' 1 2 3 15 7 1.1 christos 8 1.1 christos tmpfiles="$tmpfiles xg-pl-2.pl" 9 1.1 christos cat <<\EOF > xg-pl-2.pl 10 1.1 christos use charnames ':full'; 11 1.1 christos printf "%s\n", gettext "Bse Bbchen - wo sind sie blo\N{LATIN SMALL LETTER SHARP S}?"; 12 1.1 christos print gettext <<STR 13 1.1 christos Die europische Whrung ist \N{EURO SIGN}. 14 1.1 christos STR 15 1.1 christos EOF 16 1.1 christos 17 1.1 christos tmpfiles="$tmpfiles xg-pl-2.po" 18 1.1 christos : ${XGETTEXT=xgettext} 19 1.1 christos # delete POT-Creation-Date: line because the date depends on local time. 20 1.1 christos ${XGETTEXT} --output - --from-code=ISO-8859-1 xg-pl-2.pl \ 21 1.1 christos | sed '/\"POT-Creation-Date:.*/d' > xg-pl-2.po 22 1.1 christos test $? = 0 || { rm -fr $tmpfiles; exit 1; } 23 1.1 christos 24 1.1 christos tmpfiles="$tmpfiles xg-pl-2.ok" 25 1.1 christos cat <<\EOF > xg-pl-2.ok 26 1.1 christos # SOME DESCRIPTIVE TITLE. 27 1.1 christos # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 28 1.1 christos # This file is distributed under the same license as the PACKAGE package. 29 1.1 christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 30 1.1 christos # 31 1.1 christos #, fuzzy 32 1.1 christos msgid "" 33 1.1 christos msgstr "" 34 1.1 christos "Project-Id-Version: PACKAGE VERSION\n" 35 1.1 christos "Report-Msgid-Bugs-To: \n" 36 1.1 christos "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 37 1.1 christos "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 38 1.1 christos "Language-Team: LANGUAGE <LL (at] li.org>\n" 39 1.1 christos "MIME-Version: 1.0\n" 40 1.1 christos "Content-Type: text/plain; charset=UTF-8\n" 41 1.1 christos "Content-Transfer-Encoding: 8bit\n" 42 1.1 christos 43 1.1 christos #: xg-pl-2.pl:2 44 1.1 christos msgid "Bse Bbchen - wo sind sie blo?" 45 1.1 christos msgstr "" 46 1.1 christos 47 1.1 christos #: xg-pl-2.pl:4 48 1.1 christos msgid "Die europische Whrung ist .\n" 49 1.1 christos msgstr "" 50 1.1 christos EOF 51 1.1 christos 52 1.1 christos : ${DIFF=diff} 53 1.1 christos ${DIFF} xg-pl-2.ok xg-pl-2.po 54 1.1 christos result=$? 55 1.1 christos 56 1.1 christos rm -fr $tmpfiles 57 1.1 christos 58 1.1 christos exit $result 59