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 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!!! |