Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:06

Motiejus Jakštys [off-list ref] writes:
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?
quoted hunk
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help