git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] help: add space after autocorrect prompt
@ 2021-12-15 21:41 kashav madan via GitGitGadget
  2021-12-15 22:32 ` Junio C Hamano
  2021-12-15 22:58 ` [PATCH v2] help: make auto-correction prompt more consistent kashav madan via GitGitGadget
  0 siblings, 2 replies; 14+ messages in thread
From: kashav madan via GitGitGadget @ 2021-12-15 21:41 UTC (permalink / raw)
  To: git; +Cc: kashav madan, Kashav Madan

From: Kashav Madan <kshvmdn@gmail.com>

Signed-off-by: Kashav Madan <kshvmdn@gmail.com>
---
    help: add space after autocorrect prompt

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1166%2Fkashav%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1166/kashav/master-v1
Pull-Request: https://github.com/git/git/pull/1166

 help.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/help.c b/help.c
index 973e47cdc30..8435858ce86 100644
--- a/help.c
+++ b/help.c
@@ -643,7 +643,7 @@ const char *help_unknown_cmd(const char *cmd)
 		else if (autocorrect == AUTOCORRECT_PROMPT) {
 			char *answer;
 			struct strbuf msg = STRBUF_INIT;
-			strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
+			strbuf_addf(&msg, _("Run '%s' instead? (y/N) "), assumed);
 			answer = git_prompt(msg.buf, PROMPT_ECHO);
 			strbuf_release(&msg);
 			if (!(starts_with(answer, "y") ||

base-commit: e773545c7fe7eca21b134847f4fc2cbc9547fa14
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] help: add space after autocorrect prompt
  2021-12-15 21:41 [PATCH] help: add space after autocorrect prompt kashav madan via GitGitGadget
@ 2021-12-15 22:32 ` Junio C Hamano
  2021-12-16  6:27   ` Johannes Altmanninger
  2021-12-15 22:58 ` [PATCH v2] help: make auto-correction prompt more consistent kashav madan via GitGitGadget
  1 sibling, 1 reply; 14+ messages in thread
From: Junio C Hamano @ 2021-12-15 22:32 UTC (permalink / raw)
  To: kashav madan via GitGitGadget; +Cc: git, kashav madan

"kashav madan via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Kashav Madan <kshvmdn@gmail.com>
>
> Signed-off-by: Kashav Madan <kshvmdn@gmail.com>
> ---
>     help: add space after autocorrect prompt

The patch looks OK-ish, but let's make sure.  We will find what we
should write in the log message while doing so.

If you look at the output from

    $ git grep -C2 git_prompt \*.c

you'll notice that existing message given to git_prompt look like
these:

    yesno = git_prompt(_("Are you sure [Y/n]? "), PROMPT_ECHO);

    yesno = git_prompt(_("Do you want me to do it for you "
                         "[Y/n]? "), PROMPT_ECHO);

    strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
    answer = git_prompt(msg.buf, PROMPT_ECHO);

The last one is what you are touching in this patch.

There is another one in credential.c that asks not just a single
yes/no answer, so it is justifiably different from all the others,
but the one you noticed is different from what we see above in three
points:

 - It does not leave a SP before where the end-user input goes;
 - It append (y/N) _after_ question mark;
 - It encloses the choices in (), not [].

You are only addressing the first inconsistency, leaving the other
two still there.

So, perhaps you would want to explain the change this way

    Subject: [PATCH] help: update auto-correction prompt to look more like others

    There are three callsite of git_prompt() helper function to ask
    a "yes/no" question to the end user, but one of them in help.c
    that asks if the suggested auto-correction is OK, which is given
    when the user makes a possible typo in a Git subcommand name, is
    formatted differently from others.  Update the format string to
    make the prompt string look more consistent.


And you'd want to update the string more like so:

> -			strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
> +			strbuf_addf(&msg, _("Run '%s' instead [y/N]? "), assumed);

to fix all three points, not just one.

Thanks.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2] help: make auto-correction prompt more consistent
  2021-12-15 21:41 [PATCH] help: add space after autocorrect prompt kashav madan via GitGitGadget
  2021-12-15 22:32 ` Junio C Hamano
@ 2021-12-15 22:58 ` kashav madan via GitGitGadget
  2021-12-16  3:12   ` Junio C Hamano
  2021-12-16 18:18   ` [PATCH v3 0/4] normalize format of yes/no prompts kashav madan via GitGitGadget
  1 sibling, 2 replies; 14+ messages in thread
From: kashav madan via GitGitGadget @ 2021-12-15 22:58 UTC (permalink / raw)
  To: git; +Cc: kashav madan, Kashav Madan

From: Kashav Madan <kshvmdn@gmail.com>

There are three callsites of git_prompt() that ask the user for "yes/no"
confirmation, but the one in help.c, used for auto-correction, is
formatted differently from the others. This updates that format string
to make the prompt look more consistent.

Signed-off-by: Kashav Madan <kshvmdn@gmail.com>
---
    help: make auto-correction prompt more consistent
    
    Changes since v1:
    
     * Appended (y/N) after the question mark
     * Enclosed the choices in (), not []

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1166%2Fkashav%2Fmaster-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1166/kashav/master-v2
Pull-Request: https://github.com/git/git/pull/1166

Range-diff vs v1:

 1:  5df696252dd ! 1:  e6dc616c964 help: add space after autocorrect prompt
     @@ Metadata
      Author: Kashav Madan <kshvmdn@gmail.com>
      
       ## Commit message ##
     -    help: add space after autocorrect prompt
     +    help: make auto-correction prompt more consistent
     +
     +    There are three callsites of git_prompt() that ask the user for "yes/no"
     +    confirmation, but the one in help.c, used for auto-correction, is
     +    formatted differently from the others. This updates that format string
     +    to make the prompt look more consistent.
      
          Signed-off-by: Kashav Madan <kshvmdn@gmail.com>
      
     @@ help.c: const char *help_unknown_cmd(const char *cmd)
       			char *answer;
       			struct strbuf msg = STRBUF_INIT;
      -			strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
     -+			strbuf_addf(&msg, _("Run '%s' instead? (y/N) "), assumed);
     ++			strbuf_addf(&msg, _("Run '%s' instead [y/N]? "), assumed);
       			answer = git_prompt(msg.buf, PROMPT_ECHO);
       			strbuf_release(&msg);
       			if (!(starts_with(answer, "y") ||


 help.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/help.c b/help.c
index 973e47cdc30..71444906ddf 100644
--- a/help.c
+++ b/help.c
@@ -643,7 +643,7 @@ const char *help_unknown_cmd(const char *cmd)
 		else if (autocorrect == AUTOCORRECT_PROMPT) {
 			char *answer;
 			struct strbuf msg = STRBUF_INIT;
-			strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
+			strbuf_addf(&msg, _("Run '%s' instead [y/N]? "), assumed);
 			answer = git_prompt(msg.buf, PROMPT_ECHO);
 			strbuf_release(&msg);
 			if (!(starts_with(answer, "y") ||

base-commit: e773545c7fe7eca21b134847f4fc2cbc9547fa14
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] help: make auto-correction prompt more consistent
  2021-12-15 22:58 ` [PATCH v2] help: make auto-correction prompt more consistent kashav madan via GitGitGadget
@ 2021-12-16  3:12   ` Junio C Hamano
  2021-12-16 18:18   ` [PATCH v3 0/4] normalize format of yes/no prompts kashav madan via GitGitGadget
  1 sibling, 0 replies; 14+ messages in thread
From: Junio C Hamano @ 2021-12-16  3:12 UTC (permalink / raw)
  To: kashav madan via GitGitGadget; +Cc: git, kashav madan

"kashav madan via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Kashav Madan <kshvmdn@gmail.com>
>
> There are three callsites of git_prompt() that ask the user for "yes/no"
> confirmation, but the one in help.c, used for auto-correction, is
> formatted differently from the others. This updates that format string
> to make the prompt look more consistent.

Looks much better.  

The last sentence should be phrased as if we were giving an order to
the codebase to "become like so", to match the style, in which our
log messages are typically written (look for "imperative-mood" in
Documentation/SubmittingPatches).

Thanks.

> diff --git a/help.c b/help.c
> index 973e47cdc30..71444906ddf 100644
> --- a/help.c
> +++ b/help.c
> @@ -643,7 +643,7 @@ const char *help_unknown_cmd(const char *cmd)
>  		else if (autocorrect == AUTOCORRECT_PROMPT) {
>  			char *answer;
>  			struct strbuf msg = STRBUF_INIT;
> -			strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
> +			strbuf_addf(&msg, _("Run '%s' instead [y/N]? "), assumed);
>  			answer = git_prompt(msg.buf, PROMPT_ECHO);
>  			strbuf_release(&msg);
>  			if (!(starts_with(answer, "y") ||
>
> base-commit: e773545c7fe7eca21b134847f4fc2cbc9547fa14

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] help: add space after autocorrect prompt
  2021-12-15 22:32 ` Junio C Hamano
@ 2021-12-16  6:27   ` Johannes Altmanninger
  2021-12-16 15:55     ` Eric Sunshine
  2021-12-16 21:32     ` Junio C Hamano
  0 siblings, 2 replies; 14+ messages in thread
From: Johannes Altmanninger @ 2021-12-16  6:27 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: kashav madan via GitGitGadget, git, kashav madan

On Wed, Dec 15, 2021 at 02:32:36PM -0800, Junio C Hamano wrote:
> "kashav madan via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
> > From: Kashav Madan <kshvmdn@gmail.com>
> >
> > Signed-off-by: Kashav Madan <kshvmdn@gmail.com>
> > ---
> >     help: add space after autocorrect prompt
> 
> The patch looks OK-ish, but let's make sure.  We will find what we
> should write in the log message while doing so.
> 
> If you look at the output from
> 
>     $ git grep -C2 git_prompt \*.c
> 
> you'll notice that existing message given to git_prompt look like
> these:
> 
>     yesno = git_prompt(_("Are you sure [Y/n]? "), PROMPT_ECHO);
> 
>     yesno = git_prompt(_("Do you want me to do it for you "
>                          "[Y/n]? "), PROMPT_ECHO);
> 
>     strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
>     answer = git_prompt(msg.buf, PROMPT_ECHO);
> 
> The last one is what you are touching in this patch.
> 
> There is another one in credential.c that asks not just a single
> yes/no answer, so it is justifiably different from all the others,
> but the one you noticed is different from what we see above in three
> points:
> 
>  - It does not leave a SP before where the end-user input goes;
>  - It append (y/N) _after_ question mark;

I actually prefer this one;

	Run 'status' instead? [y/N] 

sounds better than

	Run 'status' instead [y/N]? 

but that's not a strong opinion.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] help: add space after autocorrect prompt
  2021-12-16  6:27   ` Johannes Altmanninger
@ 2021-12-16 15:55     ` Eric Sunshine
  2021-12-16 21:32     ` Junio C Hamano
  1 sibling, 0 replies; 14+ messages in thread
From: Eric Sunshine @ 2021-12-16 15:55 UTC (permalink / raw)
  To: Johannes Altmanninger
  Cc: Junio C Hamano, kashav madan via GitGitGadget, Git List,
	kashav madan

On Thu, Dec 16, 2021 at 6:18 AM Johannes Altmanninger <aclopte@gmail.com> wrote:
> On Wed, Dec 15, 2021 at 02:32:36PM -0800, Junio C Hamano wrote:
> > you'll notice that existing message given to git_prompt look like
> > these:
> >
> >     yesno = git_prompt(_("Are you sure [Y/n]? "), PROMPT_ECHO);
> >
> >     yesno = git_prompt(_("Do you want me to do it for you "
> >                          "[Y/n]? "), PROMPT_ECHO);
> >
> >     strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
> >     answer = git_prompt(msg.buf, PROMPT_ECHO);
> >
> >  - It does not leave a SP before where the end-user input goes;
> >  - It append (y/N) _after_ question mark;
>
> I actually prefer this one;
>
>         Run 'status' instead? [y/N]
>
> sounds better than
>
>         Run 'status' instead [y/N]?
>
> but that's not a strong opinion.

For what it's worth, I also find "Run 'status' instead? [y/N]" more
sensible, and (at least based upon memory) it also seems to be the
typical way it's done in other software (including software I've
written). That said, it's a very minor point which needn't hold up the
patch if kashav isn't interested in redoing this as a single patch
which normalizes all callers to use a common format.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v3 0/4] normalize format of yes/no prompts
  2021-12-15 22:58 ` [PATCH v2] help: make auto-correction prompt more consistent kashav madan via GitGitGadget
  2021-12-16  3:12   ` Junio C Hamano
@ 2021-12-16 18:18   ` kashav madan via GitGitGadget
  2021-12-16 18:18     ` [PATCH v3 1/4] bisect--helper: normalize format string " Kashav Madan via GitGitGadget
                       ` (3 more replies)
  1 sibling, 4 replies; 14+ messages in thread
From: kashav madan via GitGitGadget @ 2021-12-16 18:18 UTC (permalink / raw)
  To: git; +Cc: Johannes Altmanninger, Eric Sunshine, kashav madan

Changes since v2:

 * Moves question mark before the yes/no choices, to be more consistent with
   other tools.
 * Normalizes format string for bisect--helper, clean, add-patch.
 * Updates localized versions of all changed strings, which was missed in
   v2.

Kashav Madan (4):
  bisect--helper: normalize format string of yes/no prompts
  clean: normalize format string of yes/no prompt
  add-patch: normalize format string of yes/no prompt
  help: make auto-correction prompt more consistent

 add-patch.c              |  4 ++--
 builtin/bisect--helper.c |  6 +++---
 builtin/clean.c          |  2 +-
 help.c                   |  2 +-
 po/bg.po                 | 14 +++++++-------
 po/ca.po                 | 20 ++++++++++----------
 po/de.po                 | 20 ++++++++++----------
 po/el.po                 | 14 +++++++-------
 po/es.po                 | 22 +++++++++++-----------
 po/fr.po                 | 20 ++++++++++----------
 po/git.pot               | 10 +++++-----
 po/id.po                 | 18 +++++++++---------
 po/it.po                 | 14 +++++++-------
 po/ko.po                 | 16 ++++++++--------
 po/pl.po                 | 20 ++++++++++----------
 po/pt_PT.po              | 16 ++++++++--------
 po/ru.po                 | 16 ++++++++--------
 po/sv.po                 | 22 +++++++++++-----------
 po/tr.po                 | 20 ++++++++++----------
 po/vi.po                 | 20 ++++++++++----------
 po/zh_CN.po              | 20 ++++++++++----------
 po/zh_TW.po              | 20 ++++++++++----------
 22 files changed, 168 insertions(+), 168 deletions(-)


base-commit: e773545c7fe7eca21b134847f4fc2cbc9547fa14
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1166%2Fkashav%2Fmaster-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1166/kashav/master-v3
Pull-Request: https://github.com/git/git/pull/1166

Range-diff vs v2:

 1:  e6dc616c964 < -:  ----------- help: make auto-correction prompt more consistent
 -:  ----------- > 1:  e7672e70cc9 bisect--helper: normalize format string of yes/no prompts
 -:  ----------- > 2:  0c81a14247f clean: normalize format string of yes/no prompt
 -:  ----------- > 3:  4a70e569f8a add-patch: normalize format string of yes/no prompt
 -:  ----------- > 4:  fc913ef31fb help: make auto-correction prompt more consistent

-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v3 1/4] bisect--helper: normalize format string of yes/no prompts
  2021-12-16 18:18   ` [PATCH v3 0/4] normalize format of yes/no prompts kashav madan via GitGitGadget
@ 2021-12-16 18:18     ` Kashav Madan via GitGitGadget
  2021-12-16 21:39       ` Junio C Hamano
  2021-12-16 18:18     ` [PATCH v3 2/4] clean: normalize format string of yes/no prompt Kashav Madan via GitGitGadget
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Kashav Madan via GitGitGadget @ 2021-12-16 18:18 UTC (permalink / raw)
  To: git; +Cc: Johannes Altmanninger, Eric Sunshine, kashav madan, Kashav Madan

From: Kashav Madan <kshvmdn@gmail.com>

Both callers of git_prompt in bisect--helper.c ask the user for yes/no
confirmation. They both place the question mark after the choices,
however this is inconsistent with how most UNIX-y tools do it. Update
the format string to exclude the choices from the question.

Signed-off-by: Kashav Madan <kshvmdn@gmail.com>
---
 builtin/bisect--helper.c | 6 +++---
 po/bg.po                 | 6 +++---
 po/ca.po                 | 8 ++++----
 po/de.po                 | 8 ++++----
 po/el.po                 | 8 ++++----
 po/es.po                 | 8 ++++----
 po/fr.po                 | 8 ++++----
 po/git.pot               | 4 ++--
 po/id.po                 | 8 ++++----
 po/it.po                 | 6 +++---
 po/ko.po                 | 8 ++++----
 po/pl.po                 | 8 ++++----
 po/pt_PT.po              | 8 ++++----
 po/ru.po                 | 8 ++++----
 po/sv.po                 | 8 ++++----
 po/tr.po                 | 8 ++++----
 po/vi.po                 | 8 ++++----
 po/zh_CN.po              | 8 ++++----
 po/zh_TW.po              | 8 ++++----
 19 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 28a2e6a5750..2bfbb75f08b 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -370,7 +370,7 @@ static int decide_next(const struct bisect_terms *terms,
 		 * translation. The program will only accept English input
 		 * at this point.
 		 */
-		yesno = git_prompt(_("Are you sure [Y/n]? "), PROMPT_ECHO);
+		yesno = git_prompt(_("Are you sure? [Y/n] "), PROMPT_ECHO);
 		if (starts_with(yesno, "N") || starts_with(yesno, "n"))
 			return -1;
 		return 0;
@@ -838,8 +838,8 @@ static int bisect_autostart(struct bisect_terms *terms)
 	 * translation. The program will only accept English input
 	 * at this point.
 	 */
-	yesno = git_prompt(_("Do you want me to do it for you "
-			     "[Y/n]? "), PROMPT_ECHO);
+	yesno = git_prompt(_("Do you want me to do it for you? "
+			     "[Y/n] "), PROMPT_ECHO);
 	res = tolower(*yesno) == 'n' ?
 		-1 : bisect_start(terms, empty_strvec, 0);
 
diff --git a/po/bg.po b/po/bg.po
index 51d7c7242f2..e0786caa274 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -11633,7 +11633,7 @@ msgstr "двоично търсене само по „%s“ подаване."
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
+msgid "Are you sure? [Y/n] "
 msgstr "Да се продължи ли? „Y“ —  ДА, „n“ — не"
 
 #: builtin/bisect--helper.c:434
@@ -11716,8 +11716,8 @@ msgstr "Започнете като изпълните командата „git
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Да се извърши ли автоматично? „Y“ —  ДА, „n“ — не"
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Да се извърши ли автоматично? „Y“ —  ДА, „n“ — не "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/ca.po b/po/ca.po
index 556b028cd8b..71673d48d01 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -11355,8 +11355,8 @@ msgstr "bisecant amb només una comissió %s"
 #. translation. The program will only accept English input
 #. at this point.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "N'esteu segur [Y/n]? "
+msgid "Are you sure? [Y/n] "
+msgstr "N'esteu segur? [Y/n] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -11435,8 +11435,8 @@ msgstr "Cal començar per «git bisect start»\n"
 #. translation. The program will only accept English input
 #. at this point.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Voleu que ho faci per vostè [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Voleu que ho faci per vostè? [Y/n] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/de.po b/po/de.po
index f00c21d896f..3e8ef2ed122 100644
--- a/po/de.po
+++ b/po/de.po
@@ -11429,8 +11429,8 @@ msgstr "binäre Suche nur mit einem %s Commit"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "Sind Sie sicher [Y/n]? "
+msgid "Are you sure? [Y/n] "
+msgstr "Sind Sie sicher? [Y/n] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -11511,8 +11511,8 @@ msgstr "Sie müssen mit \"git bisect start\" beginnen\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Wollen Sie, dass ich es für Sie mache [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Wollen Sie, dass ich es für Sie mache? [Y/n] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/el.po b/po/el.po
index 703f46d0c7c..27c8c488ea1 100644
--- a/po/el.po
+++ b/po/el.po
@@ -8202,7 +8202,7 @@ msgstr ""
 #. at this point.
 #.
 #: builtin/bisect--helper.c:329
-msgid "Are you sure [Y/n]? "
+msgid "Are you sure? [Y/n] "
 msgstr "Επιβεβαιώνετε [Y/n]; "
 
 #: builtin/bisect--helper.c:376
@@ -19779,7 +19779,7 @@ msgstr "Χρειάζεται να αρχίσετε με \"git bisect start\""
 #. translation. The program will only accept English input
 #. at this point.
 #: git-bisect.sh:60
-msgid "Do you want me to do it for you [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
 msgstr ""
 
 #: git-bisect.sh:101
@@ -21272,8 +21272,8 @@ msgstr ""
 #. TRANSLATORS: please keep [y/N] as is.
 #: git-send-email.perl:825
 #, perl-format
-msgid "Are you sure you want to use <%s> [y/N]? "
-msgstr "Επιβεβαιώνετε πως θέλετε να χρησιμοποιήσετε <%s> [y/N]? "
+msgid "Are you sure you want to use <%s>? [y/N] "
+msgstr "Επιβεβαιώνετε πως θέλετε να χρησιμοποιήσετε <%s>? [y/N] "
 
 #: git-send-email.perl:880
 msgid ""
diff --git a/po/es.po b/po/es.po
index ced2eb6d3d5..ef8ae6d471e 100644
--- a/po/es.po
+++ b/po/es.po
@@ -11267,8 +11267,8 @@ msgstr "haciendo bisect solo con un commit %s"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "¿Estás seguro [Y/n]? "
+msgid "Are you sure? [Y/n] "
+msgstr "¿Estás seguro? [Y/n] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -11347,8 +11347,8 @@ msgstr "Debes iniciar con \"git bisect start\"\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "¿Quieres que lo haga por ti [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "¿Quieres que lo haga por ti? [Y/n] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/fr.po b/po/fr.po
index e950f87add0..9812213b2fe 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -11445,8 +11445,8 @@ msgstr "bissection avec seulement un commit %s"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "Confirmez-vous [Y/n] ? "
+msgid "Are you sure? [Y/n] "
+msgstr "Confirmez-vous ? [Y/n] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -11526,8 +11526,8 @@ msgstr "Vous devez démarrer avec \"git bisect start\"\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Souhaitez-vous que je le fasse pour vous [Y/n] ? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Souhaitez-vous que je le fasse pour vous ? [Y/n] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/git.pot b/po/git.pot
index 78fea37065b..c3102deb5d2 100644
--- a/po/git.pot
+++ b/po/git.pot
@@ -10385,7 +10385,7 @@ msgstr ""
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
+msgid "Are you sure? [Y/n] "
 msgstr ""
 
 #: builtin/bisect--helper.c:434
@@ -10460,7 +10460,7 @@ msgstr ""
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
 msgstr ""
 
 #: builtin/bisect--helper.c:859
diff --git a/po/id.po b/po/id.po
index c1afc2a32f3..3b8b0c39e51 100644
--- a/po/id.po
+++ b/po/id.po
@@ -10734,8 +10734,8 @@ msgstr "membagi dua hanya dengan sebuah komit %s"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "Anda yakin [Y/n]?"
+msgid "Are you sure? [Y/n] "
+msgstr "Anda yakin? [Y/n] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -10813,8 +10813,8 @@ msgstr "Anda perlu memulai dengan \"git bisect start\"\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Anda ingin saya melakukannya untuk Anda [Y/n]"
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Anda ingin saya melakukannya untuk Anda [Y/n] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/it.po b/po/it.po
index c31560834d8..01c6d1f095e 100644
--- a/po/it.po
+++ b/po/it.po
@@ -10682,7 +10682,7 @@ msgstr "eseguo la bisezione solo con un commit %s"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:370
-msgid "Are you sure [Y/n]? "
+msgid "Are you sure? [Y/n] "
 msgstr "Sei sicuro? [Y/n] "
 
 #: builtin/bisect--helper.c:431
@@ -10762,8 +10762,8 @@ msgstr "Devi iniziare con \"git bisect start\"\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:838
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Vuoi che me ne occupi io [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Vuoi che me ne occupi io? [Y/n] "
 
 #: builtin/bisect--helper.c:866
 msgid "perform 'git bisect next'"
diff --git a/po/ko.po b/po/ko.po
index 5d190e52380..96d3a2a3be4 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -15994,8 +15994,8 @@ msgstr "\"git bisect start\" 명령으로 시작해야 합니다"
 #. translation. The program will only accept English input
 #. at this point.
 #: git-bisect.sh:60
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "지금 하시겠습니까 [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "지금 하시겠습니까? [Y/n] "
 
 #: git-bisect.sh:121
 #, sh-format
@@ -16061,8 +16061,8 @@ msgstr "경고: 하나의 $TERM_BAD 커밋에 대해서만 이등분."
 #. translation. The program will only accept English input
 #. at this point.
 #: git-bisect.sh:312
-msgid "Are you sure [Y/n]? "
-msgstr "확실합니까 [Y/n]? "
+msgid "Are you sure? [Y/n] "
+msgstr "확실합니까? [Y/n] "
 
 #: git-bisect.sh:324
 #, sh-format
diff --git a/po/pl.po b/po/pl.po
index 0ec127e14cc..637a328a869 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -11238,8 +11238,8 @@ msgstr "przeszukiwanie tylko z zapisem %s"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "Czy na pewno [Y/n]? "
+msgid "Are you sure? [Y/n] "
+msgstr "Czy na pewno? [Y/n] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -11319,8 +11319,8 @@ msgstr "Musisz rozpocząć przez „git bisect start”\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Chcesz, żeby to teraz zrobić [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Chcesz, żeby to teraz zrobić? [Y/n] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 70e5c6d9c16..a9a67f15484 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -10900,8 +10900,8 @@ msgstr "bissetando apenas com uma memória %s"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:358
-msgid "Are you sure [Y/n]? "
-msgstr "Tem a certeza [Y/n]? "
+msgid "Are you sure? [Y/n] "
+msgstr "Tem a certeza? [Y/n] "
 
 #: builtin/bisect--helper.c:419
 msgid "no terms defined"
@@ -10977,8 +10977,8 @@ msgstr "Deves começar com \"git bisect start\"\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:826
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Quer que seja eu a fazer isso [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Quer que seja eu a fazer isso? [Y/n] "
 
 #: builtin/bisect--helper.c:844
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/ru.po b/po/ru.po
index 993d106f1f9..d091ea22e5a 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -9796,8 +9796,8 @@ msgstr ""
 #. translation. The program will only accept English input
 #. at this point.
 #: builtin/bisect--helper.c:357
-msgid "Are you sure [Y/n]? "
-msgstr "Вы уверены [Y - да/n - нет]? "
+msgid "Are you sure? [Y/n] "
+msgstr "Вы уверены? [Y - да/n - нет] "
 
 #: builtin/bisect--helper.c:418
 msgid "no terms defined"
@@ -9870,8 +9870,8 @@ msgstr ""
 #. translation. The program will only accept English input
 #. at this point.
 #: builtin/bisect--helper.c:825
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Вы уверены, что хотите, чтобы я сделал это [Y] - да/[n] - нет? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Вы уверены, что хотите, чтобы я сделал это? [Y] - да/[n] - нет "
 
 #: builtin/bisect--helper.c:843
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/sv.po b/po/sv.po
index e3b17b6a0ef..6ccb7e7421c 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -11173,8 +11173,8 @@ msgstr "utför bisect med endast en %s incheckning"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "Är du säker [Y=ja/N=nej]? "
+msgid "Are you sure? [Y/n] "
+msgstr "Är du säker? [Y=ja/N=nej] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -11254,8 +11254,8 @@ msgstr "Du måste starta med \"git bisect start\"\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Vill du att jag ska göra det åt dig [Y=ja/N=nej]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Vill du att jag ska göra det åt dig? [Y=ja/N=nej] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/tr.po b/po/tr.po
index 06870900c4e..686b21459a3 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -11238,8 +11238,8 @@ msgstr "yalnızca bir %s işlemesi ile ikili arama yapılıyor"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "Emin misiniz [Y/n]? "
+msgid "Are you sure? [Y/n] "
+msgstr "Emin misiniz? [Y/n] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -11317,8 +11317,8 @@ msgstr "\"git bisect start\" ile başlamalısınız\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Bunu sizin yerinize benim yapmamı ister misiniz [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Bunu sizin yerinize benim yapmamı ister misiniz? [Y/n] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/vi.po b/po/vi.po
index be197ab594f..bfb84bd0049 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -11235,8 +11235,8 @@ msgstr "chỉ thực hiện việc bisect với một lần chuyển giao %s"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "Bạn có chắc chắn chưa [Y/n]? "
+msgid "Are you sure? [Y/n] "
+msgstr "Bạn có chắc chắn chưa? [Y/n] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -11314,8 +11314,8 @@ msgstr "Bạn cần khởi đầu bằng \"git bisect start\"\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "Bạn có muốn tôi thực hiện điều này cho bạn không [Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "Bạn có muốn tôi thực hiện điều này cho bạn không? [Y/n] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 60ffa45f7a0..9131b440e6f 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -11092,8 +11092,8 @@ msgstr "在只有一个 %s 提交的情况下二分查找"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "您确认么[Y/n]? "
+msgid "Are you sure? [Y/n] "
+msgstr "您确认么? [Y/n] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -11169,8 +11169,8 @@ msgstr "您需要执行 \"git bisect start\" 来开始\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "您想让我为您这样做么[Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "您想让我为您这样做么? [Y/n] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
diff --git a/po/zh_TW.po b/po/zh_TW.po
index f1df8b60a91..80e156c94fc 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -10958,8 +10958,8 @@ msgstr "在只有一個 %s 提交的情況下二分搜尋"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:373
-msgid "Are you sure [Y/n]? "
-msgstr "您確認嗎[Y/n]? "
+msgid "Are you sure? [Y/n] "
+msgstr "您確認嗎? [Y/n] "
 
 #: builtin/bisect--helper.c:434
 msgid "no terms defined"
@@ -11036,8 +11036,8 @@ msgstr "您需要執行 \"git bisect start\" 來開始\n"
 #. at this point.
 #.
 #: builtin/bisect--helper.c:841
-msgid "Do you want me to do it for you [Y/n]? "
-msgstr "您想讓我為您這樣做嗎[Y/n]? "
+msgid "Do you want me to do it for you? [Y/n] "
+msgstr "您想讓我為您這樣做嗎? [Y/n] "
 
 #: builtin/bisect--helper.c:859
 msgid "Please call `--bisect-state` with at least one argument"
-- 
gitgitgadget


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 2/4] clean: normalize format string of yes/no prompt
  2021-12-16 18:18   ` [PATCH v3 0/4] normalize format of yes/no prompts kashav madan via GitGitGadget
  2021-12-16 18:18     ` [PATCH v3 1/4] bisect--helper: normalize format string " Kashav Madan via GitGitGadget
@ 2021-12-16 18:18     ` Kashav Madan via GitGitGadget
  2021-12-16 18:18     ` [PATCH v3 3/4] add-patch: " Kashav Madan via GitGitGadget
  2021-12-16 18:18     ` [PATCH v3 4/4] help: make auto-correction prompt more consistent Kashav Madan via GitGitGadget
  3 siblings, 0 replies; 14+ messages in thread
From: Kashav Madan via GitGitGadget @ 2021-12-16 18:18 UTC (permalink / raw)
  To: git; +Cc: Johannes Altmanninger, Eric Sunshine, kashav madan, Kashav Madan

From: Kashav Madan <kshvmdn@gmail.com>

Move the question mark in the prompt before the choices to be more
consistent with other similar prompts.

Signed-off-by: Kashav Madan <kshvmdn@gmail.com>
---
 builtin/clean.c | 2 +-
 po/bg.po        | 2 +-
 po/ca.po        | 4 ++--
 po/de.po        | 4 ++--
 po/el.po        | 2 +-
 po/es.po        | 4 ++--
 po/fr.po        | 4 ++--
 po/git.pot      | 2 +-
 po/id.po        | 4 ++--
 po/it.po        | 4 ++--
 po/ko.po        | 4 ++--
 po/pl.po        | 4 ++--
 po/pt_PT.po     | 4 ++--
 po/ru.po        | 4 ++--
 po/sv.po        | 4 ++--
 po/tr.po        | 4 ++--
 po/vi.po        | 4 ++--
 po/zh_CN.po     | 4 ++--
 po/zh_TW.po     | 4 ++--
 19 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/builtin/clean.c b/builtin/clean.c
index 98a2860409b..2b52e522a82 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -752,7 +752,7 @@ static int ask_each_cmd(void)
 		if (!eof) {
 			qname = quote_path(item->string, NULL, &buf, 0);
 			/* TRANSLATORS: Make sure to keep [y/N] as is */
-			printf(_("Remove %s [y/N]? "), qname);
+			printf(_("Remove %s? [y/N] "), qname);
 			if (git_read_line_interactively(&confirm) == EOF) {
 				putchar('\n');
 				eof = 1;
diff --git a/po/bg.po b/po/bg.po
index e0786caa274..10ba01d2817 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -13487,7 +13487,7 @@ msgstr "Избиране на обекти за изтриване"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
+msgid "Remove %s? [y/N] "
 msgstr "Да се изтрие ли „%s“? „y“ —  да, „N“ — НЕ"
 
 #: builtin/clean.c:786
diff --git a/po/ca.po b/po/ca.po
index 71673d48d01..d9798fd530e 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -13211,8 +13211,8 @@ msgstr "Selecciona els ítems a suprimir"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "Voleu eliminar %s [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "Voleu eliminar %s? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/de.po b/po/de.po
index 3e8ef2ed122..442627f3448 100644
--- a/po/de.po
+++ b/po/de.po
@@ -13274,8 +13274,8 @@ msgstr "Wählen Sie Einträge zum Löschen"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "'%s' löschen [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "'%s' löschen? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/el.po b/po/el.po
index 27c8c488ea1..b826b73d460 100644
--- a/po/el.po
+++ b/po/el.po
@@ -9560,7 +9560,7 @@ msgstr ""
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:760
 #, c-format
-msgid "Remove %s [y/N]? "
+msgid "Remove %s? [y/N] "
 msgstr ""
 
 #: builtin/clean.c:785 git-add--interactive.perl:1717
diff --git a/po/es.po b/po/es.po
index ef8ae6d471e..8e9143131d0 100644
--- a/po/es.po
+++ b/po/es.po
@@ -13081,8 +13081,8 @@ msgstr "Seleccionar objetos para borrar"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "¿Borrar %s [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "¿Borrar %s? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/fr.po b/po/fr.po
index 9812213b2fe..ebb5b73ce3b 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -13282,8 +13282,8 @@ msgstr "Sélectionner les éléments à supprimer"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "Supprimer %s [y/N] ? "
+msgid "Remove %s? [y/N] "
+msgstr "Supprimer %s ? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/git.pot b/po/git.pot
index c3102deb5d2..4ef2f39b950 100644
--- a/po/git.pot
+++ b/po/git.pot
@@ -12087,7 +12087,7 @@ msgstr ""
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
+msgid "Remove %s? [y/N] "
 msgstr ""
 
 #: builtin/clean.c:786
diff --git a/po/id.po b/po/id.po
index 3b8b0c39e51..b41e290c94a 100644
--- a/po/id.po
+++ b/po/id.po
@@ -12525,8 +12525,8 @@ msgstr "Pilih item untuk dihapus"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "Hapus %s [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "Hapus %s? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/it.po b/po/it.po
index 01c6d1f095e..b4322699060 100644
--- a/po/it.po
+++ b/po/it.po
@@ -12508,8 +12508,8 @@ msgstr "Seleziona gli elementi da eliminare"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:758
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "Eliminare %s [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "Eliminare %s? [y/N] "
 
 #: builtin/clean.c:789
 msgid ""
diff --git a/po/ko.po b/po/ko.po
index 96d3a2a3be4..29c7a6896fd 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -7179,8 +7179,8 @@ msgstr "삭제할 항목을 선택하십시오"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:763
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "%s 제거합니까 [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "%s 제거합니까? [y/N] "
 
 #: builtin/clean.c:788 git-add--interactive.perl:1717
 #, c-format
diff --git a/po/pl.po b/po/pl.po
index 637a328a869..4d79160a15b 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -13061,8 +13061,8 @@ msgstr "Wybierz elementy do skasowania"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "Usunąć %s [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "Usunąć %s? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/pt_PT.po b/po/pt_PT.po
index a9a67f15484..06da638e981 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -12623,8 +12623,8 @@ msgstr "Selecione itens para eliminar"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "Remover %s [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "Remover %s? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/ru.po b/po/ru.po
index d091ea22e5a..cc886655cfd 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -11466,8 +11466,8 @@ msgstr "Укажите элементы для удаления"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:758
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "Удалить %s [y - да/N - нет]? "
+msgid "Remove %s? [y/N] "
+msgstr "Удалить %s? [y - да/N - нет] "
 
 #: builtin/clean.c:789
 msgid ""
diff --git a/po/sv.po b/po/sv.po
index 6ccb7e7421c..ea9fe33cf9e 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -12981,8 +12981,8 @@ msgstr "Välj poster att ta bort"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "Ta bort %s [Y=ja / N=nej]? "
+msgid "Remove %s? [y/N] "
+msgstr "Ta bort %s? [Y=ja / N=nej] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/tr.po b/po/tr.po
index 686b21459a3..46a1ae5a8d2 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -13040,8 +13040,8 @@ msgstr "Silinecek ögeleri seçin"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "%s kaldırılsın mı [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "%s kaldırılsın mı? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/vi.po b/po/vi.po
index bfb84bd0049..d9c0130af2b 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -13037,8 +13037,8 @@ msgstr "Chọn mục muốn xóa"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "Xóa bỏ “%s” [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "Xóa bỏ “%s”? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 9131b440e6f..a51c81bfc4a 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -12881,8 +12881,8 @@ msgstr "选择要删除的条目"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "删除 %s [y/N]?"
+msgid "Remove %s? [y/N] "
+msgstr "删除 %s? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 80e156c94fc..c5b5f756f33 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -12735,8 +12735,8 @@ msgstr "選擇要刪除的條目"
 #. TRANSLATORS: Make sure to keep [y/N] as is
 #: builtin/clean.c:755
 #, c-format
-msgid "Remove %s [y/N]? "
-msgstr "移除 %s [y/N]? "
+msgid "Remove %s? [y/N] "
+msgstr "移除 %s? [y/N] "
 
 #: builtin/clean.c:786
 msgid ""
-- 
gitgitgadget


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 3/4] add-patch: normalize format string of yes/no prompt
  2021-12-16 18:18   ` [PATCH v3 0/4] normalize format of yes/no prompts kashav madan via GitGitGadget
  2021-12-16 18:18     ` [PATCH v3 1/4] bisect--helper: normalize format string " Kashav Madan via GitGitGadget
  2021-12-16 18:18     ` [PATCH v3 2/4] clean: normalize format string of yes/no prompt Kashav Madan via GitGitGadget
@ 2021-12-16 18:18     ` Kashav Madan via GitGitGadget
  2021-12-16 18:18     ` [PATCH v3 4/4] help: make auto-correction prompt more consistent Kashav Madan via GitGitGadget
  3 siblings, 0 replies; 14+ messages in thread
From: Kashav Madan via GitGitGadget @ 2021-12-16 18:18 UTC (permalink / raw)
  To: git; +Cc: Johannes Altmanninger, Eric Sunshine, kashav madan, Kashav Madan

From: Kashav Madan <kshvmdn@gmail.com>

Move the question mark in the prompt before the choices to be more
consistent with other similar prompts.

Signed-off-by: Kashav Madan <kshvmdn@gmail.com>
---
 add-patch.c | 4 ++--
 po/bg.po    | 2 +-
 po/ca.po    | 4 ++--
 po/de.po    | 4 ++--
 po/el.po    | 4 ++--
 po/es.po    | 6 +++---
 po/fr.po    | 4 ++--
 po/git.pot  | 2 +-
 po/id.po    | 4 ++--
 po/it.po    | 4 ++--
 po/ko.po    | 4 ++--
 po/pl.po    | 4 ++--
 po/pt_PT.po | 4 ++--
 po/ru.po    | 4 ++--
 po/sv.po    | 6 +++---
 po/tr.po    | 4 ++--
 po/vi.po    | 4 ++--
 po/zh_CN.po | 4 ++--
 po/zh_TW.po | 4 ++--
 19 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/add-patch.c b/add-patch.c
index 8c41cdfe39b..9ff2d4f1749 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1245,8 +1245,8 @@ static int edit_hunk_loop(struct add_p_state *s,
 		 * of the word "no" does not start with n.
 		 */
 		res = prompt_yesno(s, _("Your edited hunk does not apply. "
-					"Edit again (saying \"no\" discards!) "
-					"[y/n]? "));
+					"Edit again (saying \"no\" discards!)? "
+					"[y/n] "));
 		if (res < 1)
 			return -1;
 	}
diff --git a/po/bg.po b/po/bg.po
index 10ba01d2817..5f768a72102 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -826,7 +826,7 @@ msgstr "неуспешно изпълнение на „git apply --cached“"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "Редактираното парче не може да се приложи.  Да се продължи ли с "
 "редактирането? (текущите редакции ще се отменят при отказ!): „y“ (да)/ "
diff --git a/po/ca.po b/po/ca.po
index d9798fd530e..8419c7fe04f 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -689,11 +689,11 @@ msgstr "«git apply --cached» ha fallat"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]?"
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n]"
 " "
 msgstr ""
 "El tros editat no s'aplica. Editeu-lo de nou (si responeu «no» es "
-"descartarà) [y/n]? "
+"descartarà)? [y/n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/de.po b/po/de.po
index 442627f3448..367cd73c5a4 100644
--- a/po/de.po
+++ b/po/de.po
@@ -654,10 +654,10 @@ msgstr "'git apply --cached' schlug fehl."
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "Ihr bearbeiteter Patch-Block kann nicht angewendet werden.\n"
-"Erneut bearbeiten? (\"n\" verwirft Bearbeitung!) [y/n]?"
+"Erneut bearbeiten? (\"n\" verwirft Bearbeitung!)? [y/n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/el.po b/po/el.po
index b826b73d460..f5a7936b4a6 100644
--- a/po/el.po
+++ b/po/el.po
@@ -20795,10 +20795,10 @@ msgstr ""
 #. of the word "no" does not start with n.
 #: git-add--interactive.perl:1213
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "Η επεξεργασμένη αλλαγή σας δεν εφαρμόζεται. Να γίνει επεξεργασία πάλι (με \"n"
-"\" απορρίπτεται!) [y/n];"
+"\" απορρίπτεται!); [y/n] "
 
 #: git-add--interactive.perl:1222
 msgid ""
diff --git a/po/es.po b/po/es.po
index 8e9143131d0..3877b1351e6 100644
--- a/po/es.po
+++ b/po/es.po
@@ -644,10 +644,10 @@ msgstr "falló 'git apply --cached'"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
-"Tu hunk editado no aplica. ¿Editar nuevamente (¡decir \"no\" descarta!) [y/"
-"n]? "
+"Tu hunk editado no aplica. ¿Editar nuevamente (¡decir \"no\" descarta!)? [y/"
+"n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/fr.po b/po/fr.po
index ebb5b73ce3b..11b83570f71 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -714,10 +714,10 @@ msgstr "'git apply --cached' a échoué"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "Votre section éditée ne s'applique pas. L'éditer à nouveau (\"no\" "
-"l'élimine !) [y|n] ? "
+"l'élimine !) ? [y|n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/git.pot b/po/git.pot
index 4ef2f39b950..0fe5805d8ec 100644
--- a/po/git.pot
+++ b/po/git.pot
@@ -567,7 +567,7 @@ msgstr ""
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 
 #: add-patch.c:1290
diff --git a/po/id.po b/po/id.po
index b41e290c94a..3a9f703a106 100644
--- a/po/id.po
+++ b/po/id.po
@@ -631,10 +631,10 @@ msgstr "'git apply --cached' gagal"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "Bingkah Anda tak diterapkan. Sunting lagi (bilang \"n\" untuk \"tidak\" "
-"buang!) [y/n]?"
+"buang!)? [y/n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/it.po b/po/it.po
index b4322699060..c077320c697 100644
--- a/po/it.po
+++ b/po/it.po
@@ -660,10 +660,10 @@ msgstr "'git apply --cached' non riuscito"
 #. of the word "no" does not start with n.
 #: add-patch.c:1241 git-add--interactive.perl:1244
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "L'hunk modificato non può essere applicato senza problemi. Modificarlo di "
-"nuovo (se rispondi \"no\", sarà eliminato!) [y/n]? "
+"nuovo (se rispondi \"no\", sarà eliminato!)? [y/n] "
 
 #: add-patch.c:1284
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/ko.po b/po/ko.po
index 29c7a6896fd..1ae95afe670 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -17274,10 +17274,10 @@ msgstr "부분 편집 파일을 읽기용으로 여는데 실패: '%s'"
 #. of the word "no" does not start with n.
 #: git-add--interactive.perl:1213
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "편집한 부분이 적용되지 않습니다. 다시 편집하시겠습니까 (\"no\"라고 하면 버립"
-"니다!) [y/n]? "
+"니다!)? [y/n] "
 
 #: git-add--interactive.perl:1222
 msgid ""
diff --git a/po/pl.po b/po/pl.po
index 4d79160a15b..f9b6bc59dde 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -689,10 +689,10 @@ msgstr "„git apply --cached” nie powiodło się"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "Zmieniony skrawek się nie stosuje.  Edytować ponownie (odpowiedź „nie” go "
-"porzuci!) [y/n]? "
+"porzuci!)? [y/n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 06da638e981..8cabcf9729c 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -844,10 +844,10 @@ msgstr "'git apply --cached' falhou"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "Problema na submissão de pedaço editado. Editar de novo (responder \"n\" "
-"para \"não\" descarta!) [y/n]? "
+"para \"não\" descarta!)? [y/n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/ru.po b/po/ru.po
index cc886655cfd..d8bc1acd810 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -577,9 +577,9 @@ msgstr ""
 #. of the word "no" does not start with n.
 #: add-patch.c:1246 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]?"
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n]"
 " "
-msgstr "Изменённый вами блок не применяется. Редактировать снова (ответ «y» означает «нет»!) [y/n]? "
+msgstr "Изменённый вами блок не применяется. Редактировать снова (ответ «y» означает «нет»!)? [y/n] "
 
 #: add-patch.c:1289
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/sv.po b/po/sv.po
index ea9fe33cf9e..685294c8bac 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -632,10 +632,10 @@ msgstr "\"git apply --cached\" misslyckades"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
-"Ditt redigerade stycke kan inte appliceras. Redigera igen (\"nej\" kastar!) "
-"[y/n]? "
+"Ditt redigerade stycke kan inte appliceras. Redigera igen (\"nej\" kastar!)? "
+"[y/n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/tr.po b/po/tr.po
index 46a1ae5a8d2..4c7cea44183 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -716,10 +716,10 @@ msgstr "'git apply --cached' başarısız oldu"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "Düzenlediğiniz parça uygulanamıyor. Yeniden düzenlensin mi (\"n (hayır)\" "
-"ıskartaya çıkarır!) [y/n]? "
+"ıskartaya çıkarır!)? [y/n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/vi.po b/po/vi.po
index d9c0130af2b..0aed6d2d0a4 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -641,10 +641,10 @@ msgstr "“git apply --cached” gặp lỗi"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
 msgstr ""
 "Hunk đã sửa của bạn không được áp dụng. Sửa lại lần nữa (nói \"n\" để loại "
-"bỏ!) [y/n]? "
+"bỏ!)? [y/n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index a51c81bfc4a..e785a8156ae 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -754,8 +754,8 @@ msgstr "'git apply --cached' 失败"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
-msgstr "您的编辑块不能被应用。重新编辑(选择 \"no\" 丢弃!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
+msgstr "您的编辑块不能被应用。重新编辑(选择 \"no\" 丢弃!)? [y/n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
diff --git a/po/zh_TW.po b/po/zh_TW.po
index c5b5f756f33..a1fb6b5267a 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -637,8 +637,8 @@ msgstr "「git apply --cached」失敗"
 #. of the word "no" does not start with n.
 #: add-patch.c:1247 git-add--interactive.perl:1242
 msgid ""
-"Your edited hunk does not apply. Edit again (saying \"no\" discards!) [y/n]? "
-msgstr "未套用編輯區塊。是否重新編輯(輸入 “no” 捨棄!) [y/n]? "
+"Your edited hunk does not apply. Edit again (saying \"no\" discards!)? [y/n] "
+msgstr "未套用編輯區塊。是否重新編輯(輸入 “no” 捨棄!)? [y/n] "
 
 #: add-patch.c:1290
 msgid "The selected hunks do not apply to the index!"
-- 
gitgitgadget


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 4/4] help: make auto-correction prompt more consistent
  2021-12-16 18:18   ` [PATCH v3 0/4] normalize format of yes/no prompts kashav madan via GitGitGadget
                       ` (2 preceding siblings ...)
  2021-12-16 18:18     ` [PATCH v3 3/4] add-patch: " Kashav Madan via GitGitGadget
@ 2021-12-16 18:18     ` Kashav Madan via GitGitGadget
  3 siblings, 0 replies; 14+ messages in thread
From: Kashav Madan via GitGitGadget @ 2021-12-16 18:18 UTC (permalink / raw)
  To: git; +Cc: Johannes Altmanninger, Eric Sunshine, kashav madan, Kashav Madan

From: Kashav Madan <kshvmdn@gmail.com>

There are three callsites of git_prompt() that ask the user for "yes/no"
confirmation, but the one in help.c, used for auto-correction, is
formatted differently from the others. Update that format string to make
the prompt look more consistent, by adding a space after the prompt and
enclosing the choices in [] instead of ().

Signed-off-by: Kashav Madan <kshvmdn@gmail.com>
---
 help.c      | 2 +-
 po/bg.po    | 4 ++--
 po/ca.po    | 4 ++--
 po/de.po    | 4 ++--
 po/es.po    | 4 ++--
 po/fr.po    | 4 ++--
 po/git.pot  | 2 +-
 po/id.po    | 2 +-
 po/pl.po    | 4 ++--
 po/sv.po    | 4 ++--
 po/tr.po    | 4 ++--
 po/vi.po    | 4 ++--
 po/zh_CN.po | 4 ++--
 po/zh_TW.po | 4 ++--
 14 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/help.c b/help.c
index 973e47cdc30..2cd08b199c2 100644
--- a/help.c
+++ b/help.c
@@ -643,7 +643,7 @@ const char *help_unknown_cmd(const char *cmd)
 		else if (autocorrect == AUTOCORRECT_PROMPT) {
 			char *answer;
 			struct strbuf msg = STRBUF_INIT;
-			strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
+			strbuf_addf(&msg, _("Run '%s' instead? [y/N] "), assumed);
 			answer = git_prompt(msg.buf, PROMPT_ECHO);
 			strbuf_release(&msg);
 			if (!(starts_with(answer, "y") ||
diff --git a/po/bg.po b/po/bg.po
index 5f768a72102..5933ea51b06 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -4800,8 +4800,8 @@ msgstr ""
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
-msgstr "Да се изпълни „%s“ вместо това? (y/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "Да се изпълни „%s“ вместо това? [y/N] "
 
 #: help.c:654
 #, c-format
diff --git a/po/ca.po b/po/ca.po
index 8419c7fe04f..0c1084d8733 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -4665,8 +4665,8 @@ msgstr "El procés continuarà, pressuposant que volíeu dir «%s»."
 
 #: help.c:646
 #, c-format, fuzzy
-msgid "Run '%s' instead? (y/N)"
-msgstr "Voleu executar «%s»? (s/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "Voleu executar «%s»? [s/N] "
 
 #: help.c:654
 #, c-format
diff --git a/po/de.po b/po/de.po
index 367cd73c5a4..4afe6f94325 100644
--- a/po/de.po
+++ b/po/de.po
@@ -4620,8 +4620,8 @@ msgstr "Setze fort unter der Annahme, dass Sie '%s' meinten."
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
-msgstr "Stattdessen '%s' ausführen? (y/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "Stattdessen '%s' ausführen? [y/N] "
 
 #: help.c:654
 #, c-format
diff --git a/po/es.po b/po/es.po
index 3877b1351e6..472a633a8f2 100644
--- a/po/es.po
+++ b/po/es.po
@@ -4565,8 +4565,8 @@ msgstr "Continuando asumiendo que quisiste decir '%s'."
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
-msgstr "Ejecutar '%s' en su lugar? (y/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "Ejecutar '%s' en su lugar? [y/N] "
 
 #: help.c:654
 #, c-format
diff --git a/po/fr.po b/po/fr.po
index 11b83570f71..b9c111c096b 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -4698,8 +4698,8 @@ msgstr "Continuons en supposant que vous avez voulu dire '%s'."
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
-msgstr "Lancer '%s' à la place ? (y/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "Lancer '%s' à la place ? [y/N] "
 
 #: help.c:654
 #, c-format
diff --git a/po/git.pot b/po/git.pot
index 0fe5805d8ec..c4ff320187a 100644
--- a/po/git.pot
+++ b/po/git.pot
@@ -4246,7 +4246,7 @@ msgstr ""
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
+msgid "Run '%s' instead? [y/N] "
 msgstr ""
 
 #: help.c:654
diff --git a/po/id.po b/po/id.po
index 3a9f703a106..4ffe1005120 100644
--- a/po/id.po
+++ b/po/id.po
@@ -4415,7 +4415,7 @@ msgstr "Melanjutkan di bawah asumsi bahwa maksud Anda '%s'."
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
+msgid "Run '%s' instead? [y/N] "
 msgstr ""
 
 #: help.c:654
diff --git a/po/pl.po b/po/pl.po
index f9b6bc59dde..bfbb2be5ca2 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -4591,8 +4591,8 @@ msgstr "Zakładam dalej, że chodziło o „%s”."
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
-msgstr "Wykonać zamiast tego „%s”? (y/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "Wykonać zamiast tego „%s”? [y/N] "
 
 #: help.c:654
 #, c-format
diff --git a/po/sv.po b/po/sv.po
index 685294c8bac..a43e1072b53 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -4528,8 +4528,8 @@ msgstr "Fortsätter under förutsättningen att du menade \"%s\"."
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
-msgstr "Köra \"%s\" istället? (j/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "Köra \"%s\" istället? [j/N] "
 
 #: help.c:654
 #, c-format
diff --git a/po/tr.po b/po/tr.po
index 4c7cea44183..40d5ec8d703 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -4597,8 +4597,8 @@ msgstr "'%s' demek istediğiniz varsayılarak sürdürülüyor."
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
-msgstr "Bunun yerine '%s' çalıştır? (y/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "Bunun yerine '%s' çalıştır? [y/N] "
 
 #: help.c:654
 #, c-format
diff --git a/po/vi.po b/po/vi.po
index 0aed6d2d0a4..b8500e04f99 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -4535,8 +4535,8 @@ msgstr "Tiếp tục và coi rằng ý bạn là “%s”."
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
-msgstr "Chạy “%s” để thay thế? (y/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "Chạy “%s” để thay thế? [y/N] "
 
 #: help.c:654
 #, c-format
diff --git a/po/zh_CN.po b/po/zh_CN.po
index e785a8156ae..475c43f0ea2 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -4546,8 +4546,8 @@ msgstr "假定您想要的是 '%s' 并继续。"
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
-msgstr "取而代之运行 '%s' ? (y/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "取而代之运行 '%s' ? [y/N] "
 
 #: help.c:654
 #, c-format
diff --git a/po/zh_TW.po b/po/zh_TW.po
index a1fb6b5267a..8727a72e182 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -4411,8 +4411,8 @@ msgstr "假定你想要的是 '%s' 並繼續。"
 
 #: help.c:646
 #, c-format
-msgid "Run '%s' instead? (y/N)"
-msgstr "改執行「%s」?(y/N)"
+msgid "Run '%s' instead? [y/N] "
+msgstr "改執行「%s」?[y/N] "
 
 #: help.c:654
 #, c-format
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] help: add space after autocorrect prompt
  2021-12-16  6:27   ` Johannes Altmanninger
  2021-12-16 15:55     ` Eric Sunshine
@ 2021-12-16 21:32     ` Junio C Hamano
  1 sibling, 0 replies; 14+ messages in thread
From: Junio C Hamano @ 2021-12-16 21:32 UTC (permalink / raw)
  To: Johannes Altmanninger; +Cc: kashav madan via GitGitGadget, git, kashav madan

Johannes Altmanninger <aclopte@gmail.com> writes:

>>  - It does not leave a SP before where the end-user input goes;
>>  - It append (y/N) _after_ question mark;
>
> I actually prefer this one;
>
> 	Run 'status' instead? [y/N] 
>
> sounds better than
>
> 	Run 'status' instead [y/N]? 
>
> but that's not a strong opinion.

It is fine to have your own preference, but we are discussing to
make the three, two of which use "[choices]? " while only one uses
"? (choices)", consistent.  

So I'd prefer to see us turn the odd man out to do "[choices]? "
first.  Adjusting to your personal preference can be proposed after
the dust settles for the consistency fix.

Thanks.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 1/4] bisect--helper: normalize format string of yes/no prompts
  2021-12-16 18:18     ` [PATCH v3 1/4] bisect--helper: normalize format string " Kashav Madan via GitGitGadget
@ 2021-12-16 21:39       ` Junio C Hamano
  2021-12-16 21:49         ` Junio C Hamano
  0 siblings, 1 reply; 14+ messages in thread
From: Junio C Hamano @ 2021-12-16 21:39 UTC (permalink / raw)
  To: Kashav Madan via GitGitGadget
  Cc: git, Johannes Altmanninger, Eric Sunshine, kashav madan

"Kashav Madan via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Kashav Madan <kshvmdn@gmail.com>
>
> Both callers of git_prompt in bisect--helper.c ask the user for yes/no
> confirmation. They both place the question mark after the choices,
> however this is inconsistent with how most UNIX-y tools do it. Update
> the format string to exclude the choices from the question.

Is there somewhere that the claim can be confirmed?  I am not having
much luck with queries like

https://www.google.com/search?q=prompt+question+mark+and+choices

that gave https://home.csulb.edu/~murdock/choice.html the most
relevant page X-<.

I personally do not think this step is worth doing, but in any case,
NEVER touch po/* directory when you are updating code and strings in
the code.  It is something our i18n coordinator will do at certain
point in the release cycle.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 1/4] bisect--helper: normalize format string of yes/no prompts
  2021-12-16 21:39       ` Junio C Hamano
@ 2021-12-16 21:49         ` Junio C Hamano
  0 siblings, 0 replies; 14+ messages in thread
From: Junio C Hamano @ 2021-12-16 21:49 UTC (permalink / raw)
  To: Kashav Madan via GitGitGadget
  Cc: git, Johannes Altmanninger, Eric Sunshine, kashav madan

Junio C Hamano <gitster@pobox.com> writes:

> "Kashav Madan via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> From: Kashav Madan <kshvmdn@gmail.com>
>>
>> Both callers of git_prompt in bisect--helper.c ask the user for yes/no
>> confirmation. They both place the question mark after the choices,
>> however this is inconsistent with how most UNIX-y tools do it. Update
>> the format string to exclude the choices from the question.
>
> Is there somewhere that the claim can be confirmed?  I am not having
> much luck with queries like
>
> https://www.google.com/search?q=prompt+question+mark+and+choices
>
> that gave https://home.csulb.edu/~murdock/choice.html the most
> relevant page X-<.
>
> I personally do not think this step is worth doing, but in any case,
> NEVER touch po/* directory when you are updating code and strings in
> the code.  It is something our i18n coordinator will do at certain
> point in the release cycle.

After reading the series through, it seems all four patches share
the same problem (i.e. swapping ? and choices, and touching po/*).

I'll discard this round, and instead queue the v2 from you, using
the proposed log message to what I wrote for you during my review.

Thanks for your first contribution, and welcome to the Git
development community ;-)

----- >8 --------- >8 --------- >8 --------- >8 --------- >8 -----
From: Kashav Madan <kshvmdn@gmail.com>
Date: Wed, 15 Dec 2021 22:58:58 +0000
Subject: [PATCH] help: make auto-correction prompt more consistent

There are three callsites of git_prompt() helper function that ask a
"yes/no" question to the end user, but one of them in help.c that
asks if the suggested auto-correction is OK, which is given when the
user makes a possible typo in a Git subcommand name, is formatted
differently from the others.

Update the format string to make the prompt string look more
consistent.

Signed-off-by: Kashav Madan <kshvmdn@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 help.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/help.c b/help.c
index 973e47cdc3..71444906dd 100644
--- a/help.c
+++ b/help.c
@@ -643,7 +643,7 @@ const char *help_unknown_cmd(const char *cmd)
 		else if (autocorrect == AUTOCORRECT_PROMPT) {
 			char *answer;
 			struct strbuf msg = STRBUF_INIT;
-			strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
+			strbuf_addf(&msg, _("Run '%s' instead [y/N]? "), assumed);
 			answer = git_prompt(msg.buf, PROMPT_ECHO);
 			strbuf_release(&msg);
 			if (!(starts_with(answer, "y") ||
-- 
2.34.1-469-g0a17e94afe


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-12-16 21:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 21:41 [PATCH] help: add space after autocorrect prompt kashav madan via GitGitGadget
2021-12-15 22:32 ` Junio C Hamano
2021-12-16  6:27   ` Johannes Altmanninger
2021-12-16 15:55     ` Eric Sunshine
2021-12-16 21:32     ` Junio C Hamano
2021-12-15 22:58 ` [PATCH v2] help: make auto-correction prompt more consistent kashav madan via GitGitGadget
2021-12-16  3:12   ` Junio C Hamano
2021-12-16 18:18   ` [PATCH v3 0/4] normalize format of yes/no prompts kashav madan via GitGitGadget
2021-12-16 18:18     ` [PATCH v3 1/4] bisect--helper: normalize format string " Kashav Madan via GitGitGadget
2021-12-16 21:39       ` Junio C Hamano
2021-12-16 21:49         ` Junio C Hamano
2021-12-16 18:18     ` [PATCH v3 2/4] clean: normalize format string of yes/no prompt Kashav Madan via GitGitGadget
2021-12-16 18:18     ` [PATCH v3 3/4] add-patch: " Kashav Madan via GitGitGadget
2021-12-16 18:18     ` [PATCH v3 4/4] help: make auto-correction prompt more consistent Kashav Madan via GitGitGadget

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).