2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test of gettext facilities in the YCP language.
10 print (_("'Your command, please?', asked the waiter."));
11 print (sformat (_("a piece of cake", "%1 pieces of cake", n), n));
12 print (sformat (_("%1 is replaced by %2."), "FF", "EUR"));
16 : ${XGETTEXT=xgettext}
17 ${XGETTEXT} -o prog.tmp --omit-header --no-location prog.ycp || exit 1
18 LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1
21 msgid "'Your command, please?', asked the waiter."
25 msgid "a piece of cake"
26 msgid_plural "%1 pieces of cake"
31 msgid "%1 is replaced by %2."
36 ${DIFF} prog.ok prog.pot || exit 1
41 "Content-Type: text/plain; charset=ISO-8859-1\n"
42 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
44 msgid "'Your command, please?', asked the waiter."
45 msgstr "«Votre commande, s'il vous plait», dit le garçon."
47 # Les gateaux allemands sont les meilleurs du monde.
49 msgid "a piece of cake"
50 msgid_plural "%1 pieces of cake"
51 msgstr[0] "un morceau de gateau"
52 msgstr[1] "%1 morceaux de gateau"
54 # Reverse the arguments.
56 msgid "%1 is replaced by %2."
57 msgstr "%2 remplace %1."
60 : ${MSGMERGE=msgmerge}
61 ${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1
62 LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1
65 ${DIFF} fr.po fr.po.new || exit 1