Commit d7fe456f d7fe456f61e86d8bfeffb6a4557ddb7512326d1c by Sergey Poznyakoff

Added NLS support

1 parent dc63794a
......@@ -12,4 +12,5 @@ pam.c \
sql.c \
virtual.c
libmuauth_la_LIBADD = @LTLIBINTL@
libmuauth_la_LDFLAGS = -version-info 0:0:0
......
......@@ -45,6 +45,7 @@
#include <mailutils/mailbox.h>
#include <mailutils/argp.h>
#include <mailutils/mu_auth.h>
#include <mailutils/nls.h>
char *pam_service = NULL;
......@@ -150,8 +151,8 @@ mu_pam_argp_parser (int key, char *arg, struct argp_state *state)
}
static struct argp_option mu_pam_argp_option[] = {
{ "pam-service", ARG_PAM_SERVICE, "STRING", 0,
"Use STRING as PAM service name", 0},
{ "pam-service", ARG_PAM_SERVICE, N_("STRING"), 0,
N_("Use STRING as PAM service name"), 0},
{ NULL, 0, NULL, 0, NULL, 0 }
};
......
......@@ -43,6 +43,7 @@
#include <mailutils/argp.h>
#include <mailutils/mu_auth.h>
#include <mailutils/error.h>
#include <mailutils/nls.h>
#ifdef HAVE_MYSQL
#include <mysql/mysql.h>
......@@ -396,22 +397,22 @@ mu_sql_authenticate (void *ignored_return_data, void *key,
# define ARG_SQL_PORT 8
static struct argp_option mu_sql_argp_option[] = {
{"sql-getpwnam", ARG_SQL_GETPWNAM, "QUERY", 0,
"SQL query to retrieve a passwd entry based on username", 0},
{"sql-getpwuid", ARG_SQL_GETPWUID, "QUERY", 0,
"SQL query to retrieve a passwd entry based on UID", 0},
{"sql-getpass", ARG_SQL_GETPASS, "QUERY", 0,
"SQL query to retrieve a password from the database", 0},
{"sql-host", ARG_SQL_HOST, "HOSTNAME", 0,
"Name or IP of MySQL server to connect to", 0},
{"sql-user", ARG_SQL_USER, "NAME", 0,
"SQL user name", 0},
{"sql-passwd", ARG_SQL_PASSWD, "STRING", 0,
"SQL connection password", 0},
{"sql-db", ARG_SQL_DB, "STRING", 0,
"Name of the database to connect to", 0},
{"sql-port", ARG_SQL_PORT, "NUMBER", 0,
"Port to use", 0},
{"sql-getpwnam", ARG_SQL_GETPWNAM, N_("QUERY"), 0,
N_("SQL query to retrieve a passwd entry based on username"), 0},
{"sql-getpwuid", ARG_SQL_GETPWUID, N_("QUERY"), 0,
N_("SQL query to retrieve a passwd entry based on UID"), 0},
{"sql-getpass", ARG_SQL_GETPASS, N_("QUERY"), 0,
N_("SQL query to retrieve a password from the database"), 0},
{"sql-host", ARG_SQL_HOST, N_("HOSTNAME"), 0,
N_("Name or IP of MySQL server to connect to"), 0},
{"sql-user", ARG_SQL_USER, N_("NAME"), 0,
N_("SQL user name"), 0},
{"sql-passwd", ARG_SQL_PASSWD, N_("STRING"), 0,
N_("SQL connection password"), 0},
{"sql-db", ARG_SQL_DB, N_("STRING"), 0,
N_("Name of the database to connect to"), 0},
{"sql-port", ARG_SQL_PORT, N_("NUMBER"), 0,
N_("Port to use"), 0},
{ NULL, 0, NULL, 0, NULL, 0 }
};
......
......@@ -51,6 +51,7 @@
#include <mailutils/mailbox.h>
#include <mailutils/argp.h>
#include <mailutils/mu_auth.h>
#include <mailutils/nls.h>
#ifdef ENABLE_VIRTUAL_DOMAINS
......@@ -189,8 +190,8 @@ mu_virt_argp_parser (int key, char *arg, struct argp_state *state)
}
static struct argp_option mu_virt_argp_option[] = {
{ "virtual-passwd-dir", ARG_PWDDIR, "DIR", 0,
"Search for virtual passwd file in DIR", 0},
{ "virtual-passwd-dir", ARG_PWDDIR, N_("DIR"), 0,
N_("Search for virtual passwd file in DIR"), 0},
{ NULL, 0, NULL, 0, NULL, 0 }
};
......