Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-22
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test msgmerge when a msgid_plural changed but msgid remained the same.
5 # Reported by Chusslove Illich (Часлав Илић).
6
7 cat <<\EOF > mm-test22.po
8 msgid ""
9 msgstr ""
10 "Project-Id-Version: GNU gettext-tools 0.16\n"
11 "Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
12 "POT-Creation-Date: 2007-10-18 02:57+0200\n"
13 "PO-Revision-Date: 2007-06-28 16:37+0200\n"
14 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
15 "Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
21 msgid "Add resource from addressbook"
22 msgid_plural "Add %n resources from addressbook"
23 msgstr[0] "Engadir un recurso dende o libro de enderezos"
24 msgstr[1] "Engadir %n recursos dende o libro de enderezos"
25 EOF
26
27 cat <<\EOF > mm-test22.pot
28 msgid ""
29 msgstr ""
30 "Project-Id-Version: GNU gettext-tools 0.16\n"
31 "Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
32 "POT-Creation-Date: 2007-10-19 02:57+0200\n"
33 "PO-Revision-Date: 2007-06-28 16:37+0200\n"
34 "Last-Translator: \n"
35 "Language-Team: \n"
36 "MIME-Version: 1.0\n"
37 "Content-Type: text/plain; charset=UTF-8\n"
38 "Content-Transfer-Encoding: 8bit\n"
39
40 msgid "Add resource from addressbook"
41 msgid_plural "Add %1 resources from addressbook"
42 msgstr[0] ""
43 msgstr[1] ""
44 EOF
45
46 : ${MSGMERGE=msgmerge}
47 ${MSGMERGE} -q -o mm-test22.tmp.po mm-test22.po mm-test22.pot || exit 1
48 LC_ALL=C tr -d '\r' < mm-test22.tmp.po > mm-test22.new.po || exit 1
49
50 cat <<\EOF > mm-test22.ok
51 msgid ""
52 msgstr ""
53 "Project-Id-Version: GNU gettext-tools 0.16\n"
54 "Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
55 "POT-Creation-Date: 2007-10-19 02:57+0200\n"
56 "PO-Revision-Date: 2007-06-28 16:37+0200\n"
57 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
58 "Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
59 "Language: de\n"
60 "MIME-Version: 1.0\n"
61 "Content-Type: text/plain; charset=UTF-8\n"
62 "Content-Transfer-Encoding: 8bit\n"
63 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
64
65 #, fuzzy
66 msgid "Add resource from addressbook"
67 msgid_plural "Add %1 resources from addressbook"
68 msgstr[0] "Engadir un recurso dende o libro de enderezos"
69 msgstr[1] "Engadir %n recursos dende o libro de enderezos"
70 EOF
71
72 : ${DIFF=diff}
73 ${DIFF} mm-test22.ok mm-test22.new.po || exit 1
74
75 : ${MSGFMT=msgfmt}
76 ${MSGFMT} --check -o mm-test22.mo mm-test22.new.po || exit 1
77
78 exit 0