1 1.1 christos #! /bin/sh 2 1.1 christos 3 1.1 christos # Test --update: location changed, and xgettext comment added. Both changes 4 1.1 christos # must be reflected in the resulting PO file. 5 1.1 christos 6 1.1 christos tmpfiles="" 7 1.1 christos trap 'rm -fr $tmpfiles' 1 2 3 15 8 1.1 christos 9 1.1 christos tmpfiles="$tmpfiles mm-u-2.po" 10 1.1 christos cat <<\EOF > mm-u-2.po 11 1.1 christos # SOME DESCRIPTIVE TITLE. 12 1.1 christos # Copyright (C) YEAR Free Software Foundation, Inc. 13 1.1 christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 14 1.1 christos # 15 1.1 christos msgid "" 16 1.1 christos msgstr "" 17 1.1 christos "Project-Id-Version: cog_training 1.0\n" 18 1.1 christos "POT-Creation-Date: 2001-04-29 22:40+0200\n" 19 1.1 christos "PO-Revision-Date: 2001-04-29 21:19+02:00\n" 20 1.1 christos "Last-Translator: Felix N. <xyz (at] zyx.uucp>\n" 21 1.1 christos "Language-Team: German <de (at] li.org>\n" 22 1.1 christos "MIME-Version: 1.0\n" 23 1.1 christos "Content-Type: text/plain; charset=ISO-8859-1\n" 24 1.1 christos "Content-Transfer-Encoding: 8bit\n" 25 1.1 christos 26 1.1 christos #: cogarithmetic.cc:12 27 1.1 christos msgid "white" 28 1.1 christos msgstr "wei" 29 1.1 christos EOF 30 1.1 christos 31 1.1 christos tmpfiles="$tmpfiles mm-u-2.pot" 32 1.1 christos cat <<EOF > mm-u-2.pot 33 1.1 christos # SOME DESCRIPTIVE TITLE. 34 1.1 christos # Copyright (C) YEAR Free Software Foundation, Inc. 35 1.1 christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 36 1.1 christos # 37 1.1 christos msgid "" 38 1.1 christos msgstr "" 39 1.1 christos "Project-Id-Version: PACKAGE VERSION\n" 40 1.1 christos "POT-Creation-Date: 2001-04-29 22:40+0200\n" 41 1.1 christos "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 42 1.1 christos "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 43 1.1 christos "Language-Team: LANGUAGE <LL (at] li.org>\n" 44 1.1 christos "MIME-Version: 1.0\n" 45 1.1 christos "Content-Type: text/plain; charset=ISO-8859-1\n" 46 1.1 christos "Content-Transfer-Encoding: 8bit\n" 47 1.1 christos 48 1.1 christos #. location changed 49 1.1 christos #: cogarithmetic.cc:33 50 1.1 christos msgid "white" 51 1.1 christos msgstr "" 52 1.1 christos EOF 53 1.1 christos 54 1.1 christos tmpfiles="$tmpfiles mm-u-2.po~" 55 1.1 christos : ${MSGMERGE=msgmerge} 56 1.1 christos ${MSGMERGE} -q --update mm-u-2.po mm-u-2.pot 57 1.1 christos test $? = 0 || { rm -fr $tmpfiles; exit 1; } 58 1.1 christos 59 1.1 christos tmpfiles="$tmpfiles mm-u-2.ok" 60 1.1 christos cat <<\EOF > mm-u-2.ok 61 1.1 christos # SOME DESCRIPTIVE TITLE. 62 1.1 christos # Copyright (C) YEAR Free Software Foundation, Inc. 63 1.1 christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 64 1.1 christos # 65 1.1 christos msgid "" 66 1.1 christos msgstr "" 67 1.1 christos "Project-Id-Version: cog_training 1.0\n" 68 1.1 christos "POT-Creation-Date: 2001-04-29 22:40+0200\n" 69 1.1 christos "PO-Revision-Date: 2001-04-29 21:19+02:00\n" 70 1.1 christos "Last-Translator: Felix N. <xyz (at] zyx.uucp>\n" 71 1.1 christos "Language-Team: German <de (at] li.org>\n" 72 1.1 christos "MIME-Version: 1.0\n" 73 1.1 christos "Content-Type: text/plain; charset=ISO-8859-1\n" 74 1.1 christos "Content-Transfer-Encoding: 8bit\n" 75 1.1 christos 76 1.1 christos #. location changed 77 1.1 christos #: cogarithmetic.cc:33 78 1.1 christos msgid "white" 79 1.1 christos msgstr "wei" 80 1.1 christos EOF 81 1.1 christos 82 1.1 christos : ${DIFF=diff} 83 1.1 christos ${DIFF} mm-u-2.ok mm-u-2.po 84 1.1 christos result=$? 85 1.1 christos 86 1.1 christos rm -fr $tmpfiles 87 1.1 christos 88 1.1 christos exit $result 89