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

Re: [PATCH] Make a string localizable

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2005-04-01 15:53:30 CEST

Julian Foad <julianfoad@btopenworld.com> writes:

> Marcel Gosselin wrote:
> > Patch updated with Peter's suggestions:
> [...]
> > Index: subversion/clients/cmdline/info-cmd.c
> > ===================================================================
> > --- subversion/clients/cmdline/info-cmd.c (revision 13824)
> > +++ subversion/clients/cmdline/info-cmd.c (working copy)
> > @@ -202,9 +202,10 @@
> > /* NOTE: The stdio will handle newline translation. */
> > comment_lines = svn_cstring_count_newlines (info->lock->comment) + 1;
> > SVN_ERR (svn_cmdline_printf (pool,
> > - _("Lock Comment (%i %s):\n%s\n"),
> > + (comment_lines != 0)
> > + ? _("Lock Comment (%i lines):\n%s\n")
> > + : _("Lock Comment (%i line):\n%s\n"),
> > comment_lines, -
> > (comment_lines > 1) ? "lines" : "line",
> > info->lock->comment));
> > }
> > }
>
>
> Still wrong. Should output "0 lines", "1 line", "2 lines", "3
> lines", etc.

Here's an idea:

   Lock Comment (%i line(s)):

And skip all the integer testing jazz altogether. Wouldn't that be
easier to localize, and easier to grep for in output, anyway?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 1 15:57:54 2005

This is an archived mail posted to the Subversion Dev mailing list.