aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/conf.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-05-05 15:09:46 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 15:24:00 -0700
commit3b9fa0931dd86a1fe5507311ee8031650f5d0e8c (patch)
treeb40a8a09aca2b52f40d548b34c48ea46ba10b90f /scripts/kconfig/conf.c
parent[XFS] Cleanup use of loff_t vs xfs_off_t in the core code. (diff)
downloadlinux-dev-3b9fa0931dd86a1fe5507311ee8031650f5d0e8c.tar.xz
linux-dev-3b9fa0931dd86a1fe5507311ee8031650f5d0e8c.zip
[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;
static signed char line[128];
static struct menu *rootEntry;
-static char nohelp_text[] = "Sorry, no help available for this option yet.\n";
+static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
static void strip(signed char *str)
{
@@ -56,9 +56,9 @@ static void strip(signed char *str)
static void check_stdin(void)
{
if (!valid_stdin && input_mode == ask_silent) {
- printf("aborted!\n\n");
- printf("Console input/output is redirected. ");
- printf("Run 'make oldconfig' to update configuration.\n\n");
+ printf(_("aborted!\n\n"));
+ printf(_("Console input/output is redirected. "));
+ printf(_("Run 'make oldconfig' to update configuration.\n\n"));
exit(1);
}
}
@@ -470,7 +470,7 @@ static void check_conf(struct menu *menu)
if (sym) {
if (sym_is_changable(sym) && !sym_has_value(sym)) {
if (!conf_cnt++)
- printf("*\n* Restart config...\n*\n");
+ printf(_("*\n* Restart config...\n*\n"));
rootEntry = menu_get_parent_menu(menu);
conf(rootEntry);
}
@@ -504,7 +504,7 @@ int main(int ac, char **av)
input_mode = set_default;
defconfig_file = av[i++];
if (!defconfig_file) {
- printf("%s: No default config file specified\n",
+ printf(_("%s: No default config file specified\n"),
av[0]);
exit(1);
}
@@ -530,7 +530,7 @@ int main(int ac, char **av)
}
name = av[i];
if (!name) {
- printf("%s: Kconfig file missing\n", av[0]);
+ printf(_("%s: Kconfig file missing\n"), av[0]);
}
conf_parse(name);
//zconfdump(stdout);
@@ -547,12 +547,12 @@ int main(int ac, char **av)
break;
case ask_silent:
if (stat(".config", &tmpstat)) {
- printf("***\n"
+ printf(_("***\n"
"*** You have not yet configured your kernel!\n"
"***\n"
"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
"*** \"make menuconfig\" or \"make xconfig\").\n"
- "***\n");
+ "***\n"));
exit(1);
}
case ask_all:
@@ -576,7 +576,7 @@ int main(int ac, char **av)
check_conf(&rootmenu);
} while (conf_cnt);
if (conf_write(NULL)) {
- fprintf(stderr, "\n*** Error during writing of the kernel configuration.\n\n");
+ fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
return 1;
}
return 0;