Hyrum K. Wright wrote:
> On Jun 29, 2009, at 8:42 AM, Arfrever Frehtes Taifersar Arahesis wrote:
>
> > 2009-06-25 16:47 Hyrum K. Wright <hyrum_at_hyrumwright.org> napisaĆ(a):
> >> Author: hwright
> >> Date: Thu Jun 25 07:47:23 2009
> >> New Revision: 38199
> >>
> >> Log:
> >> Remove some "format not a string literal, argument types not
> >> checked" warnings,
> >> and simplify a few format strings while we're at it.
> >
> > Could you revert this change? Separation of " expected: %s" and "
> > actual: %s" messages allows to avoid the risk of inconsistent
> > translation of these messages and also reduces the amount of text
> > which need to be translated.
>
> It seems there is a tradeoff to be made here: Compilation warnings
> every time somebody compiles (and a slight runtime cost of allocating
> an separate format string when these errors occur) vs. a n-time
Compilation warnings are worth avoiding. A "runtime cost" involved in
printing an error message is not worth mentioning.
> translation cost for translators. Now, since I'm not a translator, I
> don't feel that pain very acutely, but it seems that a one-time
> translator cost is much more reasonable than a every-compile-time
> developer cost.
You could say that, but it's also important to give translators an
enjoyable and minimal task, to maximise the community's benefit of their
efforts.
> I also don't quite understand what the "risk" involved with
> inconsistent translation of these messages is. To help me better
> understand the translator's plight, could you elaborate? Do other
> translators have a feeling on this as well?
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));
- Julian
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2366412
Received on 2009-06-29 17:04:49 CEST