public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Vasco Almeida <vascomalmeida@sapo•pt>
Cc: git@vger•kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail•com>
Subject: Re: [PATCH v3] i18n: notes: mark comment for translation
Date: Wed, 27 Jul 2016 12:33:31 -0700	[thread overview]
Message-ID: <xmqq7fc6x4dw.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1469616819.1858.25.camel@sapo.pt> (Vasco Almeida's message of "Wed, 27 Jul 2016 10:53:39 +0000")

Vasco Almeida <vascomalmeida@sapo•pt> writes:

> A Ter, 26-07-2016 às 09:57 -0700, Junio C Hamano escreveu:
>> Vasco Almeida <vascomalmeida@sapo•pt> writes:
>> 
>> > 
>> > +		strbuf_add_commented_lines(&buf, "\n",
>> > strlen("\n"));
>> > +		strbuf_add_commented_lines(&buf, _(note_template),
>> > strlen(_(note_template)));
>> > +		strbuf_add_commented_lines(&buf, "\n",
>> > strlen("\n"));
>> 
>> Hmm, do we really need to make three separate calls?
>
> This patch does (1)
>
> #
> # Write/edit the notes for the following object:
> #
>
> The original source does (2)
>
> #
> # Write/edit the notes for the following object:
>
> How do we want, (1) or (2) ?

As I said earlier I was misreading the original one.

The input to strbuf_add_commented_lines() actually is a string that
uses LF as a record terminator and asks the function to output each
record on its own line prefixed with either "#" or "# ", so I should
have considered the last LF as part of the second line.

In other words, the output should be as if you just did

-	"\nWrite/edit the notes for the following object:\n";
+	N_("\nWrite/edit the notes for the following object:\n");

in your patch, i.e. (2).

Thanks.

  reply	other threads:[~2016-07-27 19:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-23 14:10 [PATCH v2] i18n: notes: mark comment for translation Vasco Almeida
2016-07-25 17:49 ` Junio C Hamano
2016-07-26 12:16   ` Vasco Almeida
2016-07-26 17:05     ` Junio C Hamano
2016-07-27 10:40       ` Vasco Almeida
2016-07-26 12:16 ` [PATCH v3] " Vasco Almeida
2016-07-26 16:57   ` Junio C Hamano
2016-07-27 10:53     ` Vasco Almeida
2016-07-27 19:33       ` Junio C Hamano [this message]
2016-07-28 11:26 ` [PATCH v4] " Vasco Almeida
2016-07-28 16:09   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7fc6x4dw.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=avarab@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=vascomalmeida@sapo$(echo .)pt \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox