[Nagiosplug-checkins] nagiosplug/plugins check_by_ssh.c,1.22,1.23 check_dig.c,1.27,1.28 check_disk.c,1.47,1.48 check_dns.c,1.29,1.30 check_fping.c,1.14,1.15 check_ssh.c,1.15,1.16

Benoit Mortier opensides at users.sourceforge.net
Wed Dec 1 11:36:41 CET 2004


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6374/plugins

Modified Files:
	check_by_ssh.c check_dig.c check_disk.c check_dns.c 
	check_fping.c check_ssh.c 
Log Message:

first pass at standardization of messages for the localization



Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- check_disk.c	25 Nov 2004 05:09:15 -0000	1.47
+++ check_disk.c	1 Dec 2004 19:33:45 -0000	1.48
@@ -437,7 +437,7 @@
 			print_help ();
 			exit (STATE_OK);
 		case '?':									/* help */
-			usage (_("check_disk: unrecognized option\n"));
+			usage (_("Unknow argument\n"));
 			break;
 		}
 	}
@@ -566,7 +566,6 @@
 
 
 
-
 void
 print_help (void)
 {

Index: check_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ssh.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- check_ssh.c	27 Nov 2004 21:00:23 -0000	1.15
+++ check_ssh.c	1 Dec 2004 19:33:45 -0000	1.16
@@ -104,7 +104,8 @@
 
 		switch (c) {
 		case '?':									/* help */
-			usage ("");
+			usage (_("Unknow argument\n"));
+			break;
 		case 'V':									/* version */
 			print_revision (progname, revision);
 			exit (STATE_OK);
@@ -135,7 +136,7 @@
 			break;
 		case 'H':									/* host */
 			if (is_host (optarg) == FALSE)
-				usage2 (_("Invalid host name/address"), optarg);
+				usage2 (_("Invalid hostname/address"), optarg);
 			server_name = optarg;
 			break;
 		case 'p':									/* port */
@@ -250,7 +251,7 @@
 	printf ("Copyright (c) 1999 Remi Paulmier <remi at sinfomic.fr>\n");
 	printf (COPYRIGHT, copyright, email);
 
-	printf (_("Try to connect to SSH server at specified server and port\n\n"));
+	printf (_("Try to connect to an SSH server at specified server and port\n\n"));
 
 	print_usage ();
 

Index: check_dig.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dig.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- check_dig.c	24 Nov 2004 00:46:38 -0000	1.27
+++ check_dig.c	1 Dec 2004 19:33:45 -0000	1.28
@@ -151,7 +151,7 @@
 	if (spclose (child_process)) {
 		result = max_state (result, STATE_WARNING);
 		if (strlen (output) == 0)
-			asprintf (&output, _("dig returned error status"));
+			asprintf (&output, _("dig returned an error status"));
 	}
 
 	microsec = deltime (tv);
@@ -183,7 +183,6 @@
 
 
 
-
 /* process command-line arguments */
 int
 process_arguments (int argc, char **argv)
@@ -228,7 +227,7 @@
 				dns_server = optarg;
 			}
 			else {
-				usage2 (_("Invalid host name"), optarg);
+				usage2 (_("Invalid hostname/adress"), optarg);
 			}
 			break;
 		case 'p':                 /* server port */
@@ -236,7 +235,7 @@
 				server_port = atoi (optarg);
 			}
 			else {
-				usage2 (_("Server port must be a nonnegative integer"), optarg);
+				usage2 (_("port must be a positive integer"), optarg);
 			}
 			break;
 		case 'l':									/* address to lookup */
@@ -247,7 +246,7 @@
 				warning_interval = strtod (optarg, NULL);
 			}
 			else {
-				usage2 (_("Warning interval must be a nonnegative integer"), optarg);
+				usage2 (_("Warning interval must be a positive integer"), optarg);
 			}
 			break;
 		case 'c':									/* critical */
@@ -255,7 +254,7 @@
 				critical_interval = strtod (optarg, NULL);
 			}
 			else {
-				usage2 (_("Critical interval must be a nonnegative integer"), optarg);
+				usage2 (_("Critical interval must be a positive integer"), optarg);
 			}
 			break;
 		case 't':									/* timeout */
