3
# Test msgmerge when a msgid_plural changed but msgid remained the same,
4
# and --previous was specified.
5
# Reported by Chusslove Illich (Часлав Илић).
8
trap 'rm -fr $tmpfiles' 1 2 3 15
10
tmpfiles="$tmpfiles mm-test23.po"
11
cat <<\EOF > mm-test23.po
14
"Project-Id-Version: \n"
15
"Report-Msgid-Bugs-To: \n"
16
"POT-Creation-Date: 2008-01-13 16:59+0100\n"
17
"PO-Revision-Date: 2007-06-28 16:37+0200\n"
22
"Content-Type: text/plain; charset=UTF-8\n"
23
"Content-Transfer-Encoding: 8bit\n"
24
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
36
msgid_plural "%n objects"
42
msgid_plural "%n volumes"
47
tmpfiles="$tmpfiles mm-test23.pot"
48
cat <<\EOF > mm-test23.pot
51
"Project-Id-Version: \n"
52
"Report-Msgid-Bugs-To: \n"
53
"POT-Creation-Date: 2008-01-13 16:59+0100\n"
54
"PO-Revision-Date: 2007-06-28 16:37+0200\n"
59
"Content-Type: text/plain; charset=UTF-8\n"
60
"Content-Transfer-Encoding: 8bit\n"
72
msgid_plural "%1 objects"
78
msgid_plural "%1 volumes"
83
tmpfiles="$tmpfiles mm-test23.tmp.po mm-test23.new.po"
84
: ${MSGMERGE=msgmerge}
85
${MSGMERGE} -q --previous -o mm-test23.tmp.po mm-test23.po mm-test23.pot
86
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
87
LC_ALL=C tr -d '\r' < mm-test23.tmp.po > mm-test23.new.po
88
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
90
tmpfiles="$tmpfiles mm-test23.ok"
91
cat <<\EOF > mm-test23.ok
94
"Project-Id-Version: \n"
95
"Report-Msgid-Bugs-To: \n"
96
"POT-Creation-Date: 2008-01-13 16:59+0100\n"
97
"PO-Revision-Date: 2007-06-28 16:37+0200\n"
101
"MIME-Version: 1.0\n"
102
"Content-Type: text/plain; charset=UTF-8\n"
103
"Content-Transfer-Encoding: 8bit\n"
104
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
117
msgid_plural "%1 objects"
122
#| msgid "One volume"
123
#| msgid_plural "%n volumes"
125
msgid_plural "%1 volumes"
131
${DIFF} mm-test23.ok mm-test23.new.po
132
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
134
tmpfiles="$tmpfiles mm-test23.mo"
136
${MSGFMT} --check -o mm-test23.mo mm-test23.new.po
137
test $? = 0 || { rm -fr $tmpfiles; exit 1; }