Here is a c-extension module that runs those checks using libgettext.
The po.check(filename) function returns a list of dicts like this:
{'column': 0,
'filename': None,
'lineno': 0,
'message': "headerfield `Project-Id-Version' missing in header\n",
'severity': 'error'}
Anyone who wants to help is more than welcome. Right now the code
needs some polishing and we need to create a test suite of corrupted
files for testing.
$ mkvirtualenv pocheck
$ git clone git://github.com/ctrochalakis/python-postats.git
$ cd python-postats
$ git checkout -b check origin/check
$ easy_install .
$ python msgtest.py example.po
-christos
Very interesting!
> Anyone who wants to help is more than welcome. Right now the code
> needs some polishing and we need to create a test suite of corrupted
> files for testing.
Just forked your project. Hopefully I'll find some free time between
projects to contribute a bit.
Cheers,
--
Og B. Maciel
oma...@foresightlinux.org
ogma...@gnome.org
ogma...@ubuntu.com
GPG Keys: D5CFC202
http://www.ogmaciel.com (en_US)
http://blog.ogmaciel.com (pt_BR)