From fa002886e390f5cc603021e422be3c319a1040ea Mon Sep 17 00:00:00 2001
From: Benoit Mortier <opensides@users.sourceforge.net>
Date: Fri, 3 Dec 2004 11:45:10 +0000
Subject: internationalization fixes and help fixes

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@989 f882894a-f735-0410-b71e-b25c423dba1c

diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c
index d9fe26e..7080c69 100644
--- a/plugins/check_by_ssh.c
+++ b/plugins/check_by_ssh.c
@@ -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);
 }
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index 32bf2c4..823ea01 100644
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
@@ -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);
 }
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index c7ea344..70cd548 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -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);
 }
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 6dfb09f..579c51a 100644
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
@@ -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);
 }
diff --git a/plugins/check_dummy.c b/plugins/check_dummy.c
index 6864d02..c621b9f 100644
--- a/plugins/check_dummy.c
+++ b/plugins/check_dummy.c
@@ -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);
 }
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index 46d4beb..3baf52f 100644
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
@@ -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);
 }
diff --git a/plugins/check_game.c b/plugins/check_game.c
index ea08f9d..a194ab2 100644
--- a/plugins/check_game.c
+++ b/plugins/check_game.c
@@ -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);
 }
 
 /******************************************************************************
diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c
index 7ad950a..b9b3f7f 100644
--- a/plugins/check_hpjd.c
+++ b/plugins/check_hpjd.c
@@ -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);
 }
diff --git a/plugins/check_http.c b/plugins/check_http.c
index f6cf507..125052f 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -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);
 }
diff --git a/plugins/check_ide-smart.c b/plugins/check_ide-smart.c
index 6ceebe2..aa74f98 100644
--- a/plugins/check_ide-smart.c
+++ b/plugins/check_ide-smart.c
@@ -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);
 }
 
 
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index c0b33a8..80c0907 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -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);
 }
diff --git a/plugins/check_load.c b/plugins/check_load.c
index 803467d..00bfc8a 100644
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
@@ -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);
 }
diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c
index 7cf7d89..cc4714c 100644
--- a/plugins/check_mrtg.c
+++ b/plugins/check_mrtg.c
@@ -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);
 }
diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c
index f8d6955..69778e3 100644
--- a/plugins/check_mrtgtraf.c
+++ b/plugins/check_mrtgtraf.c
@@ -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);
 }
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 30dce9d..5863e1a 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -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);
 }
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index 7b312d3..694c069 100644
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
@@ -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);
 }
diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index f142675..2cc45cd 100644
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
@@ -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);
 }
diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c
index 9c89ef9..98b06d9 100644
--- a/plugins/check_nwstat.c
+++ b/plugins/check_nwstat.c
@@ -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);
 }
-- 
cgit v0.10-9-g596f

