1 #! /bin/sh 2 3 # Test non-ASCII msgids when the PO file and the POT file are in different 4 # encodings. 5 6 tmpfiles="" 7 trap 'rm -fr $tmpfiles' 1 2 3 15 8 9 tmpfiles="$tmpfiles mm-test16.po" 10 cat <<\EOF > mm-test16.po 11 msgid "" 12 msgstr "" 13 "Project-Id-Version: hello-cplusplus-qt 0\n" 14 "Report-Msgid-Bugs-To: bug-gnu-gettext (at] gnu.org\n" 15 "POT-Creation-Date: 2003-10-20 10:14+0200\n" 16 "PO-Revision-Date: 2003-10-20 10:13+0200\n" 17 "Last-Translator: Bruno Haible <bruno (at] clisp.org>\n" 18 "Language-Team: Polish <pl (at] li.org>\n" 19 "MIME-Version: 1.0\n" 20 "Content-Type: text/plain; charset=ISO-8859-2\n" 21 "Content-Transfer-Encoding: 8bit\n" 22 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " 23 "|| n%100>=20) ? 1 : 2);\n" 24 25 #: hello.cc:45 26 msgid "Written by Franois Pinard." 27 msgstr "Program napisa Franois Pinard." 28 29 #: hello.cc:52 30 msgid "error %1." 31 msgstr "bd %1." 32 EOF 33 34 tmpfiles="$tmpfiles mm-test16.pot" 35 cat <<EOF > mm-test16.pot 36 # SOME DESCRIPTIVE TITLE. 37 # Copyright (C) YEAR Yoyodyne, Inc. 38 # This file is distributed under the same license as the PACKAGE package. 39 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 40 # 41 #, fuzzy 42 msgid "" 43 msgstr "" 44 "Project-Id-Version: PACKAGE VERSION\n" 45 "Report-Msgid-Bugs-To: bug-gnu-gettext (at] gnu.org\n" 46 "POT-Creation-Date: 2003-10-20 10:14+0200\n" 47 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 48 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 49 "Language-Team: LANGUAGE <LL (at] li.org>\n" 50 "MIME-Version: 1.0\n" 51 "Content-Type: text/plain; charset=UTF-8\n" 52 "Content-Transfer-Encoding: 8bit\n" 53 54 #: hello.cc:45 55 msgid "Written by Franois Pinard." 56 msgstr "" 57 58 #: hello.cc:52 59 msgid "error %1." 60 msgstr "" 61 EOF 62 63 tmpfiles="$tmpfiles mm-test16.new.po" 64 : ${MSGMERGE=msgmerge} 65 ${MSGMERGE} -q -o mm-test16.new.po mm-test16.po mm-test16.pot 66 test $? = 0 || { rm -fr $tmpfiles; exit 1; } 67 68 tmpfiles="$tmpfiles mm-test16.ok" 69 cat <<\EOF > mm-test16.ok 70 msgid "" 71 msgstr "" 72 "Project-Id-Version: hello-cplusplus-qt 0\n" 73 "Report-Msgid-Bugs-To: bug-gnu-gettext (at] gnu.org\n" 74 "POT-Creation-Date: 2003-10-20 10:14+0200\n" 75 "PO-Revision-Date: 2003-10-20 10:13+0200\n" 76 "Last-Translator: Bruno Haible <bruno (at] clisp.org>\n" 77 "Language-Team: Polish <pl (at] li.org>\n" 78 "MIME-Version: 1.0\n" 79 "Content-Type: text/plain; charset=UTF-8\n" 80 "Content-Transfer-Encoding: 8bit\n" 81 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " 82 "|| n%100>=20) ? 1 : 2);\n" 83 84 #: hello.cc:45 85 msgid "Written by Franois Pinard." 86 msgstr "Program napisa Franois Pinard." 87 88 #: hello.cc:52 89 msgid "error %1." 90 msgstr "bd %1." 91 EOF 92 93 : ${DIFF=diff} 94 ${DIFF} mm-test16.ok mm-test16.new.po 95 result=$? 96 97 rm -fr $tmpfiles 98 99 exit $result 100