gnucash maint: Remove bare percent sign in taxinvoice.scm, replace with English.

Geert Janssens geert.gnucash at kobaltwit.be
Tue Oct 21 16:56:40 EDT 2014


Jeff,

Thank you for the details. I have experimented a bit with the kok.po file.

The issue is not in the % sign but in the fact that the string is marked as a c-format string.
Removing this line from the comment block right above the msgid fixes the msgfmt error for 
that particular translation string.

The c-format comment is unfortunately automatically (and erroneously) generated by xgettext 
while parsing guile-strings.c. This is a bug. I have a patch in my queue that can fix this. This 
patch however requires at least intl-tool version 0.50, which is still fairly recent.

This means I can't apply the patch (yet) to our maint branch and the c-format comment will 
continue to pop up for the time being.

To work around this until we can apply my patch, I'll redo the string in a different way in the scm 
file to put the examples outside of the translatable string.

Note that the current kok.po file still has two other errors which are valid IMO. You can see them 
by running msgfmt -c on the file. Can you look into fixing these ?

Some of the other Indic language files that got recently contributed have similar errors. I'll list 
them here for your convenience:

brx.po:12727: number of format specifications in 'msgid_plural' and 'msgstr[1]' does not match
brx.po:26200: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that 
terminates the directive number 1 is not a valid conversion specifier.
brx.po:30500: format specifications in 'msgid' and 'msgstr' for argument 1 are not the same
brx.po:30509: format specifications in 'msgid' and 'msgstr' for argument 1 are not the same
msgfmt: found 4 fatal errors
kok.po:12155: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that 
terminates the directive number 2 is not a valid conversion specifier.
kok.po:19974: number of format specifications in 'msgid' and 'msgstr' does not match
kok.po:26045: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that 
terminates the directive number 1 is not a valid conversion specifier.
msgfmt: found 3 fatal errors
ks.po:99: number of format specifications in 'msgid' and 'msgstr' does not match
ks.po:4535: number of format specifications in 'msgid' and 'msgstr' does not match
ks.po:12736: number of format specifications in 'msgid_plural' and 'msgstr[1]' does not match
ks.po:18093: number of format specifications in 'msgid_plural' and 'msgstr[1]' does not match
ks.po:19325: number of format specifications in 'msgid' and 'msgstr' does not match
ks.po:26224: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that 
terminates the directive number 1 is not a valid conversion specifier.
msgfmt: found 6 fatal errors
mr.po:404: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that 
terminates the directive number 2 is not a valid conversion specifier.
mr.po:422: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that 
terminates the directive number 2 is not a valid conversion specifier.
mr.po:20309: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the directive 
number 1, the character ':' is not a valid conversion specifier.
mr.po:26714: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that 
terminates the directive number 1 is not a valid conversion specifier.
msgfmt: found 4 fatal errors
ta.po:26932: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that 
terminates the directive number 1 is not a valid conversion specifier.
msgfmt: found 1 fatal error
te.po:12659: number of format specifications in 'msgid_plural' and 'msgstr[1]' does not match
te.po:18572: number of format specifications in 'msgid' and 'msgstr' does not match
te.po:21060: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the directive 
number 4, the character 'U' is not a valid conversion specifier.
te.po:26517: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that 
terminates the directive number 1 is not a valid conversion specifier.
msgfmt: found 4 fatal errors
ur.po:12773: format specifications in 'msgid' and 'msgstr' for argument 1 are not the same
ur.po:27301: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that 
terminates the directive number 1 is not a valid conversion specifier.
msgfmt: found 2 fatal errors

For those errors pointing at the CSS attribute you can temporarily fix it by removing the c-
format comment until I have pushed the modified base string.

Thank you for your work.

Geert

On Tuesday 21 October 2014 16:03:14 Jeff Earickson wrote:
> Derek,
> 
> Hmmm...  Trying to reproduce here.  Sometimes msgfmt will compile the
> po file fine, but poedit will complain, so the two are not
> consistent.
> 
> In the case I just tried, poedit said:
> 
> "Error: 'msgstr'' is not a valid C format string, unlike 'msgid'. 
> Reason: the character that erminates the directive number 1 is not a
> valid conversion specifier."
> 
> But that same exact file just compiled with msgfmt just fine.  Ugh.
> 
> 
> -----------------------------------
> Jeff A. Earickson, Ph.D
> Senior Server System Administrator
> Colby College,
> 4214 Mayflower Hill,
> Waterville ME, 04901-8842
> 207-859-4214 (fax 207-859-4186)
> Eastern Time Zone, USA
> -----------------------------------
> 
> On Tue, Oct 21, 2014 at 12:20 PM, Derek Atkins <derek at ihtfp.com> wrote:
> >  Could you provide the exact compiler error you get, including the
> > 
> > commands to reproduce it?
> > 
> > -derek
> > 
> > Sent on my mobile. Please forgive any typos.
> > 
> > ----- Reply message -----
> > From: "Jeff Earickson" <jaearick at colby.edu>
> > To: "Geert Janssens" <geert.gnucash at kobaltwit.be>
> > Cc: "Gnucash-devel" <gnucash-devel at gnucash.org>
> > Subject: gnucash maint: Remove bare percent sign in taxinvoice.scm,
> > replace with English.
> > Date: Tue, Oct 21, 2014 11:56 AM
> > 
> > Geert,
> > 
> > Well, "10 percent" and "32 pixels" are literal examples too.  In my
> > efforts on getting the Indic language translations to compile,
> > poedit and/or the compile sequence always seems to choke on this
> > spot.  The English> 
> > translation of:
> > :... e.g. 10% or 32px"
> > 
> > ends up in the following translated string as:
> > 
> > "[characters in Devanagari]% [more chars] 32px [more chars]"
> > 
> > and the compiler sees the "%" as a "bare character" when it expects
> > "%d" or "%s" or "\%" or "%%" or something in proper C format. 
> > Compiler error.


More information about the gnucash-devel mailing list