2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test plural formula dependent checking of format strings.
6 # Take as example a plural formula which takes the values 0 and 2 infinitely
7 # often, and value 1 only a few times.
8 # Test: 1 - have %d everywhere - OK
9 # 2 - lack %d for value 0 - error
10 # 3 - lack %d for value 1 - OK
11 # 4 - lack %d for value 2 - error
13 cat <<\EOF > mf-15.po1
14 # SOME DESCRIPTIVE TITLE.
15 # Copyright (C) YEAR Free Software Foundation, Inc.
16 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
20 "Project-Id-Version: GNU bison\n"
21 "PO-Revision-Date: 2001-04-05 19:47+0200\n"
22 "Last-Translator: ABC DEF <abc@gnu.uucp>\n"
23 "Language-Team: test <test@li.org>\n"
26 "Content-Type: text/plain; charset=UTF-8\n"
27 "Content-Transfer-Encoding: 8bit\n"
28 "Plural-Forms: nplurals=3; plural=(n <= 1 ? 1 : (n % 2) == 0 ? 2 : 0);\n"
32 msgid "%d useless nonterminal"
33 msgid_plural "%d useless nonterminals"
34 msgstr[0] "%d unnütze Nichtterminale"
35 msgstr[1] "%d unnützes Nichtterminal"
36 msgstr[2] "%d der unnützen Nichtterminale"
40 ${MSGFMT} --check -o /dev/null mf-15.po1 || exit 1
42 cat <<\EOF > mf-15.po2
43 # SOME DESCRIPTIVE TITLE.
44 # Copyright (C) YEAR Free Software Foundation, Inc.
45 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
49 "Project-Id-Version: GNU bison\n"
50 "PO-Revision-Date: 2001-04-05 19:47+0200\n"
51 "Last-Translator: ABC DEF <abc@gnu.uucp>\n"
52 "Language-Team: test <test@li.org>\n"
55 "Content-Type: text/plain; charset=UTF-8\n"
56 "Content-Transfer-Encoding: 8bit\n"
57 "Plural-Forms: nplurals=3; plural=(n <= 1 ? 1 : (n % 2) == 0 ? 2 : 0);\n"
61 msgid "%d useless nonterminal"
62 msgid_plural "%d useless nonterminals"
63 msgstr[0] "unnütze Nichtterminale"
64 msgstr[1] "%d unnützes Nichtterminal"
65 msgstr[2] "%d der unnützen Nichtterminale"
69 ${MSGFMT} --check -o /dev/null mf-15.po2 2>/dev/null
70 test $? = 1 || { exit 1; }
72 cat <<\EOF > mf-15.po3
73 # SOME DESCRIPTIVE TITLE.
74 # Copyright (C) YEAR Free Software Foundation, Inc.
75 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
79 "Project-Id-Version: GNU bison\n"
80 "PO-Revision-Date: 2001-04-05 19:47+0200\n"
81 "Last-Translator: ABC DEF <abc@gnu.uucp>\n"
82 "Language-Team: test <test@li.org>\n"
85 "Content-Type: text/plain; charset=UTF-8\n"
86 "Content-Transfer-Encoding: 8bit\n"
87 "Plural-Forms: nplurals=3; plural=(n <= 1 ? 1 : (n % 2) == 0 ? 2 : 0);\n"
91 msgid "%d useless nonterminal"
92 msgid_plural "%d useless nonterminals"
93 msgstr[0] "%d unnütze Nichtterminale"
94 msgstr[1] "unnützes Nichtterminal"
95 msgstr[2] "%d der unnützen Nichtterminale"
99 ${MSGFMT} --check -o /dev/null mf-15.po3 || exit 1
101 cat <<\EOF > mf-15.po4
102 # SOME DESCRIPTIVE TITLE.
103 # Copyright (C) YEAR Free Software Foundation, Inc.
104 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
108 "Project-Id-Version: GNU bison\n"
109 "PO-Revision-Date: 2001-04-05 19:47+0200\n"
110 "Last-Translator: ABC DEF <abc@gnu.uucp>\n"
111 "Language-Team: test <test@li.org>\n"
113 "MIME-Version: 1.0\n"
114 "Content-Type: text/plain; charset=UTF-8\n"
115 "Content-Transfer-Encoding: 8bit\n"
116 "Plural-Forms: nplurals=3; plural=(n <= 1 ? 1 : (n % 2) == 0 ? 2 : 0);\n"
120 msgid "%d useless nonterminal"
121 msgid_plural "%d useless nonterminals"
122 msgstr[0] "%d unnütze Nichtterminale"
123 msgstr[1] "%d unnützes Nichtterminal"
124 msgstr[2] "der unnützen Nichtterminale"
128 ${MSGFMT} --check -o /dev/null mf-15.po4 2>/dev/null
129 test $? = 1 || { exit 1; }