Re: Need for help in handling l10n for several packages
Quoting pi (pi@beobide.net):
> I suppose I will need to learn advanced use of svn/cvs but I think is not too much complicated.
You don't need...:-). I'm absolutely ignorant of "advanced" use of
cvs/svn..:-)
You know, all what's needed is commiting file as they arrive AFTER
CHECKING THEM.
So, the most important is to know how to check the PO files, which
bascally can be resumed to my little wacky shell script below (parts
contributed by Denis Barbier : the only non-whacky parts, actually):
>
> If no one want it I think I can do popularity-contest related work if you can help me at the begining.
Mohamed proposed to take it. Can you pick another one ? ;:-)
#!/bin/sh
temp=`tempfile`
trap "rm -f $temp $temp.new" 1 2 3 15
clean_and_die() {
rm -f $temp $temp.new
if [ "$1" = "2" ] ; then
echo Invalid encoding. Please check the file.
fi
exit $1
}
if [ -z $1 ]
then
echo Usage $0 fichier
clean_and_die 1
fi
if [ ! -f $1 ]
then
echo $1 not found.
clean_and_die 1
fi
if [ `ls -1 *pot 2>/dev/null | wc -l` != "1" ] ; then
echo No POT file \(or more than one\) in current directory
clean_and_die 1
fi
potfile=`ls -1 *pot`
msgmerge -U $1 $potfile
enc=$(grep -E "^\"Content-Type" $1 | cut -f2 -d= | sed 's/\\n\"//g')
echo -n "Charset is $enc. Stats: "
if test -n "$enc" ; then
iconv -f $enc -t UTF-8 $1 >$temp >/dev/null 2>&1 || clean_and_die 2
if [ -x $HOME/bin/check_var.pl ] ; then
$HOME/bin/check_var.pl $1 || clean_and_die 3
else
echo $HOME/bin/check_var.pl not found
clean_and_die 1
fi
LC_ALL=C msgfmt -c -v -o /dev/null --statistics $1
fi
clean_and_die 0
--
Reply to: