浏览代码

Adding missing function calls needed for i18n (only for plugins already in POTFILES.in)

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1861 f882894a-f735-0410-b71e-b25c423dba1c
Thomas Guyot-Sionnest 18 年之前
父节点
当前提交
56c9db8516

+ 4 - 0
plugins-root/check_icmp.c

@@ -371,6 +371,10 @@ main(int argc, char **argv)
 	int icmp_sockerrno, udp_sockerrno, tcp_sockerrno;
 	int result;
 	struct rta_host *host;
+
+	setlocale (LC_ALL, "");
+	bindtextdomain (PACKAGE, LOCALEDIR);
+	textdomain (PACKAGE);
 	
 	/* print a helpful error message if geteuid != 0 */
 	np_warn_if_not_root();

+ 4 - 0
plugins/check_cluster.c

@@ -71,6 +71,10 @@ int main(int argc, char **argv){
 	int return_code=STATE_OK;
 	thresholds *thresholds = NULL;
 
+	setlocale (LC_ALL, "");
+	bindtextdomain (PACKAGE, LOCALEDIR);
+	textdomain (PACKAGE);
+
 	if(process_arguments(argc,argv)==ERROR)
 		usage(_("Could not parse arguments"));
 

+ 4 - 0
plugins/check_http.c

@@ -140,6 +140,10 @@ main (int argc, char **argv)
 {
   int result = STATE_UNKNOWN;
 
+	setlocale (LC_ALL, "");
+	bindtextdomain (PACKAGE, LOCALEDIR);
+	textdomain (PACKAGE);
+
   /* Set default URL. Must be malloced for subsequent realloc if --onredirect=follow */
   server_url = strdup(HTTP_URL);
   server_url_length = strlen(server_url);

+ 4 - 0
plugins/check_mrtgtraf.c

@@ -79,6 +79,10 @@ main (int argc, char **argv)
 	char incoming_speed_rating[8];
 	char outgoing_speed_rating[8];
 
+	setlocale (LC_ALL, "");
+	bindtextdomain (PACKAGE, LOCALEDIR);
+	textdomain (PACKAGE);
+
 	if (process_arguments (argc, argv) == ERROR)
 		usage4 (_("Could not parse arguments"));
 

+ 4 - 0
plugins/check_ntp.c

@@ -757,6 +757,10 @@ int main(int argc, char *argv[]){
 	double offset=0, jitter=0;
 	char *result_line, *perfdata_line;
 
+	setlocale (LC_ALL, "");
+	bindtextdomain (PACKAGE, LOCALEDIR);
+	textdomain (PACKAGE);
+
 	result = offset_result = jitter_result = STATE_OK;
 
 	if (process_arguments (argc, argv) == ERROR)

+ 4 - 0
plugins/check_ntp_peer.c

@@ -544,6 +544,10 @@ int main(int argc, char *argv[]){
 	double offset=0, jitter=0;
 	char *result_line, *perfdata_line;
 
+	setlocale (LC_ALL, "");
+	bindtextdomain (PACKAGE, LOCALEDIR);
+	textdomain (PACKAGE);
+
 	if (process_arguments (argc, argv) == ERROR)
 		usage4 (_("Could not parse arguments"));
 

+ 4 - 0
plugins/check_ntp_time.c

@@ -534,6 +534,10 @@ int main(int argc, char *argv[]){
 	double offset=0;
 	char *result_line, *perfdata_line;
 
+	setlocale (LC_ALL, "");
+	bindtextdomain (PACKAGE, LOCALEDIR);
+	textdomain (PACKAGE);
+
 	result = offset_result = STATE_OK;
 
 	if (process_arguments (argc, argv) == ERROR)