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

Re: Translation problems with string constants

From: <kfogel_at_collab.net>
Date: 2004-04-26 17:06:18 CEST

"Erik Huelsmann" <e.huelsmann@gmx.net> writes:
> There are several cases in which string constants stand in the way of easy
> translation. The first being parametrised strings; I'd like to solve those
> this way:
> - SVN_PROP_REVISION_AUTHOR " contains a newline")
> + N_("svn:author contains a newline"))
> +
> Anybody who deems this unacceptable?
> An other being the format strings like SVN_REVNUM_T_FMT; those can be solved
> by introducing functions which do the revnum -> string formatting and having
> the SVN_REVNUM_T_FMT (and friends) replaced with %s.
> There are two possible solutions to stringify the information:
> 1) Add macros
> 2) Add (inline) functions
> In both cases the question is: where?

Is there some way to generalize the SVN_REVNUM_T_FMT solution so it
can be used for generic strings like SVN_PROP_REVISION_AUTHOR as well?

As far as where, I think (sigh) libsvn_subr is probably the place,

> My preferance would be (public) macros because they do not require linking
> any specific library.

... unless you can do it with macros :-), in which case svn_types.h
might be the place? (svn_subst.h is tempting, but it's really about
Subversion doing substitutions on user data, not Subversion developers
doing substitutions on Subversion's own code.)


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 26 18:18:48 2004

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.