1#! /bin/sh 2 3# Test msgmerge when the second argument is a PO file with obsolete messages 4# (e.g. the result of an earlier msgmerge operation). 5 6tmpfiles="" 7trap 'rm -fr $tmpfiles' 1 2 3 15 8 9tmpfiles="$tmpfiles mm-test20.po" 10cat <<\EOF > mm-test20.po 11msgid "" 12msgstr "" 13"Content-Type: text/plain; charset=UTF-8\n" 14"Content-Transfer-Encoding: 8bit\n" 15 16msgid "Hello, world!" 17msgstr "Hallo Welt!" 18 19msgid "Hello example" 20msgstr "" 21 22#, fuzzy 23msgid "Hello world example" 24msgstr "Beispiel Hallo-Welt" 25 26#~ msgid "This program is running as process number $pid." 27#~ msgstr "Dieses Programm l��uft mit der Prozess-Nummer $pid." 28 29#, python-format 30msgid "This program is running as process number %(pid)d." 31msgstr "" 32 33#, perl-brace-format 34msgid "This program is running as process number {pid}." 35msgstr "Dieses Programm l��uft mit der Proze��-Nummer {pid}." 36EOF 37 38tmpfiles="$tmpfiles mm-test20.pot" 39cat <<\EOF > mm-test20.pot 40#, fuzzy 41msgid "" 42msgstr "" 43"Project-Id-Version: PACKAGE VERSION\n" 44"Report-Msgid-Bugs-To: \n" 45"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 46"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 47"Language-Team: LANGUAGE <LL@li.org>\n" 48"MIME-Version: 1.0\n" 49"Content-Type: text/plain; charset=UTF-8\n" 50"Content-Transfer-Encoding: 8bit\n" 51 52msgid "Hello, world!" 53msgstr "Hallo Welt!" 54 55#, ycp-format 56msgid "This program is running as process number %1." 57msgstr "Dieses Programm l��uft mit der Prozess-Nummer %1." 58 59msgid "Hello example" 60msgstr "Beispiel Hallo" 61 62#, fuzzy 63msgid "Hello world example" 64msgstr "Beispiel Hallo-Welt" 65 66#, sh-format 67msgid "This program is running as process number $pid." 68msgstr "Dieses Programm l��uft mit der Prozess-Nummer $pid." 69 70#, python-format 71msgid "This program is running as process number %(pid)d." 72msgstr "" 73 74#~ msgid "This program is running as process number {pid}." 75#~ msgstr "Dieses Programm l��uft mit der Proze��-Nummer {pid}." 76EOF 77 78tmpfiles="$tmpfiles mm-test20.tmp.po mm-test20.new.po" 79: ${MSGMERGE=msgmerge} 80${MSGMERGE} -q -o mm-test20.tmp.po mm-test20.po mm-test20.pot 81test $? = 0 || { rm -fr $tmpfiles; exit 1; } 82tr -d '\r' < mm-test20.tmp.po > mm-test20.new.po 83test $? = 0 || { rm -fr $tmpfiles; exit 1; } 84 85tmpfiles="$tmpfiles mm-test20.ok" 86cat <<\EOF > mm-test20.ok 87msgid "" 88msgstr "" 89"Report-Msgid-Bugs-To: \n" 90"Content-Type: text/plain; charset=UTF-8\n" 91"Content-Transfer-Encoding: 8bit\n" 92 93msgid "Hello, world!" 94msgstr "Hallo Welt!" 95 96#, fuzzy, ycp-format 97msgid "This program is running as process number %1." 98msgstr "Dieses Programm l��uft mit der Prozess-Nummer $pid." 99 100msgid "Hello example" 101msgstr "" 102 103#, fuzzy 104msgid "Hello world example" 105msgstr "Beispiel Hallo-Welt" 106 107#, sh-format 108msgid "This program is running as process number $pid." 109msgstr "Dieses Programm l��uft mit der Prozess-Nummer $pid." 110 111#, python-format 112msgid "This program is running as process number %(pid)d." 113msgstr "" 114 115#~ msgid "This program is running as process number {pid}." 116#~ msgstr "Dieses Programm l��uft mit der Proze��-Nummer {pid}." 117EOF 118 119: ${DIFF=diff} 120${DIFF} mm-test20.ok mm-test20.new.po 121test $? = 0 || { rm -fr $tmpfiles; exit 1; } 122 123rm -fr $tmpfiles 124 125exit 0 126