Re: [PATCH 01/10] i18n: refactor "foo and bar are mutually exclusive"
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Dec 7, 2021, 18:07 UTC
- Message-ID
- <211207.86bl1snv8a.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <476eb77aff6fbea926eaec55c9b4febb74282ab4.1638514910.git.gitgitgadget@gmail.com>
On Fri, Dec 03 2021, Jean-Noël Avila via GitGitGadget wrote:
Show 26 quoted lines
> From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
>
> Use static strings for constant parts of the sentences.
>
> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
> ---
> 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 :)