diff mbox series

[3/7] i18n: factorize "bad argument" messages

Message ID c94d5c932f4bd0311c7d85e6fdb36f8801a81a83.1647813292.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series More i18n fixes | expand

Commit Message

Jean-Noël Avila March 20, 2022, 9:54 p.m. UTC
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/bisect--helper.c | 2 +-
 diff.c                   | 4 ++--
 submodule.c              | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 8b2b259ff0d..289a7d2bc9e 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -268,7 +268,7 @@  static int bisect_write(const char *state, const char *rev,
 	} else if (one_of(state, terms->term_good, "skip", NULL)) {
 		strbuf_addf(&tag, "refs/bisect/%s-%s", state, rev);
 	} else {
-		res = error(_("Bad bisect_write argument: %s"), state);
+		res = error(_("bad %s argument: %s"), "bisect_write", state);
 		goto finish;
 	}
 
diff --git a/diff.c b/diff.c
index 6b22946cd0e..5e045b4ba87 100644
--- a/diff.c
+++ b/diff.c
@@ -5010,7 +5010,7 @@  static int diff_opt_color_moved(const struct option *opt,
 	} else {
 		int cm = parse_color_moved(arg);
 		if (cm < 0)
-			return error(_("bad --color-moved argument: %s"), arg);
+			return error(_("bad %s argument: %s"), "--color-moved", arg);
 		options->color_moved = cm;
 	}
 	return 0;
@@ -5334,7 +5334,7 @@  static int diff_opt_word_diff(const struct option *opt,
 		else if (!strcmp(arg, "none"))
 			options->word_diff = DIFF_WORDS_NONE;
 		else
-			return error(_("bad --word-diff argument: %s"), arg);
+			return error(_("bad %s argument: %s"), "--word-diff", arg);
 	} else {
 		if (options->word_diff == DIFF_WORDS_NONE)
 			options->word_diff = DIFF_WORDS_PLAIN;
diff --git a/submodule.c b/submodule.c
index 5ace18a7d94..010f8252c5e 100644
--- a/submodule.c
+++ b/submodule.c
@@ -470,7 +470,7 @@  void handle_ignore_submodules_arg(struct diff_options *diffopt,
 	else if (!strcmp(arg, "dirty"))
 		diffopt->flags.ignore_dirty_submodules = 1;
 	else if (strcmp(arg, "none"))
-		die(_("bad --ignore-submodules argument: %s"), arg);
+		die(_("bad %s argument: %s"), "--ignore-submodules", arg);
 	/*
 	 * Please update _git_status() in git-completion.bash when you
 	 * add new options