Introduction
Introduction Statistics Contact Development Disclaimer Help
More scripting means less typing
Tuesday Jun 26 8:33:47 2012
Last week I stumbled upon a bad .po file which means risk of losing
hours of work. I couldn't fix it after struggling with it for a
while. In the end, I recovered the file from a backup copy and
luckily I only lost a few strings. Not a big deal.
So I decided to write a short script that would make it easier for me
to check the integrity of the po files I'm working with.
Silly as it (the script) may seem, it is true that "More scripting
means less typing."
As you can see the usage is: ~$ poic file.po
Here it is:
msgfmt --verbose --statistics --check --output-file=/dev/null $1
if [ "$?" -eq "0" ]
then
echo ""
echo "This .po file is 'good': $(echo $1)"
elif [ "$?" -ne "0" ]
then
echo ""
echo "This .po file is 'poo': $(echo $1)"
fi
Nifty!!!
______________________________________________________________________
Gophered by Gophernicus/1.6 on NetBSD/amd64 9.1
You are viewing proxied material from sdfeu.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.