1 1.1 christos #! /bin/sh 2 1.1 christos 3 1.1 christos # Test that untranslated messages that are brought over from the .pot file 4 1.1 christos # get the right number of msgstrs. 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-test17.po" 10 1.1 christos cat <<\EOF > mm-test17.po 11 1.1 christos # Irish translations. 12 1.1 christos msgid "" 13 1.1 christos msgstr "" 14 1.1 christos "Content-Type: text/plain; charset=UTF-8\n" 15 1.1 christos "Content-Transfer-Encoding: 8bit\n" 16 1.1 christos "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n" 17 1.1 christos 18 1.1 christos #, c-format 19 1.1 christos msgid "'Your command, please?', asked the waiter." 20 1.1 christos msgstr "" 21 1.1 christos EOF 22 1.1 christos 23 1.1 christos tmpfiles="$tmpfiles mm-test17.pot" 24 1.1 christos cat <<\EOF > mm-test17.pot 25 1.1 christos # SOME DESCRIPTIVE TITLE. 26 1.1 christos # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 27 1.1 christos # This file is distributed under the same license as the PACKAGE package. 28 1.1 christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 29 1.1 christos # 30 1.1 christos #, fuzzy 31 1.1 christos msgid "" 32 1.1 christos msgstr "" 33 1.1 christos "Project-Id-Version: PACKAGE VERSION\n" 34 1.1 christos "Report-Msgid-Bugs-To: \n" 35 1.1 christos "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 36 1.1 christos "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 37 1.1 christos "Language-Team: LANGUAGE <LL (at] li.org>\n" 38 1.1 christos "MIME-Version: 1.0\n" 39 1.1 christos "Content-Type: text/plain; charset=CHARSET\n" 40 1.1 christos "Content-Transfer-Encoding: 8bit\n" 41 1.1 christos 42 1.1 christos #, c-format 43 1.1 christos msgid "'Your command, please?', asked the waiter." 44 1.1 christos msgstr "" 45 1.1 christos 46 1.1 christos #, c-format 47 1.1 christos msgid "a piece of cake" 48 1.1 christos msgid_plural "%d pieces of cake" 49 1.1 christos msgstr[0] "" 50 1.1 christos msgstr[1] "" 51 1.1 christos 52 1.1 christos #, c-format 53 1.1 christos msgid "%s is replaced by %s." 54 1.1 christos msgstr "" 55 1.1 christos EOF 56 1.1 christos 57 1.1 christos tmpfiles="$tmpfiles mm-test17.new.po" 58 1.1 christos : ${MSGMERGE=msgmerge} 59 1.1 christos ${MSGMERGE} -q -o mm-test17.new.po mm-test17.po mm-test17.pot 60 1.1 christos test $? = 0 || { rm -fr $tmpfiles; exit 1; } 61 1.1 christos 62 1.1 christos tmpfiles="$tmpfiles mm-test17.ok" 63 1.1 christos cat <<\EOF > mm-test17.ok 64 1.1 christos # Irish translations. 65 1.1 christos msgid "" 66 1.1 christos msgstr "" 67 1.1 christos "Report-Msgid-Bugs-To: \n" 68 1.1 christos "Content-Type: text/plain; charset=UTF-8\n" 69 1.1 christos "Content-Transfer-Encoding: 8bit\n" 70 1.1 christos "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n" 71 1.1 christos 72 1.1 christos #, c-format 73 1.1 christos msgid "'Your command, please?', asked the waiter." 74 1.1 christos msgstr "" 75 1.1 christos 76 1.1 christos #, c-format 77 1.1 christos msgid "a piece of cake" 78 1.1 christos msgid_plural "%d pieces of cake" 79 1.1 christos msgstr[0] "" 80 1.1 christos msgstr[1] "" 81 1.1 christos msgstr[2] "" 82 1.1 christos 83 1.1 christos #, c-format 84 1.1 christos msgid "%s is replaced by %s." 85 1.1 christos msgstr "" 86 1.1 christos EOF 87 1.1 christos 88 1.1 christos : ${DIFF=diff} 89 1.1 christos ${DIFF} mm-test17.ok mm-test17.new.po 90 1.1 christos result=$? 91 1.1 christos 92 1.1 christos rm -fr $tmpfiles 93 1.1 christos 94 1.1 christos exit $result 95