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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A Seg, 12-09-2016 às 14:23 +0200, Jean-Noël Avila escreveu:
> Le 12/09/2016 à 13:29, Vasco Almeida a écrit :
> > 
> > Signed-off-by: Vasco Almeida <vascomalmeida@xxxxxxx>
> > ---
> >  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)

> Otherwise,
> 
> Acked-by: Jean-Noël Avila <jean-noel.avila@xxxxxxx>
> 
> JN



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]