You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Marcel Gosselin <ma...@polymtl.ca> on 2005/04/01 03:06:43 UTC
[PATCH] Make a string localizable
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
Marcel
[[[
* info-cmd.c: Make a string localizable
]]]
Re: [PATCH] Make a string localizable
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Fri, 1 Apr 2005, Marcel Gosselin wrote:
> Patch updated with Peter's suggestions:
> [[[
>
> * subversion/clients/cmdline/info-cmd.c (print_info): Make a string
> localizable.
> ]]]
>
As someone pointed out, this was not entirely correct. Anyway, I did this
fix and changed it in other places to be consistent. Committed in r13836.
Thanks,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Make a string localizable
Posted by "Brian W. Fitzpatrick" <fi...@collab.net>.
On Fri, 2005-04-01 at 18:47 +0100, Philip Martin wrote:
> "Brian W. Fitzpatrick" <fi...@collab.net> writes:
>
> > On Fri, 2005-04-01 at 16:24 +0100, Julian Foad wrote:
> >> C. Michael Pilato wrote:
> >> > Here's an idea:
> >> >
> >> > Lock Comment (%i line(s)):
> >>
> >> Eww. I've seen that notation for years, and I still find it horribly ugly.
> >> I'd prefer "(%i lines)" and just accept that when the number is 1 the resulting
> >> "(1 lines)" is less than perfect English.
> >
> > I hate to see either
> >
> > 1 lines
> >
> > or
> >
> > 1 line(s)
>
> These things are not complete sentences, so how about
>
> Lock Comment (lines: %i)
Still hate it.
-Fitz, comfortable with his pet peeves
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Make a string localizable
Posted by Philip Martin <ph...@codematters.co.uk>.
"Brian W. Fitzpatrick" <fi...@collab.net> writes:
> On Fri, 2005-04-01 at 16:24 +0100, Julian Foad wrote:
>> C. Michael Pilato wrote:
>> > Here's an idea:
>> >
>> > Lock Comment (%i line(s)):
>>
>> Eww. I've seen that notation for years, and I still find it horribly ugly.
>> I'd prefer "(%i lines)" and just accept that when the number is 1 the resulting
>> "(1 lines)" is less than perfect English.
>
> I hate to see either
>
> 1 lines
>
> or
>
> 1 line(s)
These things are not complete sentences, so how about
Lock Comment (lines: %i)
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Make a string localizable
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Fri, 1 Apr 2005, Brian W. Fitzpatrick wrote:
> On Fri, 2005-04-01 at 16:24 +0100, Julian Foad wrote:
> > C. Michael Pilato wrote:
> > > Here's an idea:
> > >
> I hate to see either
>
> 1 lines
>
> or
>
> 1 line(s)
>
> I think it show laziness and a lack of attention to detail on the part
> of the programmer (or programmers) that wrote the code.
>
Of course there is no reason to have any of the above. The fact that there
are languages with more than two plural froms doesn't mean we can't be
correct for languages with 1 or two (1 meaning no plurals). We don't have
ngettext, but that's not our fault:-)
I'm doing this fix once and for all.
Regards,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Make a string localizable
Posted by "Brian W. Fitzpatrick" <fi...@collab.net>.
On Fri, 2005-04-01 at 16:24 +0100, Julian Foad wrote:
> C. Michael Pilato wrote:
> > Here's an idea:
> >
> > Lock Comment (%i line(s)):
>
> Eww. I've seen that notation for years, and I still find it horribly ugly.
> I'd prefer "(%i lines)" and just accept that when the number is 1 the resulting
> "(1 lines)" is less than perfect English.
I hate to see either
1 lines
or
1 line(s)
I think it show laziness and a lack of attention to detail on the part
of the programmer (or programmers) that wrote the code.
It's all in the details.
-Fitz
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Make a string localizable
Posted by Julian Foad <ju...@btopenworld.com>.
C. Michael Pilato wrote:
> Here's an idea:
>
> Lock Comment (%i line(s)):
Eww. I've seen that notation for years, and I still find it horribly ugly.
I'd prefer "(%i lines)" and just accept that when the number is 1 the resulting
"(1 lines)" is less than perfect English.
(And I acknowledge your other comment about whether this is any more localisable.)
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Make a string localizable
Posted by "C. Michael Pilato" <cm...@collab.net>.
"C. Michael Pilato" <cm...@collab.net> writes:
> 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?
Of course, I mean "easier to localize" in that there is only one
string to mess with. My ignorance of languages is apparent, though,
as I have no idea if all languages use the "optional plurality marking
's'" *kind* of thing routinely. My guess is "not".
Looks like it's going to be one of those "C-Mike is a source of noise"
days...
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Make a string localizable
Posted by "C. Michael Pilato" <cm...@collab.net>.
Julian Foad <ju...@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
Re: [PATCH] Make a string localizable
Posted by Julian Foad <ju...@btopenworld.com>.
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.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Make a string localizable
Posted by Marcel Gosselin <ma...@polymtl.ca>.
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
>
>
>
Re: [PATCH] Make a string localizable
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
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