aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-02-19 12:25:13 +0000
committerWerner Koch <[email protected]>2010-02-19 12:25:13 +0000
commite1719778afdf43ab6ec3a7b64987041e148f9027 (patch)
tree8df230ab22df2419a9eafe2aad8ea526c7dd83ca
parentFixed backport of libassuan-2 changes. (diff)
downloadgnupg-e1719778afdf43ab6ec3a7b64987041e148f9027.tar.gz
gnupg-e1719778afdf43ab6ec3a7b64987041e148f9027.zip
Remove ranslation prefixes and add default-prompt.
-rw-r--r--agent/ChangeLog4
-rw-r--r--agent/call-pinentry.c15
2 files changed, 14 insertions, 5 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 382910af3..68accb88e 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-19 Werner Koch <[email protected]>
+
+ * call-pinentry.c (start_pinentry): Remove a translation prefix.
+
2010-02-18 Werner Koch <[email protected]>
* protect.c (agent_unprotect): Initialize CLEARTEXT.
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index 47fa7261b..fab9b8e1d 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -394,20 +394,25 @@ start_pinentry (ctrl_t ctrl)
may help a pinentry to avoid implementing localization code. */
static struct { const char *key, *value; } tbl[] = {
/* TRANSLATORS: These are labels for buttons etc used in
- Pinentries. A underscore indicates that the next letter
- should be used as an accelerator. The actual to be
- translated text starts after the second vertical bar. */
+ Pinentries. An underscore indicates that the next letter
+ should be used as an accelerator. Double the underscore for
+ a literal one. The actual to be translated text starts after
+ the second vertical bar. */
{ "ok", N_("|pinentry-label|_OK") },
{ "cancel", N_("|pinentry-label|_Cancel") },
+ { "prompt", N_("|pinentry-label|PIN:") },
{ NULL, NULL}
};
char *optstr;
int idx;
+ const char *s, *s2;
for (idx=0; tbl[idx].key; idx++)
{
- if (asprintf (&optstr, "OPTION default-%s=%s",
- tbl[idx].key, _(tbl[idx].value)) < 0 )
+ s = _(tbl[idx].value);
+ if (*s == '|' && (s2=strchr (s+1,'|')))
+ s = s2+1;
+ if (asprintf (&optstr, "OPTION default-%s=%s", tbl[idx].key, s) < 0 )
return unlock_pinentry (out_of_core ());
assuan_transact (entry_ctx, optstr, NULL, NULL, NULL, NULL, NULL,
NULL);