|
Packit Bot |
06c835 |
#! /bin/sh
|
|
Packit Bot |
06c835 |
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
: ${XGETTEXT=xgettext}
|
|
Packit Bot |
06c835 |
${XGETTEXT} -o plural-1-cake.tmp --omit-header --no-location "$abs_srcdir"/plural-1-prg.c || exit 1
|
|
Packit Bot |
06c835 |
LC_ALL=C tr -d '\r' < plural-1-cake.tmp > plural-1-cake.pot || exit 1
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
cat <<EOF > plural-1-cake.ok
|
|
Packit Bot |
06c835 |
#, c-format
|
|
Packit Bot |
06c835 |
msgid "a piece of cake"
|
|
Packit Bot |
06c835 |
msgid_plural "%d pieces of cake"
|
|
Packit Bot |
06c835 |
msgstr[0] ""
|
|
Packit Bot |
06c835 |
msgstr[1] ""
|
|
Packit Bot |
06c835 |
EOF
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
: ${DIFF=diff}
|
|
Packit Bot |
06c835 |
${DIFF} plural-1-cake.ok plural-1-cake.pot || exit 1
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
cat <<EOF > plural-1-fr.po
|
|
Packit Bot |
06c835 |
# Les gateaux allemands sont les meilleurs du monde.
|
|
Packit Bot |
06c835 |
#, c-format
|
|
Packit Bot |
06c835 |
msgid "a piece of cake"
|
|
Packit Bot |
06c835 |
msgid_plural "%d pieces of cake"
|
|
Packit Bot |
06c835 |
msgstr[0] "un morceau de gateau"
|
|
Packit Bot |
06c835 |
msgstr[1] "%d morceaux de gateau"
|
|
Packit Bot |
06c835 |
EOF
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
: ${MSGMERGE=msgmerge}
|
|
Packit Bot |
06c835 |
${MSGMERGE} -q -o plural-1-fr.po.tmp plural-1-fr.po plural-1-cake.pot || exit 1
|
|
Packit Bot |
06c835 |
LC_ALL=C tr -d '\r' < plural-1-fr.po.tmp > plural-1-fr.po.new || exit 1
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
: ${DIFF=diff}
|
|
Packit Bot |
06c835 |
${DIFF} plural-1-fr.po plural-1-fr.po.new || exit 1
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
test -d plural-1-dir || mkdir plural-1-dir
|
|
Packit Bot |
06c835 |
test -d plural-1-dir/fr || mkdir plural-1-dir/fr
|
|
Packit Bot |
06c835 |
test -d plural-1-dir/fr/LC_MESSAGES || mkdir plural-1-dir/fr/LC_MESSAGES
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
: ${MSGFMT=msgfmt}
|
|
Packit Bot |
06c835 |
${MSGFMT} -o plural-1-dir/fr/LC_MESSAGES/cake.mo plural-1-fr.po
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
: ${MSGUNFMT=msgunfmt}
|
|
Packit Bot |
06c835 |
${MSGUNFMT} -o plural-1-fr.po.tmp plural-1-dir/fr/LC_MESSAGES/cake.mo || exit 1
|
|
Packit Bot |
06c835 |
LC_ALL=C tr -d '\r' < plural-1-fr.po.tmp > plural-1-fr.po.un || exit 1
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
sed 1,2d < plural-1-fr.po > plural-1-fr.po.strip
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
: ${DIFF=diff}
|
|
Packit Bot |
06c835 |
${DIFF} plural-1-fr.po.strip plural-1-fr.po.un || exit 1
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
: ${DIFF=diff}
|
|
Packit Bot |
06c835 |
echo 'un morceau de gateau' > plural-1-cake.ok
|
|
Packit Bot |
06c835 |
LANGUAGE= ../cake fr 1 > plural-1-cake.tmp || exit 1
|
|
Packit Bot |
06c835 |
LC_ALL=C tr -d '\r' < plural-1-cake.tmp > cake.out || exit 1
|
|
Packit Bot |
06c835 |
${DIFF} plural-1-cake.ok cake.out || exit 1
|
|
Packit Bot |
06c835 |
echo '2 morceaux de gateau' > plural-1-cake.ok
|
|
Packit Bot |
06c835 |
LANGUAGE= ../cake fr 2 > plural-1-cake.tmp || exit 1
|
|
Packit Bot |
06c835 |
LC_ALL=C tr -d '\r' < plural-1-cake.tmp > cake.out || exit 1
|
|
Packit Bot |
06c835 |
${DIFF} plural-1-cake.ok cake.out || exit 1
|
|
Packit Bot |
06c835 |
echo '10 morceaux de gateau' > plural-1-cake.ok
|
|
Packit Bot |
06c835 |
LANGUAGE= ../cake fr 10 > plural-1-cake.tmp || exit 1
|
|
Packit Bot |
06c835 |
LC_ALL=C tr -d '\r' < plural-1-cake.tmp > cake.out || exit 1
|
|
Packit Bot |
06c835 |
${DIFF} plural-1-cake.ok cake.out || exit 1
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
exit 0
|