Re: [PATCH 01/10] i18n: refactor "foo and bar are mutually exclusive"
From: Jean-Noël AVILA <hidden>
Date: 2021-12-08 18:13:41
On Tuesday, 7 December 2021 19:07:41 CET Ævar Arnfjörð Bjarmason wrote:
On Fri, Dec 03 2021, Jean-Noël Avila via GitGitGadget wrote:quoted
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <redacted> Use static strings for constant parts of the sentences. Signed-off-by: Jean-Noël Avila <redacted> --- builtin/checkout.c | 2 +- builtin/diff-tree.c | 2 +- builtin/fetch.c | 2 +- builtin/init-db.c | 2 +- builtin/log.c | 4 ++-- builtin/submodule--helper.c | 4 ++-- builtin/worktree.c | 2 +- range-diff.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-)diff --git a/builtin/checkout.c b/builtin/checkout.c index cbf73b8c9f6..4bd8a57f190 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c@@ -1621,7 +1621,7 @@ static int checkout_main(int argc, const char **argv, const char *prefix, cb_option, toupper(cb_option)); if (opts->overlay_mode == 1 && opts->patch_mode) - die(_("-p and --overlay are mutually exclusive")); + die(_("%s and %s are mutually exclusive"), "-p", "--overlay");It's good to do all of these, but I think we should really quote the '%s' while at it. It also helps translators, who without that won't know (without jumping to the source) if %s and %s are "walking" and "chewing gum" or something like a CLI option that's quoted :)
With other comments included, the proposition for this factorization would be: "the options '%s' and '%s' cannot be used together"