]> git.sur5r.net Git - openldap/commitdiff
mark a few translatable strings
authorKurt Zeilenga <kurt@openldap.org>
Sun, 6 Apr 2003 06:19:13 +0000 (06:19 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 6 Apr 2003 06:19:13 +0000 (06:19 +0000)
libraries/liblber/assert.c
libraries/liblber/debug.c
libraries/liblber/io.c
libraries/libldap/schema.c
libraries/libldap/util-int.c

index 0f420ac7fd021caa14ccd0e72885a7b04dd24f35..b87d417c242be2e7135b99c62bdf7432c6b0cdc2 100644 (file)
@@ -27,7 +27,7 @@ void
 ber_pvt_assert( const char *file, int line, const char *test )
 {
        fprintf(stderr,
-               "Assertion failed: %s, file %s, line %d\n",
+               _("Assertion failed: %s, file %s, line %d\n"),
                        test, file, line);
 
        abort();
index 02f439d87d090f807a3273c80617f97016884c40..ff844feb70ba8e365732960ea955182cc0578f2f 100644 (file)
@@ -117,7 +117,7 @@ static int addSubsys( const char *subsys, int level )
                subsys_num = lutil_mnem2subsys(subsys);
                if(subsys_num < 0)
                {
-                       fprintf(stderr, "Unknown Subsystem name [ %s ] - Discarded\n"
+                       fprintf(stderr, _("Unknown Subsystem name [ %s ] - Discarded\n")
                                subsys);
                        fflush(stderr);
                        return -1;
index 125f7e9508327baa3365b1fe917c75d21bac9f70..4edfb3f9ad06805355b8fd1fc23062c2e3bb3049 100644 (file)
@@ -597,11 +597,11 @@ ber_get_next(
                if ( sb->sb_max_incoming && ber->ber_len > sb->sb_max_incoming ) {
 #ifdef NEW_LOGGING
                        LDAP_LOG( BER, ERR, 
-                               "ber_get_next: sockbuf_max_incoming limit hit "
+                               "ber_get_next: sockbuf_max_incoming exceeded "
                                "(%d > %d)\n", ber->ber_len, sb->sb_max_incoming, 0 );
 #else
                        ber_log_printf( LDAP_DEBUG_CONNS, ber->ber_debug,
-                               "ber_get_next: sockbuf_max_incoming limit hit "
+                               "ber_get_next: sockbuf_max_incoming exceeded "
                                "(%ld > %ld)\n", ber->ber_len, sb->sb_max_incoming );
 #endif
                        errno = ERANGE;
index 0ac55075bf3aeb1562a01947085d920338699d5a..ace40a523f27a3c50e04747b548c3a12763c4c8a 100644 (file)
@@ -3233,27 +3233,27 @@ ldap_str2nameform( LDAP_CONST char * s,
 }
 
 static char *const err2text[] = {
-       "Success",
-       "Out of memory",
-       "Unexpected token",
-       "Missing opening parenthesis",
-       "Missing closing parenthesis",
-       "Expecting digit",
-       "Expecting a name",
-       "Bad description",
-       "Bad superiors",
-       "Duplicate option",
-       "Unexpected end of data",
-       "Missing required field",
-       "Out of order field"
+       N_("Success"),
+       N_("Out of memory"),
+       N_("Unexpected token"),
+       N_("Missing opening parenthesis"),
+       N_("Missing closing parenthesis"),
+       N_("Expecting digit"),
+       N_("Expecting a name"),
+       N_("Bad description"),
+       N_("Bad superiors"),
+       N_("Duplicate option"),
+       N_("Unexpected end of data"),
+       N_("Missing required field"),
+       N_("Out of order field")
 };
 
 char *
 ldap_scherr2str(int code)
 {
        if ( code < 0 || code >= (int)(sizeof(err2text)/sizeof(char *)) ) {
-               return "Unknown error";
+               return _("Unknown error");
        } else {
-               return err2text[code];
+               return _(err2text[code]);
        }
 }
index 962db37b480f57708005191fa1db056e0094b579..4254c5f7337dede5006fe255ff21a45146756cab 100644 (file)
@@ -191,16 +191,15 @@ static const char *
 hp_strerror( int err )
 {
        switch (err) {
-       case HOST_NOT_FOUND:    return "Host not found (authoritative)";
-       case TRY_AGAIN:         return "Host not found (server fail?)";
-       case NO_RECOVERY:       return "Non-recoverable failure";
-       case NO_DATA:           return "No data of requested type";
+       case HOST_NOT_FOUND:    return _("Host not found (authoritative)");
+       case TRY_AGAIN:                 return _("Host not found (server fail?)");
+       case NO_RECOVERY:               return _("Non-recoverable failure");
+       case NO_DATA:                   return _("No data of requested type");
 #ifdef NETDB_INTERNAL
        case NETDB_INTERNAL:    return STRERROR( errno );
 #endif
-       default:        break;  
        }
-       return "Unknown resolver error";
+       return _("Unknown resolver error");
 }
 #endif
 
@@ -547,20 +546,20 @@ char *ldap_pvt_gai_strerror (int code) {
                const char *msg;
        } values[] = {
 #ifdef EAI_ADDRFAMILY
-               { EAI_ADDRFAMILY, "Address family for hostname not supported" },
+               { EAI_ADDRFAMILY, N_("Address family for hostname not supported") },
 #endif
-               { EAI_AGAIN, "Temporary failure in name resolution" },
-               { EAI_BADFLAGS, "Bad value for ai_flags" },
-               { EAI_FAIL, "Non-recoverable failure in name resolution" },
-               { EAI_FAMILY, "ai_family not supported" },
-               { EAI_MEMORY, "Memory allocation failure" },
+               { EAI_AGAIN, N_("Temporary failure in name resolution") },
+               { EAI_BADFLAGS, N_("Bad value for ai_flags") },
+               { EAI_FAIL, N_("Non-recoverable failure in name resolution") },
+               { EAI_FAMILY, N_("ai_family not supported") },
+               { EAI_MEMORY, N_("Memory allocation failure") },
 #ifdef EAI_NODATA
-               { EAI_NODATA, "No address associated with hostname" },
+               { EAI_NODATA, N_("No address associated with hostname") },
 #endif    
-               { EAI_NONAME, "Name or service not known" },
-               { EAI_SERVICE, "Servname not supported for ai_socktype" },
-               { EAI_SOCKTYPE, "ai_socktype not supported" },
-               { EAI_SYSTEM, "System error" },
+               { EAI_NONAME, N_("Name or service not known") },
+               { EAI_SERVICE, N_("Servname not supported for ai_socktype") },
+               { EAI_SOCKTYPE, N_("ai_socktype not supported") },
+               { EAI_SYSTEM, N_("System error") },
                { 0, NULL }
        };
 
@@ -568,10 +567,10 @@ char *ldap_pvt_gai_strerror (int code) {
 
        for ( i = 0; values[i].msg != NULL; i++ ) {
                if ( values[i].code == code ) {
-                       return (char *) values[i].msg;
+                       return (char *) _(values[i].msg);
                }
        }
        
-       return "Unknown error";
+       return _("Unknown error");
 }
 #endif