From 2d1ba3e36b950f05832ea2bd595616fa6cd28c28 Mon Sep 17 00:00:00 2001
From: Benoit Mortier <opensides@users.sourceforge.net>
Date: Thu, 2 Dec 2004 00:30:32 +0000
Subject: adapted for localization

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

diff --git a/contrib/check_rbl.c b/contrib/check_rbl.c
index 69fdd23..6831b65 100644
--- a/contrib/check_rbl.c
+++ b/contrib/check_rbl.c
@@ -22,6 +22,9 @@
 #include "string.h"
 
 const char progname = "check_rbl";
+const char *revision = "$Revision$";
+//const char *copyright = "2000-2003";
+//const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
 int process_arguments(int, char **);
 int call_getopt(int, char **);
@@ -48,7 +51,7 @@ int main(int argc, char **argv){
 		usage("Cannot catch SIGALRM\n");
 
 	if (process_arguments(argc,argv)!=OK)
-		usage("Could not parse arguments\n");
+		usage	(_("check_rbl: could not parse arguments\n"));
 
 	/* reverse the octets in the IP address */
 	query_address_rev = reverse_ipaddr(query_address);
@@ -127,7 +130,7 @@ int main(int argc, char **argv){
 	if (spclose(child_process)) {
 		result=error_set(result,STATE_WARNING);
 		if (!strcmp(output,""))
-			strcpy(output,"nslookup returned error status");
+			strcpy(output,"nslookup returned an error status");
 	}
 	
 	(void)time(&end_time);
@@ -144,6 +147,8 @@ int main(int argc, char **argv){
 	return result;
 }
 
+
+
 /* reverse the ipaddr */
 char *reverse_ipaddr(char *ipaddr)
 {
@@ -160,6 +165,7 @@ char *reverse_ipaddr(char *ipaddr)
 }
 
 
+
 /* process command-line arguments */
 int process_arguments(int argc, char **argv)
 {
@@ -189,9 +195,6 @@ int process_arguments(int argc, char **argv)
 
 
 
-
-
-
 int call_getopt(int argc, char **argv)
 {
   int c,i=0;
@@ -266,7 +269,9 @@ int call_getopt(int argc, char **argv)
 				print_help();
 				exit(STATE_OK);
       case '?': /* help */
-				usage("Invalid argument\n");
+			printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
+			print_usage ();
+			exit (STATE_UNKNOWN);
 			}
   }
   return i;
@@ -274,8 +279,6 @@ int call_getopt(int argc, char **argv)
 
 
 
-
-
 int validate_arguments(void)
 {
   if (query_address == NULL || rbl_name == NULL)
@@ -286,8 +289,6 @@ int validate_arguments(void)
 
 
 
-
-
 void print_help(void)
 {
 	print_revision(progname,"$Revision$");
@@ -317,8 +318,6 @@ void print_help(void)
 
 
 
-
-
 void print_usage(void)
 {
 	printf
-- 
cgit v0.10-9-g596f