@@ -263,7 +262,7 @@
 				timeout_interval = atoi (optarg);
 			}
 			else {
-				usage2 (_("Time interval must be a nonnegative integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			}
 			break;
 		case 'v':									/* verbose */
@@ -285,7 +284,7 @@
 				dns_server = argv[c];
 			}
 			else {
-				usage2 (_("Invalid host name"), argv[c]);
+				usage2 (_("Invalid hostname/adress"), argv[c]);
 			}
 		}
 		else {
@@ -311,7 +310,6 @@
 
 
 
-
 void
 print_help (void)
 {

Index: check_fping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_fping.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- check_fping.c	24 Nov 2004 00:46:38 -0000	1.14
+++ check_fping.c	1 Dec 2004 19:33:45 -0000	1.15
@@ -127,16 +127,16 @@
 	int status = STATE_UNKNOWN;
 
 	if (strstr (buf, "not found")) {
-		die (STATE_CRITICAL, _("FPING unknown - %s not found\n"), server_name);
+		die (STATE_CRITICAL, _("FPING UNKNOW - %s not found\n"), server_name);
 
 	}
 	else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) {
-		die (STATE_CRITICAL, _("FPING critical - %s is unreachable\n"),
+		die (STATE_CRITICAL, _("FPING CRITICAL - %s is unreachable\n"),
 							 "host");
 
 	}
 	else if (strstr (buf, "is down")) {
-		die (STATE_CRITICAL, _("FPING critical - %s is down\n"), server_name);
+		die (STATE_CRITICAL, _("FPING CRITICAL - %s is down\n"), server_name);
 
 	}
 	else if (strstr (buf, "is alive")) {
@@ -254,7 +254,7 @@
 			break;
 		case 'H':									/* hostname */
 			if (is_host (optarg) == FALSE) {
-				usage2 (_("Invalid host name/address"), optarg);
+				usage2 (_("Invalid hostname/address"), optarg);
 			}
 			server_name = strscpy (server_name, optarg);
 			break;
@@ -301,7 +301,7 @@
 
 
 	if (server_name == NULL)
-		usage (_("Host name was not supplied\n\n"));
+		usage (_("Hostname was not supplied\n\n"));
 
 	return OK;
 }

Index: check_by_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_by_ssh.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- check_by_ssh.c	24 Nov 2004 00:46:38 -0000	1.22
+++ check_by_ssh.c	1 Dec 2004 19:33:45 -0000	1.23
@@ -167,11 +167,6 @@
 	return result;
 }
 
-
-
-
-
-
 /* process command-line arguments */
 int
 process_arguments (int argc, char **argv)
@@ -238,12 +233,12 @@
 			break;
 		case 'H':									/* host */
 			if (!is_host (optarg))
-				usage2 (_("Invalid host name"), optarg);
+				usage2 (_("Invalid hostname/adress"), optarg);
 			hostname = optarg;
 			break;
 		case 'p': /* port number */
 			if (!is_integer (optarg))
-				usage2 (_("port must be an integer"), optarg);
+				usage2 (_("port must be a positive integer"), optarg);
 			asprintf (&comm,"%s -p %s", comm, optarg);
 			break;
 		case 'O':									/* output file */
@@ -340,10 +335,6 @@
 }
 
 
-
-
-
-
 void
 print_help (void)
 {

Index: check_dns.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- check_dns.c	24 Nov 2004 00:46:38 -0000	1.29
+++ check_dns.c	1 Dec 2004 19:33:45 -0000	1.30
@@ -207,7 +207,7 @@
 		printf (_("DNS CRITICAL - %s\n"),
 		        !strcmp (output, "") ? _(" Probably a non-existent host/domain") : output);
 	else
-		printf (_("DNS problem - %s\n"),
+		printf (_("DNS UNKNOW - %s\n"),
 		        !strcmp (output, "") ? _(" Probably a non-existent host/domain") : output);
 
 	return result;
@@ -331,7 +331,7 @@
 		case 'r': /* reverse server name */
 			/* TODO: Is this is_host necessary? */
 			if (is_host (optarg) == FALSE) {
-				usage2 (_("Invalid host name/address"), optarg);
+				usage2 (_("Invalid hostname/address"), optarg);
 			}
 			if (strlen (optarg) >= ADDRESS_LENGTH)
 				die (STATE_UNKNOWN, _("Input buffer overflow\n"));
@@ -359,7 +359,7 @@
 	if (strlen(dns_server)==0 && c<argc) {
 		/* TODO: See -s option */
 		if (is_host(argv[c]) == FALSE) {
-			printf (_("Invalid name/address: %s\n\n"), argv[c]);
+			printf (_("Invalid hostname/address: %s\n\n"), argv[c]);
 			return ERROR;
 		}
 		if (strlen(argv[c]) >= ADDRESS_LENGTH)





More information about the Commits mailing list