summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/kconfig/.gitignore4
-rw-r--r--scripts/kconfig/Makefile42
-rw-r--r--scripts/kconfig/POTFILES.in12
-rwxr-xr-xscripts/kconfig/check.sh14
-rw-r--r--scripts/kconfig/conf.c51
-rw-r--r--scripts/kconfig/confdata.c4
-rw-r--r--scripts/kconfig/gconf.c46
-rw-r--r--scripts/kconfig/kxgettext.c235
-rw-r--r--scripts/kconfig/lkc.h14
-rw-r--r--scripts/kconfig/lxdialog/checklist.c4
-rw-r--r--scripts/kconfig/lxdialog/dialog.h6
-rw-r--r--scripts/kconfig/lxdialog/inputbox.c4
-rw-r--r--scripts/kconfig/lxdialog/menubox.c10
-rw-r--r--scripts/kconfig/lxdialog/textbox.c2
-rw-r--r--scripts/kconfig/lxdialog/yesno.c4
-rw-r--r--scripts/kconfig/mconf.c141
-rw-r--r--scripts/kconfig/menu.c20
-rw-r--r--scripts/kconfig/nconf.c148
-rw-r--r--scripts/kconfig/nconf.h1
-rw-r--r--scripts/kconfig/qconf.cc104
-rw-r--r--scripts/kconfig/zconf.y2
21 files changed, 258 insertions, 610 deletions
diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore
index 2da579edcbaf..0aabc1d6a182 100644
--- a/scripts/kconfig/.gitignore
+++ b/scripts/kconfig/.gitignore
@@ -2,9 +2,6 @@
2# Generated files 2# Generated files
3# 3#
4*.moc 4*.moc
5gconf.glade.h
6*.pot
7*.mo
8 5
9# 6#
10# configuration programs 7# configuration programs
@@ -14,4 +11,3 @@ mconf
14nconf 11nconf
15qconf 12qconf
16gconf 13gconf
17kxgettext
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index a71596c7ecfd..061e0eb62c28 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -3,7 +3,7 @@
3# Kernel configuration targets 3# Kernel configuration targets
4# These targets are used from top-level makefile 4# These targets are used from top-level makefile
5 5
6PHONY += xconfig gconfig menuconfig config syncconfig update-po-config \ 6PHONY += xconfig gconfig menuconfig config syncconfig \
7 localmodconfig localyesconfig 7 localmodconfig localyesconfig
8 8
9ifdef KBUILD_KCONFIG 9ifdef KBUILD_KCONFIG
@@ -55,29 +55,6 @@ localyesconfig localmodconfig: $(obj)/conf
55 fi 55 fi
56 $(Q)rm -f .tmp.config 56 $(Q)rm -f .tmp.config
57 57
58# Create new linux.pot file
59# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
60update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
61 $(Q)$(kecho) " GEN config.pot"
62 $(Q)xgettext --default-domain=linux \
63 --add-comments --keyword=_ --keyword=N_ \
64 --from-code=UTF-8 \
65 --files-from=$(srctree)/scripts/kconfig/POTFILES.in \
66 --directory=$(srctree) --directory=$(objtree) \
67 --output $(obj)/config.pot
68 $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
69 $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \
70 $(srctree)/arch/*/um/Kconfig`; \
71 do \
72 $(kecho) " GEN $$i"; \
73 $(obj)/kxgettext $$i \
74 >> $(obj)/config.pot; \
75 done )
76 $(Q)$(kecho) " GEN linux.pot"
77 $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
78 --output $(obj)/linux.pot
79 $(Q)rm -f $(obj)/config.pot
80
81# These targets map 1:1 to the commandline options of 'conf' 58# These targets map 1:1 to the commandline options of 'conf'
82simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ 59simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
83 alldefconfig randconfig listnewconfig olddefconfig 60 alldefconfig randconfig listnewconfig olddefconfig
@@ -179,19 +156,11 @@ help:
179# object files used by all kconfig flavours 156# object files used by all kconfig flavours
180 157
181conf-objs := conf.o zconf.tab.o 158conf-objs := conf.o zconf.tab.o
182kxgettext-objs := kxgettext.o zconf.tab.o
183 159
184hostprogs-y := conf kxgettext 160hostprogs-y := conf
185 161
186targets += zconf.lex.c 162targets += zconf.lex.c
187clean-files += gconf.glade.h 163
188clean-files += config.pot linux.pot
189
190# Add environment specific flags
191HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) \
192 -DLOCALE
193HOST_EXTRACXXFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCXX) $(HOSTCXXFLAGS)) \
194 -DLOCALE
195# generated files seem to need this to find local include files 164# generated files seem to need this to find local include files
196HOSTCFLAGS_zconf.lex.o := -I$(src) 165HOSTCFLAGS_zconf.lex.o := -I$(src)
197HOSTCFLAGS_zconf.tab.o := -I$(src) 166HOSTCFLAGS_zconf.tab.o := -I$(src)
@@ -244,11 +213,6 @@ $(obj)/gconf.o: $(obj)/.gconf-cfg
244 213
245$(obj)/zconf.tab.o: $(obj)/zconf.lex.c 214$(obj)/zconf.tab.o: $(obj)/zconf.lex.c
246 215
247# Extract gconf menu items for i18n support
248$(obj)/gconf.glade.h: $(obj)/gconf.glade
249 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
250 $(obj)/gconf.glade
251
252# check if necessary packages are available, and configure build flags 216# check if necessary packages are available, and configure build flags
253define filechk_conf_cfg 217define filechk_conf_cfg
254 $(CONFIG_SHELL) $< 218 $(CONFIG_SHELL) $<
diff --git a/scripts/kconfig/POTFILES.in b/scripts/kconfig/POTFILES.in
deleted file mode 100644
index 967457396990..000000000000
--- a/scripts/kconfig/POTFILES.in
+++ /dev/null
@@ -1,12 +0,0 @@
1scripts/kconfig/lxdialog/checklist.c
2scripts/kconfig/lxdialog/inputbox.c
3scripts/kconfig/lxdialog/menubox.c
4scripts/kconfig/lxdialog/textbox.c
5scripts/kconfig/lxdialog/util.c
6scripts/kconfig/lxdialog/yesno.c
7scripts/kconfig/mconf.c
8scripts/kconfig/conf.c
9scripts/kconfig/confdata.c
10scripts/kconfig/gconf.c
11scripts/kconfig/gconf.glade.h
12scripts/kconfig/qconf.cc
diff --git a/scripts/kconfig/check.sh b/scripts/kconfig/check.sh
deleted file mode 100755
index 97f0fee7d173..000000000000
--- a/scripts/kconfig/check.sh
+++ /dev/null
@@ -1,14 +0,0 @@
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# Needed for systems without gettext
4$* -x c -o /dev/null - > /dev/null 2>&1 << EOF
5#include <libintl.h>
6int main()
7{
8 gettext("");
9 return 0;
10}
11EOF
12if [ ! "$?" -eq "0" ]; then
13 echo -DKBUILD_NO_NLS;
14fi
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 283eeedaa4fa..671ff5364497 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -3,7 +3,6 @@
3 * Released under the terms of the GNU GPL v2.0. 3 * Released under the terms of the GNU GPL v2.0.
4 */ 4 */
5 5
6#include <locale.h>
7#include <ctype.h> 6#include <ctype.h>
8#include <limits.h> 7#include <limits.h>
9#include <stdio.h> 8#include <stdio.h>
@@ -86,7 +85,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
86 enum symbol_type type = sym_get_type(sym); 85 enum symbol_type type = sym_get_type(sym);
87 86
88 if (!sym_has_value(sym)) 87 if (!sym_has_value(sym))
89 printf(_("(NEW) ")); 88 printf("(NEW) ");
90 89
91 line[0] = '\n'; 90 line[0] = '\n';
92 line[1] = 0; 91 line[1] = 0;
@@ -133,7 +132,7 @@ static int conf_string(struct menu *menu)
133 const char *def; 132 const char *def;
134 133
135 while (1) { 134 while (1) {
136 printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); 135 printf("%*s%s ", indent - 1, "", menu->prompt->text);
137 printf("(%s) ", sym->name); 136 printf("(%s) ", sym->name);
138 def = sym_get_string_value(sym); 137 def = sym_get_string_value(sym);
139 if (sym_get_string_value(sym)) 138 if (sym_get_string_value(sym))
@@ -166,7 +165,7 @@ static int conf_sym(struct menu *menu)
166 tristate oldval, newval; 165 tristate oldval, newval;
167 166
168 while (1) { 167 while (1) {
169 printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); 168 printf("%*s%s ", indent - 1, "", menu->prompt->text);
170 if (sym->name) 169 if (sym->name)
171 printf("(%s) ", sym->name); 170 printf("(%s) ", sym->name);
172 putchar('['); 171 putchar('[');
@@ -251,7 +250,7 @@ static int conf_choice(struct menu *menu)
251 case no: 250 case no:
252 return 1; 251 return 1;
253 case mod: 252 case mod:
254 printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu))); 253 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
255 return 0; 254 return 0;
256 case yes: 255 case yes:
257 break; 256 break;
@@ -261,7 +260,7 @@ static int conf_choice(struct menu *menu)
261 while (1) { 260 while (1) {
262 int cnt, def; 261 int cnt, def;
263 262
264 printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu))); 263 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
265 def_sym = sym_get_choice_value(sym); 264 def_sym = sym_get_choice_value(sym);
266 cnt = def = 0; 265 cnt = def = 0;
267 line[0] = 0; 266 line[0] = 0;
@@ -269,7 +268,7 @@ static int conf_choice(struct menu *menu)
269 if (!menu_is_visible(child)) 268 if (!menu_is_visible(child))
270 continue; 269 continue;
271 if (!child->sym) { 270 if (!child->sym) {
272 printf("%*c %s\n", indent, '*', _(menu_get_prompt(child))); 271 printf("%*c %s\n", indent, '*', menu_get_prompt(child));
273 continue; 272 continue;
274 } 273 }
275 cnt++; 274 cnt++;
@@ -278,14 +277,14 @@ static int conf_choice(struct menu *menu)
278 printf("%*c", indent, '>'); 277 printf("%*c", indent, '>');
279 } else 278 } else
280 printf("%*c", indent, ' '); 279 printf("%*c", indent, ' ');
281 printf(" %d. %s", cnt, _(menu_get_prompt(child))); 280 printf(" %d. %s", cnt, menu_get_prompt(child));
282 if (child->sym->name) 281 if (child->sym->name)
283 printf(" (%s)", child->sym->name); 282 printf(" (%s)", child->sym->name);
284 if (!sym_has_value(child->sym)) 283 if (!sym_has_value(child->sym))
285 printf(_(" (NEW)")); 284 printf(" (NEW)");
286 printf("\n"); 285 printf("\n");
287 } 286 }
288 printf(_("%*schoice"), indent - 1, ""); 287 printf("%*schoice", indent - 1, "");
289 if (cnt == 1) { 288 if (cnt == 1) {
290 printf("[1]: 1\n"); 289 printf("[1]: 1\n");
291 goto conf_childs; 290 goto conf_childs;
@@ -372,7 +371,7 @@ static void conf(struct menu *menu)
372 if (prompt) 371 if (prompt)
373 printf("%*c\n%*c %s\n%*c\n", 372 printf("%*c\n%*c %s\n%*c\n",
374 indent, '*', 373 indent, '*',
375 indent, '*', _(prompt), 374 indent, '*', prompt,
376 indent, '*'); 375 indent, '*');
377 default: 376 default:
378 ; 377 ;
@@ -437,7 +436,7 @@ static void check_conf(struct menu *menu)
437 } 436 }
438 } else { 437 } else {
439 if (!conf_cnt++) 438 if (!conf_cnt++)
440 printf(_("*\n* Restart config...\n*\n")); 439 printf("*\n* Restart config...\n*\n");
441 rootEntry = menu_get_parent_menu(menu); 440 rootEntry = menu_get_parent_menu(menu);
442 conf(rootEntry); 441 conf(rootEntry);
443 } 442 }
@@ -498,10 +497,6 @@ int main(int ac, char **av)
498 const char *name, *defconfig_file = NULL /* gcc uninit */; 497 const char *name, *defconfig_file = NULL /* gcc uninit */;
499 struct stat tmpstat; 498 struct stat tmpstat;
500 499
501 setlocale(LC_ALL, "");
502 bindtextdomain(PACKAGE, LOCALEDIR);
503 textdomain(PACKAGE);
504
505 tty_stdio = isatty(0) && isatty(1); 500 tty_stdio = isatty(0) && isatty(1);
506 501
507 while ((opt = getopt_long(ac, av, "s", long_opts, NULL)) != -1) { 502 while ((opt = getopt_long(ac, av, "s", long_opts, NULL)) != -1) {
@@ -559,7 +554,7 @@ int main(int ac, char **av)
559 } 554 }
560 } 555 }
561 if (ac == optind) { 556 if (ac == optind) {
562 fprintf(stderr, _("%s: Kconfig file missing\n"), av[0]); 557 fprintf(stderr, "%s: Kconfig file missing\n", av[0]);
563 conf_usage(progname); 558 conf_usage(progname);
564 exit(1); 559 exit(1);
565 } 560 }
@@ -569,12 +564,12 @@ int main(int ac, char **av)
569 if (sync_kconfig) { 564 if (sync_kconfig) {
570 name = conf_get_configname(); 565 name = conf_get_configname();
571 if (stat(name, &tmpstat)) { 566 if (stat(name, &tmpstat)) {
572 fprintf(stderr, _("***\n" 567 fprintf(stderr, "***\n"
573 "*** Configuration file \"%s\" not found!\n" 568 "*** Configuration file \"%s\" not found!\n"
574 "***\n" 569 "***\n"
575 "*** Please run some configurator (e.g. \"make oldconfig\" or\n" 570 "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
576 "*** \"make menuconfig\" or \"make xconfig\").\n" 571 "*** \"make menuconfig\" or \"make xconfig\").\n"
577 "***\n"), name); 572 "***\n", name);
578 exit(1); 573 exit(1);
579 } 574 }
580 } 575 }
@@ -585,9 +580,9 @@ int main(int ac, char **av)
585 defconfig_file = conf_get_default_confname(); 580 defconfig_file = conf_get_default_confname();
586 if (conf_read(defconfig_file)) { 581 if (conf_read(defconfig_file)) {
587 fprintf(stderr, 582 fprintf(stderr,
588 _("***\n" 583 "***\n"
589 "*** Can't find default configuration \"%s\"!\n" 584 "*** Can't find default configuration \"%s\"!\n"
590 "***\n"), 585 "***\n",
591 defconfig_file); 586 defconfig_file);
592 exit(1); 587 exit(1);
593 } 588 }
@@ -611,7 +606,7 @@ int main(int ac, char **av)
611 if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) { 606 if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) {
612 if (conf_read_simple(name, S_DEF_USER)) { 607 if (conf_read_simple(name, S_DEF_USER)) {
613 fprintf(stderr, 608 fprintf(stderr,
614 _("*** Can't read seed configuration \"%s\"!\n"), 609 "*** Can't read seed configuration \"%s\"!\n",
615 name); 610 name);
616 exit(1); 611 exit(1);
617 } 612 }
@@ -628,7 +623,7 @@ int main(int ac, char **av)
628 if (conf_read_simple(name, S_DEF_USER) && 623 if (conf_read_simple(name, S_DEF_USER) &&
629 conf_read_simple("all.config", S_DEF_USER)) { 624 conf_read_simple("all.config", S_DEF_USER)) {
630 fprintf(stderr, 625 fprintf(stderr,
631 _("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"), 626 "*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n",
632 name); 627 name);
633 exit(1); 628 exit(1);
634 } 629 }
@@ -642,7 +637,7 @@ int main(int ac, char **av)
642 name = getenv("KCONFIG_NOSILENTUPDATE"); 637 name = getenv("KCONFIG_NOSILENTUPDATE");
643 if (name && *name) { 638 if (name && *name) {
644 fprintf(stderr, 639 fprintf(stderr,
645 _("\n*** The configuration requires explicit update.\n\n")); 640 "\n*** The configuration requires explicit update.\n\n");
646 return 1; 641 return 1;
647 } 642 }
648 } 643 }
@@ -694,22 +689,22 @@ int main(int ac, char **av)
694 * All other commands are only used to generate a config. 689 * All other commands are only used to generate a config.
695 */ 690 */
696 if (conf_get_changed() && conf_write(NULL)) { 691 if (conf_get_changed() && conf_write(NULL)) {
697 fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); 692 fprintf(stderr, "\n*** Error during writing of the configuration.\n\n");
698 exit(1); 693 exit(1);
699 } 694 }
700 if (conf_write_autoconf()) { 695 if (conf_write_autoconf()) {
701 fprintf(stderr, _("\n*** Error during update of the configuration.\n\n")); 696 fprintf(stderr, "\n*** Error during update of the configuration.\n\n");
702 return 1; 697 return 1;
703 } 698 }
704 } else if (input_mode == savedefconfig) { 699 } else if (input_mode == savedefconfig) {
705 if (conf_write_defconfig(defconfig_file)) { 700 if (conf_write_defconfig(defconfig_file)) {
706 fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"), 701 fprintf(stderr, "n*** Error while saving defconfig to: %s\n\n",
707 defconfig_file); 702 defconfig_file);
708 return 1; 703 return 1;
709 } 704 }
710 } else if (input_mode != listnewconfig) { 705 } else if (input_mode != listnewconfig) {
711 if (conf_write(NULL)) { 706 if (conf_write(NULL)) {
712 fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); 707 fprintf(stderr, "\n*** Error during writing of the configuration.\n\n");
713 exit(1); 708 exit(1);
714 } 709 }
715 } 710 }
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index df26c7b0fe13..569217168e96 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -277,7 +277,7 @@ int conf_read_simple(const char *name, int def)
277 name = conf_expand_value(prop->expr->left.sym->name); 277 name = conf_expand_value(prop->expr->left.sym->name);
278 in = zconf_fopen(name); 278 in = zconf_fopen(name);
279 if (in) { 279 if (in) {
280 conf_message(_("using defaults found in %s"), 280 conf_message("using defaults found in %s",
281 name); 281 name);
282 goto load; 282 goto load;
283 } 283 }
@@ -831,7 +831,7 @@ next:
831 return 1; 831 return 1;
832 } 832 }
833 833
834 conf_message(_("configuration written to %s"), newname); 834 conf_message("configuration written to %s", newname);
835 835
836 sym_set_change_count(0); 836 sym_set_change_count(0);
837 837
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index cfddddb9c9d7..610c4ab54d76 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -137,7 +137,7 @@ void init_main_window(const gchar * glade_file)
137 137
138 xml = glade_xml_new(glade_file, "window1", NULL); 138 xml = glade_xml_new(glade_file, "window1", NULL);
139 if (!xml) 139 if (!xml)
140 g_error(_("GUI loading failed !\n")); 140 g_error("GUI loading failed !\n");
141 glade_xml_signal_autoconnect(xml); 141 glade_xml_signal_autoconnect(xml);
142 142
143 main_wnd = glade_xml_get_widget(xml, "window1"); 143 main_wnd = glade_xml_get_widget(xml, "window1");
@@ -233,7 +233,7 @@ void init_left_tree(void)
233 233
234 column = gtk_tree_view_column_new(); 234 column = gtk_tree_view_column_new();
235 gtk_tree_view_append_column(view, column); 235 gtk_tree_view_append_column(view, column);
236 gtk_tree_view_column_set_title(column, _("Options")); 236 gtk_tree_view_column_set_title(column, "Options");
237 237
238 renderer = gtk_cell_renderer_toggle_new(); 238 renderer = gtk_cell_renderer_toggle_new();
239 gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), 239 gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
@@ -276,7 +276,7 @@ void init_right_tree(void)
276 276
277 column = gtk_tree_view_column_new(); 277 column = gtk_tree_view_column_new();
278 gtk_tree_view_append_column(view, column); 278 gtk_tree_view_append_column(view, column);
279 gtk_tree_view_column_set_title(column, _("Options")); 279 gtk_tree_view_column_set_title(column, "Options");
280 280
281 renderer = gtk_cell_renderer_pixbuf_new(); 281 renderer = gtk_cell_renderer_pixbuf_new();
282 gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), 282 gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
@@ -305,7 +305,7 @@ void init_right_tree(void)
305 305
306 renderer = gtk_cell_renderer_text_new(); 306 renderer = gtk_cell_renderer_text_new();
307 gtk_tree_view_insert_column_with_attributes(view, -1, 307 gtk_tree_view_insert_column_with_attributes(view, -1,
308 _("Name"), renderer, 308 "Name", renderer,
309 "text", COL_NAME, 309 "text", COL_NAME,
310 "foreground-gdk", 310 "foreground-gdk",
311 COL_COLOR, NULL); 311 COL_COLOR, NULL);
@@ -329,7 +329,7 @@ void init_right_tree(void)
329 COL_COLOR, NULL); 329 COL_COLOR, NULL);
330 renderer = gtk_cell_renderer_text_new(); 330 renderer = gtk_cell_renderer_text_new();
331 gtk_tree_view_insert_column_with_attributes(view, -1, 331 gtk_tree_view_insert_column_with_attributes(view, -1,
332 _("Value"), renderer, 332 "Value", renderer,
333 "text", COL_VALUE, 333 "text", COL_VALUE,
334 "editable", 334 "editable",
335 COL_EDIT, 335 COL_EDIT,
@@ -368,7 +368,7 @@ static void text_insert_help(struct menu *menu)
368{ 368{
369 GtkTextBuffer *buffer; 369 GtkTextBuffer *buffer;
370 GtkTextIter start, end; 370 GtkTextIter start, end;
371 const char *prompt = _(menu_get_prompt(menu)); 371 const char *prompt = menu_get_prompt(menu);
372 struct gstr help = str_new(); 372 struct gstr help = str_new();
373 373
374 menu_get_ext_help(menu, &help); 374 menu_get_ext_help(menu, &help);
@@ -422,7 +422,7 @@ gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event,
422 if (!conf_get_changed()) 422 if (!conf_get_changed())
423 return FALSE; 423 return FALSE;
424 424
425 dialog = gtk_dialog_new_with_buttons(_("Warning !"), 425 dialog = gtk_dialog_new_with_buttons("Warning !",
426 GTK_WINDOW(main_wnd), 426 GTK_WINDOW(main_wnd),
427 (GtkDialogFlags) 427 (GtkDialogFlags)
428 (GTK_DIALOG_MODAL | 428 (GTK_DIALOG_MODAL |
@@ -436,7 +436,7 @@ gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event,
436 gtk_dialog_set_default_response(GTK_DIALOG(dialog), 436 gtk_dialog_set_default_response(GTK_DIALOG(dialog),
437 GTK_RESPONSE_CANCEL); 437 GTK_RESPONSE_CANCEL);
438 438
439 label = gtk_label_new(_("\nSave configuration ?\n")); 439 label = gtk_label_new("\nSave configuration ?\n");
440 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); 440 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label);
441 gtk_widget_show(label); 441 gtk_widget_show(label);
442 442
@@ -496,7 +496,7 @@ load_filename(GtkFileSelection * file_selector, gpointer user_data)
496 (user_data)); 496 (user_data));
497 497
498 if (conf_read(fn)) 498 if (conf_read(fn))
499 text_insert_msg(_("Error"), _("Unable to load configuration !")); 499 text_insert_msg("Error", "Unable to load configuration !");
500 else 500 else
501 display_tree(&rootmenu); 501 display_tree(&rootmenu);
502} 502}
@@ -505,7 +505,7 @@ void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data)
505{ 505{
506 GtkWidget *fs; 506 GtkWidget *fs;
507 507
508 fs = gtk_file_selection_new(_("Load file...")); 508 fs = gtk_file_selection_new("Load file...");
509 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), 509 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button),
510 "clicked", 510 "clicked",
511 G_CALLBACK(load_filename), (gpointer) fs); 511 G_CALLBACK(load_filename), (gpointer) fs);
@@ -524,7 +524,7 @@ void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data)
524void on_save_activate(GtkMenuItem * menuitem, gpointer user_data) 524void on_save_activate(GtkMenuItem * menuitem, gpointer user_data)
525{ 525{
526 if (conf_write(NULL)) 526 if (conf_write(NULL))
527 text_insert_msg(_("Error"), _("Unable to save configuration !")); 527 text_insert_msg("Error", "Unable to save configuration !");
528} 528}
529 529
530 530
@@ -537,7 +537,7 @@ store_filename(GtkFileSelection * file_selector, gpointer user_data)
537 (user_data)); 537 (user_data));
538 538
539 if (conf_write(fn)) 539 if (conf_write(fn))
540 text_insert_msg(_("Error"), _("Unable to save configuration !")); 540 text_insert_msg("Error", "Unable to save configuration !");
541 541
542 gtk_widget_destroy(GTK_WIDGET(user_data)); 542 gtk_widget_destroy(GTK_WIDGET(user_data));
543} 543}
@@ -546,7 +546,7 @@ void on_save_as1_activate(GtkMenuItem * menuitem, gpointer user_data)
546{ 546{
547 GtkWidget *fs; 547 GtkWidget *fs;
548 548
549 fs = gtk_file_selection_new(_("Save file as...")); 549 fs = gtk_file_selection_new("Save file as...");
550 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), 550 g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button),
551 "clicked", 551 "clicked",
552 G_CALLBACK(store_filename), (gpointer) fs); 552 G_CALLBACK(store_filename), (gpointer) fs);
@@ -639,7 +639,7 @@ on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data)
639void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) 639void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
640{ 640{
641 GtkWidget *dialog; 641 GtkWidget *dialog;
642 const gchar *intro_text = _( 642 const gchar *intro_text =
643 "Welcome to gkc, the GTK+ graphical configuration tool\n" 643 "Welcome to gkc, the GTK+ graphical configuration tool\n"
644 "For each option, a blank box indicates the feature is disabled, a\n" 644 "For each option, a blank box indicates the feature is disabled, a\n"
645 "check indicates it is enabled, and a dot indicates that it is to\n" 645 "check indicates it is enabled, and a dot indicates that it is to\n"
@@ -654,7 +654,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
654 "option.\n" 654 "option.\n"
655 "\n" 655 "\n"
656 "Toggling Show Debug Info under the Options menu will show \n" 656 "Toggling Show Debug Info under the Options menu will show \n"
657 "the dependencies, which you can then match by examining other options."); 657 "the dependencies, which you can then match by examining other options.";
658 658
659 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), 659 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
660 GTK_DIALOG_DESTROY_WITH_PARENT, 660 GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -671,8 +671,8 @@ void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data)
671{ 671{
672 GtkWidget *dialog; 672 GtkWidget *dialog;
673 const gchar *about_text = 673 const gchar *about_text =
674 _("gkc is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n" 674 "gkc is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n"
675 "Based on the source code from Roman Zippel.\n"); 675 "Based on the source code from Roman Zippel.\n";
676 676
677 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), 677 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
678 GTK_DIALOG_DESTROY_WITH_PARENT, 678 GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -689,9 +689,9 @@ void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data)
689{ 689{
690 GtkWidget *dialog; 690 GtkWidget *dialog;
691 const gchar *license_text = 691 const gchar *license_text =
692 _("gkc is released under the terms of the GNU GPL v2.\n" 692 "gkc is released under the terms of the GNU GPL v2.\n"
693 "For more information, please see the source code or\n" 693 "For more information, please see the source code or\n"
694 "visit http://www.fsf.org/licenses/licenses.html\n"); 694 "visit http://www.fsf.org/licenses/licenses.html\n";
695 695
696 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), 696 dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
697 GTK_DIALOG_DESTROY_WITH_PARENT, 697 GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -1049,7 +1049,7 @@ static gchar **fill_row(struct menu *menu)
1049 bzero(row, sizeof(row)); 1049 bzero(row, sizeof(row));
1050 1050
1051 row[COL_OPTION] = 1051 row[COL_OPTION] =
1052 g_strdup_printf("%s %s", _(menu_get_prompt(menu)), 1052 g_strdup_printf("%s %s", menu_get_prompt(menu),
1053 sym && !sym_has_value(sym) ? "(NEW)" : ""); 1053 sym && !sym_has_value(sym) ? "(NEW)" : "");
1054 1054
1055 if (opt_mode == OPT_ALL && !menu_is_visible(menu)) 1055 if (opt_mode == OPT_ALL && !menu_is_visible(menu))
@@ -1102,7 +1102,7 @@ static gchar **fill_row(struct menu *menu)
1102 1102
1103 if (def_menu) 1103 if (def_menu)
1104 row[COL_VALUE] = 1104 row[COL_VALUE] =
1105 g_strdup(_(menu_get_prompt(def_menu))); 1105 g_strdup(menu_get_prompt(def_menu));
1106 } 1106 }
1107 if (sym->flags & SYMBOL_CHOICEVAL) 1107 if (sym->flags & SYMBOL_CHOICEVAL)
1108 row[COL_BTNRAD] = GINT_TO_POINTER(TRUE); 1108 row[COL_BTNRAD] = GINT_TO_POINTER(TRUE);
@@ -1447,10 +1447,6 @@ int main(int ac, char *av[])
1447 char *env; 1447 char *env;
1448 gchar *glade_file; 1448 gchar *glade_file;
1449 1449
1450 bindtextdomain(PACKAGE, LOCALEDIR);
1451 bind_textdomain_codeset(PACKAGE, "UTF-8");
1452 textdomain(PACKAGE);
1453
1454 /* GTK stuffs */ 1450 /* GTK stuffs */
1455 gtk_set_locale(); 1451 gtk_set_locale();
1456 gtk_init(&ac, &av); 1452 gtk_init(&ac, &av);
diff --git a/scripts/kconfig/kxgettext.c b/scripts/kconfig/kxgettext.c
deleted file mode 100644
index 240880a89111..000000000000
--- a/scripts/kconfig/kxgettext.c
+++ /dev/null
@@ -1,235 +0,0 @@
1/*
2 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>, 2005
3 *
4 * Released under the terms of the GNU GPL v2.0
5 */
6
7#include <stdlib.h>
8#include <string.h>
9
10#include "lkc.h"
11
12static char *escape(const char* text, char *bf, int len)
13{
14 char *bfp = bf;
15 int multiline = strchr(text, '\n') != NULL;
16 int eol = 0;
17 int textlen = strlen(text);
18
19 if ((textlen > 0) && (text[textlen-1] == '\n'))
20 eol = 1;
21
22 *bfp++ = '"';
23 --len;
24
25 if (multiline) {
26 *bfp++ = '"';
27 *bfp++ = '\n';
28 *bfp++ = '"';
29 len -= 3;
30 }
31
32 while (*text != '\0' && len > 1) {
33 if (*text == '"')
34 *bfp++ = '\\';
35 else if (*text == '\n') {
36 *bfp++ = '\\';
37 *bfp++ = 'n';
38 *bfp++ = '"';
39 *bfp++ = '\n';
40 *bfp++ = '"';
41 len -= 5;
42 ++text;
43 goto next;
44 }
45 else if (*text == '\\') {
46 *bfp++ = '\\';
47 len--;
48 }
49 *bfp++ = *text++;
50next:
51 --len;
52 }
53
54 if (multiline && eol)
55 bfp -= 3;
56
57 *bfp++ = '"';
58 *bfp = '\0';
59
60 return bf;
61}
62
63struct file_line {
64 struct file_line *next;
65 const char *file;
66 int lineno;
67};
68
69static struct file_line *file_line__new(const char *file, int lineno)
70{
71 struct file_line *self = malloc(sizeof(*self));
72
73 if (self == NULL)
74 goto out;
75
76 self->file = file;
77 self->lineno = lineno;
78 self->next = NULL;
79out:
80 return self;
81}
82
83struct message {
84 const char *msg;
85 const char *option;
86 struct message *next;
87 struct file_line *files;
88};
89
90static struct message *message__list;
91
92static struct message *message__new(const char *msg, char *option,
93 const char *file, int lineno)
94{
95 struct message *self = malloc(sizeof(*self));
96
97 if (self == NULL)
98 goto out;
99
100 self->files = file_line__new(file, lineno);
101 if (self->files == NULL)
102 goto out_fail;
103
104 self->msg = xstrdup(msg);
105 if (self->msg == NULL)
106 goto out_fail_msg;
107
108 self->option = option;
109 self->next = NULL;
110out:
111 return self;
112out_fail_msg:
113 free(self->files);
114out_fail:
115 free(self);
116 self = NULL;
117 goto out;
118}
119
120static struct message *mesage__find(const char *msg)
121{
122 struct message *m = message__list;
123
124 while (m != NULL) {
125 if (strcmp(m->msg, msg) == 0)
126 break;
127 m = m->next;
128 }
129
130 return m;
131}
132
133static int message__add_file_line(struct message *self, const char *file,
134 int lineno)
135{
136 int rc = -1;
137 struct file_line *fl = file_line__new(file, lineno);
138
139 if (fl == NULL)
140 goto out;
141
142 fl->next = self->files;
143 self->files = fl;
144 rc = 0;
145out:
146 return rc;
147}
148
149static int message__add(const char *msg, char *option, const char *file,
150 int lineno)
151{
152 int rc = 0;
153 char bf[16384];
154 char *escaped = escape(msg, bf, sizeof(bf));
155 struct message *m = mesage__find(escaped);
156
157 if (m != NULL)
158 rc = message__add_file_line(m, file, lineno);
159 else {
160 m = message__new(escaped, option, file, lineno);
161
162 if (m != NULL) {
163 m->next = message__list;
164 message__list = m;
165 } else
166 rc = -1;
167 }
168 return rc;
169}
170
171static void menu_build_message_list(struct menu *menu)
172{
173 struct menu *child;
174
175 message__add(menu_get_prompt(menu), NULL,
176 menu->file == NULL ? "Root Menu" : menu->file->name,
177 menu->lineno);
178
179 if (menu->sym != NULL && menu_has_help(menu))
180 message__add(menu_get_help(menu), menu->sym->name,
181 menu->file == NULL ? "Root Menu" : menu->file->name,
182 menu->lineno);
183
184 for (child = menu->list; child != NULL; child = child->next)
185 if (child->prompt != NULL)
186 menu_build_message_list(child);
187}
188
189static void message__print_file_lineno(struct message *self)
190{
191 struct file_line *fl = self->files;
192
193 putchar('\n');
194 if (self->option != NULL)
195 printf("# %s:00000\n", self->option);
196
197 printf("#: %s:%d", fl->file, fl->lineno);
198 fl = fl->next;
199
200 while (fl != NULL) {
201 printf(", %s:%d", fl->file, fl->lineno);
202 fl = fl->next;
203 }
204
205 putchar('\n');
206}
207
208static void message__print_gettext_msgid_msgstr(struct message *self)
209{
210 message__print_file_lineno(self);
211
212 printf("msgid %s\n"
213 "msgstr \"\"\n", self->msg);
214}
215
216static void menu__xgettext(void)
217{
218 struct message *m = message__list;
219
220 while (m != NULL) {
221 /* skip empty lines ("") */
222 if (strlen(m->msg) > sizeof("\"\""))
223 message__print_gettext_msgid_msgstr(m);
224 m = m->next;
225 }
226}
227
228int main(int ac, char **av)
229{
230 conf_parse(av[1]);
231
232 menu_build_message_list(menu_get_root_menu(NULL));
233 menu__xgettext();
234 return 0;
235}
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index f4394af6e4b8..2628bc6a2141 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -8,15 +8,6 @@
8 8
9#include "expr.h" 9#include "expr.h"
10 10
11#ifndef KBUILD_NO_NLS
12# include <libintl.h>
13#else
14static inline const char *gettext(const char *txt) { return txt; }
15static inline void textdomain(const char *domainname) {}
16static inline void bindtextdomain(const char *name, const char *dir) {}
17static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; }
18#endif
19
20#ifdef __cplusplus 11#ifdef __cplusplus
21extern "C" { 12extern "C" {
22#endif 13#endif
@@ -29,11 +20,6 @@ extern "C" {
29#define PACKAGE "linux" 20#define PACKAGE "linux"
30#endif 21#endif
31 22
32#define LOCALEDIR "/usr/share/locale"
33
34#define _(text) gettext(text)
35#define N_(text) (text)
36
37#ifndef CONFIG_ 23#ifndef CONFIG_
38#define CONFIG_ "CONFIG_" 24#define CONFIG_ "CONFIG_"
39#endif 25#endif
diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
index 8d016faa28d7..2e96323ad11b 100644
--- a/scripts/kconfig/lxdialog/checklist.c
+++ b/scripts/kconfig/lxdialog/checklist.c
@@ -103,8 +103,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)
103 int x = width / 2 - 11; 103 int x = width / 2 - 11;
104 int y = height - 2; 104 int y = height - 2;
105 105
106 print_button(dialog, gettext("Select"), y, x, selected == 0); 106 print_button(dialog, "Select", y, x, selected == 0);
107 print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); 107 print_button(dialog, " Help ", y, x + 14, selected == 1);
108 108
109 wmove(dialog, y, x + 1 + 14 * selected); 109 wmove(dialog, y, x + 1 + 14 * selected);
110 wrefresh(dialog); 110 wrefresh(dialog);
diff --git a/scripts/kconfig/lxdialog/dialog.h b/scripts/kconfig/lxdialog/dialog.h
index 52e30a0012f1..0b00be5abaa6 100644
--- a/scripts/kconfig/lxdialog/dialog.h
+++ b/scripts/kconfig/lxdialog/dialog.h
@@ -26,12 +26,6 @@
26#include <string.h> 26#include <string.h>
27#include <stdbool.h> 27#include <stdbool.h>
28 28
29#ifndef KBUILD_NO_NLS
30# include <libintl.h>
31#else
32# define gettext(Msgid) ((const char *) (Msgid))
33#endif
34
35#ifdef __sun__ 29#ifdef __sun__
36#define CURS_MACROS 30#define CURS_MACROS
37#endif 31#endif
diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
index d58de1dc5360..fe82ff6d744e 100644
--- a/scripts/kconfig/lxdialog/inputbox.c
+++ b/scripts/kconfig/lxdialog/inputbox.c
@@ -31,8 +31,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)
31 int x = width / 2 - 11; 31 int x = width / 2 - 11;
32 int y = height - 2; 32 int y = height - 2;
33 33
34 print_button(dialog, gettext(" Ok "), y, x, selected == 0); 34 print_button(dialog, " Ok ", y, x, selected == 0);
35 print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); 35 print_button(dialog, " Help ", y, x + 14, selected == 1);
36 36
37 wmove(dialog, y, x + 1 + 14 * selected); 37 wmove(dialog, y, x + 1 + 14 * selected);
38 wrefresh(dialog); 38 wrefresh(dialog);
diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
index 11ae9ad7ac7b..d70cab36137e 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -157,11 +157,11 @@ static void print_buttons(WINDOW * win, int height, int width, int selected)
157 int x = width / 2 - 28; 157 int x = width / 2 - 28;
158 int y = height - 2; 158 int y = height - 2;
159 159
160 print_button(win, gettext("Select"), y, x, selected == 0); 160 print_button(win, "Select", y, x, selected == 0);
161 print_button(win, gettext(" Exit "), y, x + 12, selected == 1); 161 print_button(win, " Exit ", y, x + 12, selected == 1);
162 print_button(win, gettext(" Help "), y, x + 24, selected == 2); 162 print_button(win, " Help ", y, x + 24, selected == 2);
163 print_button(win, gettext(" Save "), y, x + 36, selected == 3); 163 print_button(win, " Save ", y, x + 36, selected == 3);
164 print_button(win, gettext(" Load "), y, x + 48, selected == 4); 164 print_button(win, " Load ", y, x + 48, selected == 4);
165 165
166 wmove(win, y, x + 1 + 12 * selected); 166 wmove(win, y, x + 1 + 12 * selected);
167 wrefresh(win); 167 wrefresh(win);
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c
index 1773319b95e7..88d2818ed956 100644
--- a/scripts/kconfig/lxdialog/textbox.c
+++ b/scripts/kconfig/lxdialog/textbox.c
@@ -129,7 +129,7 @@ do_resize:
129 129
130 print_title(dialog, title, width); 130 print_title(dialog, title, width);
131 131
132 print_button(dialog, gettext(" Exit "), height - 2, width / 2 - 4, TRUE); 132 print_button(dialog, " Exit ", height - 2, width / 2 - 4, TRUE);
133 wnoutrefresh(dialog); 133 wnoutrefresh(dialog);
134 getyx(dialog, cur_y, cur_x); /* Save cursor position */ 134 getyx(dialog, cur_y, cur_x); /* Save cursor position */
135 135
diff --git a/scripts/kconfig/lxdialog/yesno.c b/scripts/kconfig/lxdialog/yesno.c
index 676fb2f824a3..cd1223c903d1 100644
--- a/scripts/kconfig/lxdialog/yesno.c
+++ b/scripts/kconfig/lxdialog/yesno.c
@@ -29,8 +29,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected)
29 int x = width / 2 - 10; 29 int x = width / 2 - 10;
30 int y = height - 2; 30 int y = height - 2;
31 31
32 print_button(dialog, gettext(" Yes "), y, x, selected == 0); 32 print_button(dialog, " Yes ", y, x, selected == 0);
33 print_button(dialog, gettext(" No "), y, x + 13, selected == 1); 33 print_button(dialog, " No ", y, x + 13, selected == 1);
34 34
35 wmove(dialog, y, x + 1 + 13 * selected); 35 wmove(dialog, y, x + 1 + 13 * selected);
36 wrefresh(dialog); 36 wrefresh(dialog);
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index c829be8bb19f..5294ed159b98 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -17,12 +17,11 @@
17#include <string.h> 17#include <string.h>
18#include <signal.h> 18#include <signal.h>
19#include <unistd.h> 19#include <unistd.h>
20#include <locale.h>
21 20
22#include "lkc.h" 21#include "lkc.h"
23#include "lxdialog/dialog.h" 22#include "lxdialog/dialog.h"
24 23
25static const char mconf_readme[] = N_( 24static const char mconf_readme[] =
26"Overview\n" 25"Overview\n"
27"--------\n" 26"--------\n"
28"This interface lets you select features and parameters for the build.\n" 27"This interface lets you select features and parameters for the build.\n"
@@ -171,37 +170,37 @@ static const char mconf_readme[] = N_(
171" blackbg => selects a color scheme with black background\n" 170" blackbg => selects a color scheme with black background\n"
172" classic => theme with blue background. The classic look\n" 171" classic => theme with blue background. The classic look\n"
173" bluetitle => an LCD friendly version of classic. (default)\n" 172" bluetitle => an LCD friendly version of classic. (default)\n"
174"\n"), 173"\n",
175menu_instructions[] = N_( 174menu_instructions[] =
176 "Arrow keys navigate the menu. " 175 "Arrow keys navigate the menu. "
177 "<Enter> selects submenus ---> (or empty submenus ----). " 176 "<Enter> selects submenus ---> (or empty submenus ----). "
178 "Highlighted letters are hotkeys. " 177 "Highlighted letters are hotkeys. "
179 "Pressing <Y> includes, <N> excludes, <M> modularizes features. " 178 "Pressing <Y> includes, <N> excludes, <M> modularizes features. "
180 "Press <Esc><Esc> to exit, <?> for Help, </> for Search. " 179 "Press <Esc><Esc> to exit, <?> for Help, </> for Search. "
181 "Legend: [*] built-in [ ] excluded <M> module < > module capable"), 180 "Legend: [*] built-in [ ] excluded <M> module < > module capable",
182radiolist_instructions[] = N_( 181radiolist_instructions[] =
183 "Use the arrow keys to navigate this window or " 182 "Use the arrow keys to navigate this window or "
184 "press the hotkey of the item you wish to select " 183 "press the hotkey of the item you wish to select "
185 "followed by the <SPACE BAR>. " 184 "followed by the <SPACE BAR>. "
186 "Press <?> for additional information about this option."), 185 "Press <?> for additional information about this option.",
187inputbox_instructions_int[] = N_( 186inputbox_instructions_int[] =
188 "Please enter a decimal value. " 187 "Please enter a decimal value. "
189 "Fractions will not be accepted. " 188 "Fractions will not be accepted. "
190 "Use the <TAB> key to move from the input field to the buttons below it."), 189 "Use the <TAB> key to move from the input field to the buttons below it.",
191inputbox_instructions_hex[] = N_( 190inputbox_instructions_hex[] =
192 "Please enter a hexadecimal value. " 191 "Please enter a hexadecimal value. "
193 "Use the <TAB> key to move from the input field to the buttons below it."), 192 "Use the <TAB> key to move from the input field to the buttons below it.",
194inputbox_instructions_string[] = N_( 193inputbox_instructions_string[] =
195 "Please enter a string value. " 194 "Please enter a string value. "
196 "Use the <TAB> key to move from the input field to the buttons below it."), 195 "Use the <TAB> key to move from the input field to the buttons below it.",
197setmod_text[] = N_( 196setmod_text[] =
198 "This feature depends on another which has been configured as a module.\n" 197 "This feature depends on another which has been configured as a module.\n"
199 "As a result, this feature will be built as a module."), 198 "As a result, this feature will be built as a module.",
200load_config_text[] = N_( 199load_config_text[] =
201 "Enter the name of the configuration file you wish to load. " 200 "Enter the name of the configuration file you wish to load. "
202 "Accept the name shown to restore the configuration you " 201 "Accept the name shown to restore the configuration you "
203 "last retrieved. Leave blank to abort."), 202 "last retrieved. Leave blank to abort.",
204load_config_help[] = N_( 203load_config_help[] =
205 "\n" 204 "\n"
206 "For various reasons, one may wish to keep several different\n" 205 "For various reasons, one may wish to keep several different\n"
207 "configurations available on a single machine.\n" 206 "configurations available on a single machine.\n"
@@ -211,11 +210,11 @@ load_config_help[] = N_(
211 "configuration.\n" 210 "configuration.\n"
212 "\n" 211 "\n"
213 "If you are uncertain, then you have probably never used alternate\n" 212 "If you are uncertain, then you have probably never used alternate\n"
214 "configuration files. You should therefore leave this blank to abort.\n"), 213 "configuration files. You should therefore leave this blank to abort.\n",
215save_config_text[] = N_( 214save_config_text[] =
216 "Enter a filename to which this configuration should be saved " 215 "Enter a filename to which this configuration should be saved "
217 "as an alternate. Leave blank to abort."), 216 "as an alternate. Leave blank to abort.",
218save_config_help[] = N_( 217save_config_help[] =
219 "\n" 218 "\n"
220 "For various reasons, one may wish to keep different configurations\n" 219 "For various reasons, one may wish to keep different configurations\n"
221 "available on a single machine.\n" 220 "available on a single machine.\n"
@@ -225,8 +224,8 @@ save_config_help[] = N_(
225 "configuration options you have selected at that time.\n" 224 "configuration options you have selected at that time.\n"
226 "\n" 225 "\n"
227 "If you are uncertain what all this means then you should probably\n" 226 "If you are uncertain what all this means then you should probably\n"
228 "leave this blank.\n"), 227 "leave this blank.\n",
229search_help[] = N_( 228search_help[] =
230 "\n" 229 "\n"
231 "Search for symbols and display their relations.\n" 230 "Search for symbols and display their relations.\n"
232 "Regular expressions are allowed.\n" 231 "Regular expressions are allowed.\n"
@@ -271,7 +270,7 @@ search_help[] = N_(
271 "Examples: USB => find all symbols containing USB\n" 270 "Examples: USB => find all symbols containing USB\n"
272 " ^USB => find all symbols starting with USB\n" 271 " ^USB => find all symbols starting with USB\n"
273 " USB$ => find all symbols ending with USB\n" 272 " USB$ => find all symbols ending with USB\n"
274 "\n"); 273 "\n";
275 274
276static int indent; 275static int indent;
277static struct menu *current_menu; 276static struct menu *current_menu;
@@ -400,19 +399,19 @@ static void search_conf(void)
400 struct subtitle_part stpart; 399 struct subtitle_part stpart;
401 400
402 title = str_new(); 401 title = str_new();
403 str_printf( &title, _("Enter (sub)string or regexp to search for " 402 str_printf( &title, "Enter (sub)string or regexp to search for "
404 "(with or without \"%s\")"), CONFIG_); 403 "(with or without \"%s\")", CONFIG_);
405 404
406again: 405again:
407 dialog_clear(); 406 dialog_clear();
408 dres = dialog_inputbox(_("Search Configuration Parameter"), 407 dres = dialog_inputbox("Search Configuration Parameter",
409 str_get(&title), 408 str_get(&title),
410 10, 75, ""); 409 10, 75, "");
411 switch (dres) { 410 switch (dres) {
412 case 0: 411 case 0:
413 break; 412 break;
414 case 1: 413 case 1:
415 show_helptext(_("Search Configuration"), search_help); 414 show_helptext("Search Configuration", search_help);
416 goto again; 415 goto again;
417 default: 416 default:
418 str_free(&title); 417 str_free(&title);
@@ -443,7 +442,7 @@ again:
443 442
444 res = get_relations_str(sym_arr, &head); 443 res = get_relations_str(sym_arr, &head);
445 set_subtitle(); 444 set_subtitle();
446 dres = show_textbox_ext(_("Search Results"), (char *) 445 dres = show_textbox_ext("Search Results", (char *)
447 str_get(&res), 0, 0, keys, &vscroll, 446 str_get(&res), 0, 0, keys, &vscroll,
448 &hscroll, &update_text, (void *) 447 &hscroll, &update_text, (void *)
449 &data); 448 &data);
@@ -491,7 +490,7 @@ static void build_conf(struct menu *menu)
491 switch (prop->type) { 490 switch (prop->type) {
492 case P_MENU: 491 case P_MENU:
493 child_count++; 492 child_count++;
494 prompt = _(prompt); 493 prompt = prompt;
495 if (single_menu_mode) { 494 if (single_menu_mode) {
496 item_make("%s%*c%s", 495 item_make("%s%*c%s",
497 menu->data ? "-->" : "++>", 496 menu->data ? "-->" : "++>",
@@ -508,7 +507,7 @@ static void build_conf(struct menu *menu)
508 case P_COMMENT: 507 case P_COMMENT:
509 if (prompt) { 508 if (prompt) {
510 child_count++; 509 child_count++;
511 item_make(" %*c*** %s ***", indent + 1, ' ', _(prompt)); 510 item_make(" %*c*** %s ***", indent + 1, ' ', prompt);
512 item_set_tag(':'); 511 item_set_tag(':');
513 item_set_data(menu); 512 item_set_data(menu);
514 } 513 }
@@ -516,7 +515,7 @@ static void build_conf(struct menu *menu)
516 default: 515 default:
517 if (prompt) { 516 if (prompt) {
518 child_count++; 517 child_count++;
519 item_make("---%*c%s", indent + 1, ' ', _(prompt)); 518 item_make("---%*c%s", indent + 1, ' ', prompt);
520 item_set_tag(':'); 519 item_set_tag(':');
521 item_set_data(menu); 520 item_set_data(menu);
522 } 521 }
@@ -560,10 +559,10 @@ static void build_conf(struct menu *menu)
560 item_set_data(menu); 559 item_set_data(menu);
561 } 560 }
562 561
563 item_add_str("%*c%s", indent + 1, ' ', _(menu_get_prompt(menu))); 562 item_add_str("%*c%s", indent + 1, ' ', menu_get_prompt(menu));
564 if (val == yes) { 563 if (val == yes) {
565 if (def_menu) { 564 if (def_menu) {
566 item_add_str(" (%s)", _(menu_get_prompt(def_menu))); 565 item_add_str(" (%s)", menu_get_prompt(def_menu));
567 item_add_str(" --->"); 566 item_add_str(" --->");
568 if (def_menu->list) { 567 if (def_menu->list) {
569 indent += 2; 568 indent += 2;
@@ -575,7 +574,7 @@ static void build_conf(struct menu *menu)
575 } 574 }
576 } else { 575 } else {
577 if (menu == current_menu) { 576 if (menu == current_menu) {
578 item_make("---%*c%s", indent + 1, ' ', _(menu_get_prompt(menu))); 577 item_make("---%*c%s", indent + 1, ' ', menu_get_prompt(menu));
579 item_set_tag(':'); 578 item_set_tag(':');
580 item_set_data(menu); 579 item_set_data(menu);
581 goto conf_childs; 580 goto conf_childs;
@@ -618,17 +617,17 @@ static void build_conf(struct menu *menu)
618 tmp = indent - tmp + 4; 617 tmp = indent - tmp + 4;
619 if (tmp < 0) 618 if (tmp < 0)
620 tmp = 0; 619 tmp = 0;
621 item_add_str("%*c%s%s", tmp, ' ', _(menu_get_prompt(menu)), 620 item_add_str("%*c%s%s", tmp, ' ', menu_get_prompt(menu),
622 (sym_has_value(sym) || !sym_is_changable(sym)) ? 621 (sym_has_value(sym) || !sym_is_changable(sym)) ?
623 "" : _(" (NEW)")); 622 "" : " (NEW)");
624 item_set_tag('s'); 623 item_set_tag('s');
625 item_set_data(menu); 624 item_set_data(menu);
626 goto conf_childs; 625 goto conf_childs;
627 } 626 }
628 } 627 }
629 item_add_str("%*c%s%s", indent + 1, ' ', _(menu_get_prompt(menu)), 628 item_add_str("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu),
630 (sym_has_value(sym) || !sym_is_changable(sym)) ? 629 (sym_has_value(sym) || !sym_is_changable(sym)) ?
631 "" : _(" (NEW)")); 630 "" : " (NEW)");
632 if (menu->prompt->type == P_MENU) { 631 if (menu->prompt->type == P_MENU) {
633 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); 632 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->");
634 return; 633 return;
@@ -665,8 +664,8 @@ static void conf(struct menu *menu, struct menu *active_menu)
665 break; 664 break;
666 set_subtitle(); 665 set_subtitle();
667 dialog_clear(); 666 dialog_clear();
668 res = dialog_menu(prompt ? _(prompt) : _("Main Menu"), 667 res = dialog_menu(prompt ? prompt : "Main Menu",
669 _(menu_instructions), 668 menu_instructions,
670 active_menu, &s_scroll); 669 active_menu, &s_scroll);
671 if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL) 670 if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
672 break; 671 break;
@@ -708,7 +707,7 @@ static void conf(struct menu *menu, struct menu *active_menu)
708 show_help(submenu); 707 show_help(submenu);
709 else { 708 else {
710 reset_subtitle(); 709 reset_subtitle();
711 show_helptext(_("README"), _(mconf_readme)); 710 show_helptext("README", mconf_readme);
712 } 711 }
713 break; 712 break;
714 case 3: 713 case 3:
@@ -793,13 +792,13 @@ static void show_help(struct menu *menu)
793 help.max_width = getmaxx(stdscr) - 10; 792 help.max_width = getmaxx(stdscr) - 10;
794 menu_get_ext_help(menu, &help); 793 menu_get_ext_help(menu, &help);
795 794
796 show_helptext(_(menu_get_prompt(menu)), str_get(&help)); 795 show_helptext(menu_get_prompt(menu), str_get(&help));
797 str_free(&help); 796 str_free(&help);
798} 797}
799 798
800static void conf_choice(struct menu *menu) 799static void conf_choice(struct menu *menu)
801{ 800{
802 const char *prompt = _(menu_get_prompt(menu)); 801 const char *prompt = menu_get_prompt(menu);
803 struct menu *child; 802 struct menu *child;
804 struct symbol *active; 803 struct symbol *active;
805 804
@@ -814,9 +813,9 @@ static void conf_choice(struct menu *menu)
814 if (!menu_is_visible(child)) 813 if (!menu_is_visible(child))
815 continue; 814 continue;
816 if (child->sym) 815 if (child->sym)
817 item_make("%s", _(menu_get_prompt(child))); 816 item_make("%s", menu_get_prompt(child));
818 else { 817 else {
819 item_make("*** %s ***", _(menu_get_prompt(child))); 818 item_make("*** %s ***", menu_get_prompt(child));
820 item_set_tag(':'); 819 item_set_tag(':');
821 } 820 }
822 item_set_data(child); 821 item_set_data(child);
@@ -826,8 +825,8 @@ static void conf_choice(struct menu *menu)
826 item_set_tag('X'); 825 item_set_tag('X');
827 } 826 }
828 dialog_clear(); 827 dialog_clear();
829 res = dialog_checklist(prompt ? _(prompt) : _("Main Menu"), 828 res = dialog_checklist(prompt ? prompt : "Main Menu",
830 _(radiolist_instructions), 829 radiolist_instructions,
831 MENUBOX_HEIGTH_MIN, 830 MENUBOX_HEIGTH_MIN,
832 MENUBOX_WIDTH_MIN, 831 MENUBOX_WIDTH_MIN,
833 CHECKLIST_HEIGTH_MIN); 832 CHECKLIST_HEIGTH_MIN);
@@ -868,26 +867,26 @@ static void conf_string(struct menu *menu)
868 867
869 switch (sym_get_type(menu->sym)) { 868 switch (sym_get_type(menu->sym)) {
870 case S_INT: 869 case S_INT:
871 heading = _(inputbox_instructions_int); 870 heading = inputbox_instructions_int;
872 break; 871 break;
873 case S_HEX: 872 case S_HEX:
874 heading = _(inputbox_instructions_hex); 873 heading = inputbox_instructions_hex;
875 break; 874 break;
876 case S_STRING: 875 case S_STRING:
877 heading = _(inputbox_instructions_string); 876 heading = inputbox_instructions_string;
878 break; 877 break;
879 default: 878 default:
880 heading = _("Internal mconf error!"); 879 heading = "Internal mconf error!";
881 } 880 }
882 dialog_clear(); 881 dialog_clear();
883 res = dialog_inputbox(prompt ? _(prompt) : _("Main Menu"), 882 res = dialog_inputbox(prompt ? prompt : "Main Menu",
884 heading, 10, 75, 883 heading, 10, 75,
885 sym_get_string_value(menu->sym)); 884 sym_get_string_value(menu->sym));
886 switch (res) { 885 switch (res) {
887 case 0: 886 case 0:
888 if (sym_set_string_value(menu->sym, dialog_input_result)) 887 if (sym_set_string_value(menu->sym, dialog_input_result))
889 return; 888 return;
890 show_textbox(NULL, _("You have made an invalid entry."), 5, 43); 889 show_textbox(NULL, "You have made an invalid entry.", 5, 43);
891 break; 890 break;
892 case 1: 891 case 1:
893 show_help(menu); 892 show_help(menu);
@@ -915,10 +914,10 @@ static void conf_load(void)
915 sym_set_change_count(1); 914 sym_set_change_count(1);
916 return; 915 return;
917 } 916 }
918 show_textbox(NULL, _("File does not exist!"), 5, 38); 917 show_textbox(NULL, "File does not exist!", 5, 38);
919 break; 918 break;
920 case 1: 919 case 1:
921 show_helptext(_("Load Alternate Configuration"), load_config_help); 920 show_helptext("Load Alternate Configuration", load_config_help);
922 break; 921 break;
923 case KEY_ESC: 922 case KEY_ESC:
924 return; 923 return;
@@ -941,10 +940,10 @@ static void conf_save(void)
941 set_config_filename(dialog_input_result); 940 set_config_filename(dialog_input_result);
942 return; 941 return;
943 } 942 }
944 show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60); 943 show_textbox(NULL, "Can't create file! Probably a nonexistent directory.", 5, 60);
945 break; 944 break;
946 case 1: 945 case 1:
947 show_helptext(_("Save Alternate Configuration"), save_config_help); 946 show_helptext("Save Alternate Configuration", save_config_help);
948 break; 947 break;
949 case KEY_ESC: 948 case KEY_ESC:
950 return; 949 return;
@@ -961,8 +960,8 @@ static int handle_exit(void)
961 dialog_clear(); 960 dialog_clear();
962 if (conf_get_changed()) 961 if (conf_get_changed())
963 res = dialog_yesno(NULL, 962 res = dialog_yesno(NULL,
964 _("Do you wish to save your new configuration?\n" 963 "Do you wish to save your new configuration?\n"
965 "(Press <ESC><ESC> to continue kernel configuration.)"), 964 "(Press <ESC><ESC> to continue kernel configuration.)",
966 6, 60); 965 6, 60);
967 else 966 else
968 res = -1; 967 res = -1;
@@ -972,26 +971,26 @@ static int handle_exit(void)
972 switch (res) { 971 switch (res) {
973 case 0: 972 case 0:
974 if (conf_write(filename)) { 973 if (conf_write(filename)) {
975 fprintf(stderr, _("\n\n" 974 fprintf(stderr, "\n\n"
976 "Error while writing of the configuration.\n" 975 "Error while writing of the configuration.\n"
977 "Your configuration changes were NOT saved." 976 "Your configuration changes were NOT saved."
978 "\n\n")); 977 "\n\n");
979 return 1; 978 return 1;
980 } 979 }
981 /* fall through */ 980 /* fall through */
982 case -1: 981 case -1:
983 if (!silent) 982 if (!silent)
984 printf(_("\n\n" 983 printf("\n\n"
985 "*** End of the configuration.\n" 984 "*** End of the configuration.\n"
986 "*** Execute 'make' to start the build or try 'make help'." 985 "*** Execute 'make' to start the build or try 'make help'."
987 "\n\n")); 986 "\n\n");
988 res = 0; 987 res = 0;
989 break; 988 break;
990 default: 989 default:
991 if (!silent) 990 if (!silent)
992 fprintf(stderr, _("\n\n" 991 fprintf(stderr, "\n\n"
993 "Your configuration changes were NOT saved." 992 "Your configuration changes were NOT saved."
994 "\n\n")); 993 "\n\n");
995 if (res != KEY_ESC) 994 if (res != KEY_ESC)
996 res = 0; 995 res = 0;
997 } 996 }
@@ -1009,10 +1008,6 @@ int main(int ac, char **av)
1009 char *mode; 1008 char *mode;
1010 int res; 1009 int res;
1011 1010
1012 setlocale(LC_ALL, "");
1013 bindtextdomain(PACKAGE, LOCALEDIR);
1014 textdomain(PACKAGE);
1015
1016 signal(SIGINT, sig_handler); 1011 signal(SIGINT, sig_handler);
1017 1012
1018 if (ac > 1 && strcmp(av[1], "-s") == 0) { 1013 if (ac > 1 && strcmp(av[1], "-s") == 0) {
@@ -1031,8 +1026,8 @@ int main(int ac, char **av)
1031 } 1026 }
1032 1027
1033 if (init_dialog(NULL)) { 1028 if (init_dialog(NULL)) {
1034 fprintf(stderr, N_("Your display is too small to run Menuconfig!\n")); 1029 fprintf(stderr, "Your display is too small to run Menuconfig!\n");
1035 fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n")); 1030 fprintf(stderr, "It must be at least 19 lines by 80 columns.\n");
1036 return 1; 1031 return 1;
1037 } 1032 }
1038 1033
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 5c5c1374b151..068a4e4db20a 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -711,7 +711,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
711 struct menu *submenu[8], *menu, *location = NULL; 711 struct menu *submenu[8], *menu, *location = NULL;
712 struct jump_key *jump = NULL; 712 struct jump_key *jump = NULL;
713 713
714 str_printf(r, _("Prompt: %s\n"), _(prop->text)); 714 str_printf(r, "Prompt: %s\n", prop->text);
715 menu = prop->menu->parent; 715 menu = prop->menu->parent;
716 for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) { 716 for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) {
717 bool accessible = menu_is_visible(menu); 717 bool accessible = menu_is_visible(menu);
@@ -744,16 +744,16 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
744 } 744 }
745 745
746 if (i > 0) { 746 if (i > 0) {
747 str_printf(r, _(" Location:\n")); 747 str_printf(r, " Location:\n");
748 for (j = 4; --i >= 0; j += 2) { 748 for (j = 4; --i >= 0; j += 2) {
749 menu = submenu[i]; 749 menu = submenu[i];
750 if (jump && menu == location) 750 if (jump && menu == location)
751 jump->offset = strlen(r->s); 751 jump->offset = strlen(r->s);
752 str_printf(r, "%*c-> %s", j, ' ', 752 str_printf(r, "%*c-> %s", j, ' ',
753 _(menu_get_prompt(menu))); 753 menu_get_prompt(menu));
754 if (menu->sym) { 754 if (menu->sym) {
755 str_printf(r, " (%s [=%s])", menu->sym->name ? 755 str_printf(r, " (%s [=%s])", menu->sym->name ?
756 menu->sym->name : _("<choice>"), 756 menu->sym->name : "<choice>",
757 sym_get_string_value(menu->sym)); 757 sym_get_string_value(menu->sym));
758 } 758 }
759 str_append(r, "\n"); 759 str_append(r, "\n");
@@ -817,23 +817,23 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym,
817 817
818 prop = get_symbol_prop(sym); 818 prop = get_symbol_prop(sym);
819 if (prop) { 819 if (prop) {
820 str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name, 820 str_printf(r, " Defined at %s:%d\n", prop->menu->file->name,
821 prop->menu->lineno); 821 prop->menu->lineno);
822 if (!expr_is_yes(prop->visible.expr)) { 822 if (!expr_is_yes(prop->visible.expr)) {
823 str_append(r, _(" Depends on: ")); 823 str_append(r, " Depends on: ");
824 expr_gstr_print(prop->visible.expr, r); 824 expr_gstr_print(prop->visible.expr, r);
825 str_append(r, "\n"); 825 str_append(r, "\n");
826 } 826 }
827 } 827 }
828 828
829 get_symbol_props_str(r, sym, P_SELECT, _(" Selects: ")); 829 get_symbol_props_str(r, sym, P_SELECT, " Selects: ");
830 if (sym->rev_dep.expr) { 830 if (sym->rev_dep.expr) {
831 expr_gstr_print_revdep(sym->rev_dep.expr, r, yes, " Selected by [y]:\n"); 831 expr_gstr_print_revdep(sym->rev_dep.expr, r, yes, " Selected by [y]:\n");
832 expr_gstr_print_revdep(sym->rev_dep.expr, r, mod, " Selected by [m]:\n"); 832 expr_gstr_print_revdep(sym->rev_dep.expr, r, mod, " Selected by [m]:\n");
833 expr_gstr_print_revdep(sym->rev_dep.expr, r, no, " Selected by [n]:\n"); 833 expr_gstr_print_revdep(sym->rev_dep.expr, r, no, " Selected by [n]:\n");
834 } 834 }
835 835
836 get_symbol_props_str(r, sym, P_IMPLY, _(" Implies: ")); 836 get_symbol_props_str(r, sym, P_IMPLY, " Implies: ");
837 if (sym->implied.expr) { 837 if (sym->implied.expr) {
838 expr_gstr_print_revdep(sym->implied.expr, r, yes, " Implied by [y]:\n"); 838 expr_gstr_print_revdep(sym->implied.expr, r, yes, " Implied by [y]:\n");
839 expr_gstr_print_revdep(sym->implied.expr, r, mod, " Implied by [m]:\n"); 839 expr_gstr_print_revdep(sym->implied.expr, r, mod, " Implied by [m]:\n");
@@ -852,7 +852,7 @@ struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head)
852 for (i = 0; sym_arr && (sym = sym_arr[i]); i++) 852 for (i = 0; sym_arr && (sym = sym_arr[i]); i++)
853 get_symbol_str(&res, sym, head); 853 get_symbol_str(&res, sym, head);
854 if (!i) 854 if (!i)
855 str_append(&res, _("No matches found.\n")); 855 str_append(&res, "No matches found.\n");
856 return res; 856 return res;
857} 857}
858 858
@@ -867,7 +867,7 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)
867 str_printf(help, "%s%s:\n\n", CONFIG_, sym->name); 867 str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
868 help_text = menu_get_help(menu); 868 help_text = menu_get_help(menu);
869 } 869 }
870 str_printf(help, "%s\n", _(help_text)); 870 str_printf(help, "%s\n", help_text);
871 if (sym) 871 if (sym)
872 get_symbol_str(help, sym, NULL); 872 get_symbol_str(help, sym, NULL);
873} 873}
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index 003114779815..97b78445584b 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -15,7 +15,7 @@
15#include "nconf.h" 15#include "nconf.h"
16#include <ctype.h> 16#include <ctype.h>
17 17
18static const char nconf_global_help[] = N_( 18static const char nconf_global_help[] =
19"Help windows\n" 19"Help windows\n"
20"------------\n" 20"------------\n"
21"o Global help: Unless in a data entry window, pressing <F1> will give \n" 21"o Global help: Unless in a data entry window, pressing <F1> will give \n"
@@ -130,8 +130,8 @@ static const char nconf_global_help[] = N_(
130"\n" 130"\n"
131"Note that this mode can eventually be a little more CPU expensive than\n" 131"Note that this mode can eventually be a little more CPU expensive than\n"
132"the default mode, especially with a larger number of unfolded submenus.\n" 132"the default mode, especially with a larger number of unfolded submenus.\n"
133"\n"), 133"\n",
134menu_no_f_instructions[] = N_( 134menu_no_f_instructions[] =
135"Legend: [*] built-in [ ] excluded <M> module < > module capable.\n" 135"Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
136"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n" 136"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
137"\n" 137"\n"
@@ -147,8 +147,8 @@ menu_no_f_instructions[] = N_(
147"You do not have function keys support.\n" 147"You do not have function keys support.\n"
148"Press <1> instead of <F1>, <2> instead of <F2>, etc.\n" 148"Press <1> instead of <F1>, <2> instead of <F2>, etc.\n"
149"For verbose global help use key <1>.\n" 149"For verbose global help use key <1>.\n"
150"For help related to the current menu entry press <?> or <h>.\n"), 150"For help related to the current menu entry press <?> or <h>.\n",
151menu_instructions[] = N_( 151menu_instructions[] =
152"Legend: [*] built-in [ ] excluded <M> module < > module capable.\n" 152"Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
153"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n" 153"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
154"\n" 154"\n"
@@ -163,30 +163,30 @@ menu_instructions[] = N_(
163"\n" 163"\n"
164"Pressing <1> may be used instead of <F1>, <2> instead of <F2>, etc.\n" 164"Pressing <1> may be used instead of <F1>, <2> instead of <F2>, etc.\n"
165"For verbose global help press <F1>.\n" 165"For verbose global help press <F1>.\n"
166"For help related to the current menu entry press <?> or <h>.\n"), 166"For help related to the current menu entry press <?> or <h>.\n",
167radiolist_instructions[] = N_( 167radiolist_instructions[] =
168"Press <Up>, <Down>, <Home> or <End> to navigate a radiolist, select\n" 168"Press <Up>, <Down>, <Home> or <End> to navigate a radiolist, select\n"
169"with <Space>.\n" 169"with <Space>.\n"
170"For help related to the current entry press <?> or <h>.\n" 170"For help related to the current entry press <?> or <h>.\n"
171"For global help press <F1>.\n"), 171"For global help press <F1>.\n",
172inputbox_instructions_int[] = N_( 172inputbox_instructions_int[] =
173"Please enter a decimal value.\n" 173"Please enter a decimal value.\n"
174"Fractions will not be accepted.\n" 174"Fractions will not be accepted.\n"
175"Press <Enter> to apply, <Esc> to cancel."), 175"Press <Enter> to apply, <Esc> to cancel.",
176inputbox_instructions_hex[] = N_( 176inputbox_instructions_hex[] =
177"Please enter a hexadecimal value.\n" 177"Please enter a hexadecimal value.\n"
178"Press <Enter> to apply, <Esc> to cancel."), 178"Press <Enter> to apply, <Esc> to cancel.",
179inputbox_instructions_string[] = N_( 179inputbox_instructions_string[] =
180"Please enter a string value.\n" 180"Please enter a string value.\n"
181"Press <Enter> to apply, <Esc> to cancel."), 181"Press <Enter> to apply, <Esc> to cancel.",
182setmod_text[] = N_( 182setmod_text[] =
183"This feature depends on another feature which has been configured as a\n" 183"This feature depends on another feature which has been configured as a\n"
184"module. As a result, the current feature will be built as a module too."), 184"module. As a result, the current feature will be built as a module too.",
185load_config_text[] = N_( 185load_config_text[] =
186"Enter the name of the configuration file you wish to load.\n" 186"Enter the name of the configuration file you wish to load.\n"
187"Accept the name shown to restore the configuration you last\n" 187"Accept the name shown to restore the configuration you last\n"
188"retrieved. Leave empty to abort."), 188"retrieved. Leave empty to abort.",
189load_config_help[] = N_( 189load_config_help[] =
190"For various reasons, one may wish to keep several different\n" 190"For various reasons, one may wish to keep several different\n"
191"configurations available on a single machine.\n" 191"configurations available on a single machine.\n"
192"\n" 192"\n"
@@ -194,11 +194,11 @@ load_config_help[] = N_(
194"default one, entering its name here will allow you to load and modify\n" 194"default one, entering its name here will allow you to load and modify\n"
195"that configuration.\n" 195"that configuration.\n"
196"\n" 196"\n"
197"Leave empty to abort.\n"), 197"Leave empty to abort.\n",
198save_config_text[] = N_( 198save_config_text[] =
199"Enter a filename to which this configuration should be saved\n" 199"Enter a filename to which this configuration should be saved\n"
200"as an alternate. Leave empty to abort."), 200"as an alternate. Leave empty to abort.",
201save_config_help[] = N_( 201save_config_help[] =
202"For various reasons, one may wish to keep several different\n" 202"For various reasons, one may wish to keep several different\n"
203"configurations available on a single machine.\n" 203"configurations available on a single machine.\n"
204"\n" 204"\n"
@@ -206,8 +206,8 @@ save_config_help[] = N_(
206"and use the current configuration as an alternate to whatever\n" 206"and use the current configuration as an alternate to whatever\n"
207"configuration options you have selected at that time.\n" 207"configuration options you have selected at that time.\n"
208"\n" 208"\n"
209"Leave empty to abort.\n"), 209"Leave empty to abort.\n",
210search_help[] = N_( 210search_help[] =
211"Search for symbols (configuration variable names CONFIG_*) and display\n" 211"Search for symbols (configuration variable names CONFIG_*) and display\n"
212"their relations. Regular expressions are supported.\n" 212"their relations. Regular expressions are supported.\n"
213"Example: Search for \"^FOO\".\n" 213"Example: Search for \"^FOO\".\n"
@@ -244,7 +244,7 @@ search_help[] = N_(
244"USB => find all symbols containing USB\n" 244"USB => find all symbols containing USB\n"
245"^USB => find all symbols starting with USB\n" 245"^USB => find all symbols starting with USB\n"
246"USB$ => find all symbols ending with USB\n" 246"USB$ => find all symbols ending with USB\n"
247"\n"); 247"\n";
248 248
249struct mitem { 249struct mitem {
250 char str[256]; 250 char str[256];
@@ -388,7 +388,7 @@ static void print_function_line(void)
388static void handle_f1(int *key, struct menu *current_item) 388static void handle_f1(int *key, struct menu *current_item)
389{ 389{
390 show_scroll_win(main_window, 390 show_scroll_win(main_window,
391 _("Global help"), _(nconf_global_help)); 391 "Global help", nconf_global_help);
392 return; 392 return;
393} 393}
394 394
@@ -403,8 +403,8 @@ static void handle_f2(int *key, struct menu *current_item)
403static void handle_f3(int *key, struct menu *current_item) 403static void handle_f3(int *key, struct menu *current_item)
404{ 404{
405 show_scroll_win(main_window, 405 show_scroll_win(main_window,
406 _("Short help"), 406 "Short help",
407 _(current_instructions)); 407 current_instructions);
408 return; 408 return;
409} 409}
410 410
@@ -412,7 +412,7 @@ static void handle_f3(int *key, struct menu *current_item)
412static void handle_f4(int *key, struct menu *current_item) 412static void handle_f4(int *key, struct menu *current_item)
413{ 413{
414 int res = btn_dialog(main_window, 414 int res = btn_dialog(main_window,
415 _("Show all symbols?"), 415 "Show all symbols?",
416 2, 416 2,
417 " <Show All> ", 417 " <Show All> ",
418 "<Don't show all>"); 418 "<Don't show all>");
@@ -653,8 +653,8 @@ static int do_exit(void)
653 return 0; 653 return 0;
654 } 654 }
655 res = btn_dialog(main_window, 655 res = btn_dialog(main_window,
656 _("Do you wish to save your new configuration?\n" 656 "Do you wish to save your new configuration?\n"
657 "<ESC> to cancel and resume nconfig."), 657 "<ESC> to cancel and resume nconfig.",
658 2, 658 2,
659 " <save> ", 659 " <save> ",
660 "<don't save>"); 660 "<don't save>");
@@ -670,15 +670,15 @@ static int do_exit(void)
670 if (res) 670 if (res)
671 btn_dialog( 671 btn_dialog(
672 main_window, 672 main_window,
673 _("Error during writing of configuration.\n" 673 "Error during writing of configuration.\n"
674 "Your configuration changes were NOT saved."), 674 "Your configuration changes were NOT saved.",
675 1, 675 1,
676 "<OK>"); 676 "<OK>");
677 break; 677 break;
678 default: 678 default:
679 btn_dialog( 679 btn_dialog(
680 main_window, 680 main_window,
681 _("Your configuration changes were NOT saved."), 681 "Your configuration changes were NOT saved.",
682 1, 682 1,
683 "<OK>"); 683 "<OK>");
684 break; 684 break;
@@ -697,12 +697,12 @@ static void search_conf(void)
697 int dres; 697 int dres;
698 698
699 title = str_new(); 699 title = str_new();
700 str_printf( &title, _("Enter (sub)string or regexp to search for " 700 str_printf( &title, "Enter (sub)string or regexp to search for "
701 "(with or without \"%s\")"), CONFIG_); 701 "(with or without \"%s\")", CONFIG_);
702 702
703again: 703again:
704 dres = dialog_inputbox(main_window, 704 dres = dialog_inputbox(main_window,
705 _("Search Configuration Parameter"), 705 "Search Configuration Parameter",
706 str_get(&title), 706 str_get(&title),
707 "", &dialog_input_result, &dialog_input_result_len); 707 "", &dialog_input_result, &dialog_input_result_len);
708 switch (dres) { 708 switch (dres) {
@@ -710,7 +710,7 @@ again:
710 break; 710 break;
711 case 1: 711 case 1:
712 show_scroll_win(main_window, 712 show_scroll_win(main_window,
713 _("Search Configuration"), search_help); 713 "Search Configuration", search_help);
714 goto again; 714 goto again;
715 default: 715 default:
716 str_free(&title); 716 str_free(&title);
@@ -726,7 +726,7 @@ again:
726 res = get_relations_str(sym_arr, NULL); 726 res = get_relations_str(sym_arr, NULL);
727 free(sym_arr); 727 free(sym_arr);
728 show_scroll_win(main_window, 728 show_scroll_win(main_window,
729 _("Search Results"), str_get(&res)); 729 "Search Results", str_get(&res));
730 str_free(&res); 730 str_free(&res);
731 str_free(&title); 731 str_free(&title);
732} 732}
@@ -754,7 +754,7 @@ static void build_conf(struct menu *menu)
754 switch (ptype) { 754 switch (ptype) {
755 case P_MENU: 755 case P_MENU:
756 child_count++; 756 child_count++;
757 prompt = _(prompt); 757 prompt = prompt;
758 if (single_menu_mode) { 758 if (single_menu_mode) {
759 item_make(menu, 'm', 759 item_make(menu, 'm',
760 "%s%*c%s", 760 "%s%*c%s",
@@ -775,7 +775,7 @@ static void build_conf(struct menu *menu)
775 item_make(menu, ':', 775 item_make(menu, ':',
776 " %*c*** %s ***", 776 " %*c*** %s ***",
777 indent + 1, ' ', 777 indent + 1, ' ',
778 _(prompt)); 778 prompt);
779 } 779 }
780 break; 780 break;
781 default: 781 default:
@@ -783,7 +783,7 @@ static void build_conf(struct menu *menu)
783 child_count++; 783 child_count++;
784 item_make(menu, ':', "---%*c%s", 784 item_make(menu, ':', "---%*c%s",
785 indent + 1, ' ', 785 indent + 1, ' ',
786 _(prompt)); 786 prompt);
787 } 787 }
788 } 788 }
789 } else 789 } else
@@ -829,11 +829,11 @@ static void build_conf(struct menu *menu)
829 } 829 }
830 830
831 item_add_str("%*c%s", indent + 1, 831 item_add_str("%*c%s", indent + 1,
832 ' ', _(menu_get_prompt(menu))); 832 ' ', menu_get_prompt(menu));
833 if (val == yes) { 833 if (val == yes) {
834 if (def_menu) { 834 if (def_menu) {
835 item_add_str(" (%s)", 835 item_add_str(" (%s)",
836 _(menu_get_prompt(def_menu))); 836 menu_get_prompt(def_menu));
837 item_add_str(" --->"); 837 item_add_str(" --->");
838 if (def_menu->list) { 838 if (def_menu->list) {
839 indent += 2; 839 indent += 2;
@@ -847,7 +847,7 @@ static void build_conf(struct menu *menu)
847 if (menu == current_menu) { 847 if (menu == current_menu) {
848 item_make(menu, ':', 848 item_make(menu, ':',
849 "---%*c%s", indent + 1, 849 "---%*c%s", indent + 1,
850 ' ', _(menu_get_prompt(menu))); 850 ' ', menu_get_prompt(menu));
851 goto conf_childs; 851 goto conf_childs;
852 } 852 }
853 child_count++; 853 child_count++;
@@ -894,17 +894,17 @@ static void build_conf(struct menu *menu)
894 if (tmp < 0) 894 if (tmp < 0)
895 tmp = 0; 895 tmp = 0;
896 item_add_str("%*c%s%s", tmp, ' ', 896 item_add_str("%*c%s%s", tmp, ' ',
897 _(menu_get_prompt(menu)), 897 menu_get_prompt(menu),
898 (sym_has_value(sym) || 898 (sym_has_value(sym) ||
899 !sym_is_changable(sym)) ? "" : 899 !sym_is_changable(sym)) ? "" :
900 _(" (NEW)")); 900 " (NEW)");
901 goto conf_childs; 901 goto conf_childs;
902 } 902 }
903 } 903 }
904 item_add_str("%*c%s%s", indent + 1, ' ', 904 item_add_str("%*c%s%s", indent + 1, ' ',
905 _(menu_get_prompt(menu)), 905 menu_get_prompt(menu),
906 (sym_has_value(sym) || !sym_is_changable(sym)) ? 906 (sym_has_value(sym) || !sym_is_changable(sym)) ?
907 "" : _(" (NEW)")); 907 "" : " (NEW)");
908 if (menu->prompt && menu->prompt->type == P_MENU) { 908 if (menu->prompt && menu->prompt->type == P_MENU) {
909 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); 909 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->");
910 return; 910 return;
@@ -1086,8 +1086,8 @@ static void conf(struct menu *menu)
1086 if (!child_count) 1086 if (!child_count)
1087 break; 1087 break;
1088 1088
1089 show_menu(prompt ? _(prompt) : _("Main Menu"), 1089 show_menu(prompt ? prompt : "Main Menu",
1090 _(menu_instructions), 1090 menu_instructions,
1091 current_index, &last_top_row); 1091 current_index, &last_top_row);
1092 keypad((menu_win(curses_menu)), TRUE); 1092 keypad((menu_win(curses_menu)), TRUE);
1093 while (!global_exit) { 1093 while (!global_exit) {
@@ -1227,13 +1227,13 @@ static void show_help(struct menu *menu)
1227 1227
1228 help = str_new(); 1228 help = str_new();
1229 menu_get_ext_help(menu, &help); 1229 menu_get_ext_help(menu, &help);
1230 show_scroll_win(main_window, _(menu_get_prompt(menu)), str_get(&help)); 1230 show_scroll_win(main_window, menu_get_prompt(menu), str_get(&help));
1231 str_free(&help); 1231 str_free(&help);
1232} 1232}
1233 1233
1234static void conf_choice(struct menu *menu) 1234static void conf_choice(struct menu *menu)
1235{ 1235{
1236 const char *prompt = _(menu_get_prompt(menu)); 1236 const char *prompt = menu_get_prompt(menu);
1237 struct menu *child = NULL; 1237 struct menu *child = NULL;
1238 struct symbol *active; 1238 struct symbol *active;
1239 int selected_index = 0; 1239 int selected_index = 0;
@@ -1256,13 +1256,13 @@ static void conf_choice(struct menu *menu)
1256 1256
1257 if (child->sym == sym_get_choice_value(menu->sym)) 1257 if (child->sym == sym_get_choice_value(menu->sym))
1258 item_make(child, ':', "<X> %s", 1258 item_make(child, ':', "<X> %s",
1259 _(menu_get_prompt(child))); 1259 menu_get_prompt(child));
1260 else if (child->sym) 1260 else if (child->sym)
1261 item_make(child, ':', " %s", 1261 item_make(child, ':', " %s",
1262 _(menu_get_prompt(child))); 1262 menu_get_prompt(child));
1263 else 1263 else
1264 item_make(child, ':', "*** %s ***", 1264 item_make(child, ':', "*** %s ***",
1265 _(menu_get_prompt(child))); 1265 menu_get_prompt(child));
1266 1266
1267 if (child->sym == active){ 1267 if (child->sym == active){
1268 last_top_row = top_row(curses_menu); 1268 last_top_row = top_row(curses_menu);
@@ -1270,8 +1270,8 @@ static void conf_choice(struct menu *menu)
1270 } 1270 }
1271 i++; 1271 i++;
1272 } 1272 }
1273 show_menu(prompt ? _(prompt) : _("Choice Menu"), 1273 show_menu(prompt ? prompt : "Choice Menu",
1274 _(radiolist_instructions), 1274 radiolist_instructions,
1275 selected_index, 1275 selected_index,
1276 &last_top_row); 1276 &last_top_row);
1277 while (!global_exit) { 1277 while (!global_exit) {
@@ -1358,19 +1358,19 @@ static void conf_string(struct menu *menu)
1358 1358
1359 switch (sym_get_type(menu->sym)) { 1359 switch (sym_get_type(menu->sym)) {
1360 case S_INT: 1360 case S_INT:
1361 heading = _(inputbox_instructions_int); 1361 heading = inputbox_instructions_int;
1362 break; 1362 break;
1363 case S_HEX: 1363 case S_HEX:
1364 heading = _(inputbox_instructions_hex); 1364 heading = inputbox_instructions_hex;
1365 break; 1365 break;
1366 case S_STRING: 1366 case S_STRING:
1367 heading = _(inputbox_instructions_string); 1367 heading = inputbox_instructions_string;
1368 break; 1368 break;
1369 default: 1369 default:
1370 heading = _("Internal nconf error!"); 1370 heading = "Internal nconf error!";
1371 } 1371 }
1372 res = dialog_inputbox(main_window, 1372 res = dialog_inputbox(main_window,
1373 prompt ? _(prompt) : _("Main Menu"), 1373 prompt ? prompt : "Main Menu",
1374 heading, 1374 heading,
1375 sym_get_string_value(menu->sym), 1375 sym_get_string_value(menu->sym),
1376 &dialog_input_result, 1376 &dialog_input_result,
@@ -1381,7 +1381,7 @@ static void conf_string(struct menu *menu)
1381 dialog_input_result)) 1381 dialog_input_result))
1382 return; 1382 return;
1383 btn_dialog(main_window, 1383 btn_dialog(main_window,
1384 _("You have made an invalid entry."), 0); 1384 "You have made an invalid entry.", 0);
1385 break; 1385 break;
1386 case 1: 1386 case 1:
1387 show_help(menu); 1387 show_help(menu);
@@ -1410,11 +1410,11 @@ static void conf_load(void)
1410 sym_set_change_count(1); 1410 sym_set_change_count(1);
1411 return; 1411 return;
1412 } 1412 }
1413 btn_dialog(main_window, _("File does not exist!"), 0); 1413 btn_dialog(main_window, "File does not exist!", 0);
1414 break; 1414 break;
1415 case 1: 1415 case 1:
1416 show_scroll_win(main_window, 1416 show_scroll_win(main_window,
1417 _("Load Alternate Configuration"), 1417 "Load Alternate Configuration",
1418 load_config_help); 1418 load_config_help);
1419 break; 1419 break;
1420 case KEY_EXIT: 1420 case KEY_EXIT:
@@ -1441,13 +1441,13 @@ static void conf_save(void)
1441 set_config_filename(dialog_input_result); 1441 set_config_filename(dialog_input_result);
1442 return; 1442 return;
1443 } 1443 }
1444 btn_dialog(main_window, _("Can't create file! " 1444 btn_dialog(main_window, "Can't create file! "
1445 "Probably a nonexistent directory."), 1445 "Probably a nonexistent directory.",
1446 1, "<OK>"); 1446 1, "<OK>");
1447 break; 1447 break;
1448 case 1: 1448 case 1:
1449 show_scroll_win(main_window, 1449 show_scroll_win(main_window,
1450 _("Save Alternate Configuration"), 1450 "Save Alternate Configuration",
1451 save_config_help); 1451 save_config_help);
1452 break; 1452 break;
1453 case KEY_EXIT: 1453 case KEY_EXIT:
@@ -1480,10 +1480,6 @@ int main(int ac, char **av)
1480 int lines, columns; 1480 int lines, columns;
1481 char *mode; 1481 char *mode;
1482 1482
1483 setlocale(LC_ALL, "");
1484 bindtextdomain(PACKAGE, LOCALEDIR);
1485 textdomain(PACKAGE);
1486
1487 if (ac > 1 && strcmp(av[1], "-s") == 0) { 1483 if (ac > 1 && strcmp(av[1], "-s") == 0) {
1488 /* Silence conf_read() until the real callback is set up */ 1484 /* Silence conf_read() until the real callback is set up */
1489 conf_set_message_callback(NULL); 1485 conf_set_message_callback(NULL);
@@ -1541,8 +1537,8 @@ int main(int ac, char **av)
1541 /* check for KEY_FUNC(1) */ 1537 /* check for KEY_FUNC(1) */
1542 if (has_key(KEY_F(1)) == FALSE) { 1538 if (has_key(KEY_F(1)) == FALSE) {
1543 show_scroll_win(main_window, 1539 show_scroll_win(main_window,
1544 _("Instructions"), 1540 "Instructions",
1545 _(menu_no_f_instructions)); 1541 menu_no_f_instructions);
1546 } 1542 }
1547 1543
1548 conf_set_message_callback(conf_message_callback); 1544 conf_set_message_callback(conf_message_callback);
diff --git a/scripts/kconfig/nconf.h b/scripts/kconfig/nconf.h
index 9f6f21d3b0d4..2b9e19f603c4 100644
--- a/scripts/kconfig/nconf.h
+++ b/scripts/kconfig/nconf.h
@@ -14,7 +14,6 @@
14#include <stdlib.h> 14#include <stdlib.h>
15#include <string.h> 15#include <string.h>
16#include <unistd.h> 16#include <unistd.h>
17#include <locale.h>
18#include <ncurses.h> 17#include <ncurses.h>
19#include <menu.h> 18#include <menu.h>
20#include <panel.h> 19#include <panel.h>
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index ae6c72546411..ad9c22dd04f5 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -34,10 +34,6 @@
34#include "qconf.moc" 34#include "qconf.moc"
35#include "images.c" 35#include "images.c"
36 36
37#ifdef _
38# undef _
39# define _ qgettext
40#endif
41 37
42static QApplication *configApp; 38static QApplication *configApp;
43static ConfigSettings *configSettings; 39static ConfigSettings *configSettings;
@@ -46,12 +42,7 @@ QAction *ConfigMainWindow::saveAction;
46 42
47static inline QString qgettext(const char* str) 43static inline QString qgettext(const char* str)
48{ 44{
49 return QString::fromLocal8Bit(gettext(str)); 45 return QString::fromLocal8Bit(str);
50}
51
52static inline QString qgettext(const QString& str)
53{
54 return QString::fromLocal8Bit(gettext(str.toLatin1()));
55} 46}
56 47
57ConfigSettings::ConfigSettings() 48ConfigSettings::ConfigSettings()
@@ -127,7 +118,7 @@ void ConfigItem::updateMenu(void)
127 118
128 sym = menu->sym; 119 sym = menu->sym;
129 prop = menu->prompt; 120 prop = menu->prompt;
130 prompt = _(menu_get_prompt(menu)); 121 prompt = qgettext(menu_get_prompt(menu));
131 122
132 if (prop) switch (prop->type) { 123 if (prop) switch (prop->type) {
133 case P_MENU: 124 case P_MENU:
@@ -216,7 +207,7 @@ void ConfigItem::updateMenu(void)
216 break; 207 break;
217 } 208 }
218 if (!sym_has_value(sym) && visible) 209 if (!sym_has_value(sym) && visible)
219 prompt += _(" (NEW)"); 210 prompt += " (NEW)";
220set_prompt: 211set_prompt:
221 setText(promptColIdx, prompt); 212 setText(promptColIdx, prompt);
222} 213}
@@ -327,7 +318,7 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
327 setVerticalScrollMode(ScrollPerPixel); 318 setVerticalScrollMode(ScrollPerPixel);
328 setHorizontalScrollMode(ScrollPerPixel); 319 setHorizontalScrollMode(ScrollPerPixel);
329 320
330 setHeaderLabels(QStringList() << _("Option") << _("Name") << "N" << "M" << "Y" << _("Value")); 321 setHeaderLabels(QStringList() << "Option" << "Name" << "N" << "M" << "Y" << "Value");
331 322
332 connect(this, SIGNAL(itemSelectionChanged(void)), 323 connect(this, SIGNAL(itemSelectionChanged(void)),
333 SLOT(updateSelection(void))); 324 SLOT(updateSelection(void)));
@@ -883,7 +874,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
883 QAction *action; 874 QAction *action;
884 875
885 headerPopup = new QMenu(this); 876 headerPopup = new QMenu(this);
886 action = new QAction(_("Show Name"), this); 877 action = new QAction("Show Name", this);
887 action->setCheckable(true); 878 action->setCheckable(true);
888 connect(action, SIGNAL(toggled(bool)), 879 connect(action, SIGNAL(toggled(bool)),
889 parent(), SLOT(setShowName(bool))); 880 parent(), SLOT(setShowName(bool)));
@@ -891,7 +882,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
891 action, SLOT(setOn(bool))); 882 action, SLOT(setOn(bool)));
892 action->setChecked(showName); 883 action->setChecked(showName);
893 headerPopup->addAction(action); 884 headerPopup->addAction(action);
894 action = new QAction(_("Show Range"), this); 885 action = new QAction("Show Range", this);
895 action->setCheckable(true); 886 action->setCheckable(true);
896 connect(action, SIGNAL(toggled(bool)), 887 connect(action, SIGNAL(toggled(bool)),
897 parent(), SLOT(setShowRange(bool))); 888 parent(), SLOT(setShowRange(bool)));
@@ -899,7 +890,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
899 action, SLOT(setOn(bool))); 890 action, SLOT(setOn(bool)));
900 action->setChecked(showRange); 891 action->setChecked(showRange);
901 headerPopup->addAction(action); 892 headerPopup->addAction(action);
902 action = new QAction(_("Show Data"), this); 893 action = new QAction("Show Data", this);
903 action->setCheckable(true); 894 action->setCheckable(true);
904 connect(action, SIGNAL(toggled(bool)), 895 connect(action, SIGNAL(toggled(bool)),
905 parent(), SLOT(setShowData(bool))); 896 parent(), SLOT(setShowData(bool)));
@@ -1086,7 +1077,7 @@ void ConfigInfoView::menuInfo(void)
1086 if (sym) { 1077 if (sym) {
1087 if (_menu->prompt) { 1078 if (_menu->prompt) {
1088 head += "<big><b>"; 1079 head += "<big><b>";
1089 head += print_filter(_(_menu->prompt->text)); 1080 head += print_filter(_menu->prompt->text);
1090 head += "</b></big>"; 1081 head += "</b></big>";
1091 if (sym->name) { 1082 if (sym->name) {
1092 head += " ("; 1083 head += " (";
@@ -1117,7 +1108,7 @@ void ConfigInfoView::menuInfo(void)
1117 str_free(&help_gstr); 1108 str_free(&help_gstr);
1118 } else if (_menu->prompt) { 1109 } else if (_menu->prompt) {
1119 head += "<big><b>"; 1110 head += "<big><b>";
1120 head += print_filter(_(_menu->prompt->text)); 1111 head += print_filter(_menu->prompt->text);
1121 head += "</b></big><br><br>"; 1112 head += "</b></big><br><br>";
1122 if (showDebug()) { 1113 if (showDebug()) {
1123 if (_menu->prompt->visible.expr) { 1114 if (_menu->prompt->visible.expr) {
@@ -1152,7 +1143,7 @@ QString ConfigInfoView::debug_info(struct symbol *sym)
1152 case P_PROMPT: 1143 case P_PROMPT:
1153 case P_MENU: 1144 case P_MENU:
1154 debug += QString().sprintf("prompt: <a href=\"m%p\">", prop->menu); 1145 debug += QString().sprintf("prompt: <a href=\"m%p\">", prop->menu);
1155 debug += print_filter(_(prop->text)); 1146 debug += print_filter(prop->text);
1156 debug += "</a><br>"; 1147 debug += "</a><br>";
1157 break; 1148 break;
1158 case P_DEFAULT: 1149 case P_DEFAULT:
@@ -1234,7 +1225,7 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
1234QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos) 1225QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
1235{ 1226{
1236 QMenu* popup = Parent::createStandardContextMenu(pos); 1227 QMenu* popup = Parent::createStandardContextMenu(pos);
1237 QAction* action = new QAction(_("Show Debug Info"), popup); 1228 QAction* action = new QAction("Show Debug Info", popup);
1238 action->setCheckable(true); 1229 action->setCheckable(true);
1239 connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); 1230 connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
1240 connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); 1231 connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
@@ -1261,11 +1252,11 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
1261 QHBoxLayout* layout2 = new QHBoxLayout(0); 1252 QHBoxLayout* layout2 = new QHBoxLayout(0);
1262 layout2->setContentsMargins(0, 0, 0, 0); 1253 layout2->setContentsMargins(0, 0, 0, 0);
1263 layout2->setSpacing(6); 1254 layout2->setSpacing(6);
1264 layout2->addWidget(new QLabel(_("Find:"), this)); 1255 layout2->addWidget(new QLabel("Find:", this));
1265 editField = new QLineEdit(this); 1256 editField = new QLineEdit(this);
1266 connect(editField, SIGNAL(returnPressed()), SLOT(search())); 1257 connect(editField, SIGNAL(returnPressed()), SLOT(search()));
1267 layout2->addWidget(editField); 1258 layout2->addWidget(editField);
1268 searchButton = new QPushButton(_("Search"), this); 1259 searchButton = new QPushButton("Search", this);
1269 searchButton->setAutoDefault(false); 1260 searchButton->setAutoDefault(false);
1270 connect(searchButton, SIGNAL(clicked()), SLOT(search())); 1261 connect(searchButton, SIGNAL(clicked()), SLOT(search()));
1271 layout2->addWidget(searchButton); 1262 layout2->addWidget(searchButton);
@@ -1387,44 +1378,44 @@ ConfigMainWindow::ConfigMainWindow(void)
1387 toolBar = new QToolBar("Tools", this); 1378 toolBar = new QToolBar("Tools", this);
1388 addToolBar(toolBar); 1379 addToolBar(toolBar);
1389 1380
1390 backAction = new QAction(QPixmap(xpm_back), _("Back"), this); 1381 backAction = new QAction(QPixmap(xpm_back), "Back", this);
1391 connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); 1382 connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack()));
1392 backAction->setEnabled(false); 1383 backAction->setEnabled(false);
1393 QAction *quitAction = new QAction(_("&Quit"), this); 1384 QAction *quitAction = new QAction("&Quit", this);
1394 quitAction->setShortcut(Qt::CTRL + Qt::Key_Q); 1385 quitAction->setShortcut(Qt::CTRL + Qt::Key_Q);
1395 connect(quitAction, SIGNAL(triggered(bool)), SLOT(close())); 1386 connect(quitAction, SIGNAL(triggered(bool)), SLOT(close()));
1396 QAction *loadAction = new QAction(QPixmap(xpm_load), _("&Load"), this); 1387 QAction *loadAction = new QAction(QPixmap(xpm_load), "&Load", this);
1397 loadAction->setShortcut(Qt::CTRL + Qt::Key_L); 1388 loadAction->setShortcut(Qt::CTRL + Qt::Key_L);
1398 connect(loadAction, SIGNAL(triggered(bool)), SLOT(loadConfig())); 1389 connect(loadAction, SIGNAL(triggered(bool)), SLOT(loadConfig()));
1399 saveAction = new QAction(QPixmap(xpm_save), _("&Save"), this); 1390 saveAction = new QAction(QPixmap(xpm_save), "&Save", this);
1400 saveAction->setShortcut(Qt::CTRL + Qt::Key_S); 1391 saveAction->setShortcut(Qt::CTRL + Qt::Key_S);
1401 connect(saveAction, SIGNAL(triggered(bool)), SLOT(saveConfig())); 1392 connect(saveAction, SIGNAL(triggered(bool)), SLOT(saveConfig()));
1402 conf_set_changed_callback(conf_changed); 1393 conf_set_changed_callback(conf_changed);
1403 // Set saveAction's initial state 1394 // Set saveAction's initial state
1404 conf_changed(); 1395 conf_changed();
1405 QAction *saveAsAction = new QAction(_("Save &As..."), this); 1396 QAction *saveAsAction = new QAction("Save &As...", this);
1406 connect(saveAsAction, SIGNAL(triggered(bool)), SLOT(saveConfigAs())); 1397 connect(saveAsAction, SIGNAL(triggered(bool)), SLOT(saveConfigAs()));
1407 QAction *searchAction = new QAction(_("&Find"), this); 1398 QAction *searchAction = new QAction("&Find", this);
1408 searchAction->setShortcut(Qt::CTRL + Qt::Key_F); 1399 searchAction->setShortcut(Qt::CTRL + Qt::Key_F);
1409 connect(searchAction, SIGNAL(triggered(bool)), SLOT(searchConfig())); 1400 connect(searchAction, SIGNAL(triggered(bool)), SLOT(searchConfig()));
1410 singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), this); 1401 singleViewAction = new QAction(QPixmap(xpm_single_view), "Single View", this);
1411 singleViewAction->setCheckable(true); 1402 singleViewAction->setCheckable(true);
1412 connect(singleViewAction, SIGNAL(triggered(bool)), SLOT(showSingleView())); 1403 connect(singleViewAction, SIGNAL(triggered(bool)), SLOT(showSingleView()));
1413 splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), this); 1404 splitViewAction = new QAction(QPixmap(xpm_split_view), "Split View", this);
1414 splitViewAction->setCheckable(true); 1405 splitViewAction->setCheckable(true);
1415 connect(splitViewAction, SIGNAL(triggered(bool)), SLOT(showSplitView())); 1406 connect(splitViewAction, SIGNAL(triggered(bool)), SLOT(showSplitView()));
1416 fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), this); 1407 fullViewAction = new QAction(QPixmap(xpm_tree_view), "Full View", this);
1417 fullViewAction->setCheckable(true); 1408 fullViewAction->setCheckable(true);
1418 connect(fullViewAction, SIGNAL(triggered(bool)), SLOT(showFullView())); 1409 connect(fullViewAction, SIGNAL(triggered(bool)), SLOT(showFullView()));
1419 1410
1420 QAction *showNameAction = new QAction(_("Show Name"), this); 1411 QAction *showNameAction = new QAction("Show Name", this);
1421 showNameAction->setCheckable(true); 1412 showNameAction->setCheckable(true);
1422 connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool))); 1413 connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool)));
1423 showNameAction->setChecked(configView->showName()); 1414 showNameAction->setChecked(configView->showName());
1424 QAction *showRangeAction = new QAction(_("Show Range"), this); 1415 QAction *showRangeAction = new QAction("Show Range", this);
1425 showRangeAction->setCheckable(true); 1416 showRangeAction->setCheckable(true);
1426 connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool))); 1417 connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool)));
1427 QAction *showDataAction = new QAction(_("Show Data"), this); 1418 QAction *showDataAction = new QAction("Show Data", this);
1428 showDataAction->setCheckable(true); 1419 showDataAction->setCheckable(true);
1429 connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool))); 1420 connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool)));
1430 1421
@@ -1435,21 +1426,21 @@ ConfigMainWindow::ConfigMainWindow(void)
1435 connect(optGroup, SIGNAL(triggered(QAction *)), menuView, 1426 connect(optGroup, SIGNAL(triggered(QAction *)), menuView,
1436 SLOT(setOptionMode(QAction *))); 1427 SLOT(setOptionMode(QAction *)));
1437 1428
1438 configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup); 1429 configView->showNormalAction = new QAction("Show Normal Options", optGroup);
1439 configView->showAllAction = new QAction(_("Show All Options"), optGroup); 1430 configView->showAllAction = new QAction("Show All Options", optGroup);
1440 configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup); 1431 configView->showPromptAction = new QAction("Show Prompt Options", optGroup);
1441 configView->showNormalAction->setCheckable(true); 1432 configView->showNormalAction->setCheckable(true);
1442 configView->showAllAction->setCheckable(true); 1433 configView->showAllAction->setCheckable(true);
1443 configView->showPromptAction->setCheckable(true); 1434 configView->showPromptAction->setCheckable(true);
1444 1435
1445 QAction *showDebugAction = new QAction( _("Show Debug Info"), this); 1436 QAction *showDebugAction = new QAction("Show Debug Info", this);
1446 showDebugAction->setCheckable(true); 1437 showDebugAction->setCheckable(true);
1447 connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool))); 1438 connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool)));
1448 showDebugAction->setChecked(helpText->showDebug()); 1439 showDebugAction->setChecked(helpText->showDebug());
1449 1440
1450 QAction *showIntroAction = new QAction( _("Introduction"), this); 1441 QAction *showIntroAction = new QAction("Introduction", this);
1451 connect(showIntroAction, SIGNAL(triggered(bool)), SLOT(showIntro())); 1442 connect(showIntroAction, SIGNAL(triggered(bool)), SLOT(showIntro()));
1452 QAction *showAboutAction = new QAction( _("About"), this); 1443 QAction *showAboutAction = new QAction("About", this);
1453 connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout())); 1444 connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout()));
1454 1445
1455 // init tool bar 1446 // init tool bar
@@ -1463,7 +1454,7 @@ ConfigMainWindow::ConfigMainWindow(void)
1463 toolBar->addAction(fullViewAction); 1454 toolBar->addAction(fullViewAction);
1464 1455
1465 // create config menu 1456 // create config menu
1466 QMenu* config = menu->addMenu(_("&File")); 1457 QMenu* config = menu->addMenu("&File");
1467 config->addAction(loadAction); 1458 config->addAction(loadAction);
1468 config->addAction(saveAction); 1459 config->addAction(saveAction);
1469 config->addAction(saveAsAction); 1460 config->addAction(saveAsAction);
@@ -1471,11 +1462,11 @@ ConfigMainWindow::ConfigMainWindow(void)
1471 config->addAction(quitAction); 1462 config->addAction(quitAction);
1472 1463
1473 // create edit menu 1464 // create edit menu
1474 QMenu* editMenu = menu->addMenu(_("&Edit")); 1465 QMenu* editMenu = menu->addMenu("&Edit");
1475 editMenu->addAction(searchAction); 1466 editMenu->addAction(searchAction);
1476 1467
1477 // create options menu 1468 // create options menu
1478 QMenu* optionMenu = menu->addMenu(_("&Option")); 1469 QMenu* optionMenu = menu->addMenu("&Option");
1479 optionMenu->addAction(showNameAction); 1470 optionMenu->addAction(showNameAction);
1480 optionMenu->addAction(showRangeAction); 1471 optionMenu->addAction(showRangeAction);
1481 optionMenu->addAction(showDataAction); 1472 optionMenu->addAction(showDataAction);
@@ -1486,7 +1477,7 @@ ConfigMainWindow::ConfigMainWindow(void)
1486 1477
1487 // create help menu 1478 // create help menu
1488 menu->addSeparator(); 1479 menu->addSeparator();
1489 QMenu* helpMenu = menu->addMenu(_("&Help")); 1480 QMenu* helpMenu = menu->addMenu("&Help");
1490 helpMenu->addAction(showIntroAction); 1481 helpMenu->addAction(showIntroAction);
1491 helpMenu->addAction(showAboutAction); 1482 helpMenu->addAction(showAboutAction);
1492 1483
@@ -1534,14 +1525,14 @@ void ConfigMainWindow::loadConfig(void)
1534 if (s.isNull()) 1525 if (s.isNull())
1535 return; 1526 return;
1536 if (conf_read(QFile::encodeName(s))) 1527 if (conf_read(QFile::encodeName(s)))
1537 QMessageBox::information(this, "qconf", _("Unable to load configuration!")); 1528 QMessageBox::information(this, "qconf", "Unable to load configuration!");
1538 ConfigView::updateListAll(); 1529 ConfigView::updateListAll();
1539} 1530}
1540 1531
1541bool ConfigMainWindow::saveConfig(void) 1532bool ConfigMainWindow::saveConfig(void)
1542{ 1533{
1543 if (conf_write(NULL)) { 1534 if (conf_write(NULL)) {
1544 QMessageBox::information(this, "qconf", _("Unable to save configuration!")); 1535 QMessageBox::information(this, "qconf", "Unable to save configuration!");
1545 return false; 1536 return false;
1546 } 1537 }
1547 return true; 1538 return true;
@@ -1723,11 +1714,11 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e)
1723 e->accept(); 1714 e->accept();
1724 return; 1715 return;
1725 } 1716 }
1726 QMessageBox mb("qconf", _("Save configuration?"), QMessageBox::Warning, 1717 QMessageBox mb("qconf", "Save configuration?", QMessageBox::Warning,
1727 QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape); 1718 QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape);
1728 mb.setButtonText(QMessageBox::Yes, _("&Save Changes")); 1719 mb.setButtonText(QMessageBox::Yes, "&Save Changes");
1729 mb.setButtonText(QMessageBox::No, _("&Discard Changes")); 1720 mb.setButtonText(QMessageBox::No, "&Discard Changes");
1730 mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); 1721 mb.setButtonText(QMessageBox::Cancel, "Cancel Exit");
1731 switch (mb.exec()) { 1722 switch (mb.exec()) {
1732 case QMessageBox::Yes: 1723 case QMessageBox::Yes:
1733 if (saveConfig()) 1724 if (saveConfig())
@@ -1746,7 +1737,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e)
1746 1737
1747void ConfigMainWindow::showIntro(void) 1738void ConfigMainWindow::showIntro(void)
1748{ 1739{
1749 static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n" 1740 static const QString str = "Welcome to the qconf graphical configuration tool.\n\n"
1750 "For each option, a blank box indicates the feature is disabled, a check\n" 1741 "For each option, a blank box indicates the feature is disabled, a check\n"
1751 "indicates it is enabled, and a dot indicates that it is to be compiled\n" 1742 "indicates it is enabled, and a dot indicates that it is to be compiled\n"
1752 "as a module. Clicking on the box will cycle through the three states.\n\n" 1743 "as a module. Clicking on the box will cycle through the three states.\n\n"
@@ -1756,16 +1747,16 @@ void ConfigMainWindow::showIntro(void)
1756 "options must be enabled to support the option you are interested in, you can\n" 1747 "options must be enabled to support the option you are interested in, you can\n"
1757 "still view the help of a grayed-out option.\n\n" 1748 "still view the help of a grayed-out option.\n\n"
1758 "Toggling Show Debug Info under the Options menu will show the dependencies,\n" 1749 "Toggling Show Debug Info under the Options menu will show the dependencies,\n"
1759 "which you can then match by examining other options.\n\n"); 1750 "which you can then match by examining other options.\n\n";
1760 1751
1761 QMessageBox::information(this, "qconf", str); 1752 QMessageBox::information(this, "qconf", str);
1762} 1753}
1763 1754
1764void ConfigMainWindow::showAbout(void) 1755void ConfigMainWindow::showAbout(void)
1765{ 1756{
1766 static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n" 1757 static const QString str = "qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n"
1767 "Copyright (C) 2015 Boris Barbulovski <bbarbulovski@gmail.com>.\n\n" 1758 "Copyright (C) 2015 Boris Barbulovski <bbarbulovski@gmail.com>.\n\n"
1768 "Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n"); 1759 "Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n";
1769 1760
1770 QMessageBox::information(this, "qconf", str); 1761 QMessageBox::information(this, "qconf", str);
1771} 1762}
@@ -1826,7 +1817,7 @@ static const char *progname;
1826 1817
1827static void usage(void) 1818static void usage(void)
1828{ 1819{
1829 printf(_("%s [-s] <config>\n").toLatin1().constData(), progname); 1820 printf("%s [-s] <config>\n", progname);
1830 exit(0); 1821 exit(0);
1831} 1822}
1832 1823
@@ -1835,9 +1826,6 @@ int main(int ac, char** av)
1835 ConfigMainWindow* v; 1826 ConfigMainWindow* v;
1836 const char *name; 1827 const char *name;
1837 1828
1838 bindtextdomain(PACKAGE, LOCALEDIR);
1839 textdomain(PACKAGE);
1840
1841 progname = av[0]; 1829 progname = av[0];
1842 configApp = new QApplication(ac, av); 1830 configApp = new QApplication(ac, av);
1843 if (ac > 1 && av[1][0] == '-') { 1831 if (ac > 1 && av[1][0] == '-') {
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index ad6305b0f40c..8bfaaf853d23 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -546,7 +546,7 @@ void conf_parse(const char *name)
546 modules_sym = sym_find( "n" ); 546 modules_sym = sym_find( "n" );
547 547
548 tmp = rootmenu.prompt->text; 548 tmp = rootmenu.prompt->text;
549 rootmenu.prompt->text = _(rootmenu.prompt->text); 549 rootmenu.prompt->text = rootmenu.prompt->text;
550 rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); 550 rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);
551 free((char*)tmp); 551 free((char*)tmp);
552 552