mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* trustdb.h, trustdb.c (uid_trust_string_fixed): New. Return a fixed-size
translatable string similar to trust_value_to_string. This allows for easier lining up of displays. * keyedit.c (show_key_with_all_names), keylist.c (list_keyblock_print): Use it here to print validity strings. * gpgv.c: Stub.
This commit is contained in:
parent
44289a4e68
commit
04b715e4da
6 changed files with 58 additions and 29 deletions
|
@ -489,6 +489,34 @@ trust_letter (unsigned int value)
|
|||
}
|
||||
}
|
||||
|
||||
/* NOTE TO TRANSLATOR: these strings are similar to those in
|
||||
trust_value_to_string(), but are a fixed length. This is needed to
|
||||
make attractive information listings where columns line up
|
||||
properly. The value "10" should be the length of the strings you
|
||||
choose to translate to. This is the length in printable
|
||||
columns. */
|
||||
const char *
|
||||
uid_trust_string_fixed(PKT_public_key *key,PKT_user_id *uid)
|
||||
{
|
||||
if(!key && !uid)
|
||||
return _("10");
|
||||
else if(uid->is_revoked)
|
||||
return _("[ revoked]");
|
||||
else if(uid->is_expired)
|
||||
return _("[ expired]");
|
||||
else if(key)
|
||||
switch(get_validity(key,uid)&TRUST_MASK)
|
||||
{
|
||||
case TRUST_UNKNOWN: return _("[ unknown]");
|
||||
case TRUST_UNDEFINED: return _("[ undef ]");
|
||||
case TRUST_MARGINAL: return _("[marginal]");
|
||||
case TRUST_FULLY: return _("[ full ]");
|
||||
case TRUST_ULTIMATE: return _("[ultimate]");
|
||||
}
|
||||
|
||||
return "err";
|
||||
}
|
||||
|
||||
/* The strings here are similar to those in
|
||||
pkclist.c:do_edit_ownertrust() */
|
||||
const char *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue