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