3 # Test plural count for locales with nplurals != 2.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles
="$tmpfiles mi-test1.pot"
9 cat <<\EOF
> mi-test1.pot
10 # SOME DESCRIPTIVE TITLE.
11 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
12 # This file is distributed under the same license as the PACKAGE package.
13 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
18 "Project-Id-Version: PACKAGE VERSION\n"
19 "Report-Msgid-Bugs-To: \n"
20 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
21 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
22 "Language-Team: LANGUAGE <LL@li.org>\n"
24 "Content-Type: text/plain; charset=CHARSET\n"
25 "Content-Transfer-Encoding: 8bit\n"
28 msgid
"'Your command, please?', asked the waiter."
32 msgid
"a piece of cake"
33 msgid_plural
"%d pieces of cake"
38 msgid
"%s is replaced by %s."
42 tmpfiles
="$tmpfiles mi-test1.tmp mi-test1.out mi-test1.err"
44 ${MSGINIT} -i mi-test1.pot
-l ga_IE
--no-translator -o mi-test1.tmp
2>mi-test1.err
45 test $?
= 0 ||
{ cat mi-test1.err
1>&2; rm -fr $tmpfiles; exit 1; }
46 sed -e '1,15d' < mi-test1.tmp
> mi-test1.out
47 test $?
= 0 ||
{ rm -fr $tmpfiles; exit 1; }
49 tmpfiles
="$tmpfiles mi-test1.ok"
50 cat <<\EOF
> mi-test1.ok
51 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n"
54 msgid
"'Your command, please?', asked the waiter."
58 msgid
"a piece of cake"
59 msgid_plural
"%d pieces of cake"
65 msgid
"%s is replaced by %s."
70 ${DIFF} mi-test1.ok mi-test1.out