[PATCH 7/7] i18n: factorize unrecognized options arguments messages
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
builtin/commit-graph.c | 2 +-
builtin/config.c | 2 +-
builtin/env--helper.c | 2 +-
builtin/gc.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index 51c4040ea6c..1a4c798f908 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -134,7 +134,7 @@ static int write_option_parse_split(const struct option *opt, const char *arg,
else if (!strcmp(arg, "replace"))
*flags = COMMIT_GRAPH_SPLIT_REPLACE;
else
- die(_("unrecognized --split argument, %s"), arg);
+ die(_("unrecognized %s argument '%s'"), "--split", arg);
return 0;
}
diff --git a/builtin/config.c b/builtin/config.c
index e7b88a9c08d..aaf87761e58 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -106,7 +106,7 @@ static int option_parse_type(const struct option *opt, const char *arg,
else if (!strcmp(arg, "color"))
new_type = TYPE_COLOR;
else
- die(_("unrecognized --type argument, %s"), arg);
+ die(_("unrecognized %s argument '%s'"), "--type", arg);
}
to_type = opt->value;
diff --git a/builtin/env--helper.c b/builtin/env--helper.c
index 27349098b07..e58e0de9a7b 100644
--- a/builtin/env--helper.c
+++ b/builtin/env--helper.c
@@ -24,7 +24,7 @@ static int option_parse_type(const struct option *opt, const char *arg,
else if (!strcmp(arg, "ulong"))
*cmdmode = ENV_HELPER_TYPE_ULONG;
else
- die(_("unrecognized --type argument, %s"), arg);
+ die(_("unrecognized %s argument '%s'"), "--type", arg);
return 0;
}
diff --git a/builtin/gc.c b/builtin/gc.c
index d512c127b99..1a9ee85a4d3 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -750,7 +750,7 @@ static int maintenance_opt_schedule(const struct option *opt, const char *arg,
*priority = parse_schedule(arg);
if (!*priority)
- die(_("unrecognized --schedule argument '%s'"), arg);
+ die(_("unrecognized %s argument '%s'"), "--schedule", arg);
return 0;
}
@@ -2393,7 +2393,7 @@ static int maintenance_opt_scheduler(const struct option *opt, const char *arg,
*scheduler = parse_scheduler(arg);
if (*scheduler == SCHEDULER_INVALID)
- return error(_("unrecognized --scheduler argument '%s'"), arg);
+ return error(_("unrecognized %s argument '%s'"), "--scheduler", arg);
return 0;
}
--
gitgitgadget