On 05/02/2013 04:45 PM, Mattias Engdegård wrote:
> It is quite annoying that some of the more common error messages, the
> 
> svn: invalid option: --gurgle
> 
> kind, are entirely untranslatable because they are printed directly by 
> APR which does not have any concept of translation at all. (This was 
> reported before but met with silence:
> http://svn.haxx.se/dev/archive-2008-05/1445.shtml)
> 
> It is not easy to fix it in a clean way; ideally, APR would return a 
> detailed error code together with the required string parameters, but 
> it doesn't. Even if we did change APR to that effect, it would be an 
> incompatibility requiring a new APR version for use with Subversion.
> 
> This patch, instead, installs an apr_getopt_err_fn_t, acting as a 
> replacement for fprintf. It is admittedly a hack, but quite a 
> localised one -- it doesn't foul up any other code -- and does not 
> have any negative effects that I can think of. In short, it should be 
> a strict improvement.
> 
> Should APR's getopt error strings change, all that will happen is that 
> they are shown untranslated, just like any other translated strings.

It's a hack, to be sure, but it doesn't strike me as one that carries a
particularly high penalty.  Plus, it's ultimately not much more of a hack
than we already employ in *much* more commonly executed code -- the code
which determines which of the svn_error_t's in the chain are "tracing
errors".  (See svn_error__is_tracing_link().)

+1 (from me, at least) to commit.  That said, I know danielsh voiced some
pretty strong opinions the opposite direction about this on IRC, so please
respect those and see if he's willing to budge before moving forward.

-- 
C. Michael Pilato <cmpil...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to