1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test that the msgmerge output is stable under an 'msgcat' invocation. 5# Also test what happens with the 'c-format' flag during msgmerge. 6 7cat <<\EOF > mm-test28.po 8msgid "" 9msgstr "" 10"Content-Type: text/plain; charset=UTF-8\n" 11"Content-Transfer-Encoding: 8bit\n" 12 13msgid "warning: bad context for singular argument of keyword '%.*s'" 14msgstr "Warnung: schlechter Kontext für das Singular-Argument des Schlüsselwortes »%.*s«" 15 16#, c-format 17msgid "warning: broken context for singular argument of keyword '%.*s'" 18msgstr "Warnung: missratener Kontext für das Singular-Argument des Schlüsselworts »%.*s«" 19 20msgid "warning: abstruse context for plural argument of keyword '%.*s'" 21msgstr "Warnung: abstruser Kontext für das Plural-Argument des Schlüsselwortes »%.*s«" 22 23#, c-format 24msgid "warning: missing context for plural argument of keyword '%.*s'" 25msgstr "Warnung: fehlender Kontext für das Plural-Argument des Schlüsselwortes »%.*s«" 26EOF 27 28cat <<\EOF > mm-test28-1.pot 29#, fuzzy 30msgid "" 31msgstr "" 32"Project-Id-Version: PACKAGE VERSION\n" 33"Report-Msgid-Bugs-To: \n" 34"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 35"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 36"Language-Team: LANGUAGE <LL@li.org>\n" 37"MIME-Version: 1.0\n" 38"Content-Type: text/plain; charset=UTF-8\n" 39"Content-Transfer-Encoding: 8bit\n" 40 41msgid "warning: bad context for singular argument of keyword '%.*s'" 42msgstr "" 43 44#, c-format 45msgid "warning: broken context for singular argument of keyword '%.*s'" 46msgstr "" 47EOF 48 49: ${MSGMERGE=msgmerge} 50${MSGMERGE} -q -o mm-test28.tmp.po mm-test28.po mm-test28-1.pot || Exit 1 51LC_ALL=C tr -d '\r' < mm-test28.tmp.po > mm-test28.new.po || Exit 1 52 53: ${MSGCAT=msgcat} 54${MSGCAT} mm-test28.new.po > mm-test28.tmp.po || Exit 1 55LC_ALL=C tr -d '\r' < mm-test28.tmp.po > mm-test28.cat.po || Exit 1 56 57: ${DIFF=diff} 58${DIFF} mm-test28.new.po mm-test28.cat.po || Exit 1 59 60cat <<\EOF > mm-test28-1.ok 61msgid "" 62msgstr "" 63"Report-Msgid-Bugs-To: \n" 64"Content-Type: text/plain; charset=UTF-8\n" 65"Content-Transfer-Encoding: 8bit\n" 66 67msgid "warning: bad context for singular argument of keyword '%.*s'" 68msgstr "" 69"Warnung: schlechter Kontext für das Singular-Argument des Schlüsselwortes »%." 70"*s«" 71 72#, c-format 73msgid "warning: broken context for singular argument of keyword '%.*s'" 74msgstr "" 75"Warnung: missratener Kontext für das Singular-Argument des Schlüsselworts " 76"»%.*s«" 77 78#~ msgid "warning: abstruse context for plural argument of keyword '%.*s'" 79#~ msgstr "" 80#~ "Warnung: abstruser Kontext für das Plural-Argument des Schlüsselwortes »%." 81#~ "*s«" 82 83#, c-format 84#~ msgid "warning: missing context for plural argument of keyword '%.*s'" 85#~ msgstr "" 86#~ "Warnung: fehlender Kontext für das Plural-Argument des Schlüsselwortes " 87#~ "»%.*s«" 88EOF 89 90: ${DIFF=diff} 91${DIFF} mm-test28-1.ok mm-test28.new.po || Exit 1 92 93# Now test what happens with the 'c-format' flag when merging with a POT file 94# where the 'c-format' flag is set. 95 96cat <<\EOF > mm-test28-2.pot 97#, fuzzy 98msgid "" 99msgstr "" 100"Project-Id-Version: PACKAGE VERSION\n" 101"Report-Msgid-Bugs-To: \n" 102"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 103"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 104"Language-Team: LANGUAGE <LL@li.org>\n" 105"MIME-Version: 1.0\n" 106"Content-Type: text/plain; charset=UTF-8\n" 107"Content-Transfer-Encoding: 8bit\n" 108 109#, c-format 110msgid "warning: bad context for singular argument of keyword '%.*s'" 111msgstr "" 112 113#, c-format 114msgid "warning: broken context for singular argument of keyword '%.*s'" 115msgstr "" 116 117#, c-format 118msgid "warning: abstruse context for plural argument of keyword '%.*s'" 119msgstr "" 120 121#, c-format 122msgid "warning: missing context for plural argument of keyword '%.*s'" 123msgstr "" 124EOF 125 126: ${MSGMERGE=msgmerge} 127${MSGMERGE} -q -o mm-test28.tmp.po mm-test28.new.po mm-test28-2.pot || Exit 1 128LC_ALL=C tr -d '\r' < mm-test28.tmp.po > mm-test28-2.po || Exit 1 129 130cat <<\EOF > mm-test28-2.ok 131msgid "" 132msgstr "" 133"Report-Msgid-Bugs-To: \n" 134"Content-Type: text/plain; charset=UTF-8\n" 135"Content-Transfer-Encoding: 8bit\n" 136 137#, c-format 138msgid "warning: bad context for singular argument of keyword '%.*s'" 139msgstr "" 140"Warnung: schlechter Kontext für das Singular-Argument des Schlüsselwortes " 141"»%.*s«" 142 143#, c-format 144msgid "warning: broken context for singular argument of keyword '%.*s'" 145msgstr "" 146"Warnung: missratener Kontext für das Singular-Argument des Schlüsselworts " 147"»%.*s«" 148 149#, c-format 150msgid "warning: abstruse context for plural argument of keyword '%.*s'" 151msgstr "" 152"Warnung: abstruser Kontext für das Plural-Argument des Schlüsselwortes »%.*s«" 153 154#, c-format 155msgid "warning: missing context for plural argument of keyword '%.*s'" 156msgstr "" 157"Warnung: fehlender Kontext für das Plural-Argument des Schlüsselwortes »%.*s«" 158EOF 159 160: ${DIFF=diff} 161${DIFF} mm-test28-2.ok mm-test28-2.po || Exit 1 162 163# Now test what happens with the 'c-format' flag when merging with a POT file 164# where the 'c-format' flag is absent. 165 166cat <<\EOF > mm-test28-3.pot 167#, fuzzy 168msgid "" 169msgstr "" 170"Project-Id-Version: PACKAGE VERSION\n" 171"Report-Msgid-Bugs-To: \n" 172"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 173"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 174"Language-Team: LANGUAGE <LL@li.org>\n" 175"MIME-Version: 1.0\n" 176"Content-Type: text/plain; charset=UTF-8\n" 177"Content-Transfer-Encoding: 8bit\n" 178 179msgid "warning: bad context for singular argument of keyword '%.*s'" 180msgstr "" 181 182msgid "warning: broken context for singular argument of keyword '%.*s'" 183msgstr "" 184 185msgid "warning: abstruse context for plural argument of keyword '%.*s'" 186msgstr "" 187 188msgid "warning: missing context for plural argument of keyword '%.*s'" 189msgstr "" 190EOF 191 192: ${MSGMERGE=msgmerge} 193${MSGMERGE} -q -o mm-test28.tmp.po mm-test28.new.po mm-test28-3.pot || Exit 1 194LC_ALL=C tr -d '\r' < mm-test28.tmp.po > mm-test28-3.po || Exit 1 195 196cat <<\EOF > mm-test28-3.ok 197msgid "" 198msgstr "" 199"Report-Msgid-Bugs-To: \n" 200"Content-Type: text/plain; charset=UTF-8\n" 201"Content-Transfer-Encoding: 8bit\n" 202 203msgid "warning: bad context for singular argument of keyword '%.*s'" 204msgstr "" 205"Warnung: schlechter Kontext für das Singular-Argument des Schlüsselwortes »%." 206"*s«" 207 208msgid "warning: broken context for singular argument of keyword '%.*s'" 209msgstr "" 210"Warnung: missratener Kontext für das Singular-Argument des Schlüsselworts »%." 211"*s«" 212 213msgid "warning: abstruse context for plural argument of keyword '%.*s'" 214msgstr "" 215"Warnung: abstruser Kontext für das Plural-Argument des Schlüsselwortes »%.*s«" 216 217msgid "warning: missing context for plural argument of keyword '%.*s'" 218msgstr "" 219"Warnung: fehlender Kontext für das Plural-Argument des Schlüsselwortes »%.*s«" 220EOF 221 222: ${DIFF=diff} 223${DIFF} mm-test28-3.ok mm-test28-3.po || Exit 1 224 225Exit 0 226