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.