* pkclist.c (do_edit_ownertrust): Use the same translated string for
authorDavid Shaw <dshaw@jabberwocky.com>
Mon, 11 Oct 2004 21:08:37 +0000 (21:08 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Mon, 11 Oct 2004 21:08:37 +0000 (21:08 +0000)
showing the user ID as mainproc.c:print_pkenc_list.

* mainproc.c (print_pkenc_list): Allow translating the quotes around the
user ID.

* card-util.c, g10.c, photoid.c, trustdb.c: The last of the \"%s\" -> `%s'
quoting for things that aren't user IDs.

* keyserver.c (keyserver_spawn): If there is no keyserver host, print the
whole URI since it is self-contained.

g10/ChangeLog
g10/card-util.c
g10/g10.c
g10/keyserver.c
g10/mainproc.c
g10/photoid.c
g10/pkclist.c
g10/trustdb.c

index b98a377..ba899b2 100644 (file)
@@ -1,3 +1,17 @@
+2004-10-11  David Shaw  <dshaw@jabberwocky.com>
+
+       * pkclist.c (do_edit_ownertrust): Use the same translated string
+       for showing the user ID as mainproc.c:print_pkenc_list.
+
+       * mainproc.c (print_pkenc_list): Allow translating the quotes
+       around the user ID.
+
+       * card-util.c, g10.c, photoid.c, trustdb.c: The last of the \"%s\"
+       -> `%s' quoting for things that aren't user IDs.
+
+       * keyserver.c (keyserver_spawn): If there is no keyserver host,
+       print the whole URI since it is self-contained.
+
 2004-10-11  Werner Koch  <wk@g10code.com>
 
        * keyserver.c (keyserver_spawn): Print an empty string in log_info
index 7314ee4..8f638c9 100644 (file)
@@ -912,7 +912,7 @@ generate_card_keys (const char *serialno)
     {
       tty_printf ("\n");
       tty_printf (_("Please note that the factory settings of the PINs are\n"
-                    "   PIN = \"%s\"     Admin PIN = \"%s\"\n"
+                    "   PIN = `%s'     Admin PIN = `%s'\n"
                     "You should change them using the command --change-pin\n"),
                   "123456", "12345678");
       tty_printf ("\n");
index 85c27d4..366fac0 100644 (file)
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -971,7 +971,7 @@ add_group(char *string)
   name=strsep(&string,"=");
   if(string==NULL)
     {
-      log_error(_("no = sign found in group definition \"%s\"\n"),name);
+      log_error(_("no = sign found in group definition `%s'\n"),name);
       return;
     }
 
@@ -2002,7 +2002,7 @@ main( int argc, char **argv )
            else if(ascii_strcasecmp(pargs.r.ret_str,"auto")==0)
              opt.trust_model=TM_AUTO;
            else
-             log_error("unknown trust model \"%s\"\n",pargs.r.ret_str);
+             log_error("unknown trust model `%s'\n",pargs.r.ret_str);
            break;
          case oForceOwnertrust:
            log_info(_("NOTE: %s is not for normal use!\n"),
@@ -2010,7 +2010,7 @@ main( int argc, char **argv )
            opt.force_ownertrust=string_to_trust_value(pargs.r.ret_str);
            if(opt.force_ownertrust==-1)
              {
-               log_error("invalid ownertrust \"%s\"\n",pargs.r.ret_str);
+               log_error("invalid ownertrust `%s'\n",pargs.r.ret_str);
                opt.force_ownertrust=0;
              }
            break;
@@ -2452,7 +2452,7 @@ main( int argc, char **argv )
            else if(ascii_strcasecmp(pargs.r.ret_str,"0xlong")==0)
              opt.keyid_format=KF_0xLONG;
            else
-             log_error("unknown keyid-format \"%s\"\n",pargs.r.ret_str);
+             log_error("unknown keyid-format `%s'\n",pargs.r.ret_str);
            break;
 
          default : pargs.err = configfp? 1:2; break;
index 5e29efd..e0eebf3 100644 (file)
@@ -892,9 +892,13 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,
            else
              BUG();
 
-           log_info(_("requesting key %s from %s server %s\n"),
-                    keystr_from_desc(&desc[i]),
-                    keyserver->scheme,keyserver->host?keyserver->host:"");
+           if(keyserver->host)
+             log_info(_("requesting key %s from %s server %s\n"),
+                      keystr_from_desc(&desc[i]),
+                      keyserver->scheme,keyserver->host);
+           else
+             log_info(_("requesting key %s from %s\n"),
+                      keystr_from_desc(&desc[i]),keyserver->uri);
          }
 
        fprintf(spawn->tochild,"\n");
@@ -1037,9 +1041,14 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,
 
                iobuf_close(buffer);
 
-               log_info(_("sending key %s to %s server %s\n"),
-                        keystr(block->pkt->pkt.public_key->keyid),
-                        keyserver->scheme,keyserver->host?keyserver->host:"");
+               if(keyserver->host)
+                 log_info(_("sending key %s to %s server %s\n"),
+                          keystr(block->pkt->pkt.public_key->keyid),
+                          keyserver->scheme,keyserver->host);
+               else
+                 log_info(_("sending key %s to %s\n"),
+                          keystr(block->pkt->pkt.public_key->keyid),
+                          keyserver->uri);
 
                release_kbnode(block);
              }
