diff mbox series

graph: improve grammar of "invalid color" error message

Message ID 20210509212220.29557-1-alexhenrie24@gmail.com (mailing list archive)
State Accepted
Commit 98538307876ab9565c24d45bce6b5302f99fec0b
Headers show
Series graph: improve grammar of "invalid color" error message | expand

Commit Message

Alex Henrie May 9, 2021, 9:22 p.m. UTC
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(-)

Comments

Eric Sunshine May 9, 2021, 10:02 p.m. UTC | #1
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 May 9, 2021, 11:06 p.m. UTC | #2
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 May 10, 2021, 6:10 a.m. UTC | #3
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.
diff mbox series

Patch

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;
 	}