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

Re: [PATCH/RFC] inconsistent error messages for translation

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 27, 2011, 17:17 UTC
Message-ID
<7vr58n8vh1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110427122250.GA10919@jakstys.lt>
Motiejus Jakštys <desired.mta@gmail.com> writes:
Show 6 quoted lines
> There are lots of variants of the same message:
>
> msgid "cannot stat '%s'"
> msgid "failed to stat '%s'"
> msgid "failed to stat %s\n"
> msgid "Could not stat '%s'"

I am not sure what to do with the trailing LF (it may be a bug in the message written without being aware that die/warn will give their own LF at the end), but the first one ("cannot $verb '$name'") is preferred.

> Also same trivial fix:
> -		return error(_("path '%s' does not have all three versions"),
> +		return error(_("path '%s' does not have all 3 versions"),
I would not call this a "fix", though.  What problem does it solve?
Show 13 quoted lines
> diff --git a/builtin/grep.c b/builtin/grep.c
> index 10a1f65..24d19b8 100644
> --- a/builtin/grep.c
> +++ b/builtin/grep.c
> @@ -413,7 +413,7 @@ static void *load_file(const char *filename, size_t *sz)
>  	if (lstat(filename, &st) < 0) {
>  	err_ret:
>  		if (errno != ENOENT)
> -			error(_("'%s': %s"), filename, strerror(errno));
> +			error("'%s': %s", filename, strerror(errno));
>  		return NULL;
>  	}
>  	if (!S_ISREG(st.st_mode))

This hunk is a fix for mismarked message and is unrelated to the error message unification, no? I prefer to have only this part as a separate patch.

Previous: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?=
Message 2 of 2 in “inconsistent error messages for translation”
  1. inconsistent error messages for translation=?UTF-8?q?Motiejus=20Jak=C5=A1tys?=, Apr 27, 2011
  2. Junio C HamanoApr 27, 2011

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.