aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/conf.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-05-05 18:09:46 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 18:24:00 -0400
commit3b9fa0931dd86a1fe5507311ee8031650f5d0e8c (patch)
treeb40a8a09aca2b52f40d548b34c48ea46ba10b90f /scripts/kconfig/conf.c
parentf403b7f452e4347f6af14c1f3c47bce758eb6337 (diff)
[PATCH] Kconfig i18n support
This patch adds i18n support for make *config, allowing users to have the config process in their own language. No printk was harmed in the process, don't worry, so all the bug reports, kernel messages, etc, remain in english, just the user tools to configure the kernel are internationalized. Users not interested in translations can just unset the related LANG, LC_ALL, etc env variables and have the config process in plain english, something like: LANG= make menuconfig is enough for having the whole config process in english. Or just don't install any translation file. Translations for brazilian portuguese are being done by a team of volunteers at: http://www.visionflex.inf.br/kernel_ptbr/pmwiki.php/Principal/Traducoes To start the translation process: make update-po-config This will generate the pot template named scripts/kconfig/linux.pot, copy it to, say, ~/es.po, to start the translation for spanish. To test your translation, as root issue this command: msgfmt -o /usr/share/locale/es/LC_MESSAGES/linux.mo ~/es.po Replace "es" with your language code. Then execute, for instance: make menuconfig The current patch doesn't use any optimization to reduce the size of the generated .mo file, it is possible to use the config option as a key, but this doesn't prevent the current patch from being used or the translations done under the current scheme to be in any way lost if we chose to do any kind of keying. Thanks to Fabricio Vaccari for starting the pt_BR (brazilian portuguese) translation effort, Thiago Maciera for helping me with the gconf.cc (QT frontent) i18n coding and to all the volunteers that are already working on the first translation, to pt_BR. I left the question on whether to ship the translations with the stock kernel sources to be discussed here, please share your suggestions. Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'scripts/kconfig/conf.c')
-rw-r--r--scripts/kconfig/conf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index a494d1aeb9f9..70e7264c6942 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -34,7 +34,7 @@ static int conf_cnt;
34static signed char line[128]; 34static signed char line[128];
35static struct menu *rootEntry; 35static struct menu *rootEntry;
36 36
37static char nohelp_text[] = "Sorry, no help available for this option yet.\n"; 37static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
38 38
39static void strip(signed char *str) 39static void strip(signed char *str)
40{ 40{
@@ -56,9 +56,9 @@ static void strip(signed char *str)
56static void check_stdin(void) 56static void check_stdin(void)
57{ 57{
58 if (!valid_stdin && input_mode == ask_silent) { 58 if (!valid_stdin && input_mode == ask_silent) {
59 printf("aborted!\n\n"); 59 printf(_("aborted!\n\n"));
60 printf("Console input/output is redirected. "); 60 printf(_("Console input/output is redirected. "));
61 printf("Run 'make oldconfig' to update configuration.\n\n"); 61 printf(_("Run 'make oldconfig' to update configuration.\n\n"));
62 exit(1); 62 exit(1);
63 } 63 }
64} 64}
@@ -470,7 +470,7 @@ static void check_conf(struct menu *menu)
470 if (sym) { 470 if (sym) {
471 if (sym_is_changable(sym) && !sym_has_value(sym)) { 471 if (sym_is_changable(sym) && !sym_has_value(sym)) {
472 if (!conf_cnt++) 472 if (!conf_cnt++)
473 printf("*\n* Restart config...\n*\n"); 473 printf(_("*\n* Restart config...\n*\n"));
474 rootEntry = menu_get_parent_menu(menu); 474 rootEntry = menu_get_parent_menu(menu);
475 conf(rootEntry); 475 conf(rootEntry);
476 } 476 }
@@ -504,7 +504,7 @@ int main(int ac, char **av)
504 input_mode = set_default; 504 input_mode = set_default;
505 defconfig_file = av[i++]; 505 defconfig_file = av[i++];
506 if (!defconfig_file) { 506 if (!defconfig_file) {
507 printf("%s: No default config file specified\n", 507 printf(_("%s: No default config file specified\n"),
508 av[0]); 508 av[0]);
509 exit(1); 509 exit(1);
510 } 510 }
@@ -530,7 +530,7 @@ int main(int ac, char **av)
530 } 530 }
531 name = av[i]; 531 name = av[i];
532 if (!name) { 532 if (!name) {
533 printf("%s: Kconfig file missing\n", av[0]); 533 printf(_("%s: Kconfig file missing\n"), av[0]);
534 } 534 }
535 conf_parse(name); 535 conf_parse(name);
536 //zconfdump(stdout); 536 //zconfdump(stdout);
@@ -547,12 +547,12 @@ int main(int ac, char **av)
547 break; 547 break;
548 case ask_silent: 548 case ask_silent:
549 if (stat(".config", &tmpstat)) { 549 if (stat(".config", &tmpstat)) {
550 printf("***\n" 550 printf(_("***\n"
551 "*** You have not yet configured your kernel!\n" 551 "*** You have not yet configured your kernel!\n"
552 "***\n" 552 "***\n"
553 "*** Please run some configurator (e.g. \"make oldconfig\" or\n" 553 "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
554 "*** \"make menuconfig\" or \"make xconfig\").\n" 554 "*** \"make menuconfig\" or \"make xconfig\").\n"
555 "***\n"); 555 "***\n"));
556 exit(1); 556 exit(1);
557 } 557 }
558 case ask_all: 558 case ask_all:
@@ -576,7 +576,7 @@ int main(int ac, char **av)
576 check_conf(&rootmenu); 576 check_conf(&rootmenu);
577 } while (conf_cnt); 577 } while (conf_cnt);
578 if (conf_write(NULL)) { 578 if (conf_write(NULL)) {
579 fprintf(stderr, "\n*** Error during writing of the kernel configuration.\n\n"); 579 fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
580 return 1; 580 return 1;
581 } 581 }
582 return 0; 582 return 0;