[gnome-utils] [gsearchtool] Fix bug #454650



commit 157f29bb4d77e08c1d64a5751ffceefa1c3883c0
Author: Dennis Cranston <dennis_cranston yahoo com>
Date:   Tue Oct 5 12:38:07 2010 -0700

    [gsearchtool] Fix bug #454650

 gsearchtool/ChangeLog     |    7 +++++++
 gsearchtool/gsearchtool.c |    8 +++++---
 2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/gsearchtool/ChangeLog b/gsearchtool/ChangeLog
index 1a0a4ee..7575e45 100644
--- a/gsearchtool/ChangeLog
+++ b/gsearchtool/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-05  Dennis Cranston  <dennis_cranston yahoo com>
+
+	* gsearchtool.c (gsearch_setup_goption_descriptions): 
+	Fix bug 454650, fix display of --help output, by adding 
+	setlocale() call and moving gettext calls. Contributed
+	by Gabor Kelemen.
+	
 2010-09-28  Dennis Cranston  <dennis_cranston yahoo com>
 
 	* gsearchtool-callbacks.c (build_popup_menu_for_file),
diff --git a/gsearchtool/gsearchtool.c b/gsearchtool/gsearchtool.c
index 44f970e..1764172 100644
--- a/gsearchtool/gsearchtool.c
+++ b/gsearchtool/gsearchtool.c
@@ -43,6 +43,7 @@
 #include <glib/gi18n.h>
 #include <gdk/gdk.h>
 #include <gio/gio.h>
+#include <locale.h>
 
 #include "gsearchtool.h"
 #include "gsearchtool-callbacks.h"
@@ -1292,12 +1293,12 @@ gsearch_setup_goption_descriptions (void)
 
 	for (j = 0; GSearchOptionTemplates[j].type != SEARCH_CONSTRAINT_TYPE_NONE; j++) {
 		if (GSearchOptionTemplates[j].type != SEARCH_CONSTRAINT_TYPE_SEPARATOR) {
-			gchar *text = remove_mnemonic_character (GSearchOptionTemplates[j].desc);
+			gchar *text = remove_mnemonic_character (_(GSearchOptionTemplates[j].desc));
 			if (GSearchOptionTemplates[j].type == SEARCH_CONSTRAINT_TYPE_BOOLEAN) {
-				GSearchGOptionEntries[i++].description = g_strdup_printf (_("Select the \"%s\" search option"), _(text));
+				GSearchGOptionEntries[i++].description = g_strdup_printf (_("Select the \"%s\" search option"), text);
 			}
 			else {
-				GSearchGOptionEntries[i++].description = g_strdup_printf (_("Select and set the \"%s\" search option"), _(text));
+				GSearchGOptionEntries[i++].description = g_strdup_printf (_("Select and set the \"%s\" search option"), text);
 			}
 			g_free (text);
 		}
@@ -2966,6 +2967,7 @@ main (int argc,
 	GError * error = NULL;
 	EggSMClient * client;
 
+	setlocale (LC_ALL, "");
 	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]