4 trap 'rm -fr $tmpfiles' 1 2 3 15
6 tmpfiles
="$tmpfiles cake.pot"
8 ${XGETTEXT} -o cake.pot
--omit-header --no-location ${top_srcdir}/tests
/plural-1-prg.c
10 tmpfiles
="$tmpfiles cake.ok"
13 msgid "a piece of cake"
14 msgid_plural "%d pieces of cake"
20 ${DIFF} cake.ok cake.pot ||
exit 1
22 tmpfiles
="$tmpfiles fr.po"
24 # Les gateaux allemands sont les meilleurs du monde.
26 msgid "a piece of cake"
27 msgid_plural "%d pieces of cake"
28 msgstr[0] "un morceau de gateau"
29 msgstr[1] "%d morceaux de gateau"
32 tmpfiles
="$tmpfiles fr.po.new"
33 : ${MSGMERGE=msgmerge}
34 ${MSGMERGE} -q -o fr.po.new fr.po cake.pot
37 ${DIFF} fr.po fr.po.new ||
exit 1
39 tmpfiles
="$tmpfiles fr"
40 test -d fr || mkdir fr
41 test -d fr
/LC_MESSAGES || mkdir fr
/LC_MESSAGES
44 ${MSGFMT} -o fr
/LC_MESSAGES
/cake.mo fr.po
46 tmpfiles
="$tmpfiles fr.po.tmp"
47 : ${MSGUNFMT=msgunfmt}
48 ${MSGUNFMT} fr
/LC_MESSAGES
/cake.mo
-o fr.po.tmp
50 tmpfiles
="$tmpfiles fr.po.strip"
51 sed 1,2d
< fr.po
> fr.po.strip
54 ${DIFF} fr.po.strip fr.po.tmp ||
exit 1
56 tmpfiles
="$tmpfiles cake.ok cake.out"
58 echo 'un morceau de gateau' > cake.ok
59 LANGUAGE
= .
/cake fr
1 > cake.out ||
exit 1
60 ${DIFF} cake.ok cake.out ||
exit 1
61 echo '2 morceaux de gateau' > cake.ok
62 LANGUAGE
= .
/cake fr
2 > cake.out ||
exit 1
63 ${DIFF} cake.ok cake.out ||
exit 1
64 echo '10 morceaux de gateau' > cake.ok
65 LANGUAGE
= .
/cake fr
10 > cake.out ||
exit 1
66 ${DIFF} cake.ok cake.out ||
exit 1