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

Re: [PATCH v2 09/14] i18n: notes: mark error messages for translation

From
Vasco Almeida <vascomalmeida@sapo.pt>
Date
Sep 13, 2016, 16:35 UTC
Message-ID
<1473784505.7329.18.camel@sapo.pt>
In-Reply-To
<83f72924-9a9d-dc1c-109f-341f0cd7ac96@free.fr>
A Seg, 12-09-2016 às 14:23 +0200, Jean-Noël Avila escreveu:
Show 35 quoted lines
> Le 12/09/2016 à 13:29, Vasco Almeida a écrit :
> > 
> > Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
> > ---
> >  builtin/notes.c | 18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> > 
> > diff --git a/builtin/notes.c b/builtin/notes.c
> > index f848b89..abacae2 100644
> > --- a/builtin/notes.c
> > +++ b/builtin/notes.c
> > @@ -340,7 +340,7 @@ static struct notes_tree
> > *init_notes_check(const char *subcommand,
> >  
> >  	ref = (flags & NOTES_INIT_WRITABLE) ? t->update_ref : t-
> > >ref;
> >  	if (!starts_with(ref, "refs/notes/"))
> > -		die("Refusing to %s notes in %s (outside of
> > refs/notes/)",
> > +		die(_("Refusing to %s notes in %s (outside of
> > refs/notes/)"),
> >  		    subcommand, ref);
> >  	return t;
> >  }
> 
> Not sure this one will be easy to localize. The verb is passed as a
> parameter : see line 366 "list", line 426 "add", line 517 "copy",
> line
> 658 "show", line 816 "merge", line 908 "remove" or line 595 with
> argv[0].
> 
> If all the verbs are real subcommands, then the translators should be
> warned that this is some english twisting, but that they need to
> refer
> to the subcommand on the command line.

Yes, these verbs are git notes subcommands. I will add a Translators comment to it explaining so. Or we can unfold that error messages like

if (!strcmp(subcommand, "add")
	die(_("Refusing to add notes in %s (outside of refs/notes/)"),
ref);
elseif ...
else
	die(_("Refusing to %s notes in %s (outside of refs/notes/)"),
subcommand, ref);

This is more verbose but translations would benefit from it being more natural. What do we prefer: (1) concise source and a little unnatural translations or (2) verbose code and natural translations?

Compare, imaging that English is a target translation language, the user would read: "Refusing to do add of notes in /path [...]" (1) "Refusing do add notes in /path [...]" (2)

Show 5 quoted lines
> Otherwise,
> 
> Acked-by: Jean-Noël Avila <jean-noel.avila@free.fr>
> 
> JN
Previous: Jean-Noël AvilaNext: Jean-Noël AVILA
Message 16 of 26 in “i18n: apply: mark plural string for translation”
  1. 01/14 i18n: apply: mark plural string for translationVasco Almeida, Sep 12, 2016
  2. 06/14 i18n: config: mark error message for translationVasco Almeida, Sep 12, 2016
  3. 10/14 notes: lowercase first word of error messagesVasco Almeida, Sep 12, 2016
  4. 02/14 i18n: apply: mark error messages for translationVasco Almeida, Sep 12, 2016
  5. 04/14 i18n: blame: mark error messages for translationVasco Almeida, Sep 12, 2016
  6. 03/14 i18n: apply: mark info messages for translationVasco Almeida, Sep 12, 2016
  7. 05/14 i18n: branch: mark option description for translationVasco Almeida, Sep 12, 2016
  8. 07/14 i18n: merge-recursive: mark error messages for translationVasco Almeida, Sep 12, 2016
  9. Jean-Noël AvilaSep 12, 2016
  10. Junio C HamanoSep 12, 2016
  11. Junio C HamanoSep 12, 2016
  12. Vasco AlmeidaSep 13, 2016
  13. 08/14 i18n: merge-recursive: mark verbose message for translationVasco Almeida, Sep 12, 2016
  14. 09/14 i18n: notes: mark error messages for translationVasco Almeida, Sep 12, 2016
  15. Jean-Noël AvilaSep 12, 2016
  16. Vasco AlmeidaSep 13, 2016
  17. Jean-Noël AVILASep 13, 2016
  18. Junio C HamanoSep 13, 2016
  19. 12/14 i18n: show-branch: mark error messages for translationVasco Almeida, Sep 12, 2016
  20. Jean-Noël AvilaSep 12, 2016
  21. Junio C HamanoSep 12, 2016
  22. Jean-Noël AVILASep 12, 2016
  23. Junio C HamanoSep 12, 2016
  24. 11/14 i18n: receive-pack: mark messages for translationVasco Almeida, Sep 12, 2016
  25. 13/14 i18n: update-index: mark warnings for translationVasco Almeida, Sep 12, 2016
  26. 14/14 i18n: show-branch: mark plural strings for translationVasco Almeida, Sep 12, 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.