threads / discuss / 33184

Re: Delivery Status Notification (Failure)

Subject: Re: Delivery Status Notification (Failure)

## tl;dr

3 messages between Mar 14, 2013 and Mar 14, 2013.

replies: 2people: 2as markdown or json

Harring Figueiredo· Mar 14, 2013, 22:01 UTC · lore
Hello folks,
 Just want to confirm that this is not a bug:
 <code>
 bunde.c: 443
  printf_ln(Q_("The bundle requires this ref",
                                      "The bundle requires these %d refs",
                                      r->nr),
                                   r->nr);
 </code>
 seems to be missing %d parameter on the first message.
 Please let me know if this is a bug or if it indeed should be like this.
 I am not a expert on gettext :-(
 Thank you!
 -hff
Junio C Hamano· Mar 14, 2013, 22:12 UTC · re: Harring Figueiredo · lore
Harring Figueiredo <harringf@gmail.com> writes:
Show 8 quoted lines
>  Just want to confirm that this is not a bug:
> ...
>   printf_ln(Q_("The bundle requires this ref",
>                                       "The bundle requires these %d refs",
>                                       r->nr),
>                                    r->nr);
> ...
>  seems to be missing %d parameter on the first message.
Perhaps visit
	http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms

look for "In the English singular case,..." and read the explanation there?

Harring Figueiredo· Mar 14, 2013, 23:36 UTC · re: Junio C Hamano · lore
Got it!
From the recommended site:

-- In the English singular case, the number – always 1 – can be replaced with "one":

          printf (ngettext ("One file removed", "%d files removed", n), n);
This works because the ‘printf’ function discards excess arguments
that are not consumed by the format string.
--
Junio, thank you so much for the  reply and link to the docs.
-hff
On Thu, Mar 14, 2013 at 6:12 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 18 quoted lines
> Harring Figueiredo <harringf@gmail.com> writes:
>
>>  Just want to confirm that this is not a bug:
>> ...
>>   printf_ln(Q_("The bundle requires this ref",
>>                                       "The bundle requires these %d refs",
>>                                       r->nr),
>>                                    r->nr);
>> ...
>>  seems to be missing %d parameter on the first message.
>
> Perhaps visit
>
>         http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms
>
> look for "In the English singular case,..." and read the
> explanation there?
>

← back to recent threads