2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test plural count for locales with nplurals != 2.
6 cat <<\EOF > mi-test1.pot
7 # SOME DESCRIPTIVE TITLE.
8 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
9 # This file is distributed under the same license as the PACKAGE package.
10 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
15 "Project-Id-Version: PACKAGE VERSION\n"
16 "Report-Msgid-Bugs-To: \n"
17 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
18 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
19 "Language-Team: LANGUAGE <LL@li.org>\n"
22 "Content-Type: text/plain; charset=CHARSET\n"
23 "Content-Transfer-Encoding: 8bit\n"
26 msgid "'Your command, please?', asked the waiter."
30 msgid "a piece of cake"
31 msgid_plural "%d pieces of cake"
36 msgid "%s is replaced by %s."
41 ${MSGINIT} -i mi-test1.pot -l ga_IE --no-translator -o mi-test1.tmp 2>mi-test1.err
42 test $? = 0 || { cat mi-test1.err 1>&2; exit 1; }
43 # The charset stored in the header entry is the locale encoding of the gl_IE
44 # locale, which is system dependent, or ASCII if the locale does not exist.
45 sed -e '1,10d' -e 's/\(ISO-8859-1\|CP1252\|UTF-8\)/ASCII/g' < mi-test1.tmp | LC_ALL=C tr -d '\r' > mi-test1.out || exit 1
47 cat <<\EOF > mi-test1.ok
48 "Last-Translator: Automatically generated\n"
49 "Language-Team: none\n"
52 "Content-Type: text/plain; charset=ASCII\n"
53 "Content-Transfer-Encoding: 8bit\n"
54 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n"
57 msgid "'Your command, please?', asked the waiter."
61 msgid "a piece of cake"
62 msgid_plural "%d pieces of cake"
68 msgid "%s is replaced by %s."
73 ${DIFF} mi-test1.ok mi-test1.out