3 # Test format string checking in plural entries.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles
="$tmpfiles mf-test10.po1"
9 cat <<\EOF
> mf-test10.po1
10 # SOME DESCRIPTIVE TITLE.
11 # Copyright (C) YEAR Free Software Foundation, Inc.
12 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
16 "Project-Id-Version: GNU bison\n"
17 "PO-Revision-Date: 2001-04-05 19:47+0200\n"
18 "Last-Translator: ABC DEF <abc@gnu.uucp>\n"
19 "Language-Team: test <test@li.org>\n"
21 "Content-Type: text/plain; charset=ISO-8859-9\n"
22 "Content-Transfer-Encoding: 8bit\n"
23 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
27 msgid
"%d useless nonterminal"
28 msgid_plural
"%d useless nonterminals"
29 msgstr
[0] "1 yararsýz deðiþken simge"
30 msgstr
[1] "%d yararsýz deðiþken simges"
34 msgid
"one useless rule"
35 msgid_plural
"%d useless rules"
36 msgstr
[0] "%d yararsýz kural"
37 msgstr
[1] "%d yararsýz kurals"
41 ${MSGFMT} --check mf-test10.po1
-o /dev
/null
42 test $?
= 0 ||
{ rm -fr $tmpfiles; exit 1; }
44 tmpfiles
="$tmpfiles mf-test10.po2"
45 cat <<\EOF
> mf-test10.po2
46 # SOME DESCRIPTIVE TITLE.
47 # Copyright (C) YEAR Free Software Foundation, Inc.
48 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
52 "Project-Id-Version: GNU bison\n"
53 "PO-Revision-Date: 2001-04-05 19:47+0200\n"
54 "Last-Translator: ABC DEF <abc@gnu.uucp>\n"
55 "Language-Team: test <test@li.org>\n"
57 "Content-Type: text/plain; charset=ISO-8859-9\n"
58 "Content-Transfer-Encoding: 8bit\n"
59 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
63 msgid
"one useless rule"
64 msgid_plural
"%d useless rules"
65 msgstr
[0] "%d yararsýz kural"
66 msgstr
[1] "%d yararsýz kural%s"
69 tmpfiles
="$tmpfiles mf-test10.err"
71 LC_MESSAGES
=C LC_ALL
= \
72 ${MSGFMT} --check mf-test10.po2
-o /dev
/null \
73 2>&1 |
grep -v '^==' > mf-test10.err
75 tmpfiles
="$tmpfiles mf-test10.ok"
76 cat << EOF > mf-test10.ok
77 mf-test10.po2:18: number of format specifications in 'msgid' and 'msgstr[1]' does not match
78 msgfmt: found 1 fatal error
82 ${DIFF} mf-test10.ok mf-test10.err