[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: Marcel Gosselin <marcel.gosselin_at_polymtl.ca>
Date: 2005-04-01 14:35:59 CEST

Patch updated with Peter's suggestions:
[[[

* subversion/clients/cmdline/info-cmd.c (print_info): Make a string
  localizable.
]]]

Marcel

Peter N. Lundblad a écrit :

>On Thu, 31 Mar 2005, Marcel Gosselin wrote:
>
>
>
>>Patch to make a string localizable
>>
>>Right now the string is half localized.
>>
>>We would still need ngettext to have perfect behavior but this change
>>should suffice for now
>>
>>[[[
>>* info-cmd.c: Make a string localizable
>>]]]
>>
>>
>>
>Should be:
>* subversion/clients/cmdline/info-cmd.c (print_info): Make a string
> localizable.
>
>
>Index: subversion/clients/cmdline/info-cmd.c
>===================================================================
>--- subversion/clients/cmdline/info-cmd.c (revision 13817)
>+++ 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 > 1)
>
>That test should be !=. Otherwise you'd get "0 line". (In this particular
>case, it doesn't matter, since it will never be 0, but it is more readable
>tohandle plurals in a consistent way.)
>
>
>Thanks,
>//Peter
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org
>
>
>

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));
         }
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 1 14:39:36 2005

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.