[zanata-users] po file's that don't compile

David Mason damason at redhat.com
Thu Dec 13 22:39:36 UTC 2012


Hi Adrian,

Can you let us know the changes you've made to have these files pass validation (diff would probably be most useful)?

I haven't had too close a look yet, but see a few comments below.

Cheers,

David Mason
Software Engineer
L10n Engineering

Red Hat, Asia-Pacific Pty Ltd
Level 1, 193 North Quay
Brisbane 4000

----- Original Message -----
> From: "Adrian Likins" <alikins at redhat.com>
> To: zanata-users at redhat.com
> Sent: Friday, 14 December, 2012 1:19:28 AM
> Subject: [zanata-users] po file's that don't compile
> 
> 
> Often with po files from zanata, they will not "compile" with:
>      msgfmt -c --statistics -o rhsm po/ko.po
> 
> I usually end up editing them by hand to fix them when I
> can, and try to push those po changes back up.
> 
> Do I need a newer msgfmt? This is with msgfmt from
> gettext-0.17-16.el6.x86_64 from rhel6.
> 
> Is this the wrong options for msgfmt? Is there
> some preprocessing step I'm missing?
> 
> Are the po's generated incorrectly?
> 
> Example output from latest version of
> strings from subscription-manager 1.1 branch:

<snip>

> po/pt_BR.po:547: format specifications in 'msgid' and 'msgstr' for
> argument 2 are not the same

We intend to extend our validators to cover format specifiers. In the meantime this string should be fixed in Zanata to prevent having to change it every time.

> po/pt_BR.po:3877: `msgid' and `msgstr' entries do not both begin with
> '\n'

This is up to the translator to enter a valid matching translation. Zanata has a validator for leading/trailing newlines that is on by default, so there's not much more we can do until we start enforcing validation, which will require lots of testing to ensure validators are very reliable, and some extra metadata about document types.


> po/ta_IN.po:2289: 'msgstr' is not a valid Python format string,
> unlike
> 'msgid'. Reason: The character that terminates the directive number 1
> is
> not a valid conversion specifier.

This message looks like it is talking about an invalid source string, so I would suggest trying to fix it in the source.




More information about the zanata-users mailing list