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

Re: svn commit: r28504 - branches/reintegrate/subversion/libsvn_fs_fs

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-12-16 20:36:31 CET

On Dec 16, 2007 11:33 AM, Erik Huelsmann <ehuels@gmail.com> wrote:
>
> On Dec 16, 2007 7:02 PM, Blair Zajac <blair@orcaware.com> wrote:
> >
> > Erik Huelsmann wrote:
> > > On Dec 15, 2007 10:12 PM, <blair@tigris.org> wrote:
> > >> Author: blair
> > >> Date: Sat Dec 15 13:12:07 2007
> > >> New Revision: 28504
> > >>
> > >> Log:
> > >> Instead of using %llu for a apr_int64_t, use APR_INT64_T_FMT which
> > >> works correctly with 64-bit compiles.
> > >>
> > >> * subversion/libsvn_fs_fs/dag.c
> > >> (svn_fs_fs__dag_increment_mergeinfo_count):
> > >> s/llu/APR_INT64_T_FMT/g.
> > >>
> > >>
> > >> Modified:
> > >> branches/reintegrate/subversion/libsvn_fs_fs/dag.c
> > >>
> > >> Modified: branches/reintegrate/subversion/libsvn_fs_fs/dag.c
> > >> URL: http://svn.collab.net/viewvc/svn/branches/reintegrate/subversion/libsvn_fs_fs/dag.c?pathrev=28504&r1=28503&r2=28504
> > >> ==============================================================================
> > >> --- branches/reintegrate/subversion/libsvn_fs_fs/dag.c (original)
> > >> +++ branches/reintegrate/subversion/libsvn_fs_fs/dag.c Sat Dec 15 13:12:07 2007
> > >> @@ -528,7 +528,7 @@
> > >> return svn_error_createf
> > >> (SVN_ERR_FS_CORRUPT, NULL,
> > >> _("Can't increment mergeinfo count on node-revision %s to negative "
> > >> - "value %llu"),
> > >> + "value %" APR_INT64_T_FMT),
> > >> idstr->data, noderev->mergeinfo_count);
> > >
> > > You can't include format specifiers in translatable strings because
> > > xgettext (the translatable string extractor) chokes on it.
> > >
> > > The right way to do it would be to
> > > _("value %s"), apr_psprintf("%" APR_INT64_T_FMT, noderev->mergeinfo_count)
> >
> > It would be nicer to have xgettext use cpp on the source code before processing
> > it. Is there a way we can do that?
>
> Unfortunately not: the APR_*_FMT macros expand to different strings on
> different platforms (one has "lu", the other "llu", afaik). This fact
> makes the actual string appear differently on different platforms.
> This would render it impossible to create a translation for it,
> because input strings are hashed and then used to look up the
> translated string from the dictionary.
>
> So, the way we've been doing it (using the %s placeholder) is pretty
> much the only way to do this portably while still taking advantage of
> the APR_*_FMT constants...
>
> Hope that explains it a bit.

Arguably, xgettext could do something along the lines of
  s/%(d|ll|llu|etc...)/%NUMBER/
before it hashes or something...

Maybe this activates the SEP field though.

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 16 20:36:42 2007

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.