mirror of
git://git.gnupg.org/gnupg.git
synced 2025-06-13 18:21:03 +02:00
Remove ranslation prefixes and add default-prompt.
This commit is contained in:
parent
ae4afd61a5
commit
e1719778af
@ -1,3 +1,7 @@
|
|||||||
|
2010-02-19 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* call-pinentry.c (start_pinentry): Remove a translation prefix.
|
||||||
|
|
||||||
2010-02-18 Werner Koch <wk@g10code.com>
|
2010-02-18 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* protect.c (agent_unprotect): Initialize CLEARTEXT.
|
* protect.c (agent_unprotect): Initialize CLEARTEXT.
|
||||||
|
@ -394,20 +394,25 @@ start_pinentry (ctrl_t ctrl)
|
|||||||
may help a pinentry to avoid implementing localization code. */
|
may help a pinentry to avoid implementing localization code. */
|
||||||
static struct { const char *key, *value; } tbl[] = {
|
static struct { const char *key, *value; } tbl[] = {
|
||||||
/* TRANSLATORS: These are labels for buttons etc used in
|
/* TRANSLATORS: These are labels for buttons etc used in
|
||||||
Pinentries. A underscore indicates that the next letter
|
Pinentries. An underscore indicates that the next letter
|
||||||
should be used as an accelerator. The actual to be
|
should be used as an accelerator. Double the underscore for
|
||||||
translated text starts after the second vertical bar. */
|
a literal one. The actual to be translated text starts after
|
||||||
|
the second vertical bar. */
|
||||||
{ "ok", N_("|pinentry-label|_OK") },
|
{ "ok", N_("|pinentry-label|_OK") },
|
||||||
{ "cancel", N_("|pinentry-label|_Cancel") },
|
{ "cancel", N_("|pinentry-label|_Cancel") },
|
||||||
|
{ "prompt", N_("|pinentry-label|PIN:") },
|
||||||
{ NULL, NULL}
|
{ NULL, NULL}
|
||||||
};
|
};
|
||||||
char *optstr;
|
char *optstr;
|
||||||
int idx;
|
int idx;
|
||||||
|
const char *s, *s2;
|
||||||
|
|
||||||
for (idx=0; tbl[idx].key; idx++)
|
for (idx=0; tbl[idx].key; idx++)
|
||||||
{
|
{
|
||||||
if (asprintf (&optstr, "OPTION default-%s=%s",
|
s = _(tbl[idx].value);
|
||||||
tbl[idx].key, _(tbl[idx].value)) < 0 )
|
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 ());
|
return unlock_pinentry (out_of_core ());
|
||||||
assuan_transact (entry_ctx, optstr, NULL, NULL, NULL, NULL, NULL,
|
assuan_transact (entry_ctx, optstr, NULL, NULL, NULL, NULL, NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user