1 #! /bin/sh 2 3 # Test -j option with charset conversion from ISO-8859-1 to UTF-8. 4 5 tmpfiles="" 6 trap 'rm -fr $tmpfiles' 1 2 3 15 7 8 tmpfiles="$tmpfiles xg-test8.po" 9 cat <<\EOF > xg-test8.po 10 # SOME DESCRIPTIVE TITLE. 11 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 12 # This file is distributed under the same license as the PACKAGE package. 13 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 14 # 15 #, fuzzy 16 msgid "" 17 msgstr "" 18 "Project-Id-Version: PACKAGE VERSION\n" 19 "Report-Msgid-Bugs-To: \n" 20 "POT-Creation-Date: 2004-10-22 12:39+0200\n" 21 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 22 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 23 "Language-Team: LANGUAGE <LL (at] li.org>\n" 24 "MIME-Version: 1.0\n" 25 "Content-Type: text/plain; charset=ISO-8859-1\n" 26 "Content-Transfer-Encoding: 8bit\n" 27 28 #: fifo.c:4 29 msgid "@(#)fifo.c\t1.56 04/10/10 Copyright 1989, 1994-2003 Jrg Schilling" 30 msgstr "" 31 EOF 32 33 tmpfiles="$tmpfiles xg-test8.in.c" 34 cat <<EOF > xg-test8.in.c 35 _("extract me") 36 EOF 37 38 : ${XGETTEXT=xgettext} 39 ${XGETTEXT} -a -j -o xg-test8.po xg-test8.in.c 40 test $? = 0 || { rm -fr $tmpfiles; exit 1; } 41 42 tmpfiles="$tmpfiles xg-test8.pot" 43 sed -e '/POT-Creation-Date/d' < xg-test8.po > xg-test8.pot 44 45 tmpfiles="$tmpfiles xg-test8.ok" 46 cat <<\EOF > xg-test8.ok 47 # SOME DESCRIPTIVE TITLE. 48 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 49 # This file is distributed under the same license as the PACKAGE package. 50 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 51 # 52 #, fuzzy 53 msgid "" 54 msgstr "" 55 "Project-Id-Version: PACKAGE VERSION\n" 56 "Report-Msgid-Bugs-To: \n" 57 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 58 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 59 "Language-Team: LANGUAGE <LL (at] li.org>\n" 60 "MIME-Version: 1.0\n" 61 "Content-Type: text/plain; charset=UTF-8\n" 62 "Content-Transfer-Encoding: 8bit\n" 63 64 #: fifo.c:4 65 msgid "@(#)fifo.c\t1.56 04/10/10 Copyright 1989, 1994-2003 Jrg Schilling" 66 msgstr "" 67 68 #: xg-test8.in.c:1 69 msgid "extract me" 70 msgstr "" 71 EOF 72 73 : ${DIFF=diff} 74 ${DIFF} xg-test8.ok xg-test8.pot 75 result=$? 76 77 rm -fr $tmpfiles 78 79 exit $result 80