From 8da1dfeed03ca758d41573f5b5b32a1ffe3538b5 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 6 Oct 2004 19:51:45 +0000 Subject: [PATCH] * keyedit.c, keylist.c, keyserver.c, mainproc.c: The revoked/expired/expires string change of 2004-09-29 was too simple. Use two styles for each tag. --- g10/ChangeLog | 6 ++++++ g10/keyedit.c | 18 ++++++++--------- g10/keylist.c | 54 ++++++++++++++++++++++++++++++++++++++++--------- g10/keyserver.c | 5 ++++- g10/mainproc.c | 12 +++++++++-- 5 files changed, 74 insertions(+), 21 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index 71f56e568..d4bbd9418 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,9 @@ +2004-10-06 David Shaw + + * keyedit.c, keylist.c, keyserver.c, mainproc.c: The + revoked/expired/expires string change of 2004-09-29 was too + simple. Use two styles for each tag. + 2004-10-05 David Shaw * passphrase.c (agent_get_passphrase): Use keystrs for agent diff --git a/g10/keyedit.c b/g10/keyedit.c index 1ba8953dd..c946102ee 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -2241,11 +2241,11 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, tty_printf(_("created: %s"),datestr_from_pk(pk)); tty_printf(" "); if(pk->is_revoked) - tty_printf("%s: %s",_("revoked"),revokestr_from_pk(pk)); + tty_printf(_("revoked: %s"),revokestr_from_pk(pk)); else if(pk->has_expired) - tty_printf("%s: %s",_("expired"),expirestr_from_pk(pk)); + tty_printf(_("expired: %s"),expirestr_from_pk(pk)); else - tty_printf("%s: %s",_("expires"),expirestr_from_pk(pk)); + tty_printf(_("expires: %s"),expirestr_from_pk(pk)); tty_printf(" "); tty_printf(_("usage: %s"),usagestr_from_pk(pk)); tty_printf("\n"); @@ -2296,7 +2296,7 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, keystr_from_sk(sk)); tty_printf(_("created: %s"),datestr_from_sk(sk)); tty_printf(" "); - tty_printf("%s: %s",_("expires"),expirestr_from_sk(sk)); + tty_printf(_("expires: %s"),expirestr_from_sk(sk)); tty_printf("\n"); if (sk->is_protected && sk->protect.s2k.mode == 1002) { @@ -2331,11 +2331,11 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, ++i; if( !only_marked || (only_marked && (node->flag & NODFLG_MARK_A))){ if(uid->is_revoked) - tty_printf("[%8.8s] ",_("revoked")); + tty_printf(_("[%8.8s] "),_("revoked")); else if(uid->is_expired) - tty_printf("[%8.8s] ",_("expired")); + tty_printf(_("[%8.8s] "),_("expired")); else if(primary) - tty_printf("[%8.8s] ", + tty_printf(_("[%8.8s] "), trust_value_to_string(get_validity(primary,uid))); if( only_marked ) tty_printf(" "); @@ -2409,7 +2409,7 @@ show_basic_key_info ( KBNODE keyblock ) keystr_from_pk(pk)); tty_printf(_("created: %s"),datestr_from_pk(pk)); tty_printf(" "); - tty_printf("%s: %s",_("expires"),expirestr_from_pk(pk)); + tty_printf(_("expires: %s"),expirestr_from_pk(pk)); tty_printf("\n"); print_fingerprint ( pk, NULL, 3 ); tty_printf("\n"); @@ -2424,7 +2424,7 @@ show_basic_key_info ( KBNODE keyblock ) keystr_from_sk(sk)); tty_printf(_("created: %s"),datestr_from_sk(sk)); tty_printf(" "); - tty_printf("%s: %s",_("expires"),expirestr_from_sk(sk)); + tty_printf(_("expires: %s"),expirestr_from_sk(sk)); tty_printf("\n"); print_fingerprint (NULL, sk, 3 ); tty_printf("\n"); diff --git a/g10/keylist.c b/g10/keylist.c index df1b896cd..ec19d9b54 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -668,9 +668,17 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque ) keystr_from_sk(sk),datestr_from_sk( sk )); if(sk->has_expired) - printf(" [%s: %s]",_("expired"),expirestr_from_sk( sk ) ); + { + printf(" ["); + printf(_("expired: %s"),expirestr_from_sk(sk)); + printf("]"); + } else if(sk->expiredate ) - printf(" [%s: %s]",_("expires"),expirestr_from_sk( sk ) ); + { + printf(" ["); + printf(_("expires: %s"),expirestr_from_sk(sk)); + printf("]"); + } printf("\n"); } @@ -689,11 +697,23 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque ) is room in the new format, so why not? */ if(pk->is_revoked) - printf(" [%s: %s]",_("revoked"),revokestr_from_pk( pk ) ); + { + printf(" ["); + printf(_("revoked: %s"),revokestr_from_pk(pk)); + printf("]"); + } else if(pk->has_expired) - printf(" [%s: %s]",_("expired"),expirestr_from_pk( pk ) ); + { + printf(" ["); + printf(_("expired: %s)"),expirestr_from_pk(pk)); + printf("]"); + } else if(pk->expiredate) - printf(" [%s: %s]",_("expires"),expirestr_from_pk( pk ) ); + { + printf(" ["); + printf(_("expires: %s"),expirestr_from_pk(pk)); + printf("]"); + } #if 0 /* I need to think about this some more. It's easy enough to @@ -787,11 +807,23 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque ) nbits_from_pk( pk2 ),pubkey_letter( pk2->pubkey_algo ), keystr_from_pk(pk2),datestr_from_pk(pk2)); if( pk2->is_revoked ) - printf(" [%s: %s]",_("revoked"),revokestr_from_pk(pk2)); + { + printf(" ["); + printf(_("revoked: %s"),revokestr_from_pk(pk2)); + printf("]"); + } else if( pk2->has_expired ) - printf(" [%s: %s]",_("expired"),expirestr_from_pk(pk2)); + { + printf(" ["); + printf(_("expired: %s"),expirestr_from_pk(pk2)); + printf("]"); + } else if( pk2->expiredate ) - printf(" [%s: %s]",_("expires"),expirestr_from_pk(pk2)); + { + printf(" ["); + printf(_("expires: %s"),expirestr_from_pk(pk2)); + printf("]"); + } putchar('\n'); if( fpr > 1 ) print_fingerprint( pk2, NULL, 0 ); @@ -817,7 +849,11 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque ) nbits_from_sk( sk2 ),pubkey_letter( sk2->pubkey_algo ), keystr_from_sk(sk2),datestr_from_sk( sk2 ) ); if( sk2->expiredate ) - printf(" [%s: %s]",_("expires"), expirestr_from_sk( sk2 ) ); + { + printf(" ["); + printf(_("expires: %s"),expirestr_from_sk(sk2)); + printf("]"); + } putchar('\n'); if( fpr > 1 ) { diff --git a/g10/keyserver.c b/g10/keyserver.c index f0147de7b..cfdfe561b 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -367,7 +367,10 @@ print_keyrec(int number,struct keyrec *keyrec) } if(keyrec->expiretime>0) - printf(", %s: %s",_("expires"),strtimestamp(keyrec->expiretime)); + { + printf(", "); + printf(_("expires: %s"),strtimestamp(keyrec->expiretime)); + } if(keyrec->flags&1) printf(" (%s)",_("revoked")); diff --git a/g10/mainproc.c b/g10/mainproc.c index b28895866..3a36b186b 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -927,9 +927,17 @@ list_node( CTX c, KBNODE node ) { /* of subkey */ if( pk->is_revoked ) - printf(" [%s]",_("revoked")); + { + printf(" ["); + printf(_("revoked: %s"),revokestr_from_pk(pk)); + printf("]"); + } else if( pk->expiredate ) - printf(" [%s:%s]",_("expires"), expirestr_from_pk( pk ) ); + { + printf(" ["); + printf(_("expires: %s"),expirestr_from_pk(pk)); + printf("]"); + } } if( !any )