summaryrefslogtreecommitdiffstats
path: root/scd
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-02-22 16:54:32 +0100
committerWerner Koch <wk@gnupg.org>2017-02-22 18:51:02 +0100
commitf98c8cb013033c08e98ebedcc0e084fbd2a85b0c (patch)
tree1b08ac483f95f8b9110acf88b62be00ba275a84b /scd
parentRevert "scd: Nitpicks on the improved card prompts" (diff)
downloadgnupg2-f98c8cb013033c08e98ebedcc0e084fbd2a85b0c.tar.xz
gnupg2-f98c8cb013033c08e98ebedcc0e084fbd2a85b0c.zip
scd,agent: Improve the OpenPGP PIN prompt texts.
* scd/app-openpgp.c (get_prompt_info): Change texts. * agent/call-pinentry.c (struct entry_features): New. (getinfo_features_cb): New. (start_pinentry): Set new fucntion as status callback. (build_cmd_setdesc): New. Replace all snprintf for SETDESC by this one. -- Suggested-by: Andre Heinecke Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'scd')
-rw-r--r--scd/app-openpgp.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 90c26612c..5e75d4bdd 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -1986,19 +1986,30 @@ get_prompt_info (app_t app, int chvno, unsigned long sigcount, int remaining)
disp_name = get_disp_name (app);
if (chvno == 1)
{
- result = xtryasprintf (_("Card number:\t%s%%0A"
- "Signatures:\t%lu%%0A"
- "Cardholder:\t%s"),
+ /* TRANSLATORS: Put a \x1f right before a colon. This can be
+ * used by pinentry to nicely align the names and values. Keep
+ * the %s at the start and end of the string. */
+ result = xtryasprintf (_("%s"
+ "Number\x1f: %s%%0A"
+ "Holder\x1f: %s%%0A"
+ "Counter\x1f: %lu"
+ "%s"),
+ "\x1e",
serial,
+ disp_name? disp_name:"",
sigcount,
- disp_name? disp_name:"");
+ "");
}
else
{
- result = xtryasprintf (_("Card number:\t%s%%0A"
- "Cardholder:\t%s"),
+ result = xtryasprintf (_("%s"
+ "Number\x1f: %s%%0A"
+ "Holder\x1f: %s"
+ "%s"),
+ "\x1e",
serial,
- disp_name? disp_name:"");
+ disp_name? disp_name:"",
+ "");
}
xfree (disp_name);
xfree (serial);