You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mattias Engdegård <ma...@bredband.net> on 2013/04/13 23:27:41 UTC

[PATCH] Proper plural localisation of conflict summary

This is a good example of how a string that does not distinguish  
between singular and plural in English still needs to be localised in  
a number-aware way:

        SVN_ERR(svn_cmdline_printf(scratch_pool,
          _("  Text conflicts: %d remaining (and %d already resolved) 
\n"),
          n_text, n_text_r));

In general, the actual numbers must agree with the phrases. Strictly  
speaking that may also be the case for strings like

"Text conflicts: %d"

but we can probably get away without doing so, since the text before  
the colon is considered to be a quantity-independent label, not a part  
of the same phrase. The patch does not change these strings.

[[[
Use correct grammatical number localisation for conflict summary
messages.

* subversion/svn/notify.c
   (report_conflicts_remaining_and_resolved): New.
   (svn_cl__notifier_print_conflict_stats):
    Call report_conflicts_remaining_and_resolved for number-aware
    localisation of messages.
]]]

Re: _("%s: %s\n") was: Re: [PATCH] Proper plural localisation of conflict summary

Posted by Mattias Engdegård <ma...@bredband.net>.
17 apr 2013 kl. 00.39 skrev Daniel Shahaf:

> Nice.  I suppose that means we now have a bunch of places where _()
> should be added --- such as svn_cl__info_print_time().  I am not quite
> sure how to find all of them, other than by using a finished  
> translation
> and then looking for English or mis-punctuated output.

Perhaps -- I may have a look at them later. This particular patch was  
entirely about allowing for correct grammar in the translations, which  
is much more important.


_("%s: %s\n") was: Re: [PATCH] Proper plural localisation of conflict summary

Posted by Daniel Shahaf <da...@elego.de>.
Mattias Engdegård wrote on Tue, Apr 16, 2013 at 23:03:04 +0200:
> 16 apr 2013 kl. 20.28 skrev C. Michael Pilato:
>
>>> So, what about applying, approving or rejecting the patch?
>>> (The one of http://svn.haxx.se/dev/archive-2013-04/0339.shtml)
>>> It's required for at least one translation and very likely for  
>>> several more.
>>> It does not change the English output in any way.
>>
>> +1 to commit that patch, Matthias.
>
>
> Thank you; done in r1468565.

Nice.  I suppose that means we now have a bunch of places where _()
should be added --- such as svn_cl__info_print_time().  I am not quite
sure how to find all of them, other than by using a finished translation
and then looking for English or mis-punctuated output.

Re: [PATCH] Proper plural localisation of conflict summary

Posted by Mattias Engdegård <ma...@bredband.net>.
16 apr 2013 kl. 20.28 skrev C. Michael Pilato:

>> So, what about applying, approving or rejecting the patch?
>> (The one of http://svn.haxx.se/dev/archive-2013-04/0339.shtml)
>> It's required for at least one translation and very likely for  
>> several more.
>> It does not change the English output in any way.
>
> +1 to commit that patch, Matthias.


Thank you; done in r1468565.


Re: [PATCH] Proper plural localisation of conflict summary

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 04/16/2013 01:59 PM, Mattias Engdegård wrote:
> 14 apr 2013 kl. 19.35 skrev Ben Reser:
> 
>> Agreed I really don't see any reason not to fix these.  Yes we've been
>> sloppy with these sorts of localization issues in the past, doesn't
>> mean we should continue to do so.
> 
> So, what about applying, approving or rejecting the patch?
> (The one of http://svn.haxx.se/dev/archive-2013-04/0339.shtml)
> It's required for at least one translation and very likely for several more.
> It does not change the English output in any way.

+1 to commit that patch, Matthias.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development


Re: [PATCH] Proper plural localisation of conflict summary

Posted by Mattias Engdegård <ma...@bredband.net>.
14 apr 2013 kl. 19.35 skrev Ben Reser:

> Agreed I really don't see any reason not to fix these.  Yes we've been
> sloppy with these sorts of localization issues in the past, doesn't
> mean we should continue to do so.

So, what about applying, approving or rejecting the patch?
(The one of http://svn.haxx.se/dev/archive-2013-04/0339.shtml)
It's required for at least one translation and very likely for several  
more.
It does not change the English output in any way.


Re: [PATCH] Proper plural localisation of conflict summary

Posted by Ben Reser <be...@reser.org>.
On Sun, Apr 14, 2013 at 10:22 AM, Branko Čibej <br...@wandisco.com> wrote:
> I would argue that we should listen to our translators in matters like
> these.

Agreed I really don't see any reason not to fix these.  Yes we've been
sloppy with these sorts of localization issues in the past, doesn't
mean we should continue to do so.

Re: [PATCH] Proper plural localisation of conflict summary

Posted by Branko Čibej <br...@wandisco.com>.
On 14.04.2013 12:43, Mattias Engdegård wrote:
> 14 apr 2013 kl. 03.57 skrev Daniel Shahaf:
>
>> We don't usually translate strings that don't contain alphanumerics.  If
>> you want to translate those, no opinion here either way, but you'll
>> probably find a fair number of strings around the codebase to add _()
>> around.
>
> As you wish. I just noted this part of the gettext manual:
>
>   For example, ‘"%s"’ is an example of string not requiring
> translation. But ‘"%s: %d"’ does require translation, because in
> French, unlike in English, it's customary to put a space before a colon.

I would argue that we should listen to our translators in matters like
these.

-- Brane


-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com


Re: [PATCH] Proper plural localisation of conflict summary

Posted by Mattias Engdegård <ma...@bredband.net>.
14 apr 2013 kl. 03.57 skrev Daniel Shahaf:

> We don't usually translate strings that don't contain  
> alphanumerics.  If
> you want to translate those, no opinion here either way, but you'll
> probably find a fair number of strings around the codebase to add _()
> around.

As you wish. I just noted this part of the gettext manual:

   For example, �"%s"� is an example of string not requiring  
translation. But �"%s: %d"� does require translation, because in  
French, unlike in English, it's customary to put a space before a colon.

Anyway, here is a reformulated version without localised non-verbal  
strings.

[[[
Use correct grammatical number localisation for conflict summary
messages.

* subversion/svn/notify.c
   (resolved_str, remaining_str): New.
   (svn_cl__notifier_print_conflict_stats):
    Call resolved_str and remaining_str for number-aware
    localisation of messages.
]]]

Re: [PATCH] Proper plural localisation of conflict summary

Posted by Daniel Shahaf <da...@elego.de>.
Mattias Engdegård wrote on Sat, Apr 13, 2013 at 23:56:37 +0200:
> 13 apr 2013 kl. 23.47 skrev Daniel Shahaf:
>
>> Mattias Engdegård wrote on Sat, Apr 13, 2013 at 23:27:41 +0200:
>>> +  SVN_ERR(svn_cmdline_printf(pool, _("  %s: %s (%s)\n"),
>>> +                             prefix, remaining, resolved));
>>
>> Why is this marked for translation?
>
> To allow for variations in spacing, punctuation and bracketing. For  
> example, in French, a colon is typically preceded by a (non-breaking)  
> space.

We don't usually translate strings that don't contain alphanumerics.  If
you want to translate those, no opinion here either way, but you'll
probably find a fair number of strings around the codebase to add _()
around.

Re: [PATCH] Proper plural localisation of conflict summary

Posted by Mattias Engdegård <ma...@bredband.net>.
13 apr 2013 kl. 23.47 skrev Daniel Shahaf:

> Mattias Engdegård wrote on Sat, Apr 13, 2013 at 23:27:41 +0200:
>> +  SVN_ERR(svn_cmdline_printf(pool, _("  %s: %s (%s)\n"),
>> +                             prefix, remaining, resolved));
>
> Why is this marked for translation?

To allow for variations in spacing, punctuation and bracketing. For  
example, in French, a colon is typically preceded by a (non-breaking)  
space.


Re: [PATCH] Proper plural localisation of conflict summary

Posted by Daniel Shahaf <da...@elego.de>.
Mattias Engdegård wrote on Sat, Apr 13, 2013 at 23:27:41 +0200:
> +  SVN_ERR(svn_cmdline_printf(pool, _("  %s: %s (%s)\n"),
> +                             prefix, remaining, resolved));

Why is this marked for translation?

Looks good otherwise (including the MIME-type - thanks!).