[svn] GnuPG - r5271 - branches/STABLE-BRANCH-2-0/agent
svn author wk
cvs at cvs.gnupg.org
Fri Feb 19 13:25:14 CET 2010
Author: wk
Date: 2010-02-19 13:25:13 +0100 (Fri, 19 Feb 2010)
New Revision: 5271
Modified:
branches/STABLE-BRANCH-2-0/agent/ChangeLog
branches/STABLE-BRANCH-2-0/agent/call-pinentry.c
Log:
Remove ranslation prefixes and add default-prompt.
Modified: branches/STABLE-BRANCH-2-0/agent/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-2-0/agent/ChangeLog 2010-02-18 10:56:12 UTC (rev 5270)
+++ branches/STABLE-BRANCH-2-0/agent/ChangeLog 2010-02-19 12:25:13 UTC (rev 5271)
@@ -1,3 +1,7 @@
+2010-02-19 Werner Koch <wk at g10code.com>
+
+ * call-pinentry.c (start_pinentry): Remove a translation prefix.
+
2010-02-18 Werner Koch <wk at g10code.com>
* protect.c (agent_unprotect): Initialize CLEARTEXT.
Modified: branches/STABLE-BRANCH-2-0/agent/call-pinentry.c
===================================================================
--- branches/STABLE-BRANCH-2-0/agent/call-pinentry.c 2010-02-18 10:56:12 UTC (rev 5270)
+++ branches/STABLE-BRANCH-2-0/agent/call-pinentry.c 2010-02-19 12:25:13 UTC (rev 5271)
@@ -394,20 +394,25 @@
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);
More information about the Gnupg-commits
mailing list