Skip to contentSkip to conversation

kconfig: missing macros in gconfig

PATCH In review EGRY Gabor 1 participant 1 message Jan 11, 2008

Subsystems (2)
lore
Share & tools
lore

EGRY Gabor

author
#0 lore raw

PATCH 5/10 kconfig: missing macros in gconfig

This patch adds missing gettext macros.

---

 kbuild-szilard/scripts/kconfig/gconf.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
scripts/kconfig/gconf.c renamed from scripts/kconfig/gconf.c~kconfig-i18n-10-gconfig-missing +8 -4
diff -puN scripts/kconfig/gconf.c~kconfig-i18n-10-gconfig-missing scripts/kconfig/gconf.c
@@ -455,11 +455,15 @@ static void text_insert_help(struct menu
 {
 	GtkTextBuffer *buffer;
 	GtkTextIter start, end;
-	const char *prompt = menu_get_prompt(menu);
+	const char *prompt = _(menu_get_prompt(menu));
 	gchar *name;
 	const char *help;
 
-	help = _(menu_get_help(menu));
+	help = menu_get_help(menu);
+
+	/* Gettextize if the help text not empty */
+	if ((help != 0) && (help[0] != 0))
+		help = _(help);
 
 	if (menu->sym && menu->sym->name)
 		name = g_strdup_printf(_(menu->sym->name));
@@ -1169,7 +1173,7 @@ static gchar **fill_row(struct menu *men
 	bzero(row, sizeof(row));
 
 	row[COL_OPTION] =
-	    g_strdup_printf("%s %s", menu_get_prompt(menu),
+	    g_strdup_printf("%s %s", _(menu_get_prompt(menu)),
 			    sym && sym_has_value(sym) ? "(NEW)" : "");
 
 	if (show_all && !menu_is_visible(menu))
@@ -1219,7 +1223,7 @@ static gchar **fill_row(struct menu *men
 
 		if (def_menu)
 			row[COL_VALUE] =
-			    g_strdup(menu_get_prompt(def_menu));
+			    g_strdup(_(menu_get_prompt(def_menu)));
 	}
 	if (sym->flags & SYMBOL_CHOICEVAL)
 		row[COL_BTNRAD] = GINT_TO_POINTER(TRUE);

_