[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Better error message ?
From: |
Bruno Haible |
Subject: |
Re: Better error message ? |
Date: |
Thu, 4 Apr 2002 12:43:11 +0200 (CEST) |
Felix Natter writes:
> #: gtypist.c:1470
> #, c-format
> msgid "'%' must immediately follow value"
> msgstr "«%» debe seguir un valor"
>
> I get this error:
>
> rm -f es.gmo && /usr/local/bin/msgfmt -c --statistics -o es.gmo es.po
> es.po:76: 'msgstr' is not a valid C format string, unlike 'msgid'
> /usr/local/bin/msgfmt: found 1 fatal error
>
> This is misleading because 'msgid' is not a valid format-string
"'%' must immediately follow value" is a valid C format string. The
format directive starts at '%' and ends at 'm' (this is a glibc
extension).
> either. I think it should better be something like (I hope you have a better
> idea):
> es.po:76: 'msgstr' is not a valid C format string as the comment suggests
> or
> es.po:76: 'msgstr' is not a valid C format string but it is marked as one
Such an error message would suggest to the translator to remove the
"#, c-format" mark, which won't help. (The mark would be reintroduced
when the maintainer runs msgmerge.)
> I also have a question concerning the code:
> the code looks like this:
>
> fatal_error( _("'*' must immediately follow '%'"), copy_of_line );
> else
> fatal_error( _("missing '%'"), copy_of_line );
> } else
> fatal_error( _("missing '%'"), copy_of_line );
> }
> if (isspace( *(data - 1) ))
> fatal_error( _("'%' must immediately follow value"), copy_of_line );
In order not to let xgettext think these are format strings, it'd be
good to mark these strings as being not C printf strings.
/* xgettext: no-c-format */
fatal_error( _("'*' must immediately follow '%'"), copy_of_line );
else
fatal_error( _("missing '%'"), copy_of_line );
} else
fatal_error( _("missing '%'"), copy_of_line );
}
if (isspace( *(data - 1) ))
/* xgettext: no-c-format */
fatal_error( _("'%' must immediately follow value"), copy_of_line );
Bruno
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Better error message ?,
Bruno Haible <=