Add missing gettext calls for some SSL errors.
authorPeter Eisentraut
Mon, 4 Sep 2006 14:57:27 +0000 (14:57 +0000)
committerPeter Eisentraut
Mon, 4 Sep 2006 14:57:27 +0000 (14:57 +0000)
src/backend/libpq/be-secure.c
src/interfaces/libpq/fe-secure.c

index 35382adc8f7fe451c8a2d2dadfdbc3912ca593df..20c2cc7a3b56315887bc1f7959c48d31d8f60fe5 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.71 2006/07/14 14:52:19 momjian Exp $
+ *   $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.72 2006/09/04 14:57:27 petere Exp $
  *
  *   Since the server static private key ($DataDir/server.key)
  *   will normally be stored unencrypted so that the database
@@ -986,11 +986,11 @@ SSLerrmessage(void)
 
    errcode = ERR_get_error();
    if (errcode == 0)
-       return "No SSL error reported";
+       return _("no SSL error reported");
    errreason = ERR_reason_error_string(errcode);
    if (errreason != NULL)
        return errreason;
-   snprintf(errbuf, sizeof(errbuf), "SSL error code %lu", errcode);
+   snprintf(errbuf, sizeof(errbuf), _("SSL error code %lu"), errcode);
    return errbuf;
 }
 
index 26c21ce0636741f624a4d8e0386b1af9101d5e26..91315e379040f38e81234aac40c3de6c728a5be3 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.85 2006/07/14 16:59:19 tgl Exp $
+ *   $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.86 2006/09/04 14:57:27 petere Exp $
  *
  * NOTES
  *   [ Most of these notes are wrong/obsolete, but perhaps not all ]
@@ -1000,7 +1000,7 @@ close_SSL(PGconn *conn)
  * return NULL if it doesn't recognize the error code.  We don't
  * want to return NULL ever.
  */
-static char ssl_nomem[] = "Out of memory allocating error description";
+static char ssl_nomem[] = "out of memory allocating error description";
 
 #define SSL_ERR_LEN 128
 
@@ -1017,7 +1017,7 @@ SSLerrmessage(void)
    errcode = ERR_get_error();
    if (errcode == 0)
    {
-       strcpy(errbuf, "No SSL error reported");
+       snprintf(errbuf, SSL_ERR_LEN, libpq_gettext("no SSL error reported"));
        return errbuf;
    }
    errreason = ERR_reason_error_string(errcode);
@@ -1027,7 +1027,7 @@ SSLerrmessage(void)
        errbuf[SSL_ERR_LEN - 1] = '\0';
        return errbuf;
    }
-   snprintf(errbuf, SSL_ERR_LEN, "SSL error code %lu", errcode);
+   snprintf(errbuf, SSL_ERR_LEN, libpq_gettext("SSL error code %lu"), errcode);
    return errbuf;
 }