[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r38199 - in trunk/subversion: libsvn_client libsvn_wc

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 29 Jun 2009 16:19:33 +0100

I (Julian Foad) wrote:
> Without answering the question of what's best for translation (let the
> translators decide that), I think we can easily avoid the "non-constant
> format string" warnings without changing the strings marked for
> translation:
>
> > - err = svn_error_createf(
> > - SVN_ERR_WC_CORRUPT_TEXT_BASE, err,
> > - apr_psprintf(hb->pool, "%s:\n%s\n%s\n",
> > - _("Checksum mismatch while updating '%s'"),
> > - _(" expected: %s"),
> > - _(" actual: %s")),
> > - X, Y, Z);
>
> > + err = svn_error_createf(
> > + SVN_ERR_WC_CORRUPT_TEXT_BASE, err,
> > + "%s:\n%s\n%s\n",
> > + apr_psprintf(hb->pool, _("Checksum mismatch while updating '%s'"), X),
> > + apr_psprintf(hb->pool, _(" expected: %s"), Y),
> > + apr_psprintf(hb->pool, _(" actual: %s"), Z));

FYI, I only offer this as an option, not a vote. As a developer, I
prefer Hyrum's solution of just writing the three-line message as a
single string if that is in fact OK for translators. Even better would
be to factor out at least the four "corrupt text base" error reports
into a single helper function to reduce the (near-)duplication.

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2366419
Received on 2009-06-29 17:19:51 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.