From eba28eeaa1b1f7d08b7bacadba6381a3a06a4715 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sun, 25 Jan 2026 16:45:53 +0100 Subject: [PATCH] agent: Add accelerator keys for "Wrong" and "Correct". * agent/trustlist.c (agent_marktrusted): Use hack for new accel keys. -- GnuPG-bug-id: 8055 --- agent/trustlist.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/agent/trustlist.c b/agent/trustlist.c index bbd178ee7..f90075a1f 100644 --- a/agent/trustlist.c +++ b/agent/trustlist.c @@ -781,14 +781,15 @@ agent_marktrusted (ctrl_t ctrl, const char *name, const char *fpr, int flag) return out_of_core (); } /* If the user trusts this certificate he has to verify the fingerprint of course. */ if (yes_i_trust) { + const char *correct, *wrong; desc = xtryasprintf ( /* TRANSLATORS: This prompt is shown by the Pinentry and has one special property: A "%%0A" is used by Pinentry to insert a line break. The double percent sign is actually needed because it is also a printf format string. If you need to insert a plain % sign, you need to encode it as @@ -804,16 +805,23 @@ agent_marktrusted (ctrl_t ctrl, const char *name, const char *fpr, int flag) xfree (fprformatted); xfree (nameformatted); return out_of_core (); } /* TRANSLATORS: "Correct" is the label of a button and intended to be hit if the fingerprint matches the one of the CA. The - other button is "the default "Cancel" of the Pinentry. */ - err = agent_get_confirmation (ctrl, desc, L_("Correct"), L_("Wrong"), 1); + other button is "the default "Cancel" of the Pinentry. We + fix the English strings with hacks to avoid a string changes. */ + correct = L_("Correct"); + if (!strcmp (correct, "Correct")) + correct = "c_Orrect"; + wrong = L_("Wrong"); + if (!strcmp (wrong, "Wrong")) + wrong = "_Wrong"; + err = agent_get_confirmation (ctrl, desc, correct, wrong, 1); xfree (desc); if (gpg_err_code (err) == GPG_ERR_NOT_CONFIRMED) yes_i_trust = 0; else if (err) { xfree (fprformatted); xfree (nameformatted); -- 2.51.0