* [Improvements on messages 1/5] rebase: trivial fix of error message
2024-02-16 10:15 [Improvements on messages 0/5] Disambuiguate between options and commands Alexander Shopov
@ 2024-02-16 10:15 ` Alexander Shopov
2024-02-16 19:05 ` Alex Henrie
2024-02-16 10:15 ` [Improvements on messages 2/5] transport-helper.c: " Alexander Shopov
` (5 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: Alexander Shopov @ 2024-02-16 10:15 UTC (permalink / raw)
To: git, gitster, worldhello.net, alexhenrie24; +Cc: Alexander Shopov
Mark --rebase-merges as option rather than variable name
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
---
builtin/rebase.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 4084a6abb8..9c6d971515 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -746,7 +746,7 @@ static void parse_rebase_merges_value(struct rebase_options *options, const char
else if (!strcmp("rebase-cousins", value))
options->rebase_cousins = 1;
else
- die(_("Unknown rebase-merges mode: %s"), value);
+ die(_("Unknown --rebase-merges mode: %s"), value);
}
static int rebase_config(const char *var, const char *value,
--
2.43.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [Improvements on messages 1/5] rebase: trivial fix of error message
2024-02-16 10:15 ` [Improvements on messages 1/5] rebase: trivial fix of error message Alexander Shopov
@ 2024-02-16 19:05 ` Alex Henrie
0 siblings, 0 replies; 9+ messages in thread
From: Alex Henrie @ 2024-02-16 19:05 UTC (permalink / raw)
To: Alexander Shopov; +Cc: git, gitster, worldhello.net
On Fri, Feb 16, 2024 at 3:16 AM Alexander Shopov <ash@kambanaria.org> wrote:
>
> Mark --rebase-merges as option rather than variable name
>
> Signed-off-by: Alexander Shopov <ash@kambanaria.org>
> ---
> builtin/rebase.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/rebase.c b/builtin/rebase.c
> index 4084a6abb8..9c6d971515 100644
> --- a/builtin/rebase.c
> +++ b/builtin/rebase.c
> @@ -746,7 +746,7 @@ static void parse_rebase_merges_value(struct rebase_options *options, const char
> else if (!strcmp("rebase-cousins", value))
> options->rebase_cousins = 1;
> else
> - die(_("Unknown rebase-merges mode: %s"), value);
> + die(_("Unknown --rebase-merges mode: %s"), value);
Hi Alexander! The other patches in this series look good to me, but I
don't think this one is right. This error message could be about
either the --rebase-merges command line option or the
rebase.rebaseMerges config option. The word "rebase-merges" is
intentionally ambiguous enough to cover both situations and was not
intended to be left in English in translations.
-Alex
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Improvements on messages 2/5] transport-helper.c: trivial fix of error message
2024-02-16 10:15 [Improvements on messages 0/5] Disambuiguate between options and commands Alexander Shopov
2024-02-16 10:15 ` [Improvements on messages 1/5] rebase: trivial fix of error message Alexander Shopov
@ 2024-02-16 10:15 ` Alexander Shopov
2024-02-16 10:15 ` [Improvements on messages 3/5] builtin/remote.c: " Alexander Shopov
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Alexander Shopov @ 2024-02-16 10:15 UTC (permalink / raw)
To: git, gitster, worldhello.net, felipe.contreras; +Cc: Alexander Shopov
Mark --force as option rather than variable names
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
---
transport-helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/transport-helper.c b/transport-helper.c
index e34a8f47cf..7014b9ad70 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -1072,7 +1072,7 @@ static int push_refs_with_export(struct transport *transport,
set_common_push_options(transport, data->name, flags);
if (flags & TRANSPORT_PUSH_FORCE) {
if (set_helper_option(transport, "force", "true") != 0)
- warning(_("helper %s does not support 'force'"), data->name);
+ warning(_("helper %s does not support '--force'"), data->name);
}
helper = get_helper(transport);
--
2.43.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Improvements on messages 3/5] builtin/remote.c: trivial fix of error message
2024-02-16 10:15 [Improvements on messages 0/5] Disambuiguate between options and commands Alexander Shopov
2024-02-16 10:15 ` [Improvements on messages 1/5] rebase: trivial fix of error message Alexander Shopov
2024-02-16 10:15 ` [Improvements on messages 2/5] transport-helper.c: " Alexander Shopov
@ 2024-02-16 10:15 ` Alexander Shopov
2024-02-16 10:15 ` [Improvements on messages 4/5] builtin/clone.c: trivial fix of message Alexander Shopov
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Alexander Shopov @ 2024-02-16 10:15 UTC (permalink / raw)
To: git, gitster, worldhello.net, peff; +Cc: Alexander Shopov
Mark --mirror as option rather than command
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
---
builtin/remote.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index d91bbe728d..8412d12fa5 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -150,7 +150,7 @@ static int parse_mirror_opt(const struct option *opt, const char *arg, int not)
else if (!strcmp(arg, "push"))
*mirror = MIRROR_PUSH;
else
- return error(_("unknown mirror argument: %s"), arg);
+ return error(_("unknown --mirror argument: %s"), arg);
return 0;
}
--
2.43.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Improvements on messages 4/5] builtin/clone.c: trivial fix of message
2024-02-16 10:15 [Improvements on messages 0/5] Disambuiguate between options and commands Alexander Shopov
` (2 preceding siblings ...)
2024-02-16 10:15 ` [Improvements on messages 3/5] builtin/remote.c: " Alexander Shopov
@ 2024-02-16 10:15 ` Alexander Shopov
2024-02-16 10:15 ` [Improvements on messages 5/5] revision.c: trivial fix to message Alexander Shopov
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Alexander Shopov @ 2024-02-16 10:15 UTC (permalink / raw)
To: git, gitster, worldhello.net, stefanbeller; +Cc: Alexander Shopov
bare in that context is an option, not purely an adjective
Mark it properly
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
---
builtin/clone.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index 315befa133..f0261bbb01 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -115,7 +115,7 @@ static struct option builtin_clone_options[] = {
OPT_HIDDEN_BOOL(0, "naked", &option_bare,
N_("create a bare repository")),
OPT_BOOL(0, "mirror", &option_mirror,
- N_("create a mirror repository (implies bare)")),
+ N_("create a mirror repository (implies --bare)")),
OPT_BOOL('l', "local", &option_local,
N_("to clone from a local repository")),
OPT_BOOL(0, "no-hardlinks", &option_no_hardlinks,
--
2.43.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Improvements on messages 5/5] revision.c: trivial fix to message
2024-02-16 10:15 [Improvements on messages 0/5] Disambuiguate between options and commands Alexander Shopov
` (3 preceding siblings ...)
2024-02-16 10:15 ` [Improvements on messages 4/5] builtin/clone.c: trivial fix of message Alexander Shopov
@ 2024-02-16 10:15 ` Alexander Shopov
2024-02-16 18:43 ` [Improvements on messages 0/5] Disambuiguate between options and commands Junio C Hamano
2024-03-05 22:05 ` Junio C Hamano
6 siblings, 0 replies; 9+ messages in thread
From: Alexander Shopov @ 2024-02-16 10:15 UTC (permalink / raw)
To: git, gitster, worldhello.net, newren; +Cc: Alexander Shopov
ancestry-path is an option, not a command - mark it as such.
This brings it in sync with the rest of usages in the file
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
---
revision.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/revision.c b/revision.c
index 2424c9bd67..e29aa10781 100644
--- a/revision.c
+++ b/revision.c
@@ -2320,7 +2320,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
} else if (skip_prefix(arg, "--ancestry-path=", &optarg)) {
struct commit *c;
struct object_id oid;
- const char *msg = _("could not get commit for ancestry-path argument %s");
+ const char *msg = _("could not get commit for --ancestry-path argument %s");
revs->ancestry_path = 1;
revs->simplify_history = 0;
--
2.43.2
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [Improvements on messages 0/5] Disambuiguate between options and commands
2024-02-16 10:15 [Improvements on messages 0/5] Disambuiguate between options and commands Alexander Shopov
` (4 preceding siblings ...)
2024-02-16 10:15 ` [Improvements on messages 5/5] revision.c: trivial fix to message Alexander Shopov
@ 2024-02-16 18:43 ` Junio C Hamano
2024-03-05 22:05 ` Junio C Hamano
6 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2024-02-16 18:43 UTC (permalink / raw)
To: Alexander Shopov; +Cc: git, worldhello.net
Alexander Shopov <ash@kambanaria.org> writes:
> These are trivial fixes to messages.
> They make sure commands and options are markes as such.
> This will help translators and end users.
> This will also reduce the special cases Jiang Xin keeps
> for git-po-helper which will ease maintenance.
>
> I am basing these on maint but I have also checked that
> they ar still relevant by cherry picking on top of latest and next.
I've looked at all of them and they looked sensible.
The changes look like this:
- die(_("something option something: %s"), arg);
+ die(_("something --option something: %s"), arg);
It is not a fault of this patch, but wasn't the concensus that the
ideal form would be more like this:
die(_("something %s something: %s"), "--option", arg);
in order to completely avoid tempting translators into touching
"--option", IIRC?
These patches do not make things worse, so I am willing to say they
are strict improvements and the series is a good first step if we
wanted to follow through to eject option names out of translatable
strings later.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [Improvements on messages 0/5] Disambuiguate between options and commands
2024-02-16 10:15 [Improvements on messages 0/5] Disambuiguate between options and commands Alexander Shopov
` (5 preceding siblings ...)
2024-02-16 18:43 ` [Improvements on messages 0/5] Disambuiguate between options and commands Junio C Hamano
@ 2024-03-05 22:05 ` Junio C Hamano
6 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2024-03-05 22:05 UTC (permalink / raw)
To: git; +Cc: Alexander Shopov, worldhello.net, Alex Henrie
Alexander Shopov <ash@kambanaria.org> writes:
> These are nice to be merged but this is not urgent.
>
> Alexander Shopov (5):
> rebase: trivial fix of error message
> transport-helper.c: trivial fix of error message
> builtin/remote.c: trivial fix of error message
> builtin/clone.c: trivial fix of message
> revision.c: trivial fix to message
The first one got commented on with a suggestion to drop it; any
comments on other patches, anybody?
If not, I'll drop the first patch and merge the remainder down to
'next'.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread