git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 21, 2016, 10:45 UTC
Message-ID
<CACBZZX51K=D2gYbzKvJW3B5=bzxEGGFhOc6TkAfJkkpdYuEt0w@mail.gmail.com>
In-Reply-To
<1469095670-3834-1-git-send-email-vascomalmeida@sapo.pt>
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:
Show 15 quoted lines
> 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:");
Show 7 quoted lines
>
>  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.

Previous: Vasco Almeida
Message 2 of 2 in “i18n: notes: mark comment for translation”
  1. i18n: notes: mark comment for translationVasco Almeida, Jul 21, 2016
  2. Ævar Arnfjörð BjarmasonJul 21, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.