On Friday 01 September 2006 04:39, Christian Perrier wrote:
> When a PO file (say, ar.po) is apparently invalid, the following
> command can help spotting the error:
>
> msgfmt -o /dev/null -c ar.po
>
> It will output the number of the line where the error happens.
>
> I highly recommend ALL translators to validate their translation files
> this way before sending them to maintainers or committing them. It
> usually helps to spot invalid format errors, plural forms errors,
> variable substitution errors, etc.
Validation is very important, here are some few scripts to check lot of files
at once:
for i in `find . -name "*.po"`; do echo $i; msgfmt -o /dev/null -cv $i; done
for i in `find . -name "*.po"`; do echo $i; msgfmt -o /dev/null --statistics
$i; done
Use the second one with KDE. KDE has a special plural form syntax, when the
number of plurals is not equal to 2 msgfmt -o /dev/null -c kde-ar.po returns
errors which are correct. msgfmt -o /dev/null --statistics is sufficient to
ensure the validity of KDE files.
_______________________________________________
Doc mailing list
Doc at arabeyes dot org
http://lists.arabeyes.org/mailman/listinfo/doc