Yes, the current pot is bad:
msgid "Invalid length (%"
If apply the following patch, it's good:
msgid "Invalid length (%%%s) when about to read a string"
--- subversion/libsvn_repos/reporter.c (revision 28499)
+++ subversion/libsvn_repos/reporter.c (working copy)
@@ -155,6 +155,7 @@
+ char *fmt;
SVN_ERR(read_number(&len, temp, pool));
@@ -164,9 +165,10 @@
string, anyone?) but let's be future-proof anyway. */
if (len + 1 < len)
+ fmt = apr_psprintf(pool, _("Invalid length (%%%s) when about to read
+ "a string"), APR_UINT64_T_FMT);
return svn_error_createf(SVN_ERR_REPOS_BAD_REVISION_REPORT, NULL,
- _("Invalid length (%" APR_UINT64_T_FMT ") "
- "when about to read a string"), len);
+ fmt, len);
buf = apr_palloc(pool, len + 1);
2007/12/15, Erik Huelsmann <firstname.lastname@example.org>:
> On Dec 10, 2007 9:55 PM, Karl Fogel <email@example.com> wrote:
> > "Dongsheng Song" <firstname.lastname@example.org> writes:
> > > Could you use "llu" instead of "APR_UINT64_T_FMT", otherwise:
> > >
> > > $ ../../tools/po/po-update.sh zh_CN
> > > Building subversion.pot...
> > > ../libsvn_repos/reporter.c:168: warning: Although being used in a
> > > format string position, the msgid is not a valid C format string.
> > > Reason: The string ends in the middle of a directive.
> > Hrm. I hate to not use the mechanism provided by APR for exactly this
> > purpose. Is there any way to shut off that warning for a specific
> > string?
> No. xgettext doesn't expand defines, so it doesn't know you're
> concatenating strings there.
> What we do in other places is: apr_psprintf the number into a string
> and insert the %s format specifier in the error string.
Received on Sat Dec 15 16:41:38 2007