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

Re: [PATCH] parse-options: print "fatal:" before usage_msg_opt()

From
Jeff King <peff@peff.net>
Date
Dec 19, 2016, 14:32 UTC
Message-ID
<20161219143231.nh54e4cebxttvtav@sigill.intra.peff.net>
In-Reply-To
<CACsJy8AswJb1wzV+mcQ3HXrib3HRtVje7PPd9AWPE9Bi32_2sw@mail.gmail.com>
On Mon, Dec 19, 2016 at 09:30:09PM +0700, Duy Nguyen wrote:
Show 26 quoted lines
> On Mon, Dec 19, 2016 at 9:05 PM, Jeff King <peff@peff.net> wrote:
> > On Mon, Dec 19, 2016 at 08:53:30PM +0700, Duy Nguyen wrote:
> >
> >> >> Your commit message does not make clear if you want this "fatal" to be
> >> >> grep-able (by scripts) or not. If not, please _() the string.  Maybe
> >> >> this to reduce work for translators
> >> >>
> >> >>       /* TRANSLATORS: this is the prefix before usage error */
> >> >>       fprintf(stderr, "%s %s\n\n", _("fatal:"), msg);
> >> >
> >> > I don't think we translate any of our "fatal:", "error:", etc, do we?
> >> > It certainly doesn't look like it in usage.c.
> >>
> >> I know. But those existed before the l10n starts, some of those belong
> >> to plumbing messages. This one is new.
> >
> > We add lots of new messages which are themselves translated, and they
> > still get untranslated prefixes. It seems like consistency is more
> > important than translating this one spot. But then, I do not use a
> > translated git myself, so I would not see the difference either way.
> 
> I'm kinda used to the half English half Vietnamese messages after so
> many years (not just git). I do like the prefix translated as well.
> But I guess we could leave this a is for now. At least we know the
> scope of this message and will have easier time i18n-izing it when we
> do the same for die(), warning() and friends.

Yeah. It's a big enough change that at the very least it should go into its own patch. I don't have a strong opinion myself, except that if we want to leave plumbing messages completely grep-able, we probably need to distinguish between different calls to die(), etc. Which sounds kind of nasty.

I dunno. I _thought_ nobody was supposed to be grepping stderr, even for plumbing commands. But maybe that does not match reality.

-Peff
Previous: Duy Nguyen
Message 8 of 8 in “parse-options: print "fatal:" before usage_msg_opt()”
  1. parse-options: print "fatal:" before usage_msg_opt()Jeff King, Dec 14, 2016
  2. Junio C HamanoDec 14, 2016
  3. Duy NguyenDec 19, 2016
  4. Jeff KingDec 19, 2016
  5. Duy NguyenDec 19, 2016
  6. Jeff KingDec 19, 2016
  7. Duy NguyenDec 19, 2016
  8. Jeff KingDec 19, 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.