threads / patch / 55653

patchgraph: improve grammar of "invalid color" error message

Subject: [PATCH] graph: improve grammar of "invalid color" error message

## tl;dr

4 messages between May 9, 2021 and May 10, 2021. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Alex Henrie· May 9, 2021, 21:22 UTC · lore

Without the "d", it sounds like a command, not an error, and is liable to be translated incorrectly.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
---
 graph.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to graph.c +1 −1
diff --git a/graph.c b/graph.c
index c128ad0cce..e3828eb8f2 100644
--- a/graph.c
+++ b/graph.c
@@ -95,7 +95,7 @@ static void parse_graph_colors_config(struct strvec *colors, const char *string)
 		if (!color_parse_mem(start, comma - start, color))
 			strvec_push(colors, color);
 		else
-			warning(_("ignore invalid color '%.*s' in log.graphColors"),
+			warning(_("ignored invalid color '%.*s' in log.graphColors"),
 				(int)(comma - start), start);
 		start = comma + 1;
 	}
-- 
2.31.1
Eric Sunshine· May 9, 2021, 22:02 UTC · re: Alex Henrie · lore

Re: [PATCH] graph: improve grammar of "invalid color" error message

On Sun, May 9, 2021 at 5:23 PM Alex Henrie <alexhenrie24@gmail.com> wrote:
Show 9 quoted lines
> Without the "d", it sounds like a command, not an error, and is liable
> to be translated incorrectly.
>
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> ---
> diff --git a/graph.c b/graph.c
> @@ -95,7 +95,7 @@ static void parse_graph_colors_config(struct strvec *colors, const char *string)
> -                       warning(_("ignore invalid color '%.*s' in log.graphColors"),
> +                       warning(_("ignored invalid color '%.*s' in log.graphColors"),
Another possibility: "ignoring invalid color ... in ..."
Even better: "invalid color ... in ..."
Alex Henrie· May 9, 2021, 23:06 UTC · re: Eric Sunshine · lore

Re: [PATCH] graph: improve grammar of "invalid color" error message

On Sun, May 9, 2021 at 4:03 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 15 quoted lines
>
> On Sun, May 9, 2021 at 5:23 PM Alex Henrie <alexhenrie24@gmail.com> wrote:
> > Without the "d", it sounds like a command, not an error, and is liable
> > to be translated incorrectly.
> >
> > Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> > ---
> > diff --git a/graph.c b/graph.c
> > @@ -95,7 +95,7 @@ static void parse_graph_colors_config(struct strvec *colors, const char *string)
> > -                       warning(_("ignore invalid color '%.*s' in log.graphColors"),
> > +                       warning(_("ignored invalid color '%.*s' in log.graphColors"),
>
> Another possibility: "ignoring invalid color ... in ..."
>
> Even better: "invalid color ... in ..."
Any of those would be fine. I don't have a strong opinion.
-Alex
Junio C Hamano· May 10, 2021, 06:10 UTC · re: Eric Sunshine · lore

Re: [PATCH] graph: improve grammar of "invalid color" error message

Eric Sunshine <sunshine@sunshineco.com> writes:
Show 14 quoted lines
> On Sun, May 9, 2021 at 5:23 PM Alex Henrie <alexhenrie24@gmail.com> wrote:
>> Without the "d", it sounds like a command, not an error, and is liable
>> to be translated incorrectly.
>>
>> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
>> ---
>> diff --git a/graph.c b/graph.c
>> @@ -95,7 +95,7 @@ static void parse_graph_colors_config(struct strvec *colors, const char *string)
>> -                       warning(_("ignore invalid color '%.*s' in log.graphColors"),
>> +                       warning(_("ignored invalid color '%.*s' in log.graphColors"),
>
> Another possibility: "ignoring invalid color ... in ..."
>
> Even better: "invalid color ... in ..."

The last one, if it does not say what we did to that invalid thing, is not as helpful as Alex's or your "another possibility".

Betweein "ignored" vs "ignoring", I do not have a preference, but whichever one is more prevalent in our existing messages should be used, I would think.

Thanks.

← back to recent threads