mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-20 00:10:09 -05:00
internationalization fixes and help fixes
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@989 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
83df67099d
commit
fa002886e3
18 changed files with 64 additions and 56 deletions
|
|
@ -308,7 +308,7 @@ process_arguments (int argc, char **argv)
|
|||
asprintf (&remotecmd, "%s;echo STATUS CODE: $?;", remotecmd);
|
||||
|
||||
if (remotecmd == NULL || strlen (remotecmd) <= 1)
|
||||
usage (_("No remotecmd\n"));
|
||||
usage4 (_("No remotecmd"));
|
||||
|
||||
asprintf (&comm, "%s %s '%s'", comm, hostname, remotecmd);
|
||||
|
||||
|
|
@ -409,9 +409,10 @@ $ cat /tmp/foo\n\
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\n\
|
||||
printf ("\n\
|
||||
Usage: %s [-f46] [-t timeout] [-i identity] [-l user] -H <host> \n\
|
||||
-C <command> [-n name] [-s servicelist] [-O outputfile] [-p port]\n"),
|
||||
-C <command> [-n name] [-s servicelist] [-O outputfile] [-p port]\n",
|
||||
progname);
|
||||
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -353,11 +353,10 @@ print_help (void)
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\
|
||||
printf ("\
|
||||
Usage: %s -H host -l lookup [-p <server port>] [-T <query type>]\n\
|
||||
[-w <warning interval>] [-c <critical interval>] [-t <timeout>]\n\
|
||||
[-a <expected answer address>] [-v]\n"),
|
||||
progname);
|
||||
printf (" %s (-h|--help)\n", progname);
|
||||
printf (" %s (-V|--version)\n", progname);
|
||||
[-a <expected answer address>] [-v]\n", progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ process_arguments (int argc, char **argv)
|
|||
break;
|
||||
}
|
||||
else {
|
||||
usage (_("Warning threshold must be integer or percentage!\n"));
|
||||
usage4 (_("Warning threshold must be integer or percentage!"));
|
||||
}
|
||||
case 'c': /* critical threshold */
|
||||
if (is_intnonneg (optarg)) {
|
||||
|
|
@ -339,7 +339,7 @@ process_arguments (int argc, char **argv)
|
|||
break;
|
||||
}
|
||||
else {
|
||||
usage (_("Critical threshold must be integer or percentage!\n"));
|
||||
usage4 (_("Critical threshold must be integer or percentage!"));
|
||||
}
|
||||
case 'u':
|
||||
if (units)
|
||||
|
|
@ -636,10 +636,9 @@ and generates an alert if free space is less than one of the threshold values.")
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\
|
||||
printf ("\
|
||||
Usage: %s -w limit -c limit [-p path | -x device] [-t timeout] [-m] [-e]\n\
|
||||
[-v] [-q]\n\
|
||||
%s (-h|--help)\n\
|
||||
%s (-V|--version)\n"),
|
||||
progname, progname, progname);
|
||||
[-v] [-q]\n", progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -425,8 +425,8 @@ specified in /etc/resolv.conf will be used.\n"));
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\
|
||||
Usage: %s -H host [-s server] [-a expected-address] [-A] [-t timeout]\n\
|
||||
%s --help\n\
|
||||
%s --version\n"), progname, progname, progname);
|
||||
printf ("\
|
||||
Usage: %s -H host [-s server] [-a expected-address] [-A] [-t timeout]\n", progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ main (int argc, char **argv)
|
|||
textdomain (PACKAGE);
|
||||
|
||||
if (argc < 2)
|
||||
usage (_("Incorrect number of arguments supplied\n"));
|
||||
usage4 (_("Incorrect number of arguments supplied"));
|
||||
else if (strcmp (argv[1], "-V") == 0 || strcmp (argv[1], "--version") == 0) {
|
||||
print_revision (progname, revision);
|
||||
exit (STATE_OK);
|
||||
|
|
@ -51,7 +51,7 @@ main (int argc, char **argv)
|
|||
exit (STATE_OK);
|
||||
}
|
||||
else if (!is_integer (argv[1]))
|
||||
usage (_("Arguments to check_dummy must be an integer\n"));
|
||||
usage4 (_("Arguments to check_dummy must be an integer"));
|
||||
else
|
||||
result = atoi (argv[1]);
|
||||
|
||||
|
|
@ -107,5 +107,5 @@ of the <state> argument with optional text.\n"));
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("Usage: %s <integer state> [optional text]\n"), progname);
|
||||
printf ("Usage: %s <integer state> [optional text]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -399,6 +399,6 @@ percentage of packet loss to trigger an alarm state.\n"));
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("Usage: %s <host_address>\n"), progname);
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
printf ("Usage: %s <host_address>\n", progname);
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -333,10 +333,11 @@ Notes:\n\
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\
|
||||
printf ("\
|
||||
Usage: %s <game> <ip_address> [-p port] [-gf game_field] [-mf map_field]\n\
|
||||
[-pf ping_field]\n"), progname);
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
[-pf ping_field]\n", progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
|||
|
|
@ -400,5 +400,6 @@ print_usage (void)
|
|||
{
|
||||
printf (_("\
|
||||
Usage: %s -H host [-C community]\n"), progname);
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1497,5 +1497,6 @@ Usage: %s (-H <vhost> | -I <IP-address>) [-u <uri>] [-p <port>]\n\
|
|||
[-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n\
|
||||
[-P string] [-m min_pg_size] [-4|-6] [-N] [-M <age>] [-A string]\n\
|
||||
[-k string]\n"), progname);
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ void
|
|||
show_help ()
|
||||
{
|
||||
printf (_("\
|
||||
Usage: check_ide-smart [DEVICE] [OPTION]\n\
|
||||
Usage: %s [DEVICE] [OPTION]\n\
|
||||
-d, --device=DEVICE\n\
|
||||
Select device DEVICE\n\
|
||||
-i, --immediate\n\
|
||||
|
|
@ -397,9 +397,9 @@ Usage: check_ide-smart [DEVICE] [OPTION]\n\
|
|||
-0, --auto-off\n\
|
||||
Turn off automatic offline tests\n\
|
||||
-n, --net-saint\n\
|
||||
Output suitable for Net Saint\n\
|
||||
-h, --help\n\
|
||||
-V, --version\n"));
|
||||
Output suitable for Net Saint\n", progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -333,10 +333,10 @@ print_help (void)
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\
|
||||
printf ("\
|
||||
Usage: %s -H <host> -b <base_dn> [-p <port>] [-a <attr>] [-D <binddn>]\n\
|
||||
[-P <password>] [-w <warn_time>] [-c <crit_time>] [-t timeout]%s\n\
|
||||
(Note: all times are in seconds.)\n"),
|
||||
(Note: all times are in seconds.)\n",
|
||||
progname,
|
||||
#ifdef HAVE_LDAP_SET_OPTION
|
||||
" [-2|-3] [-4|-6]"
|
||||
|
|
@ -345,5 +345,5 @@ Usage: %s -H <host> -b <base_dn> [-p <port>] [-a <attr>] [-D <binddn>]\n\
|
|||
#endif
|
||||
);
|
||||
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ the load average format is the same used by \"uptime\" and \"w\"\n\n"));
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("Usage: %s -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15\n"),
|
||||
printf ("Usage: %s -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15\n"),
|
||||
progname);
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -379,8 +379,9 @@ this plugin works well for monitoring that kind of data as well.\n\n"));
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\
|
||||
printf ("\
|
||||
Usage: %s -F log_file -a <AVG | MAX> -v variable -w warning -c critical\n\
|
||||
[-l label] [-u units] [-e expire_minutes] [-t timeout] [-v]\n"), progname);
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
[-l label] [-u units] [-e expire_minutes] [-t timeout] [-v]\n", progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -363,8 +363,9 @@ the <iwl> or <owl> thresholds (in Bytes/sec), a WARNING status results.\n\n"));
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\
|
||||
printf ("\
|
||||
Usage: %s -F <log_file> -a <AVG | MAX> -v <variable> -w <warning_pair> -c <critical_pair>\n\
|
||||
[-e expire_minutes] [-t timeout] [-v]\n"), progname);
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
[-e expire_minutes] [-t timeout] [-v]\n", progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,8 +308,8 @@ a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\
|
||||
Usage: %s [-d database] [-H host] [-P port] [-u user] [-p password] [-S]\n"),
|
||||
printf ("\
|
||||
Usage: %s [-d database] [-H host] [-P port] [-u user] [-p password] [-S]\n",
|
||||
progname);
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,7 +302,9 @@ Example:\n\
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf (_("\
|
||||
Usage: %s -F <status log file> -e <expire_minutes> -C <process_string>\n"),
|
||||
printf ("\
|
||||
Usage: %s -F <status log file> -e <expire_minutes> -C <process_string>\n",
|
||||
progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -607,7 +607,7 @@ void preparelist(char *string) {
|
|||
|
||||
void print_help(void)
|
||||
{
|
||||
print_revision(progname,"$Revision$");
|
||||
print_revision(progname,revision);
|
||||
printf (_("\
|
||||
Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n\n\
|
||||
This plugin collects data from the NSClient service running on a\n\
|
||||
|
|
@ -682,8 +682,9 @@ Windows NT/2000/XP server.\n\n"));
|
|||
|
||||
void print_usage(void)
|
||||
{
|
||||
printf(_("\
|
||||
printf("\
|
||||
Usage: %s -H host -v variable [-p port] [-w warning] [-c critical]\n\
|
||||
[-l params] [-d SHOWALL] [-t timeout]\n"), progname);
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
[-l params] [-d SHOWALL] [-t timeout]\n", progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -987,8 +987,9 @@ Notes:\n\
|
|||
|
||||
void print_usage(void)
|
||||
{
|
||||
printf (_("\
|
||||
printf ("\
|
||||
Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical]\n\
|
||||
[-t timeout].\n"), progname);
|
||||
printf (_(UT_HLP_VRS), progname, progname);
|
||||
[-t timeout].\n", progname);
|
||||
|
||||
printf (UT_HLP_VRS, progname, progname);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue