[PATCH 02/10] i18n: refactor "%s, %s and %s are mutually exclusive"
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
Use placeholders for constant tokens.
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
builtin/difftool.c | 2 +-
builtin/log.c | 2 +-
builtin/worktree.c | 2 +-
diff.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/difftool.c b/builtin/difftool.c
index 4931c108451..61ebfa9c68c 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -739,7 +739,7 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
die(_("--dir-diff is incompatible with --no-index"));
if (use_gui_tool + !!difftool_cmd + !!extcmd > 1)
- die(_("--gui, --tool and --extcmd are mutually exclusive"));
+ die(_("%s, %s and %s are mutually exclusive"), "--gui", "--tool", "--extcmd");
if (use_gui_tool)
setenv("GIT_MERGETOOL_GUI", "true", 1);
diff --git a/builtin/log.c b/builtin/log.c
index a2005e3c778..c39b974ea37 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1964,7 +1964,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
load_display_notes(&rev.notes_opt);
if (use_stdout + rev.diffopt.close_file + !!output_directory > 1)
- die(_("--stdout, --output, and --output-directory are mutually exclusive"));
+ die(_("%s, %s and %s are mutually exclusive"), "--stdout", "--output", "--output-directory");
if (use_stdout) {
setup_pager();
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 9287c455594..73ee505234c 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -504,7 +504,7 @@ static int add(int ac, const char **av, const char *prefix)
opts.checkout = 1;
ac = parse_options(ac, av, prefix, options, worktree_usage, 0);
if (!!opts.detach + !!new_branch + !!new_branch_force > 1)
- die(_("-b, -B, and --detach are mutually exclusive"));
+ die(_("%s, %s and %s are mutually exclusive"), "-b", "-B", "--detach");
if (lock_reason && !keep_locked)
die(_("--reason requires --lock"));
if (lock_reason)
diff --git a/diff.c b/diff.c
index 861282db1c3..342e53f1c1f 100644
--- a/diff.c
+++ b/diff.c
@@ -4642,7 +4642,7 @@ void diff_setup_done(struct diff_options *options)
die(_("--name-only, --name-status, --check and -s are mutually exclusive"));
if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK))
- die(_("-G, -S and --find-object are mutually exclusive"));
+ die(_("%s, %s and %s are mutually exclusive"), "-G", "-S", "--find-object");
if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_G_REGEX_MASK))
die(_("-G and --pickaxe-regex are mutually exclusive, use --pickaxe-regex with -S"));
--
gitgitgadget