Thread (1 message) 1 message, 1 author, 2016-07-27

Re: [PATCH v3] i18n: notes: mark comment for translation

From: Junio C Hamano <hidden>
Date: 2016-07-27 19:33:41

Vasco Almeida [off-list ref] writes:
A Ter, 26-07-2016 às 09:57 -0700, Junio C Hamano escreveu:
quoted
Vasco Almeida [off-list ref] writes:
quoted
+		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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help