git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] i18n: notes: mark comment for translation
@ 2016-07-21 10:07 Vasco Almeida
  2016-07-21 10:45 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 2+ messages in thread
From: Vasco Almeida @ 2016-07-21 10:07 UTC (permalink / raw)
  To: git; +Cc: Vasco Almeida

Mark comment displayed when editing a note for translation.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
---
 builtin/notes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/notes.c b/builtin/notes.c
index 0572051..37933bd 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -91,7 +91,7 @@ static const char * const git_notes_get_ref_usage[] = {
 };
 
 static const char note_template[] =
-	"\nWrite/edit the notes for the following object:\n";
+	N_("\nWrite/edit the notes for the following object:\n");
 
 struct note_data {
 	int given;
@@ -179,7 +179,7 @@ static void prepare_note_data(const unsigned char *object, struct note_data *d,
 			copy_obj_to_fd(fd, old_note);
 
 		strbuf_addch(&buf, '\n');
-		strbuf_add_commented_lines(&buf, note_template, strlen(note_template));
+		strbuf_add_commented_lines(&buf, _(note_template), strlen(_(note_template)));
 		strbuf_addch(&buf, '\n');
 		write_or_die(fd, buf.buf, buf.len);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i18n: notes: mark comment for translation
  2016-07-21 10:07 [PATCH] i18n: notes: mark comment for translation Vasco Almeida
@ 2016-07-21 10:45 ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 2+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2016-07-21 10:45 UTC (permalink / raw)
  To: Vasco Almeida; +Cc: Git

On Thu, Jul 21, 2016 at 12:07 PM, Vasco Almeida <vascomalmeida@sapo.pt> wrote:
> Mark comment displayed when editing a note for translation.

I'm not sure, but wouldn't this make more sense:

> Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
> ---
>  builtin/notes.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/notes.c b/builtin/notes.c
> index 0572051..37933bd 100644
> --- a/builtin/notes.c
> +++ b/builtin/notes.c
> @@ -91,7 +91,7 @@ static const char * const git_notes_get_ref_usage[] = {
>  };
>
>  static const char note_template[] =
> -       "\nWrite/edit the notes for the following object:\n";
> +       N_("\nWrite/edit the notes for the following object:\n");
+       N_("Write/edit the notes for the following object:");
>
>  struct note_data {
>         int given;
> @@ -179,7 +179,7 @@ static void prepare_note_data(const unsigned char *object, struct note_data *d,
>                         copy_obj_to_fd(fd, old_note);
>
>                 strbuf_addch(&buf, '\n');
+                 strbuf_addch(&buf, '\n');
> -               strbuf_add_commented_lines(&buf, note_template, strlen(note_template));
> +               strbuf_add_commented_lines(&buf, _(note_template), strlen(_(note_template)));
+                 strbuf_addch(&buf, '\n');
>                 strbuf_addch(&buf, '\n');
>                 write_or_die(fd, buf.buf, buf.len);

I.e. moving the starting and ending \n out of the message itself, the
surrounding whitespace doesn't seem like something the translators
need to modify, and if they were to trim it it looks like it would
break the output a bit.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-21 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-21 10:07 [PATCH] i18n: notes: mark comment for translation Vasco Almeida
2016-07-21 10:45 ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).