@@ -1079,8 +1088,12 @@ keyserver_spawn(int action,STRLIST list,KEYDB_SEARCH_DESC *desc,
 
        fprintf(spawn->tochild,"\n");
 
-       log_info(_("searching for \"%s\" from %s server %s\n"),
-               searchstr,keyserver->scheme,keyserver->host?keyserver->host:"");
+       if(keyserver->host)
+         log_info(_("searching for \"%s\" from %s server %s\n"),
+                  searchstr,keyserver->scheme,keyserver->host);
+       else
+         log_info(_("searching for \"%s\" from %s\n"),
+                  searchstr,keyserver->uri);
 
        break;
       }
index a1daa9c..138a855 100644 (file)
@@ -457,16 +457,13 @@ print_pkenc_list( struct kidlist_item *list, int failed )
        pk->pubkey_algo = list->pubkey_algo;
        if( !get_pubkey( pk, list->kid ) )
          {
-           size_t n;
            char *p;
            log_info( _("encrypted with %u-bit %s key, ID %s, created %s\n"),
                      nbits_from_pk( pk ), algstr, keystr_from_pk(pk),
                      strtimestamp(pk->timestamp) );
-           fputs("      \"", log_stream() );
-           p = get_user_id( list->kid, &n );
-           print_utf8_string2 ( log_stream(), p, n, '"' );
+           p=get_user_id_native(list->kid);
+           fprintf(log_stream(),_("      \"%s\"\n"),p);
            m_free(p);
-           fputs("\"\n", log_stream() );
          }
        else
          log_info(_("encrypted with %s key, ID %s\n"),
@@ -579,7 +576,7 @@ proc_encrypted( CTX c, PACKET *pkt )
            sprintf ( buf, "%d:", c->dek->algo );
            for(i=0; i < c->dek->keylen; i++ )
              sprintf(buf+strlen(buf), "%02X", c->dek->key[i] );
-           log_info( "session key: \"%s\"\n", buf );
+           log_info( "session key: `%s'\n", buf );
            write_status_text ( STATUS_SESSION_KEY, buf );
          }
     }
index 2e99935..9487c0f 100644 (file)
@@ -85,7 +85,7 @@ PKT_user_id *generate_photo_id(PKT_public_key *pk)
       file=iobuf_open(filename);
       if(!file)
        {
-         log_error(_("Unable to open photo \"%s\": %s\n"),
+         log_error(_("Unable to open JPEG file `%s': %s\n"),
                    filename,strerror(errno));
          continue;
        }
@@ -110,7 +110,7 @@ PKT_user_id *generate_photo_id(PKT_public_key *pk)
       if(photo[0]!=0xFF || photo[1]!=0xD8 ||
         photo[6]!='J' || photo[7]!='F' || photo[8]!='I' || photo[9]!='F')
        {
-         log_error(_("\"%s\" is not a JPEG file\n"),filename);
+         log_error(_("`%s' is not a JPEG file\n"),filename);
          m_free(photo);
          photo=NULL;
          continue;
index 8d869cd..359a3de 100644 (file)
@@ -204,7 +204,7 @@ do_edit_ownertrust (PKT_public_key *pk, int mode,
                       pubkey_letter( pk->pubkey_algo ),
                        keystr(keyid), datestr_from_pk( pk ) );
            p=get_user_id_native(keyid);
-           tty_printf(_("          \"%s\"\n"),p);
+           tty_printf(_("      \"%s\"\n"),p);
            m_free(p);
 
             keyblock = get_pubkeyblock (keyid);
@@ -231,7 +231,7 @@ do_edit_ownertrust (PKT_public_key *pk, int mode,
                p=utf8_to_native(un->pkt->pkt.user_id->name,
                                 un->pkt->pkt.user_id->len,0);
 
-               tty_printf(_("      aka \"%s\"\n"),p);
+               tty_printf(_("  aka \"%s\"\n"),p);
              }
         
             print_fingerprint (pk, NULL, 2);
index 9cf2eff..3052281 100644 (file)
@@ -556,7 +556,7 @@ check_trustdb ()
       validate_keys (0);
     }
   else
-    log_info (_("no need for a trustdb check with \"%s\" trust model\n"),
+    log_info (_("no need for a trustdb check with `%s' trust model\n"),
              trust_model_string());
 }
 
@@ -571,7 +571,7 @@ update_trustdb()
   if(opt.trust_model==TM_PGP || opt.trust_model==TM_CLASSIC)
     validate_keys (1);
   else
-    log_info (_("no need for a trustdb update with \"%s\" trust model\n"),
+    log_info (_("no need for a trustdb update with `%s' trust model\n"),
              trust_model_string());
 }
 
@@ -1527,7 +1527,7 @@ check_regexp(const char *expr,const char *string)
   regfree(&pat);
 
   if(DBG_TRUST)
-    log_debug("regexp \"%s\" on \"%s\": %s\n",expr,string,ret==0?"YES":"NO");
+    log_debug("regexp `%s' on `%s': %s\n",expr,string,ret==0?"YES":"NO");
 
   return (ret==0);
 #endif
@@ -1987,7 +1987,7 @@ validate_keys (int interactive)
            {
              if(DBG_TRUST)
                log_debug("key %08lX%08lX:"
-                         " overriding ownertrust \"%s\" with \"%s\"\n",
+                         " overriding ownertrust `%s' with `%s'\n",
                          (ulong)k->kid[0],(ulong)k->kid[1],
                          trust_value_to_string(k->ownertrust),
                          trust_value_to_string(min));