[PATCH] help: add space after autocorrect prompt

Subsystems: the rest

STALE1709d

7 messages, 1 author, 2021-12-16 · open the first message on its own page

[PATCH] help: add space after autocorrect prompt

From: kashav madan via GitGitGadget <hidden>
Date: 2021-12-15 21:41:12

From: Kashav Madan <redacted>

Signed-off-by: Kashav Madan <redacted>
---
    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

[PATCH v2] help: make auto-correction prompt more consistent

From: kashav madan via GitGitGadget <hidden>
Date: 2021-12-15 22:59:03

From: Kashav Madan <redacted>

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 <redacted>
---
    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 [off-list ref]
      
       ## 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 [off-list ref]
      
     @@ 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

[PATCH v3 0/4] normalize format of yes/no prompts

From: kashav madan via GitGitGadget <hidden>
Date: 2021-12-16 18:19:07

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

[PATCH v3 2/4] clean: normalize format string of yes/no prompt

From: Kashav Madan via GitGitGadget <hidden>
Date: 2021-12-16 18:19:09

From: Kashav Madan <redacted>

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

Signed-off-by: Kashav Madan <redacted>
---
 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

[PATCH v3 1/4] bisect--helper: normalize format string of yes/no prompts

From: Kashav Madan via GitGitGadget <hidden>
Date: 2021-12-16 18:19:10

From: Kashav Madan <redacted>

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 <redacted>
---
 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

[PATCH v3 3/4] add-patch: normalize format string of yes/no prompt

From: Kashav Madan via GitGitGadget <hidden>
Date: 2021-12-16 18:19:11

From: Kashav Madan <redacted>

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

Signed-off-by: Kashav Madan <redacted>
---
 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

[PATCH v3 4/4] help: make auto-correction prompt more consistent

From: Kashav Madan via GitGitGadget <hidden>
Date: 2021-12-16 18:19:13

From: Kashav Madan <redacted>

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help