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

4 messages from 2021-05-09 to 2021-05-10. Participants: Alex Henrie, Eric Sunshine, Junio C Hamano.
Thread: https://gitlist.dev/t/55653

## Alex Henrie, 2021-05-09 21:22

Subject: [PATCH] graph: improve grammar of "invalid color" error message
Message-ID: <20210509212220.29557-1-alexhenrie24@gmail.com>
URL: https://gitlist.dev/e/20210509212220.29557-1-alexhenrie24%40gmail.com

```
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(-)

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, 2021-05-09 22:02

Subject: Re: [PATCH] graph: improve grammar of "invalid color" error message
Message-ID: <CAPig+cTm7rW7V2DasW2XTArHAY_91rxxm5QaF31U8rB1ZLXOvQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAPig%2BcTm7rW7V2DasW2XTArHAY_91rxxm5QaF31U8rB1ZLXOvQ%40mail.gmail.com
In-Reply-To: <20210509212220.29557-1-alexhenrie24@gmail.com>

```
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 ..."

```

## Alex Henrie, 2021-05-09 23:06

Subject: Re: [PATCH] graph: improve grammar of "invalid color" error message
Message-ID: <CAMMLpeRFjHNCUqzRhJZDuUA_CxsNvR-gn4-Mb6kmNQSZ4L8y6g@mail.gmail.com>
URL: https://gitlist.dev/e/CAMMLpeRFjHNCUqzRhJZDuUA_CxsNvR-gn4-Mb6kmNQSZ4L8y6g%40mail.gmail.com
In-Reply-To: <CAPig+cTm7rW7V2DasW2XTArHAY_91rxxm5QaF31U8rB1ZLXOvQ@mail.gmail.com>

```
On Sun, May 9, 2021 at 4:03 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> 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, 2021-05-10 06:10

Subject: Re: [PATCH] graph: improve grammar of "invalid color" error message
Message-ID: <xmqqy2cnqftm.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqy2cnqftm.fsf%40gitster.g
In-Reply-To: <CAPig+cTm7rW7V2DasW2XTArHAY_91rxxm5QaF31U8rB1ZLXOvQ@mail.gmail.com>

```
Eric Sunshine <sunshine@sunshineco.com> writes:

> 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.

```
