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