Code

first pass at standardization of messages for the localization
authorBenoit Mortier <opensides@users.sourceforge.net>
Wed, 1 Dec 2004 19:33:45 +0000 (19:33 +0000)
committerBenoit Mortier <opensides@users.sourceforge.net>
Wed, 1 Dec 2004 19:33:45 +0000 (19:33 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@962 f882894a-f735-0410-b71e-b25c423dba1c

plugins/check_by_ssh.c
plugins/check_dig.c
plugins/check_disk.c
plugins/check_dns.c
plugins/check_fping.c
plugins/check_ssh.c

index 9500cb3d464b74f2386579d695d2bad21c7f61f1..6daa1a11bd60128d1206cfe93bba730cb272bc91 100644 (file)
@@ -167,11 +167,6 @@ main (int argc, char **argv)
        return result;
 }
 
-
-
-
-
-\f
 /* process command-line arguments */
 int
 process_arguments (int argc, char **argv)
@@ -238,12 +233,12 @@ process_arguments (int argc, char **argv)
                        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 @@ validate_arguments (void)
 }
 
 
-
-
-
-\f
 void
 print_help (void)
 {
index 92a5eda89366d7e63b65a1b9472b150b2140cc85..5b472ecaac040cb158a38a12d7db7365096f7720 100644 (file)
@@ -151,7 +151,7 @@ main (int argc, char **argv)
        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 @@ main (int argc, char **argv)
 
 
 
-\f
 /* process command-line arguments */
 int
 process_arguments (int argc, char **argv)
@@ -228,7 +227,7 @@ process_arguments (int argc, char **argv)
                                dns_server = optarg;
                        }
                        else {
-                               usage2 (_("Invalid host name"), optarg);
+                               usage2 (_("Invalid hostname/adress"), optarg);
                        }
                        break;
                case 'p':                 /* server port */
@@ -236,7 +235,7 @@ process_arguments (int argc, char **argv)
                                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 @@ process_arguments (int argc, char **argv)
                                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 @@ process_arguments (int argc, char **argv)
                                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 @@ process_arguments (int argc, char **argv)
                                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 @@ process_arguments (int argc, char **argv)
                                dns_server = argv[c];
                        }
                        else {
-                               usage2 (_("Invalid host name"), argv[c]);
+                               usage2 (_("Invalid hostname/adress"), argv[c]);
                        }
                }
                else {
@@ -311,7 +310,6 @@ validate_arguments (void)
 
 
 
-\f
 void
 print_help (void)
 {
index 95e84751275f3458ae18bc4ff1051ef220f15834..c823925011cd4cffa089357be374da46dd8de930 100644 (file)
@@ -437,7 +437,7 @@ process_arguments (int argc, char **argv)
                        print_help ();
                        exit (STATE_OK);
                case '?':                                                                       /* help */
-                       usage (_("check_disk: unrecognized option\n"));
+                       usage (_("Unknow argument\n"));
                        break;
                }
        }
@@ -566,7 +566,6 @@ walk_name_list (struct name_list *list, const char *name)
 
 
 
-\f
 void
 print_help (void)
 {
index 7b18270f67d1083829e58132af6f923204df8580..6c08c2776e558ec3cee998d0a7afc49c99add4e6 100644 (file)
@@ -207,7 +207,7 @@ main (int argc, char **argv)
                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 @@ process_arguments (int argc, char **argv)
                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 @@ process_arguments (int argc, char **argv)
        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)
index 22f6b55d4f9591ee21a7a051552b30b3a31d9491..2dba2d58400bf1079978d7e142964b2b2f56cc5d 100644 (file)
@@ -127,16 +127,16 @@ textscan (char *buf)
        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 @@ process_arguments (int argc, char **argv)
                        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 @@ process_arguments (int argc, char **argv)
 
 
        if (server_name == NULL)
-               usage (_("Host name was not supplied\n\n"));
+               usage (_("Hostname was not supplied\n\n"));
 
        return OK;
 }
index 86267b29c85290804c65f5c9800f6e55e7392252..ea74fa8865939a29c71b925b2993e20801650cbc 100644 (file)
@@ -104,7 +104,8 @@ process_arguments (int argc, char **argv)
 
                switch (c) {
                case '?':                                                                       /* help */
-                       usage ("");
+                       usage (_("Unknow argument\n"));
+                       break;
                case 'V':                                                                       /* version */
                        print_revision (progname, revision);
                        exit (STATE_OK);
@@ -135,7 +136,7 @@ process_arguments (int argc, char **argv)
                        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 @@ print_help (void)
        printf ("Copyright (c) 1999 Remi Paulmier <remi@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 ();