2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test filling Plural-Forms: with Unicode CLDR
6 LC_ALL=C "$top_builddir/src/cldr-plurals" ru /dev/null 2>&1 | grep 'extraction is not supported' > /dev/null 2>&1
8 echo "Skipping test: cldr-plurals was built without XML support"
12 cat <<\EOF > mi-test4.pot
13 # SOME DESCRIPTIVE TITLE.
14 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
15 # This file is distributed under the same license as the PACKAGE package.
16 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
21 "Project-Id-Version: PACKAGE VERSION\n"
22 "Report-Msgid-Bugs-To: \n"
23 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
24 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
25 "Language-Team: LANGUAGE <LL@li.org>\n"
28 "Content-Type: text/plain; charset=CHARSET\n"
29 "Content-Transfer-Encoding: 8bit\n"
32 msgid "'Your command, please?', asked the waiter."
36 msgid "a piece of cake"
37 msgid_plural "%d pieces of cake"
42 msgid "%s is replaced by %s."
47 GETTEXTLIBDIR="$top_builddir"/src GETTEXTCLDRDIR="$abs_srcdir" ${MSGINIT} -l foo --no-translator --no-wrap -o mi-test4.tmp 2>mi-test4.err
48 test $? = 0 || { cat mi-test4.err 1>&2; exit 1; }
50 # The charset stored in the header entry is the locale encoding of the gl_IE
51 # locale, which is system dependent, or ASCII if the locale does not exist.
53 # Project-Id-Version contains version constructed from a temporary
55 sed -e '1,10d' -e 's/\(ISO-8859-1\|CP1252\|UTF-8\)/ASCII/g' < mi-test4.tmp | grep -v Project-Id-Version | LC_ALL=C tr -d '\r' > mi-test4.out || exit 1
56 cat <<\EOF > mi-test4.ok
57 "Last-Translator: Automatically generated\n"
58 "Language-Team: none\n"
61 "Content-Type: text/plain; charset=ASCII\n"
62 "Content-Transfer-Encoding: 8bit\n"
63 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
66 msgid "'Your command, please?', asked the waiter."
70 msgid "a piece of cake"
71 msgid_plural "%d pieces of cake"
77 msgid "%s is replaced by %s."
82 ${DIFF} mi-test4.ok mi-test4.out