diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2005-05-05 18:09:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-05 18:24:00 -0400 |
commit | 3b9fa0931dd86a1fe5507311ee8031650f5d0e8c (patch) | |
tree | b40a8a09aca2b52f40d548b34c48ea46ba10b90f /scripts/kconfig/Makefile | |
parent | f403b7f452e4347f6af14c1f3c47bce758eb6337 (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/Makefile')
-rw-r--r-- | scripts/kconfig/Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 5a5ddc40f36c..09abb891d11f 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Kernel configuration targets | 2 | # Kernel configuration targets |
3 | # These targets are used from top-level makefile | 3 | # These targets are used from top-level makefile |
4 | 4 | ||
5 | .PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig | 5 | .PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config |
6 | 6 | ||
7 | xconfig: $(obj)/qconf | 7 | xconfig: $(obj)/qconf |
8 | $< arch/$(ARCH)/Kconfig | 8 | $< arch/$(ARCH)/Kconfig |
@@ -23,6 +23,13 @@ oldconfig: $(obj)/conf | |||
23 | silentoldconfig: $(obj)/conf | 23 | silentoldconfig: $(obj)/conf |
24 | $< -s arch/$(ARCH)/Kconfig | 24 | $< -s arch/$(ARCH)/Kconfig |
25 | 25 | ||
26 | update-po-config: $(obj)/kxgettext | ||
27 | xgettext --default-domain=linux \ | ||
28 | --add-comments --keyword=_ --keyword=N_ \ | ||
29 | --files-from=scripts/kconfig/POTFILES.in \ | ||
30 | -o scripts/kconfig/linux.pot | ||
31 | scripts/kconfig/kxgettext arch/$(ARCH)/Kconfig >> scripts/kconfig/linux.pot | ||
32 | |||
26 | .PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig | 33 | .PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig |
27 | 34 | ||
28 | randconfig: $(obj)/conf | 35 | randconfig: $(obj)/conf |
@@ -72,9 +79,10 @@ help: | |||
72 | # Based on GTK which needs to be installed to compile it | 79 | # Based on GTK which needs to be installed to compile it |
73 | # object files used by all kconfig flavours | 80 | # object files used by all kconfig flavours |
74 | 81 | ||
75 | hostprogs-y := conf mconf qconf gconf | 82 | hostprogs-y := conf mconf qconf gconf kxgettext |
76 | conf-objs := conf.o zconf.tab.o | 83 | conf-objs := conf.o zconf.tab.o |
77 | mconf-objs := mconf.o zconf.tab.o | 84 | mconf-objs := mconf.o zconf.tab.o |
85 | kxgettext-objs := kxgettext.o zconf.tab.o | ||
78 | 86 | ||
79 | ifeq ($(MAKECMDGOALS),xconfig) | 87 | ifeq ($(MAKECMDGOALS),xconfig) |
80 | qconf-target := 1 | 88 | qconf-target := 1 |
@@ -107,7 +115,7 @@ HOSTLOADLIBES_gconf = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs` | |||
107 | HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \ | 115 | HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \ |
108 | -D LKC_DIRECT_LINK | 116 | -D LKC_DIRECT_LINK |
109 | 117 | ||
110 | $(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o: $(obj)/zconf.tab.h | 118 | $(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o $(obj)/kxgettext: $(obj)/zconf.tab.h |
111 | 119 | ||
112 | $(obj)/zconf.tab.h: $(src)/zconf.tab.h_shipped | 120 | $(obj)/zconf.tab.h: $(src)/zconf.tab.h_shipped |
113 | $(obj)/zconf.tab.c: $(src)/zconf.tab.c_shipped | 121 | $(obj)/zconf.tab.c: $(src)/zconf.tab.c_shipped |