mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 09:09:54 -05:00
mark a few translatable strings
This commit is contained in:
parent
cfd9449374
commit
e41ca42de1
5 changed files with 37 additions and 38 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue