* [PATCH 0/19] Kconfig I18N completion
@ 2005-07-13 16:50 Egry Gábor
2005-07-13 17:04 ` [PATCH 1/19] Kconfig I18N: sublocale Egry Gábor
` (21 more replies)
0 siblings, 22 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 16:50 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
Hello,
The following patches complete the "Kconfig I18N support" patch by
Arnaldo.
The following parts are internationalised:
- Kconfig prompt, help, comment and menu texts
- full visible configuration interfaces
- error messages if the user can correct the errors (ex. saving config
file)
- answering (Y/M/N)
- option's value if it is a choice (viewing only)
Without I18N support:
- symbol names (CONFIG_xxx)
- Kconfig parsing errors in LKC
- lxdialog's errors
- content of the config file
- disabled debug messages in the source code
Some incomplete language files are downloadable from the
http://sourceforge.net/projects/tlktp/ page for testing (langpack).
Currently available:
- Italian (98%)
- Hungarian (67%)
- French (37%)
- Catalan (10%)
- Russian (5%)
All patches are tested without any problems.
Please apply the patches.
Regards,
Egry Gabor
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 1/19] Kconfig I18N: sublocale
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
@ 2005-07-13 17:04 ` Egry Gábor
2005-07-13 17:07 ` [PATCH 2/19] Kconfig I18N: lxdialog: width fix Egry Gábor
` (20 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:04 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
The external store of .mo files are unfrendly and binary .mo
files are ungly in the source code. This patch creates a temporary
locale directory on build time in <kernel_source>/.locale/
directory instead of /usr/share/locale/ and compiles the
necessary source language files from the <kernel_source>/po/ directory.
Without installed gettext package the configuration interfaces remain
in english.
This patch contains too a hook for additional patches. If one or more
po/*-po directories exist (ex. po/grsecurity-po/) then the content of
them will merged into the temporary locale directory. In this way the
configuration interface of external patches will be localisable.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
Makefile | 1
scripts/kconfig/Makefile | 7 +++
scripts/kconfig/lkc.h | 2
scripts/kconfig/set_locale.sh | 93 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 102 insertions(+), 1 deletion(-)
diff -puN Makefile~kconfig-i18n-01-sublocale Makefile
--- linux-2.6.13-rc3-i18n-kconfig/Makefile~kconfig-i18n-01-sublocale 2005-07-13 18:32:15.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/Makefile 2005-07-13 18:32:15.000000000 +0200
@@ -948,6 +948,7 @@ endef
# Directories & files removed with 'make clean'
CLEAN_DIRS += $(MODVERDIR)
+CLEAN_DIRS += .locale
CLEAN_FILES += vmlinux System.map \
.tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
diff -puN scripts/kconfig/lkc.h~kconfig-i18n-01-sublocale scripts/kconfig/lkc.h
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/lkc.h~kconfig-i18n-01-sublocale 2005-07-13 18:32:15.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/lkc.h 2005-07-13 18:32:15.000000000 +0200
@@ -26,7 +26,7 @@ extern "C" {
#define SRCTREE "srctree"
#define PACKAGE "linux"
-#define LOCALEDIR "/usr/share/locale"
+#define LOCALEDIR ".locale"
#define _(text) gettext(text)
#define N_(text) (text)
diff -puN scripts/kconfig/Makefile~kconfig-i18n-01-sublocale scripts/kconfig/Makefile
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/Makefile~kconfig-i18n-01-sublocale 2005-07-13 18:32:15.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/Makefile 2005-07-13 18:36:54.000000000 +0200
@@ -5,22 +5,28 @@
.PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
xconfig: $(obj)/qconf
+ $(Q)sh $(obj)/set_locale.sh
$< arch/$(ARCH)/Kconfig
gconfig: $(obj)/gconf
+ $(Q)sh $(obj)/set_locale.sh
$< arch/$(ARCH)/Kconfig
menuconfig: $(obj)/mconf
$(Q)$(MAKE) $(build)=scripts/lxdialog
+ $(Q)sh $(obj)/set_locale.sh
$< arch/$(ARCH)/Kconfig
config: $(obj)/conf
+ $(Q)sh $(obj)/set_locale.sh
$< arch/$(ARCH)/Kconfig
oldconfig: $(obj)/conf
+ $(Q)sh $(obj)/set_locale.sh
$< -o arch/$(ARCH)/Kconfig
silentoldconfig: $(obj)/conf
+ $(Q)sh $(obj)/set_locale.sh
$< -s arch/$(ARCH)/Kconfig
update-po-config: $(obj)/kxgettext
@@ -214,3 +220,4 @@ lex.%.c: %.l
flex -P$(notdir $*) -o$@ $<
endif
+
diff -puN /dev/null scripts/kconfig/set_locale.sh
--- /dev/null 2005-07-13 15:43:03.451152136 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/set_locale.sh 2005-07-13 18:32:15.000000000 +0200
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+#
+# This script detects language and compiles the language binary files
+#
+
+# Check the po/ directory
+if [ ! -d po/ ]
+then
+ exit 0
+fi
+
+# Set language code
+if test "x$LANG" == "x"
+then
+ if test "x$LC_ALL" == "x"
+ then
+ exit 0
+ else
+ MYLC=$LC_ALL
+ fi
+else
+ MYLC=$LANG
+fi
+
+# If don't need the translation
+if test "x$MYLC" == "xC"
+then
+ exit 0
+fi
+
+MYLCTEST=$(echo $MYLC|cut -b 1-5)
+
+# Find Kconfig's .po
+POFILES=$(find po/ -maxdepth 1 -type f -name ${MYLCTEST}.po)
+if test "x$POFILES" != "x"
+then
+ MYLC=$MYLCTEST
+else
+ MYLCTEST=$(echo $MYLC|cut -b 1-2)
+ POFILES=$(find po/ -maxdepth 1 -type f -name ${MYLCTEST}.po)
+ if test "x$POFILES" != "x"
+ then
+ MYLC=$MYLCTEST
+ else
+ #echo "Your language ($MYLC) is not supported."
+ exit 0
+ fi
+fi
+
+if [ -f .locale/$MYLC/LC_MESSAGES/linux.mo ]
+then
+ exit 0
+fi
+
+echo -n " LOCALE ($MYLC)... "
+
+# Find additional .po files
+# This is a hook for external patches
+for i in $(find po/ -maxdepth 1 -type d -path '*-po')
+do
+ if [ -f $i/$MYLC.po ]
+ then
+ POFILES="$POFILES $i/$MYLC.po"
+ NEED_CAT=1
+ fi
+done
+
+# Trying msgfmt... and no returning error if it doesn't exist
+msgfmt -V &>/dev/null || {
+ echo "msgfmt doesn't exist, please install gettext";
+ exit 0;
+}
+
+# Do translation...
+mkdir -p .locale/$MYLC/LC_MESSAGES/
+if test "x$NEED_CAT" == "x1"
+then
+ # Trying msgcat and no returning error if it doesn't exist
+ msgcat -V &>/dev/null || {
+ echo "msgcat doesn't exist, please install gettext 0.12 or newer";
+ exit 0;
+ }
+ msgcat --output=.locale/$MYLC/LC_MESSAGES/__tmp.po --use-first $POFILES
+ msgfmt .locale/$MYLC/LC_MESSAGES/__tmp.po --output=.locale/$MYLC/LC_MESSAGES/linux.mo
+ rm -f .locale/$MYLC/LC_MESSAGES/__tmp.po
+else
+ msgfmt $POFILES --output=.locale/$MYLC/LC_MESSAGES/linux.mo
+fi
+
+# Done
+echo " done"
+
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 2/19] Kconfig I18N: lxdialog: width fix
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
2005-07-13 17:04 ` [PATCH 1/19] Kconfig I18N: sublocale Egry Gábor
@ 2005-07-13 17:07 ` Egry Gábor
2005-07-13 17:26 ` [PATCH] Kconfig: lxdialog: Enable UTF8 Jan Engelhardt
2005-07-13 17:09 ` [PATCH 3/19] Kconfig I18N: lxdialog Egry Gábor
` (19 subsequent siblings)
21 siblings, 1 reply; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:07 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
Width fix in checkbox.c . If the content of checkbox is too long the subwindow slips.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/lxdialog/checklist.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff -puN scripts/lxdialog/checklist.c~kconfig-i18n-02-lxdialog-witdh-fix scripts/lxdialog/checklist.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/checklist.c~kconfig-i18n-02-lxdialog-witdh-fix 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/checklist.c 2005-07-13 18:37:06.000000000 +0200
@@ -32,7 +32,8 @@ static void
print_item (WINDOW * win, const char *item, int status,
int choice, int selected)
{
- int i;
+ int i, item_width=list_width+check_x-item_x;
+ char list_item[item_width+1];
/* Clear 'residue' of last item */
wattrset (win, menubox_attr);
@@ -47,10 +48,13 @@ print_item (WINDOW * win, const char *it
else
wprintw (win, "(%c)", status ? 'X' : ' ');
+ strncpy (list_item, item, item_width);
+ list_item[item_width] = 0;
+
wattrset (win, selected ? tag_selected_attr : tag_attr);
- mvwaddch(win, choice, item_x, item[0]);
+ mvwaddch(win, choice, item_x, list_item[0]);
wattrset (win, selected ? item_selected_attr : item_attr);
- waddstr (win, (char *)item+1);
+ waddstr (win, &list_item[1]);
if (selected) {
wmove (win, choice, check_x+1);
wrefresh (win);
@@ -197,7 +201,7 @@ dialog_checklist (const char *title, con
/* Find length of longest item in order to center checklist */
check_x = 0;
for (i = 0; i < item_no; i++)
- check_x = MAX (check_x, + strlen (items[i * 3 + 1]) + 4);
+ check_x = MAX (check_x, MIN(list_width, strlen (items[i * 3 + 1]) + 4));
check_x = (list_width - check_x) / 2;
item_x = check_x + 4;
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 3/19] Kconfig I18N: lxdialog
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
2005-07-13 17:04 ` [PATCH 1/19] Kconfig I18N: sublocale Egry Gábor
2005-07-13 17:07 ` [PATCH 2/19] Kconfig I18N: lxdialog: width fix Egry Gábor
@ 2005-07-13 17:09 ` Egry Gábor
2005-07-13 17:11 ` [PATCH 4/19] Kconfig I18N: lxdialog: multibyte character support Egry Gábor
` (18 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:09 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
I18N support for buttons in lxdialog.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/POTFILES.in | 8 ++++++++
scripts/lxdialog/checklist.c | 4 ++--
scripts/lxdialog/dialog.h | 5 +++++
scripts/lxdialog/inputbox.c | 4 ++--
scripts/lxdialog/lxdialog.c | 10 +++-------
scripts/lxdialog/menubox.c | 6 +++---
scripts/lxdialog/msgbox.c | 2 +-
scripts/lxdialog/textbox.c | 2 +-
scripts/lxdialog/yesno.c | 4 ++--
9 files changed, 27 insertions(+), 18 deletions(-)
diff -puN scripts/kconfig/POTFILES.in~kconfig-i18n-03-lxdialog-i18n scripts/kconfig/POTFILES.in
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/POTFILES.in~kconfig-i18n-03-lxdialog-i18n 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/POTFILES.in 2005-07-13 18:36:54.000000000 +0200
@@ -1,3 +1,11 @@
+scripts/lxdialog/checklist.c
+scripts/lxdialog/inputbox.c
+scripts/lxdialog/lxdialog.c
+scripts/lxdialog/menubox.c
+scripts/lxdialog/msgbox.c
+scripts/lxdialog/textbox.c
+scripts/lxdialog/util.c
+scripts/lxdialog/yesno.c
scripts/kconfig/mconf.c
scripts/kconfig/conf.c
scripts/kconfig/confdata.c
diff -puN scripts/lxdialog/checklist.c~kconfig-i18n-03-lxdialog-i18n scripts/lxdialog/checklist.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/checklist.c~kconfig-i18n-03-lxdialog-i18n 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/checklist.c 2005-07-13 18:37:03.000000000 +0200
@@ -109,8 +109,8 @@ print_buttons( WINDOW *dialog, int heigh
int x = width / 2 - 11;
int y = height - 2;
- print_button (dialog, "Select", y, x, selected == 0);
- print_button (dialog, " Help ", y, x + 14, selected == 1);
+ print_button (dialog, _("Select"), y, x, selected == 0);
+ print_button (dialog, _(" Help "), y, x + 14, selected == 1);
wmove(dialog, y, x+1 + 14*selected);
wrefresh (dialog);
diff -puN scripts/lxdialog/dialog.h~kconfig-i18n-03-lxdialog-i18n scripts/lxdialog/dialog.h
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/dialog.h~kconfig-i18n-03-lxdialog-i18n 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/dialog.h 2005-07-13 18:37:03.000000000 +0200
@@ -25,6 +25,11 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
+#include <libintl.h>
+
+#define _(str) gettext(str)
+#define PACKAGE "linux"
+#define LOCALEDIR ".locale"
#ifdef __sun__
#define CURS_MACROS
diff -puN scripts/lxdialog/inputbox.c~kconfig-i18n-03-lxdialog-i18n scripts/lxdialog/inputbox.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/inputbox.c~kconfig-i18n-03-lxdialog-i18n 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/inputbox.c 2005-07-13 18:37:03.000000000 +0200
@@ -32,8 +32,8 @@ print_buttons(WINDOW *dialog, int height
int x = width / 2 - 11;
int y = height - 2;
- print_button (dialog, " Ok ", y, x, selected==0);
- print_button (dialog, " Help ", y, x + 14, selected==1);
+ print_button (dialog, _(" Ok "), y, x, selected==0);
+ print_button (dialog, _(" Help "), y, x + 14, selected==1);
wmove(dialog, y, x+1+14*selected);
wrefresh(dialog);
diff -puN scripts/lxdialog/lxdialog.c~kconfig-i18n-03-lxdialog-i18n scripts/lxdialog/lxdialog.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/lxdialog.c~kconfig-i18n-03-lxdialog-i18n 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/lxdialog.c 2005-07-13 18:32:16.000000000 +0200
@@ -49,19 +49,15 @@ static struct Mode modes[] =
static struct Mode *modePtr;
-#ifdef LOCALE
-#include <locale.h>
-#endif
-
int
main (int argc, const char * const * argv)
{
int offset = 0, opt_clear = 0, end_common_opts = 0, retval;
const char *title = NULL;
-#ifdef LOCALE
- (void) setlocale (LC_ALL, "");
-#endif
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
#ifdef TRACE
trace(TRACE_CALLS|TRACE_UPDATE);
diff -puN scripts/lxdialog/menubox.c~kconfig-i18n-03-lxdialog-i18n scripts/lxdialog/menubox.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/menubox.c~kconfig-i18n-03-lxdialog-i18n 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/menubox.c 2005-07-13 18:37:03.000000000 +0200
@@ -151,9 +151,9 @@ print_buttons (WINDOW *win, int height,
int x = width / 2 - 16;
int y = height - 2;
- print_button (win, "Select", y, x, selected == 0);
- print_button (win, " Exit ", y, x + 12, selected == 1);
- print_button (win, " Help ", y, x + 24, selected == 2);
+ print_button (win, _("Select"), y, x, selected == 0);
+ print_button (win, _(" Exit "), y, x + 12, selected == 1);
+ print_button (win, _(" Help "), y, x + 24, selected == 2);
wmove(win, y, x+1+12*selected);
wrefresh (win);
diff -puN scripts/lxdialog/msgbox.c~kconfig-i18n-03-lxdialog-i18n scripts/lxdialog/msgbox.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/msgbox.c~kconfig-i18n-03-lxdialog-i18n 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/msgbox.c 2005-07-13 18:37:04.000000000 +0200
@@ -68,7 +68,7 @@ dialog_msgbox (const char *title, const
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
- print_button (dialog, " Ok ",
+ print_button (dialog, _(" Ok "),
height - 2, width / 2 - 4, TRUE);
wrefresh (dialog);
diff -puN scripts/lxdialog/textbox.c~kconfig-i18n-03-lxdialog-i18n scripts/lxdialog/textbox.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/textbox.c~kconfig-i18n-03-lxdialog-i18n 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/textbox.c 2005-07-13 18:37:04.000000000 +0200
@@ -120,7 +120,7 @@ dialog_textbox (const char *title, const
waddstr (dialog, (char *)title);
waddch (dialog, ' ');
}
- print_button (dialog, " Exit ", height - 2, width / 2 - 4, TRUE);
+ print_button (dialog, _(" Exit "), height - 2, width / 2 - 4, TRUE);
wnoutrefresh (dialog);
getyx (dialog, cur_y, cur_x); /* Save cursor position */
diff -puN scripts/lxdialog/yesno.c~kconfig-i18n-03-lxdialog-i18n scripts/lxdialog/yesno.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/yesno.c~kconfig-i18n-03-lxdialog-i18n 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/yesno.c 2005-07-13 18:37:04.000000000 +0200
@@ -30,8 +30,8 @@ print_buttons(WINDOW *dialog, int height
int x = width / 2 - 10;
int y = height - 2;
- print_button (dialog, " Yes ", y, x, selected == 0);
- print_button (dialog, " No ", y, x + 13, selected == 1);
+ print_button (dialog, _(" Yes "), y, x, selected == 0);
+ print_button (dialog, _(" No "), y, x + 13, selected == 1);
wmove(dialog, y, x+1 + 13*selected );
wrefresh (dialog);
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 4/19] Kconfig I18N: lxdialog: multibyte character support
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (2 preceding siblings ...)
2005-07-13 17:09 ` [PATCH 3/19] Kconfig I18N: lxdialog Egry Gábor
@ 2005-07-13 17:11 ` Egry Gábor
2005-07-14 0:10 ` Roman Zippel
2005-07-13 17:13 ` [PATCH 5/19] Kconfig I18N: lxdialog: answering Egry Gábor
` (17 subsequent siblings)
21 siblings, 1 reply; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:11 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
UTF-8 support for lxdialog with wchar. The installed wide ncurses
(ncursesw) is optional because some languages (ex. English, Italian)
and ISO 8859-xx charsets don't require this patch.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/lxdialog/Makefile | 43 +++++++++--
scripts/lxdialog/checklist.c | 66 ++++++++++++++++-
scripts/lxdialog/dialog.h | 9 ++
scripts/lxdialog/inputbox.c | 23 ++++++
scripts/lxdialog/menubox.c | 161 ++++++++++++++++++++++++++++++++++++++++++-
scripts/lxdialog/msgbox.c | 22 +++++
scripts/lxdialog/textbox.c | 34 ++++++++-
scripts/lxdialog/util.c | 148 +++++++++++++++++++++++++++++++++++++--
scripts/lxdialog/yesno.c | 22 +++++
9 files changed, 502 insertions(+), 26 deletions(-)
diff -puN scripts/lxdialog/checklist.c~kconfig-i18n-04-lxdialog-multibyte scripts/lxdialog/checklist.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/checklist.c~kconfig-i18n-04-lxdialog-multibyte 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/checklist.c 2005-07-13 18:32:16.000000000 +0200
@@ -33,7 +33,11 @@ print_item (WINDOW * win, const char *it
int choice, int selected)
{
int i, item_width=list_width+check_x-item_x;
+#ifdef USE_WIDE_CURSES
+ wchar_t *witems, list_item[item_width+1], fc[2];
+#else /* USE_WIDE_CURSES */
char list_item[item_width+1];
+#endif /* USE_WIDE_CURSES */
/* Clear 'residue' of last item */
wattrset (win, menubox_attr);
@@ -48,6 +52,20 @@ print_item (WINDOW * win, const char *it
else
wprintw (win, "(%c)", status ? 'X' : ' ');
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (item);
+ if (witems) {
+ wcsncpy (list_item, witems, item_width);
+ list_item[item_width] = 0;
+ wattrset (win, selected ? tag_selected_attr : tag_attr);
+ fc[0] = list_item[0];
+ fc[1] = 0;
+ mvwaddwstr(win, choice, item_x, fc);
+ wattrset (win, selected ? item_selected_attr : item_attr);
+ waddwstr (win, &list_item[1]);
+ free (witems);
+ }
+#else /* USE_WIDE_CURSES */
strncpy (list_item, item, item_width);
list_item[item_width] = 0;
@@ -55,6 +73,7 @@ print_item (WINDOW * win, const char *it
mvwaddch(win, choice, item_x, list_item[0]);
wattrset (win, selected ? item_selected_attr : item_attr);
waddstr (win, &list_item[1]);
+#endif /* USE_WIDE_CURSES */
if (selected) {
wmove (win, choice, check_x+1);
wrefresh (win);
@@ -128,6 +147,9 @@ dialog_checklist (const char *title, con
int i, x, y, box_x, box_y;
int key = 0, button = 0, choice = 0, scroll = 0, max_choice, *status;
WINDOW *dialog, *list;
+#ifdef USE_WIDE_CURSES
+ wchar_t *wtitle, *witems;
+#endif /* USE_WIDE_CURSES */
checkflag = flag;
@@ -167,6 +189,25 @@ dialog_checklist (const char *title, con
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
+#ifdef USE_WIDE_CURSES
+ wtitle = to_wchar (title);
+ if (wtitle != NULL && wcslen(wtitle) >= width-2 ) {
+ /* truncate long title -- mec */
+ wchar_t * title2 = malloc((width-2+1)*sizeof(wchar_t));
+ memcpy( title2, wtitle, (width-2)*sizeof(wchar_t));
+ title2[width-2] = '\0';
+ free (wtitle);
+ wtitle = title2;
+ }
+
+ if (wtitle != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - wcslen(wtitle))/2 - 1, ' ');
+ waddwstr (dialog, wtitle);
+ waddch (dialog, ' ');
+ free (wtitle);
+ }
+#else /* USE_WIDE_CURSES */
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
@@ -181,6 +222,7 @@ dialog_checklist (const char *title, con
waddstr (dialog, (char *)title);
waddch (dialog, ' ');
}
+#endif /* USE_WIDE_CURSES */
wattrset (dialog, dialog_attr);
print_autowrap (dialog, prompt, width - 2, 1, 3);
@@ -200,8 +242,16 @@ dialog_checklist (const char *title, con
/* Find length of longest item in order to center checklist */
check_x = 0;
- for (i = 0; i < item_no; i++)
+ for (i = 0; i < item_no; i++) {
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[i * 3 + 1]);
+ if (witems)
+ check_x = MAX (check_x, MIN(list_width, wcslen (witems) + 4));
+ free (witems);
+#else /* USE_WIDE_CURSES */
check_x = MAX (check_x, MIN(list_width, strlen (items[i * 3 + 1]) + 4));
+#endif /* USE_WIDE_CURSES */
+ }
check_x = (list_width - check_x) / 2;
item_x = check_x + 4;
@@ -228,12 +278,17 @@ dialog_checklist (const char *title, con
while (key != ESC) {
key = wgetch (dialog);
-
- for (i = 0; i < max_choice; i++)
+ for (i = 0; i < max_choice; i++) {
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[(scroll+i)*3+1]);
+ if (witems && towupper(key) == towupper(witems[0]))
+ break;
+ free (witems);
+#else /* USE_WIDE_CURSES */
if (toupper(key) == toupper(items[(scroll+i)*3+1][0]))
break;
-
-
+#endif /* USE_WIDE_CURSES */
+ }
if ( i < max_choice || key == KEY_UP || key == KEY_DOWN ||
key == '+' || key == '-' ) {
if (key == KEY_UP || key == '-') {
@@ -369,7 +424,6 @@ dialog_checklist (const char *title, con
/* Now, update everything... */
doupdate ();
}
-
delwin (dialog);
free (status);
diff -puN scripts/lxdialog/dialog.h~kconfig-i18n-04-lxdialog-multibyte scripts/lxdialog/dialog.h
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/dialog.h~kconfig-i18n-04-lxdialog-multibyte 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/dialog.h 2005-07-13 18:32:16.000000000 +0200
@@ -36,6 +36,11 @@
#endif
#include CURSES_LOC
+#ifdef USE_WIDE_CURSES
+#include <wchar.h>
+#include <wctype.h>
+#endif
+
/*
* Colors in ncurses 1.9.9e do not work properly since foreground and
* background colors are OR'd rather than separately masked. This version
@@ -158,6 +163,10 @@ void draw_box (WINDOW * win, int y, int
void draw_shadow (WINDOW * win, int y, int x, int height, int width);
int first_alpha (const char *string, const char *exempt);
+#ifdef USE_WIDE_CURSES
+int first_alphaw (const wchar_t *string, const char *exempt);
+wchar_t* to_wchar (const char *mbs);
+#endif
int dialog_yesno (const char *title, const char *prompt, int height, int width);
int dialog_msgbox (const char *title, const char *prompt, int height,
int width, int pause);
diff -puN scripts/lxdialog/inputbox.c~kconfig-i18n-04-lxdialog-multibyte scripts/lxdialog/inputbox.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/inputbox.c~kconfig-i18n-04-lxdialog-multibyte 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/inputbox.c 2005-07-13 18:32:16.000000000 +0200
@@ -50,6 +50,9 @@ dialog_inputbox (const char *title, cons
int input_x = 0, scroll = 0, key = 0, button = -1;
unsigned char *instr = dialog_input_result;
WINDOW *dialog;
+#ifdef USE_WIDE_CURSES
+ wchar_t *wtitle;
+#endif /* USE_WIDE_CURSES */
/* center dialog box on screen */
x = (COLS - width) / 2;
@@ -69,6 +72,25 @@ dialog_inputbox (const char *title, cons
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
+#ifdef USE_WIDE_CURSES
+ wtitle = to_wchar (title);
+ if (wtitle != NULL && wcslen(wtitle) >= width-2 ) {
+ /* truncate long title -- mec */
+ wchar_t * title2 = malloc((width-2+1)*sizeof(wchar_t));
+ memcpy( title2, wtitle, (width-2)*sizeof(wchar_t));
+ title2[width-2] = '\0';
+ free (wtitle);
+ wtitle = title2;
+ }
+
+ if (wtitle != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - wcslen(wtitle))/2 - 1, ' ');
+ waddwstr (dialog, wtitle);
+ waddch (dialog, ' ');
+ free (wtitle);
+ }
+#else /* USE_WIDE_CURSES */
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
@@ -83,6 +105,7 @@ dialog_inputbox (const char *title, cons
waddstr (dialog, (char *)title);
waddch (dialog, ' ');
}
+#endif /* USE_WIDE_CURSES */
wattrset (dialog, dialog_attr);
print_autowrap (dialog, prompt, width - 2, 1, 3);
diff -puN scripts/lxdialog/Makefile~kconfig-i18n-04-lxdialog-multibyte scripts/lxdialog/Makefile
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/Makefile~kconfig-i18n-04-lxdialog-multibyte 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/Makefile 2005-07-13 18:32:16.000000000 +0200
@@ -1,23 +1,39 @@
HOST_EXTRACFLAGS := -DLOCALE
-ifeq ($(shell uname),SunOS)
-HOST_LOADLIBES := -lcurses
-else
-HOST_LOADLIBES := -lncurses
-endif
-ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
- HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
+ifeq (/usr/include/ncursesw/curses.h, $(wildcard /usr/include/ncursesw/curses.h))
+ HOST_EXTRACFLAGS += -I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"
+ HOST_EXTRACFLAGS += -DUSE_WIDE_CURSES
+ NCURSES_LIB := -lncursesw
+else
+ifeq (/usr/include/ncursesw/ncurses.h, $(wildcard /usr/include/ncursesw/ncurses.h))
+ HOST_EXTRACFLAGS += -I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/ncurses.h>"
+ HOST_EXTRACFLAGS += -DUSE_WIDE_CURSES
+ NCURSES_LIB := -lncursesw
else
ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
+ NCURSES_LIB := -lncurses
+else
+ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
+ HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
+ NCURSES_LIB := -lncurses
else
ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
HOST_EXTRACFLAGS += -DCURSES_LOC="<ncurses.h>"
+ NCURSES_LIB := -lncurses
else
- HOST_EXTRACFLAGS += -DCURSES_LOC="<curses.h>"
+ HOST_EXTRACFLAGS += -DCURSES_LOC="<curses.h>"
+endif
endif
endif
endif
+endif
+
+ifeq ($(shell uname),SunOS)
+HOST_LOADLIBES := -lcurses
+else
+HOST_LOADLIBES := $(NCURSES_LIB)
+endif
hostprogs-y := lxdialog
always := ncurses $(hostprogs-y)
@@ -25,8 +41,19 @@ always := ncurses $(hostprogs-y)
lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \
util.o lxdialog.o msgbox.o
+
.PHONY: $(obj)/ncurses
$(obj)/ncurses:
+ @if $$(echo $(HOST_LOADLIBES)|grep -qv "-lnursesw"); then \
+ LANGUAGE=$$(echo $$LANG $$LC_ALL) ;\
+ fi ;\
+ if $$(echo $$LANGUAGE|grep -v "en_"|grep -q ".UTF-8"); \
+ then \
+ echo ;\
+ echo ">> Warning: You need wide Ncurses libraries" ;\
+ echo ">> in order to display UTF-8 characters." ;\
+ echo ;\
+ fi
@echo "main() {}" > lxtemp.c
@if $(HOSTCC) lxtemp.c $(HOST_LOADLIBES); then \
rm -f lxtemp.c a.out; \
diff -puN scripts/lxdialog/menubox.c~kconfig-i18n-04-lxdialog-multibyte scripts/lxdialog/menubox.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/menubox.c~kconfig-i18n-04-lxdialog-multibyte 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/menubox.c 2005-07-13 18:36:59.000000000 +0200
@@ -67,11 +67,20 @@ static void
print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey)
{
int j;
+#ifdef USE_WIDE_CURSES
+ wchar_t menu_item[menu_width+1], *witems, fc[2];
+
+ witems = to_wchar (item);
+ wcsncpy(menu_item, witems, menu_width);
+ menu_item[menu_width] = 0;
+ j = first_alphaw(menu_item, "YyNnMmHh");
+#else /* USE_WIDE_CURSES */
char menu_item[menu_width+1];
strncpy(menu_item, item, menu_width);
menu_item[menu_width] = 0;
j = first_alpha(menu_item, "YyNnMmHh");
+#endif /* USE_WIDE_CURSES */
/* Clear 'residue' of last item */
wattrset (win, menubox_attr);
@@ -82,14 +91,24 @@ print_item (WINDOW * win, const char *it
for (i = 0; i < menu_width; i++)
waddch (win, ' ');
}
-#else
+#else /* OLD_NCURSES */
wclrtoeol(win);
-#endif
+#endif /* OLD_NCURSES */
wattrset (win, selected ? item_selected_attr : item_attr);
+#ifdef USE_WIDE_CURSES
+ mvwaddwstr (win, choice, item_x, menu_item);
+#else /* USE_WIDE_CURSES */
mvwaddstr (win, choice, item_x, menu_item);
+#endif /* USE_WIDE_CURSES */
if (hotkey) {
wattrset (win, selected ? tag_key_selected_attr : tag_key_attr);
+#ifdef USE_WIDE_CURSES
+ fc[0] = menu_item[j];
+ fc[1] = 0;
+ mvwaddwstr(win, choice, item_x+j, fc);
+#else /* USE_WIDE_CURSES */
mvwaddch(win, choice, item_x+j, menu_item[j]);
+#endif /* USE_WIDE_CURSES */
}
if (selected) {
wmove (win, choice, item_x+1);
@@ -172,6 +191,9 @@ dialog_menu (const char *title, const ch
int key = 0, button = 0, scroll = 0, choice = 0, first_item = 0, max_choice;
WINDOW *dialog, *menu;
FILE *f;
+#ifdef USE_WIDE_CURSES
+ wchar_t *wtitle, *witems, *witem2, *wcurrent;
+#endif /* USE_WIDE_CURSES */
max_choice = MIN (menu_height, item_no);
@@ -193,6 +215,24 @@ dialog_menu (const char *title, const ch
wbkgdset (dialog, dialog_attr & A_COLOR);
waddch (dialog, ACS_RTEE);
+#ifdef USE_WIDE_CURSES
+ wtitle = to_wchar (title);
+ if (wtitle != NULL && wcslen(wtitle) >= width-2 ) {
+ /* truncate long title -- mec */
+ wchar_t * title2 = malloc((width-2+1)*sizeof(wchar_t));
+ memcpy( title2, wtitle, (width-2)*sizeof(wchar_t));
+ title2[width-2] = '\0';
+ free (wtitle);
+ wtitle = title2;
+ }
+
+ if (wtitle != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - wcslen(wtitle))/2 - 1, ' ');
+ waddwstr (dialog, wtitle);
+ waddch (dialog, ' ');
+ }
+#else /* USE_WIDE_CURSES */
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
@@ -207,6 +247,7 @@ dialog_menu (const char *title, const ch
waddstr (dialog, (char *)title);
waddch (dialog, ' ');
}
+#endif /* USE_WIDE_CURSES */
wattrset (dialog, dialog_attr);
print_autowrap (dialog, prompt, width - 2, 1, 3);
@@ -229,10 +270,26 @@ dialog_menu (const char *title, const ch
* Set 'choice' to default item.
*/
item_x = 0;
+#ifdef USE_WIDE_CURSES
+ wcurrent = to_wchar (current);
+#endif /* USE_WIDE_CURSES */
for (i = 0; i < item_no; i++) {
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[i * 2 + 1]);
+ witem2 = to_wchar (items[i * 2]);
+ if (witems)
+ item_x = MAX (item_x, MIN(menu_width, wcslen (witems) + 2));
+ if (witem2 && wcurrent && wcscmp(wcurrent, witem2) == 0) choice = i;
+ free (witems);
+ free (witem2);
+#else /* USE_WIDE_CURSES */
item_x = MAX (item_x, MIN(menu_width, strlen (items[i * 2 + 1]) + 2));
if (strcmp(current, items[i*2]) == 0) choice = i;
+#endif /* USE_WIDE_CURSES */
}
+#ifdef USE_WIDE_CURSES
+ free (wcurrent);
+#endif /* USE_WIDE_CURSES */
item_x = (menu_width - item_x) / 2;
@@ -261,8 +318,18 @@ dialog_menu (const char *title, const ch
/* Print the menu */
for (i=0; i < max_choice; i++) {
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[(first_item + i)*2]);
+ if (witems)
+ print_item (menu, items[(first_item + i) * 2 + 1], i, i == choice,
+ (witems[0] != ':'));
+ else
+ print_item (menu, items[(first_item + i) * 2 + 1], i, i == choice, TRUE);
+ free (witems);
+#else /* USE_WIDE_CURSES */
print_item (menu, items[(first_item + i) * 2 + 1], i, i == choice,
(items[(first_item + i)*2][0] != ':'));
+#endif /* USE_WIDE_CURSES */
}
wnoutrefresh (menu);
@@ -284,14 +351,32 @@ dialog_menu (const char *title, const ch
else {
for (i = choice+1; i < max_choice; i++) {
j = first_alpha(items[(scroll+i)*2+1], "YyNnMmHh");
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[(scroll+i)*2+1]);
+ if (key == towlower(witems[j])) {
+ free (witems);
+ break;
+ }
+ free (witems);
+#else /* USE_WIDE_CURSES */
if (key == tolower(items[(scroll+i)*2+1][j]))
break;
+#endif /* USE_WIDE_CURSES */
}
if (i == max_choice)
for (i = 0; i < max_choice; i++) {
j = first_alpha(items[(scroll+i)*2+1], "YyNnMmHh");
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[(scroll+i)*2+1]);
+ if (key == towlower(witems[j])) {
+ free (witems);
+ break;
+ }
+ free (witems);
+#else /* USE_WIDE_CURSES */
if (key == tolower(items[(scroll+i)*2+1][j]))
break;
+#endif /* USE_WIDE_CURSES */
}
}
@@ -300,8 +385,18 @@ dialog_menu (const char *title, const ch
key == '-' || key == '+' ||
key == KEY_PPAGE || key == KEY_NPAGE) {
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[(scroll+choice)*2]);
+ if (witems)
+ print_item (menu, items[(scroll+choice)*2+1], choice, FALSE,
+ (witems[0] != ':'));
+ else
+ print_item (menu, items[(scroll+choice)*2+1], choice, FALSE, TRUE);
+ free (witems);
+#else /* USE_WIDE_CURSES */
print_item (menu, items[(scroll+choice)*2+1], choice, FALSE,
(items[(scroll+choice)*2][0] != ':'));
+#endif /* USE_WIDE_CURSES */
if (key == KEY_UP || key == '-') {
if (choice < 2 && scroll) {
@@ -312,15 +407,35 @@ dialog_menu (const char *title, const ch
scroll--;
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[scroll*2]);
+ if (witems)
+ print_item (menu, items[scroll*2+1], 0, FALSE,
+ (witems[0] != ':'));
+ else
+ print_item (menu, items[scroll*2+1], 0, FALSE, TRUE);
+ free (witems);
+#else /* USE_WIDE_CURSES */
print_item (menu, items[scroll * 2 + 1], 0, FALSE,
(items[scroll*2][0] != ':'));
+#endif /* USE_WIDE_CURSES */
} else
choice = MAX(choice - 1, 0);
} else if (key == KEY_DOWN || key == '+') {
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[(scroll+choice)*2]);
+ if (witems)
+ print_item (menu, items[(scroll+choice)*2+1], choice, FALSE,
+ (witems[0] != ':'));
+ else
+ print_item (menu, items[(scroll+choice)*2+1], choice, FALSE, TRUE);
+ free (witems);
+#else /* USE_WIDE_CURSES */
print_item (menu, items[(scroll+choice)*2+1], choice, FALSE,
(items[(scroll+choice)*2][0] != ':'));
+#endif /* USE_WIDE_CURSES */
if ((choice > max_choice-3) &&
(scroll + max_choice < item_no)
@@ -332,9 +447,20 @@ dialog_menu (const char *title, const ch
scroll++;
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[(scroll+max_choice-1)*2]);
+ if (witems)
+ print_item (menu, items[(scroll+max_choice-1)*2+1],
+ max_choice-1, FALSE,
+ (witems[0] != ':'));
+ else
+ print_item (menu, items[(scroll+max_choice-1)*2+1], max_choice-1, FALSE, TRUE);
+ free (witems);
+#else /* USE_WIDE_CURSES */
print_item (menu, items[(scroll+max_choice-1)*2+1],
max_choice-1, FALSE,
(items[(scroll+max_choice-1)*2][0] != ':'));
+#endif /* USE_WIDE_CURSES */
} else
choice = MIN(choice+1, max_choice-1);
@@ -344,8 +470,18 @@ dialog_menu (const char *title, const ch
if (scroll > 0) {
wscrl (menu, -1);
scroll--;
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[scroll*2]);
+ if (witems)
+ print_item (menu, items[scroll * 2 + 1], 0, FALSE,
+ (witems[0] != ':'));
+ else
+ print_item (menu, items[scroll * 2 + 1], 0, FALSE, TRUE);
+ free (witems);
+#else /* USE_WIDE_CURSES */
print_item (menu, items[scroll * 2 + 1], 0, FALSE,
(items[scroll*2][0] != ':'));
+#endif /* USE_WIDE_CURSES */
} else {
if (choice > 0)
choice--;
@@ -360,9 +496,20 @@ dialog_menu (const char *title, const ch
wscrl (menu, 1);
scrollok (menu, FALSE);
scroll++;
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[(scroll+max_choice-1)*2]);
+ if (witems)
+ print_item (menu, items[(scroll+max_choice-1)*2+1],
+ max_choice-1, FALSE,
+ (witems[0] != ':'));
+ else
+ print_item (menu, items[(scroll+max_choice-1)*2+1], max_choice-1, FALSE, TRUE);
+ free (witems);
+#else /* USE_WIDE_CURSES */
print_item (menu, items[(scroll+max_choice-1)*2+1],
max_choice-1, FALSE,
(items[(scroll+max_choice-1)*2][0] != ':'));
+#endif /* USE_WIDE_CURSES */
} else {
if (choice+1 < max_choice)
choice++;
@@ -372,8 +519,18 @@ dialog_menu (const char *title, const ch
} else
choice = i;
+#ifdef USE_WIDE_CURSES
+ witems = to_wchar (items[(scroll+choice)*2]);
+ if (witems)
+ print_item (menu, items[(scroll+choice)*2+1], choice, TRUE,
+ (witems[0] != ':'));
+ else
+ print_item (menu, items[(scroll+choice)*2+1], choice, TRUE, TRUE);
+ free (witems);
+#else /* USE_WIDE_CURSES */
print_item (menu, items[(scroll+choice)*2+1], choice, TRUE,
(items[(scroll+choice)*2][0] != ':'));
+#endif /* USE_WIDE_CURSES */
print_arrows(dialog, item_no, scroll,
box_y, box_x+item_x+1, menu_height);
diff -puN scripts/lxdialog/msgbox.c~kconfig-i18n-04-lxdialog-multibyte scripts/lxdialog/msgbox.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/msgbox.c~kconfig-i18n-04-lxdialog-multibyte 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/msgbox.c 2005-07-13 18:32:16.000000000 +0200
@@ -31,6 +31,9 @@ dialog_msgbox (const char *title, const
{
int i, x, y, key = 0;
WINDOW *dialog;
+#ifdef USE_WIDE_CURSES
+ wchar_t *wtitle;
+#endif /* USE_WIDE_CURSES */
/* center dialog box on screen */
x = (COLS - width) / 2;
@@ -43,6 +46,24 @@ dialog_msgbox (const char *title, const
draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);
+#ifdef USE_WIDE_CURSES
+ wtitle = to_wchar (title);
+ if (wtitle != NULL && wcslen(wtitle) >= width-2 ) {
+ /* truncate long title -- mec */
+ wchar_t * title2 = malloc((width-2+1)*sizeof(wchar_t));
+ memcpy( title2, wtitle, (width-2)*sizeof(wchar_t));
+ title2[width-2] = '\0';
+ free (wtitle);
+ wtitle = title2;
+ }
+
+ if (wtitle != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - wcslen(wtitle))/2 - 1, ' ');
+ waddwstr (dialog, wtitle);
+ waddch (dialog, ' ');
+ }
+#else /* USE_WIDE_CURSES */
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
@@ -57,6 +78,7 @@ dialog_msgbox (const char *title, const
waddstr (dialog, (char *)title);
waddch (dialog, ' ');
}
+#endif /* USE_WIDE_CURSES */
wattrset (dialog, dialog_attr);
print_autowrap (dialog, prompt, width - 2, 1, 2);
diff -puN scripts/lxdialog/textbox.c~kconfig-i18n-04-lxdialog-multibyte scripts/lxdialog/textbox.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/textbox.c~kconfig-i18n-04-lxdialog-multibyte 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/textbox.c 2005-07-13 18:32:16.000000000 +0200
@@ -41,6 +41,9 @@ dialog_textbox (const char *title, const
int passed_end;
char search_term[MAX_LEN + 1];
WINDOW *dialog, *text;
+#ifdef USE_WIDE_CURSES
+ wchar_t *wtitle;
+#endif /* USE_WIDE_CURSES */
search_term[0] = '\0'; /* no search term entered yet */
@@ -106,6 +109,24 @@ dialog_textbox (const char *title, const
wbkgdset (dialog, dialog_attr & A_COLOR);
waddch (dialog, ACS_RTEE);
+#ifdef USE_WIDE_CURSES
+ wtitle = to_wchar (title);
+ if (wtitle != NULL && wcslen(wtitle) >= width-2 ) {
+ /* truncate long title -- mec */
+ wchar_t * title2 = malloc((width-2+1)*sizeof(wchar_t));
+ memcpy( title2, wtitle, (width-2)*sizeof(wchar_t));
+ title2[width-2] = '\0';
+ free (wtitle);
+ wtitle = title2;
+ }
+
+ if (wtitle != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - wcslen(wtitle))/2 - 1, ' ');
+ waddwstr (dialog, wtitle);
+ waddch (dialog, ' ');
+ }
+#else /* USE_WIDE_CURSES */
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
@@ -120,6 +141,7 @@ dialog_textbox (const char *title, const
waddstr (dialog, (char *)title);
waddch (dialog, ' ');
}
+#endif /* USE_WIDE_CURSES */
print_button (dialog, _(" Exit "), height - 2, width / 2 - 4, TRUE);
wnoutrefresh (dialog);
getyx (dialog, cur_y, cur_x); /* Save cursor position */
@@ -461,9 +483,17 @@ print_line (WINDOW * win, int row, int w
{
int y, x;
char *line;
+#ifdef USE_WIDE_CURSES
+ wchar_t *wline;
line = get_line ();
+ wline = to_wchar (line);
+ if (wline)
+ line += MIN (wcslen (wline), hscroll); /* Scroll horizontally */
+#else /* USE_WIDE_CURSES */
+ line = get_line ();
line += MIN (strlen (line), hscroll); /* Scroll horizontally */
+#endif /* USE_WIDE_CURSES */
wmove (win, row, 0); /* move cursor to correct line */
waddch (win, ' ');
waddnstr (win, line, MIN (strlen (line), width - 2));
@@ -476,9 +506,9 @@ print_line (WINDOW * win, int row, int w
for (i = 0; i < width - x; i++)
waddch (win, ' ');
}
-#else
+#else /* OLD_NCURSES */
wclrtoeol(win);
-#endif
+#endif /* OLD_NCURSES */
}
/*
diff -puN scripts/lxdialog/util.c~kconfig-i18n-04-lxdialog-multibyte scripts/lxdialog/util.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/util.c~kconfig-i18n-04-lxdialog-multibyte 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/util.c 2005-07-13 18:32:16.000000000 +0200
@@ -199,12 +199,63 @@ print_autowrap (WINDOW * win, const char
{
int newl, cur_x, cur_y;
int i, prompt_len, room, wlen;
+#ifdef USE_WIDE_CURSES
+ wchar_t *tempstr, *word, *sp, *sp2;
+
+ tempstr = to_wchar (prompt);
+
+ prompt_len = wcslen(tempstr);
+ /*
+ * Remove newlines
+ */
+ for(i=0; i<prompt_len; i++) {
+ if(tempstr[i] == '\n') tempstr[i] = ' ';
+ }
+
+ if (prompt_len <= width - x * 2) { /* If prompt is short */
+ wmove (win, y, (width - prompt_len) / 2);
+ waddwstr (win, tempstr);
+ } else {
+ cur_x = x;
+ cur_y = y;
+ newl = 1;
+ word = tempstr;
+ while (word && *word) {
+ sp = wcschr(word, ' ');
+ if (sp)
+ *sp++ = 0;
+ /* Wrap to next line if either the word does not fit,
+ or it is the first word of a new sentence, and it is
+ short, and the next word does not fit. */
+ room = width - cur_x;
+ wlen = wcslen(word);
+ if (wlen > room ||
+ (newl && wlen < 4 && sp && wlen+1+wcslen(sp) > room
+ && (!(sp2 = wcschr(sp, ' ')) || wlen+1+(sp2-sp) > room))) {
+ cur_y++;
+ cur_x = x;
+ }
+ wmove (win, cur_y, cur_x);
+ waddwstr (win, word);
+ getyx (win, cur_y, cur_x);
+ cur_x++;
+ if (sp && *sp == ' ') {
+ cur_x++; /* double space */
+
+ while (*++sp == ' ');
+ newl = 1;
+ } else
+ newl = 0;
+ word = sp;
+ }
+ }
+#else /* USE_WIDE_CURSES */
char tempstr[MAX_LEN + 1], *word, *sp, *sp2;
strcpy (tempstr, prompt);
prompt_len = strlen(tempstr);
-
+
/*
* Remove newlines
*/
@@ -249,6 +300,7 @@ print_autowrap (WINDOW * win, const char
word = sp;
}
}
+#endif /* USE_WIDE_CURSES */
}
/*
@@ -258,6 +310,9 @@ void
print_button (WINDOW * win, const char *label, int y, int x, int selected)
{
int i, temp;
+#ifdef USE_WIDE_CURSES
+ wchar_t *wlabel, fc[2];
+#endif /* USE_WIDE_CURSES */
wmove (win, y, x);
wattrset (win, selected ? button_active_attr : button_inactive_attr);
@@ -270,10 +325,22 @@ print_button (WINDOW * win, const char *
waddch (win, ' ');
wattrset (win, selected ? button_key_active_attr
: button_key_inactive_attr);
+#ifdef USE_WIDE_CURSES
+ wlabel = to_wchar (label);
+ memset (&fc, 0, 2*sizeof(wchar_t));
+ if (wlabel) {
+ fc[0] = wlabel[0];
+ waddwstr (win, fc);
+ wattrset (win, selected ? button_label_active_attr
+ : button_label_inactive_attr);
+ waddwstr (win, &wlabel[1]);
+ }
+#else /* USE_WIDE_CURSES */
waddch (win, label[0]);
wattrset (win, selected ? button_label_active_attr
: button_label_inactive_attr);
waddstr (win, (char *)label + 1);
+#endif /* USE_WIDE_CURSES */
wattrset (win, selected ? button_active_attr : button_inactive_attr);
waddstr (win, ">");
wmove (win, y, x + temp + 1);
@@ -342,18 +409,83 @@ draw_shadow (WINDOW * win, int y, int x,
int
first_alpha(const char *string, const char *exempt)
{
- int i, in_paren=0, c;
+#ifdef USE_WIDE_CURSES
+ int ret;
+ wchar_t *wstring;
+
+ wstring = to_wchar (string);
+ if (!wstring)
+ return 0;
- for (i = 0; i < strlen(string); i++) {
- c = tolower(string[i]);
+ ret = first_alphaw (wstring, exempt);
+ free (wstring);
+
+ return ret;
+#else /* USE_WIDE_CURSES */
+ int i, in_paren=0, c;
+
+ for (i = 0; i < strlen(string); i++) {
+ c = tolower(string[i]);
+
+ if (strchr("<[(", c)) ++in_paren;
+ if (strchr(">])", c) && in_paren > 0) --in_paren;
+
+ if ((! in_paren) && isalpha(c) &&
+ strchr(exempt, c) == 0)
+ return i;
+ }
+ return 0;
+#endif /* USE_WIDE_CURSES */
+}
+
+#ifdef USE_WIDE_CURSES
+int
+first_alphaw(const wchar_t *wstring, const char *exempt)
+{
+ int i, in_paren=0;
+ wchar_t c, token1[4], token2[4], wexempt[200];
+
+ if (mbstowcs(token1, "<[(", 3) < 0)
+ return 0;
+ if (mbstowcs(token2, ">])", 3) < 0)
+ return 0;
+ if (mbstowcs(wexempt, exempt, 200) < 0)
+ return 0;
- if (strchr("<[(", c)) ++in_paren;
- if (strchr(">])", c) && in_paren > 0) --in_paren;
+ for (i = 0; i < wcslen(wstring); i++) {
+ c = towlower(wstring[i]);
- if ((! in_paren) && isalpha(c) &&
- strchr(exempt, c) == 0)
+ if (wcschr(token1, c)) ++in_paren;
+ if (wcschr(token2, c) && in_paren > 0) --in_paren;
+
+ if ((! in_paren) && iswalpha(c) &&
+ wcschr(wexempt, c) == 0) {
return i;
+ }
}
return 0;
}
+
+wchar_t* to_wchar (const char *mbs)
+{
+ mbstate_t state;
+ wchar_t *wcs;
+ const char *mbsptr;
+
+ if (mbs) {
+ wcs = (wchar_t*) malloc ((2+strlen(mbs))*sizeof(wchar_t));
+ memset (&state, 0, sizeof(state));
+ mbsptr = mbs;
+ if (mbsrtowcs (wcs, &mbsptr, strlen(mbs)+1, &state) < 0) {
+ free (wcs);
+ wcs = 0;
+ }
+ }
+ else
+ wcs = 0;
+
+ return wcs;
+}
+#endif /* USE_WIDE_CURSES */
+
diff -puN scripts/lxdialog/yesno.c~kconfig-i18n-04-lxdialog-multibyte scripts/lxdialog/yesno.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/yesno.c~kconfig-i18n-04-lxdialog-multibyte 2005-07-13 18:32:16.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/yesno.c 2005-07-13 18:36:59.000000000 +0200
@@ -45,6 +45,9 @@ dialog_yesno (const char *title, const c
{
int i, x, y, key = 0, button = 0;
WINDOW *dialog;
+#ifdef USE_WIDE_CURSES
+ wchar_t *wtitle;
+#endif /* USE_WIDE_CURSES */
/* center dialog box on screen */
x = (COLS - width) / 2;
@@ -63,6 +66,24 @@ dialog_yesno (const char *title, const c
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
+#ifdef USE_WIDE_CURSES
+ wtitle = to_wchar (title);
+ if (wtitle != NULL && wcslen(wtitle) >= width-2 ) {
+ /* truncate long title -- mec */
+ wchar_t * title2 = malloc((width-2+1)*sizeof(wchar_t));
+ memcpy( title2, wtitle, (width-2)*sizeof(wchar_t) );
+ title2[width-2] = '\0';
+ free (wtitle);
+ wtitle = title2;
+ }
+
+ if (wtitle != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - wcslen(wtitle))/2 - 1, ' ');
+ waddwstr (dialog, wtitle);
+ waddch (dialog, ' ');
+ }
+#else /* USE_WIDE_CURSES */
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
@@ -77,6 +98,7 @@ dialog_yesno (const char *title, const c
waddstr (dialog, (char *)title);
waddch (dialog, ' ');
}
+#endif /* USE_WIDE_CURSES */
wattrset (dialog, dialog_attr);
print_autowrap (dialog, prompt, width - 2, 1, 3);
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 5/19] Kconfig I18N: lxdialog: answering
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (3 preceding siblings ...)
2005-07-13 17:11 ` [PATCH 4/19] Kconfig I18N: lxdialog: multibyte character support Egry Gábor
@ 2005-07-13 17:13 ` Egry Gábor
2005-07-13 17:15 ` [PATCH 6/19] Kconfig I18N: config Egry Gábor
` (16 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:13 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
I18N support for answering in lxdialog. This patch is useful for
non-latin based languages.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/lxdialog/menubox.c | 33 ++++++++++++++++++++++++++++++++-
scripts/lxdialog/yesno.c | 33 +++++++++++++++++++++++++++++++--
2 files changed, 63 insertions(+), 3 deletions(-)
diff -puN scripts/lxdialog/yesno.c~kconfig-i18n-05-lxdialog-key scripts/lxdialog/yesno.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/yesno.c~kconfig-i18n-05-lxdialog-key 2005-07-13 18:32:17.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/yesno.c 2005-07-13 18:32:17.000000000 +0200
@@ -43,10 +43,12 @@ print_buttons(WINDOW *dialog, int height
int
dialog_yesno (const char *title, const char *prompt, int height, int width)
{
- int i, x, y, key = 0, button = 0;
+ int i, x, y, key = 0, answer = 0, button = 0;
WINDOW *dialog;
#ifdef USE_WIDE_CURSES
- wchar_t *wtitle;
+ wchar_t *wtitle, *yes, *Yes, *no, *No;
+#else /* USE_WIDE_CURSES */
+ const char *yes, *Yes, *no, *No;
#endif /* USE_WIDE_CURSES */
/* center dialog box on screen */
@@ -107,6 +109,33 @@ dialog_yesno (const char *title, const c
while (key != ESC) {
key = wgetch (dialog);
+#ifdef USE_WIDE_CURSES
+ yes = to_wchar (_("y"));
+ Yes = to_wchar (_("Y"));
+ no = to_wchar (_("n"));
+ No = to_wchar (_("N"));
+#else /* USE_WIDE_CURSES */
+ yes = _("y");
+ Yes = _("Y");
+ no = _("n");
+ No = _("N");
+#endif /* USE_WIDE_CURSES */
+ if (yes && (yes[0] == key))
+ answer = 'y';
+ if (Yes && (Yes[0] == key))
+ answer = 'Y';
+ if (no && (no[0] == key))
+ answer = 'n';
+ if (No && (No[0] == key))
+ answer = 'N';
+#ifdef USE_WIDE_CURSES
+ free (yes);
+ free (Yes);
+ free (no);
+ free (No);
+#endif /* USE_WIDE_CURSES */
+ if (answer)
+ key = answer;
switch (key) {
case 'Y':
case 'y':
diff -puN scripts/lxdialog/menubox.c~kconfig-i18n-05-lxdialog-key scripts/lxdialog/menubox.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/lxdialog/menubox.c~kconfig-i18n-05-lxdialog-key 2005-07-13 18:32:17.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/lxdialog/menubox.c 2005-07-13 18:32:17.000000000 +0200
@@ -189,10 +189,14 @@ dialog_menu (const char *title, const ch
{
int i, j, x, y, box_x, box_y;
int key = 0, button = 0, scroll = 0, choice = 0, first_item = 0, max_choice;
+ int answer = 0;
WINDOW *dialog, *menu;
FILE *f;
#ifdef USE_WIDE_CURSES
wchar_t *wtitle, *witems, *witem2, *wcurrent;
+ wchar_t *yes, *Yes, *no, *No;
+#else /* USE_WIDE_CURSES */
+ const char *yes, *Yes, *no, *No;
#endif /* USE_WIDE_CURSES */
max_choice = MIN (menu_height, item_no);
@@ -541,7 +545,34 @@ dialog_menu (const char *title, const ch
continue; /* wait for another key press */
}
- switch (key) {
+#ifdef USE_WIDE_CURSES
+ yes = to_wchar (_("y"));
+ Yes = to_wchar (_("Y"));
+ no = to_wchar (_("n"));
+ No = to_wchar (_("N"));
+#else /* USE_WIDE_CURSES */
+ yes = _("y");
+ Yes = _("Y");
+ no = _("n");
+ No = _("N");
+#endif /* USE_WIDE_CURSES */
+ if (yes && (yes[0] == key))
+ answer = 'y';
+ if (Yes && (Yes[0] == key))
+ answer = 'Y';
+ if (no && (no[0] == key))
+ answer = 'n';
+ if (No && (No[0] == key))
+ answer = 'N';
+#ifdef USE_WIDE_CURSES
+ free (yes);
+ free (Yes);
+ free (no);
+ free (No);
+#endif /* USE_WIDE_CURSES */
+ if (answer)
+ key = answer;
+ switch (key) {
case KEY_LEFT:
case TAB:
case KEY_RIGHT:
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 6/19] Kconfig I18N: config
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (4 preceding siblings ...)
2005-07-13 17:13 ` [PATCH 5/19] Kconfig I18N: lxdialog: answering Egry Gábor
@ 2005-07-13 17:15 ` Egry Gábor
2005-07-13 17:17 ` [PATCH 7/19] Kconfig I18N: gconfig Egry Gábor
` (15 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:15 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
I18N support for conf.c .
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/conf.c | 44 ++++++++++++++++++++++++--------------------
1 files changed, 24 insertions(+), 20 deletions(-)
diff -puN scripts/kconfig/conf.c~kconfig-i18n-06-config-i18n scripts/kconfig/conf.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/conf.c~kconfig-i18n-06-config-i18n 2005-07-13 18:32:17.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/conf.c 2005-07-13 18:32:17.000000000 +0200
@@ -69,7 +69,7 @@ static void conf_askvalue(struct symbol
tristate val;
if (!sym_has_value(sym))
- printf("(NEW) ");
+ printf(_("(NEW) "));
line[0] = '\n';
line[1] = 0;
@@ -164,7 +164,7 @@ int conf_string(struct menu *menu)
const char *def, *help;
while (1) {
- printf("%*s%s ", indent - 1, "", menu->prompt->text);
+ printf("%*s%s ", indent - 1, "", _(menu->prompt->text));
printf("(%s) ", sym->name);
def = sym_get_string_value(sym);
if (sym_get_string_value(sym))
@@ -176,10 +176,10 @@ int conf_string(struct menu *menu)
case '?':
/* print help */
if (line[1] == '\n') {
- help = nohelp_text;
+ help = _(nohelp_text);
if (menu->sym->help)
- help = menu->sym->help;
- printf("\n%s\n", menu->sym->help);
+ help = _(menu->sym->help);
+ printf("\n%s\n", help);
def = NULL;
break;
}
@@ -200,7 +200,7 @@ static int conf_sym(struct menu *menu)
const char *help;
while (1) {
- printf("%*s%s ", indent - 1, "", menu->prompt->text);
+ printf("%*s%s ", indent - 1, "", _(menu->prompt->text));
if (sym->name)
printf("(%s) ", sym->name);
type = sym_get_type(sym);
@@ -259,9 +259,9 @@ static int conf_sym(struct menu *menu)
if (sym_set_tristate_value(sym, newval))
return 0;
help:
- help = nohelp_text;
+ help = _(nohelp_text);
if (sym->help)
- help = sym->help;
+ help = _(sym->help);
printf("\n%s\n", help);
}
}
@@ -292,7 +292,7 @@ static int conf_choice(struct menu *menu
case no:
return 1;
case mod:
- printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
+ printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu)));
return 0;
case yes:
break;
@@ -302,7 +302,7 @@ static int conf_choice(struct menu *menu
while (1) {
int cnt, def;
- printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
+ printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu)));
def_sym = sym_get_choice_value(sym);
cnt = def = 0;
line[0] = '0';
@@ -311,7 +311,7 @@ static int conf_choice(struct menu *menu
if (!menu_is_visible(child))
continue;
if (!child->sym) {
- printf("%*c %s\n", indent, '*', menu_get_prompt(child));
+ printf("%*c %s\n", indent, '*', _(menu_get_prompt(child)));
continue;
}
cnt++;
@@ -320,14 +320,14 @@ static int conf_choice(struct menu *menu
printf("%*c", indent, '>');
} else
printf("%*c", indent, ' ');
- printf(" %d. %s", cnt, menu_get_prompt(child));
+ printf(" %d. %s", cnt, _(menu_get_prompt(child)));
if (child->sym->name)
printf(" (%s)", child->sym->name);
if (!sym_has_value(child->sym))
- printf(" (NEW)");
+ printf(_(" (NEW)"));
printf("\n");
}
- printf("%*schoice", indent - 1, "");
+ printf(_("%*schoice"), indent - 1, "");
if (cnt == 1) {
printf("[1]: 1\n");
goto conf_childs;
@@ -351,7 +351,7 @@ static int conf_choice(struct menu *menu
strip(line);
if (line[0] == '?') {
printf("\n%s\n", menu->sym->help ?
- menu->sym->help : nohelp_text);
+ _(menu->sym->help) : _(nohelp_text));
continue;
}
if (!line[0])
@@ -383,7 +383,7 @@ static int conf_choice(struct menu *menu
continue;
if (line[strlen(line) - 1] == '?') {
printf("\n%s\n", child->sym->help ?
- child->sym->help : nohelp_text);
+ _(child->sym->help) : _(nohelp_text));
continue;
}
sym_set_choice_value(sym, child->sym);
@@ -417,7 +417,7 @@ static void conf(struct menu *menu)
return;
}
case P_COMMENT:
- prompt = menu_get_prompt(menu);
+ prompt = _(menu_get_prompt(menu));
if (prompt)
printf("%*c\n%*c %s\n%*c\n",
indent, '*',
@@ -488,6 +488,10 @@ int main(int ac, char **av)
const char *name;
struct stat tmpstat;
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
if (ac > i && av[i][0] == '-') {
switch (av[i++][1]) {
case 'o':
@@ -524,7 +528,7 @@ int main(int ac, char **av)
break;
case 'h':
case '?':
- printf("%s [-o|-s] config\n", av[0]);
+ printf(_("%s [-o|-s] config\n"), av[0]);
exit(0);
}
}
@@ -539,9 +543,9 @@ int main(int ac, char **av)
if (!defconfig_file)
defconfig_file = conf_get_default_confname();
if (conf_read(defconfig_file)) {
- printf("***\n"
+ printf(_("***\n"
"*** Can't find default configuration \"%s\"!\n"
- "***\n", defconfig_file);
+ "***\n"), defconfig_file);
exit(1);
}
break;
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 7/19] Kconfig I18N: gconfig
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (5 preceding siblings ...)
2005-07-13 17:15 ` [PATCH 6/19] Kconfig I18N: config Egry Gábor
@ 2005-07-13 17:17 ` Egry Gábor
2005-07-13 17:18 ` [PATCH 8/19] Kconfig I18N: gconfig: GUI Egry Gábor
` (14 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:17 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
Full I18N support for gconf.c .
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/gconf.c | 58 ++++++++++++++++++++++++------------------------
1 files changed, 29 insertions(+), 29 deletions(-)
diff -puN scripts/kconfig/gconf.c~kconfig-i18n-07-gconfig-i18n scripts/kconfig/gconf.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/gconf.c~kconfig-i18n-07-gconfig-i18n 2005-07-13 18:32:17.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/gconf.c 2005-07-13 18:36:52.000000000 +0200
@@ -87,19 +87,19 @@ const char *dbg_print_stype(int val)
bzero(buf, 256);
if (val == S_UNKNOWN)
- strcpy(buf, "unknown");
+ strcpy(buf, _("unknown"));
if (val == S_BOOLEAN)
- strcpy(buf, "boolean");
+ strcpy(buf, _("boolean"));
if (val == S_TRISTATE)
- strcpy(buf, "tristate");
+ strcpy(buf, _("tristate"));
if (val == S_INT)
- strcpy(buf, "int");
+ strcpy(buf, _("int"));
if (val == S_HEX)
- strcpy(buf, "hex");
+ strcpy(buf, _("hex"));
if (val == S_STRING)
- strcpy(buf, "string");
+ strcpy(buf, _("string"));
if (val == S_OTHER)
- strcpy(buf, "other");
+ strcpy(buf, _("other"));
#ifdef DEBUG
printf("%s", buf);
@@ -115,33 +115,33 @@ const char *dbg_print_flags(int val)
bzero(buf, 256);
if (val & SYMBOL_YES)
- strcat(buf, "yes/");
+ strcat(buf, _("yes/"));
if (val & SYMBOL_MOD)
- strcat(buf, "mod/");
+ strcat(buf, _("mod/"));
if (val & SYMBOL_NO)
- strcat(buf, "no/");
+ strcat(buf, _("no/"));
if (val & SYMBOL_CONST)
- strcat(buf, "const/");
+ strcat(buf, _("const/"));
if (val & SYMBOL_CHECK)
- strcat(buf, "check/");
+ strcat(buf, _("check/"));
if (val & SYMBOL_CHOICE)
- strcat(buf, "choice/");
+ strcat(buf, _("choice/"));
if (val & SYMBOL_CHOICEVAL)
- strcat(buf, "choiceval/");
+ strcat(buf, _("choiceval/"));
if (val & SYMBOL_PRINTED)
- strcat(buf, "printed/");
+ strcat(buf, _("printed/"));
if (val & SYMBOL_VALID)
- strcat(buf, "valid/");
+ strcat(buf, _("valid/"));
if (val & SYMBOL_OPTIONAL)
- strcat(buf, "optional/");
+ strcat(buf, _("optional/"));
if (val & SYMBOL_WRITE)
- strcat(buf, "write/");
+ strcat(buf, _("write/"));
if (val & SYMBOL_CHANGED)
- strcat(buf, "changed/");
+ strcat(buf, _("changed/"));
if (val & SYMBOL_NEW)
- strcat(buf, "new/");
+ strcat(buf, _("new/"));
if (val & SYMBOL_AUTO)
- strcat(buf, "auto/");
+ strcat(buf, _("auto/"));
buf[strlen(buf) - 1] = '\0';
#ifdef DEBUG
@@ -158,17 +158,17 @@ const char *dbg_print_ptype(int val)
bzero(buf, 256);
if (val == P_UNKNOWN)
- strcpy(buf, "unknown");
+ strcpy(buf, _("unknown"));
if (val == P_PROMPT)
- strcpy(buf, "prompt");
+ strcpy(buf, _("prompt"));
if (val == P_COMMENT)
- strcpy(buf, "comment");
+ strcpy(buf, _("comment"));
if (val == P_MENU)
- strcpy(buf, "menu");
+ strcpy(buf, _("menu"));
if (val == P_DEFAULT)
- strcpy(buf, "default");
+ strcpy(buf, _("default"));
if (val == P_CHOICE)
- strcpy(buf, "choice");
+ strcpy(buf, _("choice"));
#ifdef DEBUG
printf("%s", buf);
@@ -1190,7 +1190,7 @@ static gchar **fill_row(struct menu *men
row[COL_OPTION] =
g_strdup_printf("%s %s", menu_get_prompt(menu),
sym ? (sym->
- flags & SYMBOL_NEW ? "(NEW)" : "") :
+ flags & SYMBOL_NEW ? _("(NEW)") : "") :
"");
if (show_all && !menu_is_visible(menu))
@@ -1614,7 +1614,7 @@ int main(int ac, char *av[])
break;
case 'h':
case '?':
- printf("%s <config>\n", av[0]);
+ printf(_("%s <config>\n"), av[0]);
exit(0);
}
name = av[2];
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 8/19] Kconfig I18N: gconfig: GUI
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (6 preceding siblings ...)
2005-07-13 17:17 ` [PATCH 7/19] Kconfig I18N: gconfig Egry Gábor
@ 2005-07-13 17:18 ` Egry Gábor
2005-07-13 17:20 ` [PATCH 9/19] Kconfig I18N: gconfig: answering Egry Gábor
` (13 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:18 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
I18N support for menu and toolbar.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/Makefile | 7 +++++--
scripts/kconfig/POTFILES.in | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff -puN scripts/kconfig/POTFILES.in~kconfig-i18n-08-gconfig-gui scripts/kconfig/POTFILES.in
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/POTFILES.in~kconfig-i18n-08-gconfig-gui 2005-07-13 18:32:17.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/POTFILES.in 2005-07-13 18:32:17.000000000 +0200
@@ -10,4 +10,5 @@ scripts/kconfig/mconf.c
scripts/kconfig/conf.c
scripts/kconfig/confdata.c
scripts/kconfig/gconf.c
+scripts/kconfig/gconf.glade.h
scripts/kconfig/qconf.cc
diff -puN scripts/kconfig/Makefile~kconfig-i18n-08-gconfig-gui scripts/kconfig/Makefile
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/Makefile~kconfig-i18n-08-gconfig-gui 2005-07-13 18:32:17.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/Makefile 2005-07-13 18:32:17.000000000 +0200
@@ -29,7 +29,7 @@ silentoldconfig: $(obj)/conf
$(Q)sh $(obj)/set_locale.sh
$< -s arch/$(ARCH)/Kconfig
-update-po-config: $(obj)/kxgettext
+update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
xgettext --default-domain=linux \
--add-comments --keyword=_ --keyword=N_ \
--files-from=scripts/kconfig/POTFILES.in \
@@ -108,7 +108,8 @@ gconf-objs := gconf.o kconfig_load.o zco
endif
clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
- .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
+ .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c \
+ gconf.glade.h
# generated files seem to need this to find local include files
HOSTCFLAGS_lex.zconf.o := -I$(src)
@@ -201,6 +202,8 @@ $(obj)/%.moc: $(src)/%.h
$(obj)/lkc_defs.h: $(src)/lkc_proto.h
sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
+$(obj)/gconf.glade.h: $(obj)/gconf.glade
+ intltool-extract --type=gettext/glade $(obj)/gconf.glade
###
# The following requires flex/bison
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 9/19] Kconfig I18N: gconfig: answering
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (7 preceding siblings ...)
2005-07-13 17:18 ` [PATCH 8/19] Kconfig I18N: gconfig: GUI Egry Gábor
@ 2005-07-13 17:20 ` Egry Gábor
2005-07-13 17:21 ` [PATCH 10/19] Kconfig I18N: gconfig: missing macros Egry Gábor
` (12 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:20 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
I18N support for answering in gconfig. This patch is useful for
non-latin based languages.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/gconf.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff -puN scripts/kconfig/gconf.c~kconfig-i18n-09-gconfig-key-i18n scripts/kconfig/gconf.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/gconf.c~kconfig-i18n-09-gconfig-key-i18n 2005-07-13 18:32:18.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/gconf.c 2005-07-13 18:36:51.000000000 +0200
@@ -407,19 +407,19 @@ void init_right_tree(void)
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
- "N", renderer,
+ _("N"), renderer,
"text", COL_NO,
"foreground-gdk",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
- "M", renderer,
+ _("M"), renderer,
"text", COL_MOD,
"foreground-gdk",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
- "Y", renderer,
+ _("Y"), renderer,
"text", COL_YES,
"foreground-gdk",
COL_COLOR, NULL);
@@ -1102,11 +1102,11 @@ on_treeview2_key_press_event(GtkWidget *
gtk_tree_model_get_iter(model2, &iter, path);
gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
- if (!strcasecmp(event->string, "n"))
+ if ((!strcmp(event->string, _("n"))) || (!strcmp(event->string, _("N"))))
col = COL_NO;
- else if (!strcasecmp(event->string, "m"))
+ else if ((!strcmp(event->string, _("m"))) || (!strcmp(event->string, _("M"))))
col = COL_MOD;
- else if (!strcasecmp(event->string, "y"))
+ else if ((!strcmp(event->string, _("y"))) || (!strcmp(event->string, _("Y"))))
col = COL_YES;
else
col = -1;
@@ -1256,19 +1256,19 @@ static gchar **fill_row(struct menu *men
val = sym_get_tristate_value(sym);
switch (val) {
case no:
- row[COL_NO] = g_strdup("N");
- row[COL_VALUE] = g_strdup("N");
+ row[COL_NO] = g_strdup(_("N"));
+ row[COL_VALUE] = g_strdup(_("N"));
row[COL_BTNACT] = GINT_TO_POINTER(FALSE);
row[COL_BTNINC] = GINT_TO_POINTER(FALSE);
break;
case mod:
- row[COL_MOD] = g_strdup("M");
- row[COL_VALUE] = g_strdup("M");
+ row[COL_MOD] = g_strdup(_("M"));
+ row[COL_VALUE] = g_strdup(_("M"));
row[COL_BTNINC] = GINT_TO_POINTER(TRUE);
break;
case yes:
- row[COL_YES] = g_strdup("Y");
- row[COL_VALUE] = g_strdup("Y");
+ row[COL_YES] = g_strdup(_("Y"));
+ row[COL_VALUE] = g_strdup(_("Y"));
row[COL_BTNACT] = GINT_TO_POINTER(TRUE);
row[COL_BTNINC] = GINT_TO_POINTER(FALSE);
break;
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 10/19] Kconfig I18N: gconfig: missing macros
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (8 preceding siblings ...)
2005-07-13 17:20 ` [PATCH 9/19] Kconfig I18N: gconfig: answering Egry Gábor
@ 2005-07-13 17:21 ` Egry Gábor
2005-07-13 17:23 ` [PATCH 11/19] Kconfig I18N: gconfig: symbol fix Egry Gábor
` (11 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:21 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
Supplementing missing macros.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/gconf.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -puN scripts/kconfig/gconf.c~kconfig-i18n-10-gconfig-missing scripts/kconfig/gconf.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/gconf.c~kconfig-i18n-10-gconfig-missing 2005-07-13 18:32:18.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/gconf.c 2005-07-13 18:36:49.000000000 +0200
@@ -464,7 +464,7 @@ static void text_insert_help(struct menu
{
GtkTextBuffer *buffer;
GtkTextIter start, end;
- const char *prompt = menu_get_prompt(menu);
+ const char *prompt = _(menu_get_prompt(menu));
gchar *name;
const char *help = _(nohelp_text);
@@ -1188,7 +1188,7 @@ static gchar **fill_row(struct menu *men
bzero(row, sizeof(row));
row[COL_OPTION] =
- g_strdup_printf("%s %s", menu_get_prompt(menu),
+ g_strdup_printf("%s %s", _(menu_get_prompt(menu)),
sym ? (sym->
flags & SYMBOL_NEW ? _("(NEW)") : "") :
"");
@@ -1240,7 +1240,7 @@ static gchar **fill_row(struct menu *men
if (def_menu)
row[COL_VALUE] =
- g_strdup(menu_get_prompt(def_menu));
+ g_strdup(_(menu_get_prompt(def_menu)));
}
if(sym->flags & SYMBOL_CHOICEVAL)
row[COL_BTNRAD] = GINT_TO_POINTER(TRUE);
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 11/19] Kconfig I18N: gconfig: symbol fix
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (9 preceding siblings ...)
2005-07-13 17:21 ` [PATCH 10/19] Kconfig I18N: gconfig: missing macros Egry Gábor
@ 2005-07-13 17:23 ` Egry Gábor
2005-07-13 17:24 ` [PATCH 12/19] Kconfig I18N: menuconfig Egry Gábor
` (10 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:23 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
I18N support for symbol names are unnecessary.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/gconf.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN scripts/kconfig/gconf.c~kconfig-i18n-11-gconfig-symbol-fix scripts/kconfig/gconf.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/gconf.c~kconfig-i18n-11-gconfig-symbol-fix 2005-07-13 18:32:18.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/gconf.c 2005-07-13 18:32:18.000000000 +0200
@@ -474,7 +474,7 @@ static void text_insert_help(struct menu
help = _(menu->sym->help);
if (menu->sym && menu->sym->name)
- name = g_strdup_printf(_(menu->sym->name));
+ name = g_strdup_printf(menu->sym->name);
else
name = g_strdup("");
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 12/19] Kconfig I18N: menuconfig
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (10 preceding siblings ...)
2005-07-13 17:23 ` [PATCH 11/19] Kconfig I18N: gconfig: symbol fix Egry Gábor
@ 2005-07-13 17:24 ` Egry Gábor
2005-07-13 17:26 ` [PATCH 13/19] Kconfig I18N: menuconfig: answering Egry Gábor
` (9 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:24 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
Full I18N support for menuconfig.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/mconf.c | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff -puN scripts/kconfig/mconf.c~kconfig-i18n-12-menuconfig-i18n scripts/kconfig/mconf.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/mconf.c~kconfig-i18n-12-menuconfig-i18n 2005-07-13 18:32:18.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/mconf.c 2005-07-13 18:36:46.000000000 +0200
@@ -308,8 +308,8 @@ static void init_wsize(void)
}
if (rows < 19 || cols < 80) {
- fprintf(stderr, N_("Your display is too small to run Menuconfig!\n"));
- fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n"));
+ fprintf(stderr, _("Your display is too small to run Menuconfig!\n"
+ "It must be at least 19 lines by 80 columns.\n"));
exit(1);
}
@@ -370,11 +370,11 @@ static void get_prompt_str(struct gstr *
int i, j;
struct menu *submenu[8], *menu;
- str_printf(r, "Prompt: %s\n", prop->text);
- str_printf(r, " Defined at %s:%d\n", prop->menu->file->name,
+ str_printf(r, _("Prompt: %s\n"), _(prop->text));
+ str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
prop->menu->lineno);
if (!expr_is_yes(prop->visible.expr)) {
- str_append(r, " Depends on: ");
+ str_append(r, _(" Depends on: "));
expr_gstr_print(prop->visible.expr, r);
str_append(r, "\n");
}
@@ -382,13 +382,13 @@ static void get_prompt_str(struct gstr *
for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
submenu[i++] = menu;
if (i > 0) {
- str_printf(r, " Location:\n");
+ str_printf(r, _(" Location:\n"));
for (j = 4; --i >= 0; j += 2) {
menu = submenu[i];
str_printf(r, "%*c-> %s", j, ' ', menu_get_prompt(menu));
if (menu->sym) {
str_printf(r, " (%s [=%s])", menu->sym->name ?
- menu->sym->name : "<choice>",
+ menu->sym->name : _("<choice>"),
sym_get_string_value(menu->sym));
}
str_append(r, "\n");
@@ -401,14 +401,14 @@ static void get_symbol_str(struct gstr *
bool hit;
struct property *prop;
- str_printf(r, "Symbol: %s [=%s]\n", sym->name,
+ str_printf(r, _("Symbol: %s [=%s]\n"), sym->name,
sym_get_string_value(sym));
for_all_prompts(sym, prop)
get_prompt_str(r, prop);
hit = false;
for_all_properties(sym, prop, P_SELECT) {
if (!hit) {
- str_append(r, " Selects: ");
+ str_append(r, _(" Selects: "));
hit = true;
} else
str_printf(r, " && ");
@@ -417,7 +417,7 @@ static void get_symbol_str(struct gstr *
if (hit)
str_append(r, "\n");
if (sym->rev_dep.expr) {
- str_append(r, " Selected by: ");
+ str_append(r, _(" Selected by: "));
expr_gstr_print(sym->rev_dep.expr, r);
str_append(r, "\n");
}
@@ -433,7 +433,7 @@ static struct gstr get_relations_str(str
for (i = 0; sym_arr && (sym = sym_arr[i]); i++)
get_symbol_str(&res, sym);
if (!i)
- str_append(&res, "No matches found.\n");
+ str_append(&res, _("No matches found.\n"));
return res;
}
@@ -503,7 +503,8 @@ static int exec_conf(void)
return -1;
}
if (WIFSIGNALED(stat)) {
- printf("\finterrupted(%d)\n", WTERMSIG(stat));
+ printf("\f");
+ printf(_("interrupted(%d)\n"), WTERMSIG(stat));
exit(1);
}
#if 0
@@ -512,7 +513,8 @@ static int exec_conf(void)
#endif
sigpending(&sset);
if (sigismember(&sset, SIGINT)) {
- printf("\finterrupted\n");
+ printf("\f");
+ printf(_("interrupted\n"));
exit(1);
}
sigprocmask(SIG_SETMASK, &osset, NULL);
@@ -688,14 +690,14 @@ static void build_conf(struct menu *menu
tmp = 0;
cprint1("%*c%s%s", tmp, ' ', menu_get_prompt(menu),
(sym_has_value(sym) || !sym_is_changable(sym)) ?
- "" : " (NEW)");
+ "" : _(" (NEW)"));
cprint_done();
goto conf_childs;
}
}
cprint1("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu),
(sym_has_value(sym) || !sym_is_changable(sym)) ?
- "" : " (NEW)");
+ "" : _(" (NEW)"));
if (menu->prompt->type == P_MENU) {
cprint1(" --->");
cprint_done();
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 13/19] Kconfig I18N: menuconfig: answering
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (11 preceding siblings ...)
2005-07-13 17:24 ` [PATCH 12/19] Kconfig I18N: menuconfig Egry Gábor
@ 2005-07-13 17:26 ` Egry Gábor
2005-07-13 17:27 ` [PATCH 14/19] Kconfig I18N: menuconfig: missing macros Egry Gábor
` (8 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:26 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
I18N support for answering in menuconfig. This patch is useful for
non-latin based languages.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/mconf.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff -puN scripts/kconfig/mconf.c~kconfig-i18n-13-menuconfig-key scripts/kconfig/mconf.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/mconf.c~kconfig-i18n-13-menuconfig-key 2005-07-13 18:32:19.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/mconf.c 2005-07-13 18:36:44.000000000 +0200
@@ -564,7 +564,7 @@ static void build_conf(struct menu *menu
struct menu *child;
int type, tmp, doint = 2;
tristate val;
- char ch;
+ const char *ch;
if (!menu_is_visible(menu))
return;
@@ -622,11 +622,11 @@ static void build_conf(struct menu *menu
break;
case S_TRISTATE:
switch (val) {
- case yes: ch = '*'; break;
- case mod: ch = 'M'; break;
- default: ch = ' '; break;
+ case yes: ch = "*"; break;
+ case mod: ch = _("M"); break;
+ default: ch = " "; break;
}
- cprint1("<%c>", ch);
+ cprint1("<%s>", ch);
break;
}
} else {
@@ -673,12 +673,12 @@ static void build_conf(struct menu *menu
case S_TRISTATE:
cprint("t%p", menu);
switch (val) {
- case yes: ch = '*'; break;
- case mod: ch = 'M'; break;
- default: ch = ' '; break;
+ case yes: ch = "*"; break;
+ case mod: ch = _("M"); break;
+ default: ch = " "; break;
}
if (sym_is_changable(sym))
- cprint1("<%c>", ch);
+ cprint1("<%s>", ch);
else
cprint1("---");
break;
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Kconfig: lxdialog: Enable UTF8
2005-07-13 17:07 ` [PATCH 2/19] Kconfig I18N: lxdialog: width fix Egry Gábor
@ 2005-07-13 17:26 ` Jan Engelhardt
2005-07-14 0:26 ` Ken Moffat
0 siblings, 1 reply; 39+ messages in thread
From: Jan Engelhardt @ 2005-07-13 17:26 UTC (permalink / raw)
Cc: Linux Kernel Mailing List
Hi,
utf-8 enabled vc consoles (/dev/tty1) usually show line drawing
graphics with the ascii set, e.g. + - and | for lxdialog (and many other apps
btw)
The following patch brings back the real graphics for lxdialog, which are
normally present in these cases:
- non-utf8 vc
- xterm (u8 / non-u8)
I've just exchanged -lncurses with -lncursesw and I got the linegraphs back.
This simple trick can only be used with lxdialog, for some reason(?)
Patch notes: There seems to be no change or impact for non-UTF8 users; but
someone using non-utf8 for vc please verify this.
Valid for many kernels in the 2.6.x series, including the "recent"
2.6.13-rc1-git3-someBigNumber I use.
Signed-off-by: Jan Engelhardt <jengelh@linux01.gwdg.de>
diff -Pdpru S0706/scripts/lxdialog/Makefile AS17/scripts/lxdialog/Makefile
--- S0706/scripts/lxdialog/Makefile 2005-07-07 20:53:51.000000000 +0200
+++ AS17/scripts/lxdialog/Makefile 2005-07-09 11:31:08.000000000 +0200
@@ -2,7 +2,7 @@ HOST_EXTRACFLAGS := -DLOCALE
ifeq ($(shell uname),SunOS)
HOST_LOADLIBES := -lcurses
else
-HOST_LOADLIBES := -lncurses
+HOST_LOADLIBES := -lncursesw
endif
ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 14/19] Kconfig I18N: menuconfig: missing macros
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (12 preceding siblings ...)
2005-07-13 17:26 ` [PATCH 13/19] Kconfig I18N: menuconfig: answering Egry Gábor
@ 2005-07-13 17:27 ` Egry Gábor
2005-07-13 17:28 ` [PATCH 15/19] Kconfig I18n: xconfig Egry Gábor
` (7 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:27 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
Supplementing missing macros.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/mconf.c | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diff -puN scripts/kconfig/mconf.c~kconfig-i18n-14-menuconfig-missing scripts/kconfig/mconf.c
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/mconf.c~kconfig-i18n-14-menuconfig-missing 2005-07-13 18:32:19.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/mconf.c 2005-07-13 18:32:19.000000000 +0200
@@ -385,7 +385,7 @@ static void get_prompt_str(struct gstr *
str_printf(r, _(" Location:\n"));
for (j = 4; --i >= 0; j += 2) {
menu = submenu[i];
- str_printf(r, "%*c-> %s", j, ' ', menu_get_prompt(menu));
+ str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
if (menu->sym) {
str_printf(r, " (%s [=%s])", menu->sym->name ?
menu->sym->name : _("<choice>"),
@@ -544,7 +544,7 @@ again:
case 0:
break;
case 1:
- show_helptext(_("Search Configuration"), search_help);
+ show_helptext(_("Search Configuration"), _(search_help));
goto again;
default:
return;
@@ -573,7 +573,7 @@ static void build_conf(struct menu *menu
prop = menu->prompt;
if (!sym) {
if (prop && menu != current_menu) {
- const char *prompt = menu_get_prompt(menu);
+ const char *prompt = _(menu_get_prompt(menu));
switch (prop->type) {
case P_MENU:
child_count++;
@@ -634,10 +634,10 @@ static void build_conf(struct menu *menu
cprint1(" ");
}
- cprint1("%*c%s", indent + 1, ' ', menu_get_prompt(menu));
+ cprint1("%*c%s", indent + 1, ' ', _(menu_get_prompt(menu)));
if (val == yes) {
if (def_menu) {
- cprint1(" (%s)", menu_get_prompt(def_menu));
+ cprint1(" (%s)", _(menu_get_prompt(def_menu)));
cprint1(" --->");
cprint_done();
if (def_menu->list) {
@@ -653,7 +653,7 @@ static void build_conf(struct menu *menu
} else {
if (menu == current_menu) {
cprint(":%p", menu);
- cprint("---%*c%s", indent + 1, ' ', menu_get_prompt(menu));
+ cprint("---%*c%s", indent + 1, ' ', _(menu_get_prompt(menu)));
goto conf_childs;
}
child_count++;
@@ -688,14 +688,14 @@ static void build_conf(struct menu *menu
tmp = indent - tmp + 4;
if (tmp < 0)
tmp = 0;
- cprint1("%*c%s%s", tmp, ' ', menu_get_prompt(menu),
+ cprint1("%*c%s%s", tmp, ' ', _(menu_get_prompt(menu)),
(sym_has_value(sym) || !sym_is_changable(sym)) ?
"" : _(" (NEW)"));
cprint_done();
goto conf_childs;
}
}
- cprint1("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu),
+ cprint1("%*c%s%s", indent + 1, ' ', _(menu_get_prompt(menu)),
(sym_has_value(sym) || !sym_is_changable(sym)) ?
"" : _(" (NEW)"));
if (menu->prompt->type == P_MENU) {
@@ -716,7 +716,7 @@ conf_childs:
static void conf(struct menu *menu)
{
struct menu *submenu;
- const char *prompt = menu_get_prompt(menu);
+ const char *prompt = _(menu_get_prompt(menu));
struct symbol *sym;
char active_entry[40];
int stat, type, i;
@@ -798,7 +798,7 @@ static void conf(struct menu *menu)
if (sym)
show_help(submenu);
else
- show_helptext("README", _(mconf_readme));
+ show_helptext(_("README"), _(mconf_readme));
break;
case 3:
if (type == 't') {
@@ -861,7 +861,7 @@ static void show_help(struct menu *menu)
str_append(&help, nohelp_text);
}
get_symbol_str(&help, sym);
- show_helptext(menu_get_prompt(menu), str_get(&help));
+ show_helptext(_(menu_get_prompt(menu)), str_get(&help));
str_free(&help);
}
@@ -882,7 +882,7 @@ static void show_file(const char *filena
static void conf_choice(struct menu *menu)
{
- const char *prompt = menu_get_prompt(menu);
+ const char *prompt = _(menu_get_prompt(menu));
struct menu *child;
struct symbol *active;
int stat;
@@ -903,7 +903,7 @@ static void conf_choice(struct menu *men
if (!menu_is_visible(child))
continue;
cprint("%p", child);
- cprint("%s", menu_get_prompt(child));
+ cprint("%s", _(menu_get_prompt(child)));
if (child->sym == sym_get_choice_value(menu->sym))
cprint("ON");
else if (child->sym == active)
@@ -934,7 +934,7 @@ static void conf_choice(struct menu *men
static void conf_string(struct menu *menu)
{
- const char *prompt = menu_get_prompt(menu);
+ const char *prompt = _(menu_get_prompt(menu));
int stat;
while (1) {
@@ -981,7 +981,7 @@ static void conf_load(void)
while (1) {
cprint_init();
cprint("--inputbox");
- cprint(load_config_text);
+ cprint(_(load_config_text));
cprint("11");
cprint("55");
cprint("%s", filename);
@@ -995,7 +995,7 @@ static void conf_load(void)
show_textbox(NULL, _("File does not exist!"), 5, 38);
break;
case 1:
- show_helptext(_("Load Alternate Configuration"), load_config_help);
+ show_helptext(_("Load Alternate Configuration"), _(load_config_help));
break;
case 255:
return;
@@ -1010,7 +1010,7 @@ static void conf_save(void)
while (1) {
cprint_init();
cprint("--inputbox");
- cprint(save_config_text);
+ cprint(_(save_config_text));
cprint("11");
cprint("55");
cprint("%s", filename);
@@ -1024,7 +1024,7 @@ static void conf_save(void)
show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60);
break;
case 1:
- show_helptext(_("Save Alternate Configuration"), save_config_help);
+ show_helptext(_("Save Alternate Configuration"), _(save_config_help));
break;
case 255:
return;
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 15/19] Kconfig I18n: xconfig
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (13 preceding siblings ...)
2005-07-13 17:27 ` [PATCH 14/19] Kconfig I18N: menuconfig: missing macros Egry Gábor
@ 2005-07-13 17:28 ` Egry Gábor
2005-07-13 17:30 ` [PATCH 16/19] Kconfig I18n: xconfig: answering Egry Gábor
` (6 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:28 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
Full I18N support for xconfig.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/qconf.cc | 93 +++++++++++++++++++++++------------------------
1 files changed, 47 insertions(+), 46 deletions(-)
diff -puN scripts/kconfig/qconf.cc~kconfig-i18n-15-qconfig-i18n scripts/kconfig/qconf.cc
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/qconf.cc~kconfig-i18n-15-qconfig-i18n 2005-07-13 18:32:19.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/qconf.cc 2005-07-13 18:36:41.000000000 +0200
@@ -192,7 +192,7 @@ void ConfigItem::updateMenu(void)
sym = menu->sym;
prop = menu->prompt;
- prompt = QString::fromLocal8Bit(menu_get_prompt(menu));
+ prompt = _(menu_get_prompt(menu));
if (prop) switch (prop->type) {
case P_MENU:
@@ -286,7 +286,7 @@ void ConfigItem::updateMenu(void)
break;
}
if (!sym_has_value(sym) && visible)
- prompt += " (NEW)";
+ prompt += _(" (NEW)");
set_prompt:
setText(promptColIdx, prompt);
}
@@ -415,7 +415,7 @@ ConfigList::ConfigList(ConfigView* p, Co
for (i = 0; i < colNr; i++)
colMap[i] = colRevMap[i] = -1;
- addColumn(promptColIdx, "Option");
+ addColumn(promptColIdx, _("Option"));
reinit();
}
@@ -429,14 +429,14 @@ void ConfigList::reinit(void)
removeColumn(nameColIdx);
if (showName)
- addColumn(nameColIdx, "Name");
+ addColumn(nameColIdx, _("Name"));
if (showRange) {
addColumn(noColIdx, "N");
addColumn(modColIdx, "M");
addColumn(yesColIdx, "Y");
}
if (showData)
- addColumn(dataColIdx, "Value");
+ addColumn(dataColIdx, _("Value"));
updateListAll();
}
@@ -860,50 +860,50 @@ ConfigMainWindow::ConfigMainWindow(void)
configList->setFocus();
menu = menuBar();
- toolBar = new QToolBar("Tools", this);
+ toolBar = new QToolBar(_("Tools"), this);
- backAction = new QAction("Back", QPixmap(xpm_back), "Back", 0, this);
+ backAction = new QAction(_("Back"), QPixmap(xpm_back), _("Back"), 0, this);
connect(backAction, SIGNAL(activated()), SLOT(goBack()));
backAction->setEnabled(FALSE);
- QAction *quitAction = new QAction("Quit", "&Quit", CTRL+Key_Q, this);
+ QAction *quitAction = new QAction(_("Quit"), _("&Quit"), CTRL+Key_Q, this);
connect(quitAction, SIGNAL(activated()), SLOT(close()));
- QAction *loadAction = new QAction("Load", QPixmap(xpm_load), "&Load", CTRL+Key_L, this);
+ QAction *loadAction = new QAction(_("Load"), QPixmap(xpm_load), _("&Load"), CTRL+Key_L, this);
connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
- QAction *saveAction = new QAction("Save", QPixmap(xpm_save), "&Save", CTRL+Key_S, this);
+ QAction *saveAction = new QAction(_("Save"), QPixmap(xpm_save), _("&Save"), CTRL+Key_S, this);
connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
- QAction *saveAsAction = new QAction("Save As...", "Save &As...", 0, this);
+ QAction *saveAsAction = new QAction(_("Save As..."), _("Save &As..."), 0, this);
connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
- QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), "Split View", 0, this);
+ QAction *singleViewAction = new QAction(_("Single View"), QPixmap(xpm_single_view), _("Split View"), 0, this);
connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
- QAction *splitViewAction = new QAction("Split View", QPixmap(xpm_split_view), "Split View", 0, this);
+ QAction *splitViewAction = new QAction(_("Split View"), QPixmap(xpm_split_view), _("Split View"), 0, this);
connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView()));
- QAction *fullViewAction = new QAction("Full View", QPixmap(xpm_tree_view), "Full View", 0, this);
+ QAction *fullViewAction = new QAction(_("Full View"), QPixmap(xpm_tree_view), _("Full View"), 0, this);
connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
- QAction *showNameAction = new QAction(NULL, "Show Name", 0, this);
+ QAction *showNameAction = new QAction(NULL, _("Show Name"), 0, this);
showNameAction->setToggleAction(TRUE);
showNameAction->setOn(configList->showName);
connect(showNameAction, SIGNAL(toggled(bool)), SLOT(setShowName(bool)));
- QAction *showRangeAction = new QAction(NULL, "Show Range", 0, this);
+ QAction *showRangeAction = new QAction(NULL, _("Show Range"), 0, this);
showRangeAction->setToggleAction(TRUE);
showRangeAction->setOn(configList->showRange);
connect(showRangeAction, SIGNAL(toggled(bool)), SLOT(setShowRange(bool)));
- QAction *showDataAction = new QAction(NULL, "Show Data", 0, this);
+ QAction *showDataAction = new QAction(NULL, _("Show Data"), 0, this);
showDataAction->setToggleAction(TRUE);
showDataAction->setOn(configList->showData);
connect(showDataAction, SIGNAL(toggled(bool)), SLOT(setShowData(bool)));
- QAction *showAllAction = new QAction(NULL, "Show All Options", 0, this);
+ QAction *showAllAction = new QAction(NULL, _("Show All Options"), 0, this);
showAllAction->setToggleAction(TRUE);
showAllAction->setOn(configList->showAll);
connect(showAllAction, SIGNAL(toggled(bool)), SLOT(setShowAll(bool)));
- QAction *showDebugAction = new QAction(NULL, "Show Debug Info", 0, this);
+ QAction *showDebugAction = new QAction(NULL, _("Show Debug Info"), 0, this);
showDebugAction->setToggleAction(TRUE);
showDebugAction->setOn(showDebug);
connect(showDebugAction, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
- QAction *showIntroAction = new QAction(NULL, "Introduction", 0, this);
+ QAction *showIntroAction = new QAction(NULL, _("Introduction"), 0, this);
connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro()));
- QAction *showAboutAction = new QAction(NULL, "About", 0, this);
+ QAction *showAboutAction = new QAction(NULL, _("About"), 0, this);
connect(showAboutAction, SIGNAL(activated()), SLOT(showAbout()));
// init tool bar
@@ -918,7 +918,7 @@ ConfigMainWindow::ConfigMainWindow(void)
// create config menu
QPopupMenu* config = new QPopupMenu(this);
- menu->insertItem("&File", config);
+ menu->insertItem(_("&File"), config);
loadAction->addTo(config);
saveAction->addTo(config);
saveAsAction->addTo(config);
@@ -927,7 +927,7 @@ ConfigMainWindow::ConfigMainWindow(void)
// create options menu
QPopupMenu* optionMenu = new QPopupMenu(this);
- menu->insertItem("&Option", optionMenu);
+ menu->insertItem(_("&Option"), optionMenu);
showNameAction->addTo(optionMenu);
showRangeAction->addTo(optionMenu);
showDataAction->addTo(optionMenu);
@@ -938,7 +938,7 @@ ConfigMainWindow::ConfigMainWindow(void)
// create help menu
QPopupMenu* helpMenu = new QPopupMenu(this);
menu->insertSeparator();
- menu->insertItem("&Help", helpMenu);
+ menu->insertItem(_("&Help"), helpMenu);
showIntroAction->addTo(helpMenu);
showAboutAction->addTo(helpMenu);
@@ -981,6 +981,7 @@ static QString print_filter(const QStrin
{
QRegExp re("[<>&\"\\n]");
QString res = str;
+
for (int i = 0; (i = res.find(re, i)) >= 0;) {
switch (res[i].latin1()) {
case '<':
@@ -1050,13 +1051,13 @@ void ConfigMainWindow::setHelp(QListView
head += "<br><br>";
if (showDebug) {
- debug += "type: ";
+ debug += _("type: ");
debug += print_filter(sym_type_name(sym->type));
if (sym_is_choice(sym))
- debug += " (choice)";
+ debug += _(" (choice)");
debug += "<br>";
if (sym->rev_dep.expr) {
- debug += "reverse dep: ";
+ debug += _("reverse dep: ");
expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE);
debug += "<br>";
}
@@ -1064,34 +1065,34 @@ void ConfigMainWindow::setHelp(QListView
switch (prop->type) {
case P_PROMPT:
case P_MENU:
- debug += "prompt: ";
+ debug += _("prompt: ");
debug += print_filter(_(prop->text));
debug += "<br>";
break;
case P_DEFAULT:
- debug += "default: ";
+ debug += _("default: ");
expr_print(prop->expr, expr_print_help, &debug, E_NONE);
debug += "<br>";
break;
case P_CHOICE:
if (sym_is_choice(sym)) {
- debug += "choice: ";
+ debug += _("choice: ");
expr_print(prop->expr, expr_print_help, &debug, E_NONE);
debug += "<br>";
}
break;
case P_SELECT:
- debug += "select: ";
+ debug += _("select: ");
expr_print(prop->expr, expr_print_help, &debug, E_NONE);
debug += "<br>";
break;
case P_RANGE:
- debug += "range: ";
+ debug += _("range: ");
expr_print(prop->expr, expr_print_help, &debug, E_NONE);
debug += "<br>";
break;
default:
- debug += "unknown property: ";
+ debug += _("unknown property: ");
debug += prop_get_type_name(prop->type);
debug += "<br>";
}
@@ -1118,7 +1119,7 @@ void ConfigMainWindow::setHelp(QListView
}
}
if (showDebug)
- debug += QString().sprintf("defined at %s:%d<br><br>", menu->file->name, menu->lineno);
+ debug += QString().sprintf(_("defined at %s:%d<br><br>"), menu->file->name, menu->lineno);
helpText->setText(head + debug + help);
}
@@ -1128,14 +1129,14 @@ void ConfigMainWindow::loadConfig(void)
if (s.isNull())
return;
if (conf_read(QFile::encodeName(s)))
- QMessageBox::information(this, "qconf", "Unable to load configuration!");
+ QMessageBox::information(this, "qconf", _("Unable to load configuration!"));
ConfigView::updateListAll();
}
void ConfigMainWindow::saveConfig(void)
{
if (conf_write(NULL))
- QMessageBox::information(this, "qconf", "Unable to save configuration!");
+ QMessageBox::information(this, "qconf", _("Unable to save configuration!"));
}
void ConfigMainWindow::saveConfigAs(void)
@@ -1144,7 +1145,7 @@ void ConfigMainWindow::saveConfigAs(void
if (s.isNull())
return;
if (conf_write(QFile::encodeName(s)))
- QMessageBox::information(this, "qconf", "Unable to save configuration!");
+ QMessageBox::information(this, "qconf", _("Unable to save configuration!"));
}
void ConfigMainWindow::changeMenu(struct menu *menu)
@@ -1280,11 +1281,11 @@ void ConfigMainWindow::closeEvent(QClose
e->accept();
return;
}
- QMessageBox mb("qconf", "Save configuration?", QMessageBox::Warning,
+ QMessageBox mb("qconf", _("Save configuration?"), QMessageBox::Warning,
QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape);
- mb.setButtonText(QMessageBox::Yes, "&Save Changes");
- mb.setButtonText(QMessageBox::No, "&Discard Changes");
- mb.setButtonText(QMessageBox::Cancel, "Cancel Exit");
+ mb.setButtonText(QMessageBox::Yes, _("&Save Changes"));
+ mb.setButtonText(QMessageBox::No, _("&Discard Changes"));
+ mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit"));
switch (mb.exec()) {
case QMessageBox::Yes:
conf_write(NULL);
@@ -1299,7 +1300,7 @@ void ConfigMainWindow::closeEvent(QClose
void ConfigMainWindow::showIntro(void)
{
- static char str[] = "Welcome to the qconf graphical kernel configuration tool for Linux.\n\n"
+ static const QString str = _("Welcome to the qconf graphical kernel configuration tool for Linux.\n\n"
"For each option, a blank box indicates the feature is disabled, a check\n"
"indicates it is enabled, and a dot indicates that it is to be compiled\n"
"as a module. Clicking on the box will cycle through the three states.\n\n"
@@ -1309,15 +1310,15 @@ void ConfigMainWindow::showIntro(void)
"options must be enabled to support the option you are interested in, you can\n"
"still view the help of a grayed-out option.\n\n"
"Toggling Show Debug Info under the Options menu will show the dependencies,\n"
- "which you can then match by examining other options.\n\n";
+ "which you can then match by examining other options.\n\n");
QMessageBox::information(this, "qconf", str);
}
void ConfigMainWindow::showAbout(void)
{
- static char str[] = "qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n\n"
- "Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n";
+ static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n\n"
+ "Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n");
QMessageBox::information(this, "qconf", str);
}
@@ -1379,7 +1380,7 @@ static const char *progname;
static void usage(void)
{
- printf("%s <config>\n", progname);
+ printf(_("%s <config>\n"), progname);
exit(0);
}
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 16/19] Kconfig I18n: xconfig: answering
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (14 preceding siblings ...)
2005-07-13 17:28 ` [PATCH 15/19] Kconfig I18n: xconfig Egry Gábor
@ 2005-07-13 17:30 ` Egry Gábor
2005-07-13 17:31 ` [PATCH 17/19] Kconfig I18N: xconfig: symbol fix Egry Gábor
` (5 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:30 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
I18N support for answering in xconfig. This patch useful for non-latin based languages.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/qconf.cc | 40 +++++++++++++++++++---------------------
1 files changed, 19 insertions(+), 21 deletions(-)
diff -puN scripts/kconfig/qconf.cc~kconfig-i18n-16-qconfig-key-i18n scripts/kconfig/qconf.cc
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/qconf.cc~kconfig-i18n-16-qconfig-key-i18n 2005-07-13 18:32:19.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/qconf.cc 2005-07-13 18:36:39.000000000 +0200
@@ -224,7 +224,7 @@ void ConfigItem::updateMenu(void)
switch (type) {
case S_BOOLEAN:
case S_TRISTATE:
- char ch;
+ const char *ch;
if (!sym_is_changable(sym) && !list->showAll) {
setPixmap(promptColIdx, 0);
@@ -240,21 +240,21 @@ void ConfigItem::updateMenu(void)
setPixmap(promptColIdx, list->choiceYesPix);
else
setPixmap(promptColIdx, list->symbolYesPix);
- setText(yesColIdx, "Y");
- ch = 'Y';
+ setText(yesColIdx, _("Y"));
+ ch = _("Y");
break;
case mod:
setPixmap(promptColIdx, list->symbolModPix);
- setText(modColIdx, "M");
- ch = 'M';
+ setText(modColIdx, _("M"));
+ ch = _("M");
break;
default:
if (sym_is_choice_value(sym) && type == S_BOOLEAN)
setPixmap(promptColIdx, list->choiceNoPix);
else
setPixmap(promptColIdx, list->symbolNoPix);
- setText(noColIdx, "N");
- ch = 'N';
+ setText(noColIdx, _("N"));
+ ch = _("N");
break;
}
if (expr != no)
@@ -264,7 +264,7 @@ void ConfigItem::updateMenu(void)
if (expr != yes)
setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0);
- setText(dataColIdx, QChar(ch));
+ setText(dataColIdx, ch);
break;
case S_INT:
case S_HEX:
@@ -431,9 +431,9 @@ void ConfigList::reinit(void)
if (showName)
addColumn(nameColIdx, _("Name"));
if (showRange) {
- addColumn(noColIdx, "N");
- addColumn(modColIdx, "M");
- addColumn(yesColIdx, "Y");
+ addColumn(noColIdx, _("N"));
+ addColumn(modColIdx, _("M"));
+ addColumn(yesColIdx, _("Y"));
}
if (showData)
addColumn(dataColIdx, _("Value"));
@@ -641,17 +641,15 @@ void ConfigList::keyPressEvent(QKeyEvent
case Key_Space:
changeValue(item);
break;
- case Key_N:
- setValue(item, no);
- break;
- case Key_M:
- setValue(item, mod);
- break;
- case Key_Y:
- setValue(item, yes);
- break;
default:
- Parent::keyPressEvent(ev);
+ if ((ev->text() == _("y")) || (ev->text() == _("Y")))
+ setValue(item, yes);
+ else if ((ev->text() == _("m")) || (ev->text() == _("M")))
+ setValue(item, mod);
+ else if ((ev->text() == _("n")) || (ev->text() == _("N")))
+ setValue(item, no);
+ else
+ Parent::keyPressEvent(ev);
return;
}
ev->accept();
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 17/19] Kconfig I18N: xconfig: symbol fix
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (15 preceding siblings ...)
2005-07-13 17:30 ` [PATCH 16/19] Kconfig I18n: xconfig: answering Egry Gábor
@ 2005-07-13 17:31 ` Egry Gábor
2005-07-13 17:33 ` [PATCH 18/19] Kconfig I18N: LKC: whitespace removing Egry Gábor
` (4 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:31 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
I18N support for symbol names are unnecessary.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/qconf.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -puN scripts/kconfig/qconf.cc~kconfig-i18n-17-qconfig-symbol-fix scripts/kconfig/qconf.cc
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/qconf.cc~kconfig-i18n-17-qconfig-symbol-fix 2005-07-13 18:32:19.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/qconf.cc 2005-07-13 18:32:19.000000000 +0200
@@ -1038,12 +1038,12 @@ void ConfigMainWindow::setHelp(QListView
head += "</b></big>";
if (sym->name) {
head += " (";
- head += print_filter(_(sym->name));
+ head += print_filter(sym->name);
head += ")";
}
} else if (sym->name) {
head += "<big><b>";
- head += print_filter(_(sym->name));
+ head += print_filter(sym->name);
head += "</b></big>";
}
head += "<br><br>";
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 18/19] Kconfig I18N: LKC: whitespace removing
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (16 preceding siblings ...)
2005-07-13 17:31 ` [PATCH 17/19] Kconfig I18N: xconfig: symbol fix Egry Gábor
@ 2005-07-13 17:33 ` Egry Gábor
2005-07-14 0:12 ` Roman Zippel
2005-07-13 17:35 ` [PATCH 19/19] Kconfig I18N: UI: Hungarian translation Egry Gábor
` (3 subsequent siblings)
21 siblings, 1 reply; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:33 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
This patch removes unnecessary whitespaces from end of help
lines of Kconfig files. The size of .po files will smaller.
This is a compatibility fix with TLKTP's .po files.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
scripts/kconfig/zconf.l | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletion(-)
diff -puN scripts/kconfig/zconf.l~kconfig-i18n-18-whitespace-fix scripts/kconfig/zconf.l
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/zconf.l~kconfig-i18n-18-whitespace-fix 2005-07-13 18:32:20.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/zconf.l 2005-07-13 18:32:20.000000000 +0200
@@ -57,6 +57,17 @@ void append_string(const char *str, int
*text_ptr = 0;
}
+void append_helpstring(const char *str, int size)
+{
+ while (size) {
+ if ((str[size-1] != ' ') && (str[size-1] != '\t'))
+ break;
+ size--;
+ }
+
+ append_string (str, size);
+}
+
void alloc_string(const char *str, int size)
{
text = malloc(size + 1);
@@ -225,7 +236,7 @@ n [A-Za-z0-9_]
append_string("\n", 1);
}
[^ \t\n].* {
- append_string(yytext, yyleng);
+ append_helpstring(yytext, yyleng);
if (!first_ts)
first_ts = last_ts;
}
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 19/19] Kconfig I18N: UI: Hungarian translation
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (17 preceding siblings ...)
2005-07-13 17:33 ` [PATCH 18/19] Kconfig I18N: LKC: whitespace removing Egry Gábor
@ 2005-07-13 17:35 ` Egry Gábor
2005-07-13 17:41 ` [PATCH 0/19] Kconfig I18N completion Linus Torvalds
` (2 subsequent siblings)
21 siblings, 0 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 17:35 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Roman Zippel, Massimo Maiurana, Linux Kernel Mailing List,
KernelFR, Arnaldo Carvalho de Melo
Hungarian translation of the configuration interfaces.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
po/hu.po | 953 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 953 insertions(+)
diff -puN /dev/null po/hu.po
--- /dev/null 2005-07-13 15:43:03.451152136 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/po/hu.po 2005-07-13 18:32:20.000000000 +0200
@@ -0,0 +1,953 @@
+# translation of hu.po to hungarian
+# Linux kernel 2.6.13-rc2 Kconfig .pot file
+# Licensed under GNU GPL v2
+#
+# The Linux Kernel Translation Project
+# http://tlktp.sourceforge.net
+#
+# Translators:
+# - Egry Gábor <gabaman@users.sourceforge.net>
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Linux 2.6.13-rc2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-07-11 19:55+0200\n"
+"PO-Revision-Date: 2005-07-11 16:44+0200\n"
+"Last-Translator: Egry Gábor <gabaman@users.sourceforge.net>\n"
+"Language-Team: TLKTP <tlktp-general@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.10.1\n"
+
+#: scripts/lxdialog/checklist.c:117 scripts/lxdialog/menubox.c:149
+msgid "Select"
+msgstr "Kiválaszt"
+
+#: scripts/lxdialog/checklist.c:118 scripts/lxdialog/inputbox.c:36
+#: scripts/lxdialog/menubox.c:151
+msgid " Help "
+msgstr " Segítség "
+
+#: scripts/lxdialog/inputbox.c:35 scripts/lxdialog/msgbox.c:74
+msgid " Ok "
+msgstr " OK "
+
+#: scripts/lxdialog/menubox.c:150 scripts/lxdialog/textbox.c:126
+msgid " Exit "
+msgstr " Kilép "
+
+#: scripts/lxdialog/menubox.c:441 scripts/lxdialog/yesno.c:91
+#: scripts/kconfig/gconf.c:1109 scripts/kconfig/qconf.cc:645
+msgid "y"
+msgstr "i"
+
+#: scripts/lxdialog/menubox.c:445 scripts/lxdialog/yesno.c:95
+#: scripts/kconfig/gconf.c:422 scripts/kconfig/gconf.c:1109
+#: scripts/kconfig/gconf.c:1270 scripts/kconfig/gconf.c:1271
+#: scripts/kconfig/qconf.cc:243 scripts/kconfig/qconf.cc:436
+#: scripts/kconfig/qconf.cc:645
+msgid "Y"
+msgstr "I"
+
+#: scripts/lxdialog/menubox.c:449 scripts/lxdialog/yesno.c:99
+#: scripts/kconfig/gconf.c:1105 scripts/kconfig/qconf.cc:649
+msgid "n"
+msgstr "n"
+
+#: scripts/lxdialog/menubox.c:453 scripts/lxdialog/yesno.c:103
+#: scripts/kconfig/gconf.c:410 scripts/kconfig/gconf.c:1105
+#: scripts/kconfig/gconf.c:1259 scripts/kconfig/gconf.c:1260
+#: scripts/kconfig/qconf.cc:244 scripts/kconfig/qconf.cc:256
+#: scripts/kconfig/qconf.cc:257 scripts/kconfig/qconf.cc:434
+#: scripts/kconfig/qconf.cc:649
+msgid "N"
+msgstr "N"
+
+#: scripts/lxdialog/yesno.c:33
+msgid " Yes "
+msgstr " Igen "
+
+#: scripts/lxdialog/yesno.c:34
+msgid " No "
+msgstr " Nem "
+
+#: scripts/kconfig/mconf.c:164
+msgid ""
+"Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted "
+"letters are hotkeys. Pressing <Y> includes, <N> excludes, <M> modularizes "
+"features. Press <Esc><Esc> to exit, <?> for Help, </> for Search. Legend: "
+"[*] built-in [ ] excluded <M> module < > module capable"
+msgstr ""
+"A nyíl gombokkal lehet navigálni a menüben. Az <Enter> kiválasztja az "
+"almenüket --->. A kiemelt betűk a gyorsgombok. Az <I> lenyomása a "
+"tartalmazás, az <N> a kihagyás az <M> a modularizásás. Az <ESC><ESC> "
+"megnyomása a kilépés, a <?> a Segítség, a </> a Keresés. Jelölés: [*] "
+"befordított [ ] kihagyott <M> modul < > modul képes."
+
+#: scripts/kconfig/mconf.c:171
+msgid ""
+"Use the arrow keys to navigate this window or press the hotkey of the item "
+"you wish to select followed by the <SPACE BAR>. Press <?> for additional "
+"information about this option."
+msgstr ""
+"Használja a nyíl billentyűket az ablakban történő navigáláshoz vagy nyomja "
+"meg az elemhez tartozó gyorsbillentyűt a kiválasztáshoz a <SZÓKÖZ> billentyű "
+"lenyomása után. Nyomja le a <?> gombot az opcióval kapcsolatos további "
+"információk eléréséhez."
+
+#: scripts/kconfig/mconf.c:176
+msgid ""
+"Please enter a decimal value. Fractions will not be accepted. Use the <TAB> "
+"key to move from the input field to the buttons below it."
+msgstr ""
+"Kérem adjon meg egy decimális értéket. A törtek nem lesznek elfogadva. "
+"Használja a <TAB> gombot a beviteli mezőről az alsó gombokra történő "
+"mozgáshoz."
+
+#: scripts/kconfig/mconf.c:180
+msgid ""
+"Please enter a hexadecimal value. Use the <TAB> key to move from the input "
+"field to the buttons below it."
+msgstr ""
+"Kérem adjon meg egy hexadecimális értéket. Használja a <TAB> gombot a "
+"beviteli mezőről az alsó gombokra történő mozgáshoz."
+
+#: scripts/kconfig/mconf.c:183
+msgid ""
+"Please enter a string value. Use the <TAB> key to move from the input field "
+"to the buttons below it."
+msgstr ""
+"Kérlem adjon meg egy szöveges értéket. Használja a <TAB> gombot a beviteli "
+"mezőről az alsó gombokra történő mozgáshoz."
+
+#: scripts/kconfig/mconf.c:186
+msgid ""
+"This feature depends on another which has been configured as a module.\n"
+"As a result, this feature will be built as a module."
+msgstr ""
+"Ez a jellemző függ egy másiktól, ami modulként van beállítva.\n"
+"Emiatt ez a jellemző modulként lesz fordítva."
+
+#: scripts/kconfig/mconf.c:189
+msgid "There is no help available for this kernel option.\n"
+msgstr "Nincs elérhető segítség ehhez a rendszermag opcióhoz.\n"
+
+#: scripts/kconfig/mconf.c:311
+#, c-format
+msgid ""
+"Your display is too small to run Menuconfig!\n"
+"It must be at least 19 lines by 80 columns.\n"
+msgstr ""
+"A kijelző túl kicsi a Menuconfig futtatásához!\n"
+"Legalább 19 sornak és 80 oszlopnak kell lennie.\n"
+
+#: scripts/kconfig/mconf.c:373
+#, c-format
+msgid "Prompt: %s\n"
+msgstr "Prompt: %s\n"
+
+#: scripts/kconfig/mconf.c:374
+#, c-format
+msgid " Defined at %s:%d\n"
+msgstr " Definiálva: %s:%d\n"
+
+#: scripts/kconfig/mconf.c:377
+msgid " Depends on: "
+msgstr " Függ: "
+
+#: scripts/kconfig/mconf.c:385
+msgid " Location:\n"
+msgstr " Helye:\n"
+
+#: scripts/kconfig/mconf.c:391
+msgid "<choice>"
+msgstr "<kiválasztás>"
+
+#: scripts/kconfig/mconf.c:404
+#, c-format
+msgid "Symbol: %s [=%s]\n"
+msgstr "Szimbólum: %s [=%s]\n"
+
+#: scripts/kconfig/mconf.c:411
+msgid " Selects: "
+msgstr " Kiválaszt: "
+
+#: scripts/kconfig/mconf.c:420
+msgid " Selected by: "
+msgstr " Kiválasztó: "
+
+#: scripts/kconfig/mconf.c:436
+msgid "No matches found.\n"
+msgstr "Nincsenek találatok.\n"
+
+#: scripts/kconfig/mconf.c:507
+#, c-format
+msgid "interrupted(%d)\n"
+msgstr "megszakítva(%d)\n"
+
+#: scripts/kconfig/mconf.c:512
+#, c-format
+msgid ""
+"exit state: %d\n"
+"exit data: '%s'\n"
+msgstr ""
+"kilépési állapot: %d\n"
+"kilépési adat: '%s'\n"
+
+#: scripts/kconfig/mconf.c:518
+#, c-format
+msgid "interrupted\n"
+msgstr "megszakítva\n"
+
+#: scripts/kconfig/mconf.c:535
+msgid "Search Configuration Parameter"
+msgstr "Beállítás Paraméter Keresése"
+
+#: scripts/kconfig/mconf.c:537
+msgid "Enter Keyword"
+msgstr "Kulcsszó megadása"
+
+#: scripts/kconfig/mconf.c:548
+msgid "Search Configuration"
+msgstr "Beállítás Keresése"
+
+#: scripts/kconfig/mconf.c:557
+msgid "Search Results"
+msgstr "Keresés Eredményei"
+
+#: scripts/kconfig/mconf.c:627 scripts/kconfig/mconf.c:678
+#: scripts/kconfig/gconf.c:416 scripts/kconfig/gconf.c:1107
+#: scripts/kconfig/gconf.c:1265 scripts/kconfig/gconf.c:1266
+#: scripts/kconfig/qconf.cc:248 scripts/kconfig/qconf.cc:249
+#: scripts/kconfig/qconf.cc:435 scripts/kconfig/qconf.cc:647
+msgid "M"
+msgstr "M"
+
+#: scripts/kconfig/mconf.c:694 scripts/kconfig/mconf.c:701
+#: scripts/kconfig/conf.c:327 scripts/kconfig/qconf.cc:289
+#, c-format
+msgid " (NEW)"
+msgstr " (ÚJ)"
+
+#: scripts/kconfig/mconf.c:730 scripts/kconfig/mconf.c:895
+#: scripts/kconfig/mconf.c:944
+msgid "Main Menu"
+msgstr "Főmenü"
+
+#: scripts/kconfig/mconf.c:745
+msgid " Load an Alternate Configuration File"
+msgstr " Alternatív Beállítások Fájl Betöltése"
+
+#: scripts/kconfig/mconf.c:747
+msgid " Save Configuration to an Alternate File"
+msgstr " Beállítások mentése egy Alternatív Fájlba"
+
+#: scripts/kconfig/mconf.c:802
+msgid "README"
+msgstr "OLVASSEL"
+
+#: scripts/kconfig/mconf.c:967
+msgid "You have made an invalid entry."
+msgstr "Egy érvénytelen bejegyzést készített."
+
+#: scripts/kconfig/mconf.c:996
+msgid "File does not exist!"
+msgstr "A fájl nem létezik!"
+
+#: scripts/kconfig/mconf.c:999
+msgid "Load Alternate Configuration"
+msgstr "Alternatív Beállítások Betöltése"
+
+#: scripts/kconfig/mconf.c:1025
+msgid "Can't create file! Probably a nonexistent directory."
+msgstr "Fájl nem hozható létre! Talán a könyvtár nem létezik."
+
+#: scripts/kconfig/mconf.c:1028
+msgid "Save Alternate Configuration"
+msgstr "Alternatív Beállítások Mentése"
+
+#: scripts/kconfig/mconf.c:1058 scripts/kconfig/gconf.c:278
+#, c-format
+msgid "Linux Kernel v%s Configuration"
+msgstr "Linux Rendszermag v%s Beállítások"
+
+#: scripts/kconfig/mconf.c:1075
+msgid "Do you wish to save your new kernel configuration?"
+msgstr "Mentve legyenek az új rendszermag beállításai?"
+
+#: scripts/kconfig/mconf.c:1083
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Error during writing of the kernel configuration.\n"
+"Your kernel configuration changes were NOT saved.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Hiba a rendszermag beállításainak írása alatt.\n"
+"A rendszermag beállítások változásai NINCSENEK elmentve.\n"
+"\n"
+
+#: scripts/kconfig/mconf.c:1089
+#, c-format
+msgid ""
+"\n"
+"\n"
+"*** End of Linux kernel configuration.\n"
+"*** Execute 'make' to build the kernel or try 'make help'.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"*** Vége a Linux rendszermag beállításoknak.\n"
+"*** Futtassa a 'make' parancsot a fordításhoz vagy *** próbálkozzon a 'make "
+"help' kiadásával.\n"
+"\n"
+
+#: scripts/kconfig/mconf.c:1094
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Your kernel configuration changes were NOT saved.\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"A rendszermag beállítások változásai NINCSENEK elmentve.\n"
+"\n"
+
+#: scripts/kconfig/conf.c:37 scripts/kconfig/gconf.c:44
+msgid "Sorry, no help available for this option yet.\n"
+msgstr "Sajnálom, még nincs elérhető segítség ehhez az opcióhoz.\n"
+
+#: scripts/kconfig/conf.c:59
+#, c-format
+msgid ""
+"aborted!\n"
+"\n"
+msgstr ""
+"megszakítva!\n"
+"\n"
+
+#: scripts/kconfig/conf.c:60
+#, c-format
+msgid "Console input/output is redirected. "
+msgstr "A konzol ki-/bemenete át van irányítva. "
+
+#: scripts/kconfig/conf.c:61
+#, c-format
+msgid ""
+"Run 'make oldconfig' to update configuration.\n"
+"\n"
+msgstr ""
+"Futtassa a 'make oldconfig' parancsot a beállítások frissítéséhez.\n"
+"\n"
+
+#: scripts/kconfig/conf.c:72
+#, c-format
+msgid "(NEW) "
+msgstr "(ÚJ) "
+
+#: scripts/kconfig/conf.c:330
+#, c-format
+msgid "%*schoice"
+msgstr "%*sválasztás"
+
+#: scripts/kconfig/conf.c:473
+#, c-format
+msgid ""
+"*\n"
+"* Restart config...\n"
+"*\n"
+msgstr ""
+"*\n"
+"* Beállítás újraindítása...\n"
+"*\n"
+
+#: scripts/kconfig/conf.c:511
+#, c-format
+msgid "%s: No default config file specified\n"
+msgstr "%s: Nincs alapértelmezett beállítás fájl megadva\n"
+
+#: scripts/kconfig/conf.c:531
+#, c-format
+msgid "%s [-o|-s] config\n"
+msgstr "%s [-o|-s] beállítás\n"
+
+#: scripts/kconfig/conf.c:537
+#, c-format
+msgid "%s: Kconfig file missing\n"
+msgstr "%s: Kconfig fájl hiányzik\n"
+
+#: scripts/kconfig/conf.c:546
+#, c-format
+msgid ""
+"***\n"
+"*** Can't find default configuration \"%s\"!\n"
+"***\n"
+msgstr ""
+"***\n"
+"*** Nem található az alapérelemzett beállítás: \"%s\"!\n"
+"***\n"
+
+#: scripts/kconfig/conf.c:554
+#, c-format
+msgid ""
+"***\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"
+msgstr ""
+"***\n"
+"*** Nincs még beállítva a rendszermag!\n"
+"***\n"
+"*** Kérem futtassa valamelyik beállítót (pl. \"make oldconfig\" vagy\n"
+"*** \"make menuconfig\" vagy \"make xconfig\").\n"
+"***\n"
+
+#: scripts/kconfig/conf.c:583
+#, c-format
+msgid ""
+"\n"
+"*** Error during writing of the kernel configuration.\n"
+"\n"
+msgstr ""
+"\n"
+"*** Hiba a rendszermag beállítások írása közben.\n"
+"\n"
+
+#: scripts/kconfig/confdata.c:91
+#, c-format
+msgid ""
+"#\n"
+"# using defaults found in %s\n"
+"#\n"
+msgstr ""
+"#\n"
+"# A(z) %s fájlban megtalált alapértelmezések használata\n"
+"#\n"
+
+#: scripts/kconfig/confdata.c:315
+#, c-format
+msgid ""
+"#\n"
+"# Automatically generated make config: don't edit\n"
+"# Linux kernel version: %s\n"
+"%s%s#\n"
+msgstr ""
+"#\n"
+"# Automatikusan létrehozva a 'make config' által: ne szerkeszed!\n"
+"# Linux rendszermag verzió: %s\n"
+"%s%s#\n"
+
+#: scripts/kconfig/gconf.c:90 scripts/kconfig/gconf.c:161
+msgid "unknown"
+msgstr "ismeretlen"
+
+#: scripts/kconfig/gconf.c:92
+msgid "boolean"
+msgstr "logikai"
+
+#: scripts/kconfig/gconf.c:94
+msgid "tristate"
+msgstr "háromállapotú"
+
+#: scripts/kconfig/gconf.c:96
+msgid "int"
+msgstr "egész"
+
+#: scripts/kconfig/gconf.c:98
+msgid "hex"
+msgstr "hexa"
+
+#: scripts/kconfig/gconf.c:100
+msgid "string"
+msgstr "sztring"
+
+#: scripts/kconfig/gconf.c:102
+msgid "other"
+msgstr "egyéb"
+
+#: scripts/kconfig/gconf.c:118
+msgid "yes/"
+msgstr "igen/"
+
+#: scripts/kconfig/gconf.c:120
+msgid "mod/"
+msgstr "modul/"
+
+#: scripts/kconfig/gconf.c:122
+msgid "no/"
+msgstr "nem/"
+
+#: scripts/kconfig/gconf.c:124
+msgid "const/"
+msgstr "konstans/"
+
+#: scripts/kconfig/gconf.c:126
+msgid "check/"
+msgstr "ellenőrzés/"
+
+#: scripts/kconfig/gconf.c:128
+msgid "choice/"
+msgstr "választás/"
+
+#: scripts/kconfig/gconf.c:130
+msgid "choiceval/"
+msgstr "értékválasztás/"
+
+#: scripts/kconfig/gconf.c:132
+msgid "printed/"
+msgstr "kinyomtatott/"
+
+#: scripts/kconfig/gconf.c:134
+msgid "valid/"
+msgstr "érvényes/"
+
+#: scripts/kconfig/gconf.c:136
+msgid "optional/"
+msgstr "kiegészítő/"
+
+#: scripts/kconfig/gconf.c:138
+msgid "write/"
+msgstr "írás/"
+
+#: scripts/kconfig/gconf.c:140
+msgid "changed/"
+msgstr "változott/"
+
+#: scripts/kconfig/gconf.c:142
+msgid "new/"
+msgstr "új/"
+
+#: scripts/kconfig/gconf.c:144
+msgid "auto/"
+msgstr "auto/"
+
+#: scripts/kconfig/gconf.c:163
+msgid "prompt"
+msgstr "prompt"
+
+#: scripts/kconfig/gconf.c:165
+msgid "comment"
+msgstr "megjegyzés"
+
+#: scripts/kconfig/gconf.c:167
+msgid "menu"
+msgstr "menü"
+
+#: scripts/kconfig/gconf.c:169
+msgid "default"
+msgstr "alapértelmezett"
+
+#: scripts/kconfig/gconf.c:171
+msgid "choice"
+msgstr "választás"
+
+#: scripts/kconfig/gconf.c:196
+msgid "GUI loading failed !\n"
+msgstr "GUI betöltése sikertelen !\n"
+
+#: scripts/kconfig/gconf.c:328 scripts/kconfig/gconf.c:373
+msgid "Options"
+msgstr "Beállítások"
+
+#: scripts/kconfig/gconf.c:404 scripts/kconfig/qconf.cc:432
+msgid "Name"
+msgstr "Név"
+
+#: scripts/kconfig/gconf.c:428 scripts/kconfig/qconf.cc:439
+msgid "Value"
+msgstr "Érték"
+
+#: scripts/kconfig/gconf.c:533
+msgid "Warning !"
+msgstr "Figyelmeztetés !"
+
+#: scripts/kconfig/gconf.c:547
+msgid ""
+"\n"
+"Save configuration ?\n"
+msgstr ""
+"\n"
+"Beállítások mentése ?\n"
+
+#: scripts/kconfig/gconf.c:607 scripts/kconfig/gconf.c:635
+#: scripts/kconfig/gconf.c:650
+msgid "Error"
+msgstr "Hiba"
+
+#: scripts/kconfig/gconf.c:607
+msgid "Unable to load configuration !"
+msgstr "A beállítások nem tölthetők be !"
+
+#: scripts/kconfig/gconf.c:616
+msgid "Load file..."
+msgstr "Fájl betöltése..."
+
+#: scripts/kconfig/gconf.c:635 scripts/kconfig/gconf.c:650
+msgid "Unable to save configuration !"
+msgstr "A beállítások nem menthetők el !"
+
+#: scripts/kconfig/gconf.c:659
+msgid "Save file as..."
+msgstr "Mentés mint..."
+
+#: scripts/kconfig/gconf.c:776
+msgid ""
+"gkc is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n"
+"Based on the source code from Roman Zippel.\n"
+msgstr ""
+"gkc is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n"
+"Roman Zippel forráskódját alapul véve.\n"
+
+#: scripts/kconfig/gconf.c:794
+msgid ""
+"gkc is released under the terms of the GNU GPL v2.\n"
+"For more information, please see the source code or\n"
+"visit http://www.fsf.org/licenses/licenses.html\n"
+msgstr ""
+"A gkc a GNU GPL v2 szabályai allat jelent meg.\n"
+"A bővebb információkért lásd a forráskódot vagy a\n"
+"<http://www.fsf.org/licenses/licenses.html> oldalt.\n"
+
+#: scripts/kconfig/gconf.c:1107 scripts/kconfig/qconf.cc:647
+msgid "m"
+msgstr "m"
+
+#: scripts/kconfig/gconf.c:1193
+msgid "(NEW)"
+msgstr "(ÚJ)"
+
+#: scripts/kconfig/gconf.c:1617 scripts/kconfig/qconf.cc:1381
+#, c-format
+msgid "%s <config>\n"
+msgstr "%s <konfig>\n"
+
+#: scripts/kconfig/gconf.glade.h:1 scripts/kconfig/qconf.cc:863
+msgid "Back"
+msgstr "Vissza"
+
+#: scripts/kconfig/gconf.glade.h:2
+msgid "Collapse"
+msgstr "Felgördítés"
+
+#: scripts/kconfig/gconf.glade.h:3
+msgid "Collapse the whole tree in the right frame"
+msgstr "Az egész fa felgördítése a jobb keretben"
+
+#: scripts/kconfig/gconf.glade.h:4
+msgid "Expand"
+msgstr "Kiboltás"
+
+#: scripts/kconfig/gconf.glade.h:5
+msgid "Expand the whole tree in the right frame"
+msgstr "Az egész fa kibontása a jobb keretben"
+
+#: scripts/kconfig/gconf.glade.h:6
+msgid "Full"
+msgstr "Teljes"
+
+#: scripts/kconfig/gconf.glade.h:7
+msgid "Full view"
+msgstr "Teljes nézet"
+
+#: scripts/kconfig/gconf.glade.h:8
+msgid "Goes up of one level (single view)"
+msgstr "Egy szinttel feljebb (egyszerű megjelenítés)"
+
+#: scripts/kconfig/gconf.glade.h:9
+msgid "Gtk Kernel Configurator"
+msgstr "Gtk Rendszermag Beállító"
+
+#: scripts/kconfig/gconf.glade.h:10 scripts/kconfig/qconf.cc:868
+msgid "Load"
+msgstr "Betöltés"
+
+#: scripts/kconfig/gconf.glade.h:11
+msgid "Load a config file"
+msgstr "Egy beállítás fájl betöltése"
+
+#: scripts/kconfig/gconf.glade.h:12 scripts/kconfig/qconf.cc:870
+msgid "Save"
+msgstr "Menetés"
+
+#: scripts/kconfig/gconf.glade.h:13
+msgid "Save _as"
+msgstr "Mentés m_int"
+
+#: scripts/kconfig/gconf.glade.h:14
+msgid "Save a config file"
+msgstr "Egy beállítás fájl mentése"
+
+#: scripts/kconfig/gconf.glade.h:15
+msgid "Save the config in .config"
+msgstr "Beállítások mentése a .config fájlba"
+
+#: scripts/kconfig/gconf.glade.h:16
+msgid "Save the config in a file"
+msgstr "Beállítások mentése egy fájlba"
+
+#: scripts/kconfig/gconf.glade.h:17
+msgid "Show _data"
+msgstr "_Adatokat mutat"
+
+#: scripts/kconfig/gconf.glade.h:18
+msgid "Show _debug info"
+msgstr "Nyom_követési infó mutatása"
+
+#: scripts/kconfig/gconf.glade.h:19
+msgid "Show _name"
+msgstr "_Neveket mutat"
+
+#: scripts/kconfig/gconf.glade.h:20
+msgid "Show _range"
+msgstr "É_rtékeket mutat"
+
+#: scripts/kconfig/gconf.glade.h:21
+msgid "Show all _options"
+msgstr "_Összes beállítás mutatása"
+
+#: scripts/kconfig/gconf.glade.h:22
+msgid "Show all options"
+msgstr "Összes beállítás mutatása"
+
+#: scripts/kconfig/gconf.glade.h:23
+msgid "Show masked options"
+msgstr "Maszkolt beállítások mutatása"
+
+#: scripts/kconfig/gconf.glade.h:24
+msgid "Show name"
+msgstr "Neveket mutat"
+
+#: scripts/kconfig/gconf.glade.h:25
+msgid "Show range (Y/M/N)"
+msgstr "Értékeket mutat (I/M/N)"
+
+#: scripts/kconfig/gconf.glade.h:26
+msgid "Show value of the option"
+msgstr "Az opció értékének mutatása"
+
+#: scripts/kconfig/gconf.glade.h:27
+msgid "Single"
+msgstr "Egyszerű"
+
+#: scripts/kconfig/gconf.glade.h:28
+msgid "Single view"
+msgstr "Egyszerű nézet"
+
+#: scripts/kconfig/gconf.glade.h:29
+msgid "Sorry, no help available for this option yet."
+msgstr "Sajnálom, még nincs elérhető segítség ehhez az opcióhoz."
+
+#: scripts/kconfig/gconf.glade.h:30
+msgid "Split"
+msgstr "Felosztott"
+
+#: scripts/kconfig/gconf.glade.h:31
+msgid "Split view"
+msgstr "Felosztott nézet"
+
+#: scripts/kconfig/gconf.glade.h:32
+msgid "_About"
+msgstr "_Névjegy"
+
+#: scripts/kconfig/gconf.glade.h:33
+msgid "_File"
+msgstr "_Fájl"
+
+#: scripts/kconfig/gconf.glade.h:34
+msgid "_Help"
+msgstr "_Súgó"
+
+#: scripts/kconfig/gconf.glade.h:35
+msgid "_Introduction"
+msgstr "_Bemutatás"
+
+#: scripts/kconfig/gconf.glade.h:36
+msgid "_License"
+msgstr "_License"
+
+#: scripts/kconfig/gconf.glade.h:37
+msgid "_Load"
+msgstr "_Betöltés"
+
+#: scripts/kconfig/gconf.glade.h:38
+msgid "_Options"
+msgstr "_Beállítások"
+
+#: scripts/kconfig/gconf.glade.h:39
+msgid "_Quit"
+msgstr "_Kilép"
+
+#: scripts/kconfig/gconf.glade.h:40
+msgid "_Save"
+msgstr "_Menetés"
+
+#: scripts/kconfig/qconf.cc:418
+msgid "Option"
+msgstr "Opció"
+
+#: scripts/kconfig/qconf.cc:861
+msgid "Tools"
+msgstr "Eszközök"
+
+#: scripts/kconfig/qconf.cc:866
+msgid "Quit"
+msgstr "Kilép"
+
+#: scripts/kconfig/qconf.cc:866
+msgid "&Quit"
+msgstr "&Kilép"
+
+#: scripts/kconfig/qconf.cc:868
+msgid "&Load"
+msgstr "&Betöltés"
+
+#: scripts/kconfig/qconf.cc:870
+msgid "&Save"
+msgstr "&Menetés"
+
+#: scripts/kconfig/qconf.cc:872
+msgid "Save As..."
+msgstr "Mentés mint..."
+
+#: scripts/kconfig/qconf.cc:872
+msgid "Save &As..."
+msgstr "M&entés mint"
+
+#: scripts/kconfig/qconf.cc:874
+msgid "Single View"
+msgstr "Egyszerű Nézet"
+
+#: scripts/kconfig/qconf.cc:874 scripts/kconfig/qconf.cc:876
+msgid "Split View"
+msgstr "Felosztott nézet"
+
+#: scripts/kconfig/qconf.cc:878
+msgid "Full View"
+msgstr "Teljes nézet"
+
+#: scripts/kconfig/qconf.cc:881
+msgid "Show Name"
+msgstr "Neveket mutat"
+
+#: scripts/kconfig/qconf.cc:885
+msgid "Show Range"
+msgstr "Értékeket mutat"
+
+#: scripts/kconfig/qconf.cc:889
+msgid "Show Data"
+msgstr "Adatokat mutat"
+
+#: scripts/kconfig/qconf.cc:893
+msgid "Show All Options"
+msgstr "Összes beállítás mutatása"
+
+#: scripts/kconfig/qconf.cc:897
+msgid "Show Debug Info"
+msgstr "Nyomkövetési infó mutatása"
+
+#: scripts/kconfig/qconf.cc:902
+msgid "Introduction"
+msgstr "Bemutatás"
+
+#: scripts/kconfig/qconf.cc:904
+msgid "About"
+msgstr "Névjegy"
+
+#: scripts/kconfig/qconf.cc:919
+msgid "&File"
+msgstr "&Fájl"
+
+#: scripts/kconfig/qconf.cc:928
+msgid "&Option"
+msgstr "&Beállítások"
+
+#: scripts/kconfig/qconf.cc:939
+msgid "&Help"
+msgstr "&Súgó"
+
+#: scripts/kconfig/qconf.cc:1052
+msgid "type: "
+msgstr "típus: "
+
+#: scripts/kconfig/qconf.cc:1055
+msgid " (choice)"
+msgstr " (választás)"
+
+#: scripts/kconfig/qconf.cc:1058
+msgid "reverse dep: "
+msgstr "inverz függőség: "
+
+#: scripts/kconfig/qconf.cc:1066
+msgid "prompt: "
+msgstr "prompt: "
+
+#: scripts/kconfig/qconf.cc:1071
+msgid "default: "
+msgstr "alapértelmezett: "
+
+#: scripts/kconfig/qconf.cc:1077
+msgid "choice: "
+msgstr "választás: "
+
+#: scripts/kconfig/qconf.cc:1083
+msgid "select: "
+msgstr "kiválasztás: "
+
+#: scripts/kconfig/qconf.cc:1088
+msgid "range: "
+msgstr "tartomány: "
+
+#: scripts/kconfig/qconf.cc:1093
+msgid "unknown property: "
+msgstr "ismeretlen tulajdonság: "
+
+#: scripts/kconfig/qconf.cc:1120
+#, c-format
+msgid "defined at %s:%d<br><br>"
+msgstr "definiálva: %s:%d<br><br>"
+
+#: scripts/kconfig/qconf.cc:1130
+msgid "Unable to load configuration!"
+msgstr "Nem lehet betölteni a beállításokat!"
+
+#: scripts/kconfig/qconf.cc:1137 scripts/kconfig/qconf.cc:1146
+msgid "Unable to save configuration!"
+msgstr "Nem lehet elmenteni a beállításokat!"
+
+#: scripts/kconfig/qconf.cc:1282
+msgid "Save configuration?"
+msgstr "Konfigurácó mentése?"
+
+#: scripts/kconfig/qconf.cc:1284
+msgid "&Save Changes"
+msgstr "Változások &Mentése"
+
+#: scripts/kconfig/qconf.cc:1285
+msgid "&Discard Changes"
+msgstr "Változások &Eldobása"
+
+#: scripts/kconfig/qconf.cc:1286
+msgid "Cancel Exit"
+msgstr "Mégsem"
+
+#: scripts/kconfig/qconf.cc:1318
+msgid ""
+"qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n"
+"\n"
+"Bug reports and feature request can also be entered at http://bugzilla."
+"kernel.org/\n"
+msgstr ""
+"qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n"
+"\n"
+"A hibajelzést és a fejlesztési javaslatokat el lehet küldeni a http://"
+"bugzilla.kernel.org/ címre (kizárólag angolul).\n"
_
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (18 preceding siblings ...)
2005-07-13 17:35 ` [PATCH 19/19] Kconfig I18N: UI: Hungarian translation Egry Gábor
@ 2005-07-13 17:41 ` Linus Torvalds
2005-07-13 18:03 ` Egry Gábor
2005-07-13 20:04 ` Jan Engelhardt
2005-07-13 20:45 ` Sam Ravnborg
2005-07-14 0:06 ` Roman Zippel
21 siblings, 2 replies; 39+ messages in thread
From: Linus Torvalds @ 2005-07-13 17:41 UTC (permalink / raw)
To: Egry Gábor
Cc: Andrew Morton, Roman Zippel, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
On Wed, 13 Jul 2005, Egry Gábor wrote:
>
> The following patches complete the "Kconfig I18N support" patch by
> Arnaldo.
No, I really don't want this.
I was told that the whole point of Arnaldo's work was that the actual po
files etc wouldn't need to be with the kernel, and could be a separate
package, maintained separately. Now I'm seeing patches that seem to make
that a lie.
Linus
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 17:41 ` [PATCH 0/19] Kconfig I18N completion Linus Torvalds
@ 2005-07-13 18:03 ` Egry Gábor
2005-07-13 20:11 ` Sam Ravnborg
2005-07-13 20:04 ` Jan Engelhardt
1 sibling, 1 reply; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 18:03 UTC (permalink / raw)
To: Linus Torvalds
Cc: Roman Zippel, Andrew Morton, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
On Wed, 13 Jul 2005, Linus Torvalds wrote:
> On Wed, 13 Jul 2005, Egry Gábor wrote:
> >
> > The following patches complete the "Kconfig I18N support" patch by
> > Arnaldo.
>
> No, I really don't want this.
>
> I was told that the whole point of Arnaldo's work was that the actual po
> files etc wouldn't need to be with the kernel, and could be a separate
> package, maintained separately. Now I'm seeing patches that seem to make
> that a lie.
Hmm, what .po files do you say about? I didn't send the translations of
Kconfig files. Unfortunetly Arnaldo's patch is incomplete. If you like
the unfinished things please drop my patches.
Gabor
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 20:11 ` Sam Ravnborg
@ 2005-07-13 18:41 ` Egry Gábor
2005-07-13 19:02 ` Linus Torvalds
` (2 more replies)
0 siblings, 3 replies; 39+ messages in thread
From: Egry Gábor @ 2005-07-13 18:41 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Linus Torvalds, Roman Zippel, Andrew Morton, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
On Wed, 13 Jul 2005, Sam Ravnborg wrote:
> On Wed, Jul 13, 2005 at 08:03:38PM +0200, Egry G?bor wrote:
> > On Wed, 13 Jul 2005, Linus Torvalds wrote:
> > > On Wed, 13 Jul 2005, Egry G??bor wrote:
> > > >
> > > > The following patches complete the "Kconfig I18N support" patch by
> > > > Arnaldo.
> > >
> > > No, I really don't want this.
> > >
> > > I was told that the whole point of Arnaldo's work was that the actual po
> > > files etc wouldn't need to be with the kernel, and could be a separate
> > > package, maintained separately. Now I'm seeing patches that seem to make
> > > that a lie.
> >
> > Hmm, what .po files do you say about?
> Patch 19/19 contains a .po file.
>
> Sam
Yes, the patch 19/19 contains the translation of configuration
interfaces ([x|g|menu]config) and it is only 23 kb. The full version of
unfinished hu.po is 2 MB and the fully translated italian it.po is 3,2
MB. I see Linus doesn't want the huge language files in kernel source.
But what is Linus opinion about this little .po file?
Gabor
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 18:41 ` Egry Gábor
@ 2005-07-13 19:02 ` Linus Torvalds
2005-07-15 17:41 ` Arnaldo Carvalho de Melo
2005-07-13 20:48 ` Sam Ravnborg
2005-07-14 10:03 ` Jan Engelhardt
2 siblings, 1 reply; 39+ messages in thread
From: Linus Torvalds @ 2005-07-13 19:02 UTC (permalink / raw)
To: Egry Gábor
Cc: Sam Ravnborg, Roman Zippel, Andrew Morton, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
On Wed, 13 Jul 2005, Egry Gábor wrote:
>
> Yes, the patch 19/19 contains the translation of configuration
> interfaces ([x|g|menu]config) and it is only 23 kb. The full version of
> unfinished hu.po is 2 MB and the fully translated italian it.po is 3,2
> MB. I see Linus doesn't want the huge language files in kernel source.
> But what is Linus opinion about this little .po file?
I don't want ANY of it in the kernel.
Quite frankly, I'm of the opinion that _all_ of the i18n stuff should be
totally outside the kernel. I took the patch from Arnaldo only because I
was told that me taking that patch would allow external packages to do the
rest. Now I'm told that isn't true, which just makes me pissed off.
_I_ think you should have a totally external package that knows how to
parse the Kconfig files. They have a well-known format that hasn't changed
in quite a while, and a nice parser. Yes, there will inevitably be new
entries that you don't have translations for, and you'll have to use the
English ones for those, but the fact is, that is true whether the i18n
stuff is included with the kernel or not.
And exactly _because_ it doesn't help to put the non-English translations
into the kernel, I think it's a mistake to even try. It's likely _easier_
for all the different language groups if they can just work on their _own_
project, and don't have to try to get their translations merged into the
standard kernel.
Linus
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 17:41 ` [PATCH 0/19] Kconfig I18N completion Linus Torvalds
2005-07-13 18:03 ` Egry Gábor
@ 2005-07-13 20:04 ` Jan Engelhardt
1 sibling, 0 replies; 39+ messages in thread
From: Jan Engelhardt @ 2005-07-13 20:04 UTC (permalink / raw)
To: Linus Torvalds
Cc: Egry Gábor, Andrew Morton, Roman Zippel, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
>> The following patches complete the "Kconfig I18N support" patch by
>> Arnaldo.
>
>I was told that the whole point of Arnaldo's work was that the actual po
>files etc wouldn't need to be with the kernel, and could be a separate
They in fact do not need to be with the kernel. It's just "bad timing" that
the recently submitted patches do so.
>package, maintained separately. Now I'm seeing patches that seem to make
>that a lie.
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 18:03 ` Egry Gábor
@ 2005-07-13 20:11 ` Sam Ravnborg
2005-07-13 18:41 ` Egry Gábor
0 siblings, 1 reply; 39+ messages in thread
From: Sam Ravnborg @ 2005-07-13 20:11 UTC (permalink / raw)
To: Egry G?bor
Cc: Linus Torvalds, Roman Zippel, Andrew Morton, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
On Wed, Jul 13, 2005 at 08:03:38PM +0200, Egry G?bor wrote:
> On Wed, 13 Jul 2005, Linus Torvalds wrote:
> > On Wed, 13 Jul 2005, Egry G??bor wrote:
> > >
> > > The following patches complete the "Kconfig I18N support" patch by
> > > Arnaldo.
> >
> > No, I really don't want this.
> >
> > I was told that the whole point of Arnaldo's work was that the actual po
> > files etc wouldn't need to be with the kernel, and could be a separate
> > package, maintained separately. Now I'm seeing patches that seem to make
> > that a lie.
>
> Hmm, what .po files do you say about?
Patch 19/19 contains a .po file.
Sam
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (19 preceding siblings ...)
2005-07-13 17:41 ` [PATCH 0/19] Kconfig I18N completion Linus Torvalds
@ 2005-07-13 20:45 ` Sam Ravnborg
2005-07-14 3:42 ` Sam Ravnborg
2005-07-14 0:06 ` Roman Zippel
21 siblings, 1 reply; 39+ messages in thread
From: Sam Ravnborg @ 2005-07-13 20:45 UTC (permalink / raw)
To: Egry G?bor
Cc: Linus Torvalds, Andrew Morton, Roman Zippel, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
On Wed, Jul 13, 2005 at 06:50:56PM +0200, Egry G?bor wrote:
> Hello,
>
> The following patches complete the "Kconfig I18N support" patch by
> Arnaldo.
>
> The following parts are internationalised:
> - Kconfig prompt, help, comment and menu texts
> - full visible configuration interfaces
> - error messages if the user can correct the errors (ex. saving config
> file)
> - answering (Y/M/N)
> - option's value if it is a choice (viewing only)
>
> Without I18N support:
> - symbol names (CONFIG_xxx)
> - Kconfig parsing errors in LKC
> - lxdialog's errors
> - content of the config file
> - disabled debug messages in the source code
>
> Some incomplete language files are downloadable from the
> http://sourceforge.net/projects/tlktp/ page for testing (langpack).
>
> Currently available:
> - Italian (98%)
> - Hungarian (67%)
> - French (37%)
> - Catalan (10%)
> - Russian (5%)
>
> All patches are tested without any problems.
When I apply them to latest Linus tree I gett a few fuzz and a single
reject. After fixing this and compiling I get a number of warnings and
errors. I have not investigated the source of this.
Sam
make menuconfig output:
Makefile:485: .config: No such file or directory
make[1]: Nothing to be done for `Makefile'.
HOSTCC scripts/lxdialog/checklist.o
scripts/lxdialog/checklist.c: In function `print_item':
scripts/lxdialog/checklist.c:63: warning: implicit declaration of function `mvwaddwstr'
scripts/lxdialog/checklist.c:65: warning: implicit declaration of function `waddwstr'
HOSTCC scripts/lxdialog/inputbox.o
scripts/lxdialog/inputbox.c: In function `dialog_inputbox':
scripts/lxdialog/inputbox.c:89: warning: implicit declaration of function `waddwstr'
HOSTCC scripts/lxdialog/lxdialog.o
HOSTCC scripts/lxdialog/menubox.o
scripts/lxdialog/menubox.c: In function `print_item':
scripts/lxdialog/menubox.c:99: warning: implicit declaration of function `mvwaddwstr'
scripts/lxdialog/menubox.c: In function `dialog_menu':
scripts/lxdialog/menubox.c:236: warning: implicit declaration of function `waddwstr'
scripts/lxdialog/menubox.c:549: warning: implicit declaration of function `_'
scripts/lxdialog/menubox.c:549: warning: passing arg 1 of `to_wchar' makes pointer from integer without a cast
scripts/lxdialog/menubox.c:550: warning: passing arg 1 of `to_wchar' makes pointer from integer without a cast
scripts/lxdialog/menubox.c:551: warning: passing arg 1 of `to_wchar' makes pointer from integer without a cast
scripts/lxdialog/menubox.c:552: warning: passing arg 1 of `to_wchar' makes pointer from integer without a cast
HOSTCC scripts/lxdialog/msgbox.o
scripts/lxdialog/msgbox.c: In function `dialog_msgbox':
scripts/lxdialog/msgbox.c:63: warning: implicit declaration of function `waddwstr'
HOSTCC scripts/lxdialog/textbox.o
scripts/lxdialog/textbox.c: In function `dialog_textbox':
scripts/lxdialog/textbox.c:126: warning: implicit declaration of function `waddwstr'
HOSTCC scripts/lxdialog/util.o
scripts/lxdialog/util.c: In function `print_autowrap':
scripts/lxdialog/util.c:217: warning: implicit declaration of function `waddwstr'
HOSTCC scripts/lxdialog/yesno.o
scripts/lxdialog/yesno.c: In function `dialog_yesno':
scripts/lxdialog/yesno.c:85: warning: implicit declaration of function `waddwstr'
scripts/lxdialog/yesno.c:113: warning: implicit declaration of function `_'
scripts/lxdialog/yesno.c:113: warning: passing arg 1 of `to_wchar' makes pointer from integer without a cast
scripts/lxdialog/yesno.c:114: warning: passing arg 1 of `to_wchar' makes pointer from integer without a cast
scripts/lxdialog/yesno.c:115: warning: passing arg 1 of `to_wchar' makes pointer from integer without a cast
scripts/lxdialog/yesno.c:116: warning: passing arg 1 of `to_wchar' makes pointer from integer without a cast
HOSTLD scripts/lxdialog/lxdialog
scripts/lxdialog/menubox.o(.text+0xe6b): In function `dialog_menu':
: undefined reference to `_'
scripts/lxdialog/menubox.o(.text+0xe83): In function `dialog_menu':
: undefined reference to `_'
scripts/lxdialog/menubox.o(.text+0xe99): In function `dialog_menu':
: undefined reference to `_'
scripts/lxdialog/menubox.o(.text+0xeaf): In function `dialog_menu':
: undefined reference to `_'
scripts/lxdialog/yesno.o(.text+0x2a9): In function `dialog_yesno':
: undefined reference to `_'
scripts/lxdialog/yesno.o(.text+0x2bf): more undefined references to `_' follow
collect2: ld returned 1 exit status
make[3]: *** [scripts/lxdialog/lxdialog] Error 1
make[2]: *** [menuconfig] Error 2
make[1]: *** [menuconfig] Error 2
make: *** [menuconfig] Error 2
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 18:41 ` Egry Gábor
2005-07-13 19:02 ` Linus Torvalds
@ 2005-07-13 20:48 ` Sam Ravnborg
2005-07-14 10:03 ` Jan Engelhardt
2 siblings, 0 replies; 39+ messages in thread
From: Sam Ravnborg @ 2005-07-13 20:48 UTC (permalink / raw)
To: Egry G?bor
Cc: Linus Torvalds, Roman Zippel, Andrew Morton, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
> Yes, the patch 19/19 contains the translation of configuration
> interfaces ([x|g|menu]config) and it is only 23 kb.
The kernel proper are not to be clutered with a huge number of .po
files. They do not belong in the kernel at the first place.
Sam
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
` (20 preceding siblings ...)
2005-07-13 20:45 ` Sam Ravnborg
@ 2005-07-14 0:06 ` Roman Zippel
21 siblings, 0 replies; 39+ messages in thread
From: Roman Zippel @ 2005-07-14 0:06 UTC (permalink / raw)
To: Egry G�bor
Cc: Linus Torvalds, Andrew Morton, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 460 bytes --]
Hi,
On Wed, 13 Jul 2005, Egry Gábor wrote:
> The following patches complete the "Kconfig I18N support" patch by
> Arnaldo.
First I'd really like to see some documentation on this, which describes
the interface how tools/distributions can provide Kconfig I18N support.
> - answering (Y/M/N)
This one is just silly. Provide a nice helptext, which describes what that
means, for xconfig I'm also accepting nice descriptive icons.
bye, Roman
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 4/19] Kconfig I18N: lxdialog: multibyte character support
2005-07-13 17:11 ` [PATCH 4/19] Kconfig I18N: lxdialog: multibyte character support Egry Gábor
@ 2005-07-14 0:10 ` Roman Zippel
0 siblings, 0 replies; 39+ messages in thread
From: Roman Zippel @ 2005-07-14 0:10 UTC (permalink / raw)
To: Egry G�bor
Cc: Linus Torvalds, Andrew Morton, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 384 bytes --]
Hi,
On Wed, 13 Jul 2005, Egry Gábor wrote:
> UTF-8 support for lxdialog with wchar. The installed wide ncurses
> (ncursesw) is optional because some languages (ex. English, Italian)
> and ISO 8859-xx charsets don't require this patch.
This is ugly, this just adds lots of #ifdefs with practically duplicated
code. Please use some wrapper functions/macros.
bye, Roman
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 18/19] Kconfig I18N: LKC: whitespace removing
2005-07-13 17:33 ` [PATCH 18/19] Kconfig I18N: LKC: whitespace removing Egry Gábor
@ 2005-07-14 0:12 ` Roman Zippel
0 siblings, 0 replies; 39+ messages in thread
From: Roman Zippel @ 2005-07-14 0:12 UTC (permalink / raw)
To: Egry G�bor
Cc: Linus Torvalds, Andrew Morton, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 1061 bytes --]
Hi,
On Wed, 13 Jul 2005, Egry Gábor wrote:
> diff -puN scripts/kconfig/zconf.l~kconfig-i18n-18-whitespace-fix scripts/kconfig/zconf.l
> --- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/zconf.l~kconfig-i18n-18-whitespace-fix 2005-07-13 18:32:20.000000000 +0200
> +++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/zconf.l 2005-07-13 18:32:20.000000000 +0200
> @@ -57,6 +57,17 @@ void append_string(const char *str, int
> *text_ptr = 0;
> }
>
> +void append_helpstring(const char *str, int size)
> +{
> + while (size) {
> + if ((str[size-1] != ' ') && (str[size-1] != '\t'))
> + break;
> + size--;
> + }
> +
> + append_string (str, size);
> +}
> +
> void alloc_string(const char *str, int size)
> {
> text = malloc(size + 1);
> @@ -225,7 +236,7 @@ n [A-Za-z0-9_]
> append_string("\n", 1);
> }
> [^ \t\n].* {
> - append_string(yytext, yyleng);
> + append_helpstring(yytext, yyleng);
> if (!first_ts)
> first_ts = last_ts;
> }
Simply integrate the function into the caller.
bye, Roman
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Kconfig: lxdialog: Enable UTF8
2005-07-13 17:26 ` [PATCH] Kconfig: lxdialog: Enable UTF8 Jan Engelhardt
@ 2005-07-14 0:26 ` Ken Moffat
2005-07-16 9:54 ` Sam Ravnborg
0 siblings, 1 reply; 39+ messages in thread
From: Ken Moffat @ 2005-07-14 0:26 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Linux Kernel Mailing List
On Wed, 13 Jul 2005, Jan Engelhardt wrote:
> Hi,
>
>
> utf-8 enabled vc consoles (/dev/tty1) usually show line drawing
> graphics with the ascii set, e.g. + - and | for lxdialog (and many other apps
> btw)
>
> The following patch brings back the real graphics for lxdialog, which are
> normally present in these cases:
> - non-utf8 vc
> - xterm (u8 / non-u8)
>
OK, I'll bite - non utf8 here, and no libncursesw : a quick google
suggests I can get it if I recompile ncurses with --enable-widec, but
why would I want to do that ?
Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 20:45 ` Sam Ravnborg
@ 2005-07-14 3:42 ` Sam Ravnborg
0 siblings, 0 replies; 39+ messages in thread
From: Sam Ravnborg @ 2005-07-14 3:42 UTC (permalink / raw)
To: Egry G?bor
Cc: Linus Torvalds, Andrew Morton, Roman Zippel, Massimo Maiurana,
Linux Kernel Mailing List, KernelFR, Arnaldo Carvalho de Melo
> When I apply them to latest Linus tree I gett a few fuzz and a single
> reject. After fixing this and compiling I get a number of warnings and
> errors. I have not investigated the source of this.
I now see that I missed two patches in the serie.
I will try to reapply tomorrow.
Sam
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 18:41 ` Egry Gábor
2005-07-13 19:02 ` Linus Torvalds
2005-07-13 20:48 ` Sam Ravnborg
@ 2005-07-14 10:03 ` Jan Engelhardt
2 siblings, 0 replies; 39+ messages in thread
From: Jan Engelhardt @ 2005-07-14 10:03 UTC (permalink / raw)
To: Egry Gábor
Cc: Sam Ravnborg, Linus Torvalds, Roman Zippel, Andrew Morton,
Massimo Maiurana, Linux Kernel Mailing List, KernelFR,
Arnaldo Carvalho de Melo
>> Patch 19/19 contains a .po file.
>
>Yes, the patch 19/19 contains the translation of configuration...
>I see Linus doesn't want the huge language files in kernel source.
>But what is Linus opinion about this little .po file?
What is little? Given that there's 'roughly' 119 languages (find
/usr/share/locale -type d -maxdepth 1 | wc -l), you'd surely reconsider if
adding 119 23KB files, if it was considered "small".
As I perceive it, the policy is: no PO files in mainline at all. I'm fine with
that.
Keeping the translations in sync with the mainline Kconfig help texts/etc. is
also not an easy task unless you got a lot of time to spare.
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 0/19] Kconfig I18N completion
2005-07-13 19:02 ` Linus Torvalds
@ 2005-07-15 17:41 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 39+ messages in thread
From: Arnaldo Carvalho de Melo @ 2005-07-15 17:41 UTC (permalink / raw)
To: Linus Torvalds
Cc: Egry Gábor, Sam Ravnborg, Roman Zippel, Andrew Morton,
Massimo Maiurana, Linux Kernel Mailing List, KernelFR
Em Wed, Jul 13, 2005 at 12:02:20PM -0700, Linus Torvalds escreveu:
>
>
> On Wed, 13 Jul 2005, Egry Gábor wrote:
> >
> > Yes, the patch 19/19 contains the translation of configuration
> > interfaces ([x|g|menu]config) and it is only 23 kb. The full version of
> > unfinished hu.po is 2 MB and the fully translated italian it.po is 3,2
> > MB. I see Linus doesn't want the huge language files in kernel source.
> > But what is Linus opinion about this little .po file?
>
> I don't want ANY of it in the kernel.
Neither me.
> Quite frankly, I'm of the opinion that _all_ of the i18n stuff should be
> totally outside the kernel. I took the patch from Arnaldo only because I
> was told that me taking that patch would allow external packages to do the
> rest. Now I'm told that isn't true, which just makes me pissed off.
>
> _I_ think you should have a totally external package that knows how to
> parse the Kconfig files. They have a well-known format that hasn't changed
> in quite a while, and a nice parser. Yes, there will inevitably be new
> entries that you don't have translations for, and you'll have to use the
> English ones for those, but the fact is, that is true whether the i18n
> stuff is included with the kernel or not.
Having just kxgettext as I submitted I guess is enough, the translators
just do make update-po-config and do the translations, put that somewhere
for anyone who wants to use it.
> And exactly _because_ it doesn't help to put the non-English translations
> into the kernel, I think it's a mistake to even try. It's likely _easier_
> for all the different language groups if they can just work on their _own_
> project, and don't have to try to get their translations merged into the
> standard kernel.
Exactly.
- Arnaldo
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Kconfig: lxdialog: Enable UTF8
2005-07-14 0:26 ` Ken Moffat
@ 2005-07-16 9:54 ` Sam Ravnborg
2005-07-16 10:12 ` Ken Moffat
0 siblings, 1 reply; 39+ messages in thread
From: Sam Ravnborg @ 2005-07-16 9:54 UTC (permalink / raw)
To: Ken Moffat; +Cc: Jan Engelhardt, Linux Kernel Mailing List
>
> OK, I'll bite - non utf8 here, and no libncursesw : a quick google
> suggests I can get it if I recompile ncurses with --enable-widec, but
> why would I want to do that ?
Could you try if specifying both libraries works for you. the 'w'
version first. Then we can use the 'w' version when available but
fall-back to the normal case if not.
Sam
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Kconfig: lxdialog: Enable UTF8
2005-07-16 9:54 ` Sam Ravnborg
@ 2005-07-16 10:12 ` Ken Moffat
2005-07-16 22:14 ` Ken Moffat
0 siblings, 1 reply; 39+ messages in thread
From: Ken Moffat @ 2005-07-16 10:12 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Jan Engelhardt, Linux Kernel Mailing List
On Sat, 16 Jul 2005, Sam Ravnborg wrote:
> >
> > OK, I'll bite - non utf8 here, and no libncursesw : a quick google
> > suggests I can get it if I recompile ncurses with --enable-widec, but
> > why would I want to do that ?
> Could you try if specifying both libraries works for you. the 'w'
> version first. Then we can use the 'w' version when available but
> fall-back to the normal case if not.
>
> Sam
>
Didn't work, I get the not unexpected "cannot find -lncursesw". I
think some sort of pre-test will be needed to see which one exists.
I'm weak on doing this in a Makefile, but I'll have a look tonight or
tomorrow.
Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Kconfig: lxdialog: Enable UTF8
2005-07-16 10:12 ` Ken Moffat
@ 2005-07-16 22:14 ` Ken Moffat
0 siblings, 0 replies; 39+ messages in thread
From: Ken Moffat @ 2005-07-16 22:14 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Jan Engelhardt, Linux Kernel Mailing List
On Sat, 16 Jul 2005, Ken Moffat wrote:
> On Sat, 16 Jul 2005, Sam Ravnborg wrote:
>
> > >
> > > OK, I'll bite - non utf8 here, and no libncursesw : a quick google
> > > suggests I can get it if I recompile ncurses with --enable-widec, but
> > > why would I want to do that ?
> > Could you try if specifying both libraries works for you. the 'w'
> > version first. Then we can use the 'w' version when available but
> > fall-back to the normal case if not.
> >
> > Sam
> >
>
> Didn't work, I get the not unexpected "cannot find -lncursesw". I
> think some sort of pre-test will be needed to see which one exists.
> I'm weak on doing this in a Makefile, but I'll have a look tonight or
> tomorrow.
>
Hmm, I can repeatedly test by linking against candidate libraries by
converting the current if...else test to nested if..else (adding
-lcurses while I'm at it), but I can't crack setting HOST_LOADLIBES from
that - if the link succeeded, I'm into the shell code to tidy up and
from there I can't set a variable in the Makefile .
I don't want to attempt to build a configure script in a Makefile -
even if it's possible, I think it would be nasty. So unless I've
misunderstood your question, no, I can't specify both libraries.
Note that I originally asked why on a system that doesn't use utf8, I
should rebuild ncurses. A sufficiently compelling reason would make me
rebuild.
Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
^ permalink raw reply [flat|nested] 39+ messages in thread
end of thread, other threads:[~2005-07-16 22:14 UTC | newest]
Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-13 16:50 [PATCH 0/19] Kconfig I18N completion Egry Gábor
2005-07-13 17:04 ` [PATCH 1/19] Kconfig I18N: sublocale Egry Gábor
2005-07-13 17:07 ` [PATCH 2/19] Kconfig I18N: lxdialog: width fix Egry Gábor
2005-07-13 17:26 ` [PATCH] Kconfig: lxdialog: Enable UTF8 Jan Engelhardt
2005-07-14 0:26 ` Ken Moffat
2005-07-16 9:54 ` Sam Ravnborg
2005-07-16 10:12 ` Ken Moffat
2005-07-16 22:14 ` Ken Moffat
2005-07-13 17:09 ` [PATCH 3/19] Kconfig I18N: lxdialog Egry Gábor
2005-07-13 17:11 ` [PATCH 4/19] Kconfig I18N: lxdialog: multibyte character support Egry Gábor
2005-07-14 0:10 ` Roman Zippel
2005-07-13 17:13 ` [PATCH 5/19] Kconfig I18N: lxdialog: answering Egry Gábor
2005-07-13 17:15 ` [PATCH 6/19] Kconfig I18N: config Egry Gábor
2005-07-13 17:17 ` [PATCH 7/19] Kconfig I18N: gconfig Egry Gábor
2005-07-13 17:18 ` [PATCH 8/19] Kconfig I18N: gconfig: GUI Egry Gábor
2005-07-13 17:20 ` [PATCH 9/19] Kconfig I18N: gconfig: answering Egry Gábor
2005-07-13 17:21 ` [PATCH 10/19] Kconfig I18N: gconfig: missing macros Egry Gábor
2005-07-13 17:23 ` [PATCH 11/19] Kconfig I18N: gconfig: symbol fix Egry Gábor
2005-07-13 17:24 ` [PATCH 12/19] Kconfig I18N: menuconfig Egry Gábor
2005-07-13 17:26 ` [PATCH 13/19] Kconfig I18N: menuconfig: answering Egry Gábor
2005-07-13 17:27 ` [PATCH 14/19] Kconfig I18N: menuconfig: missing macros Egry Gábor
2005-07-13 17:28 ` [PATCH 15/19] Kconfig I18n: xconfig Egry Gábor
2005-07-13 17:30 ` [PATCH 16/19] Kconfig I18n: xconfig: answering Egry Gábor
2005-07-13 17:31 ` [PATCH 17/19] Kconfig I18N: xconfig: symbol fix Egry Gábor
2005-07-13 17:33 ` [PATCH 18/19] Kconfig I18N: LKC: whitespace removing Egry Gábor
2005-07-14 0:12 ` Roman Zippel
2005-07-13 17:35 ` [PATCH 19/19] Kconfig I18N: UI: Hungarian translation Egry Gábor
2005-07-13 17:41 ` [PATCH 0/19] Kconfig I18N completion Linus Torvalds
2005-07-13 18:03 ` Egry Gábor
2005-07-13 20:11 ` Sam Ravnborg
2005-07-13 18:41 ` Egry Gábor
2005-07-13 19:02 ` Linus Torvalds
2005-07-15 17:41 ` Arnaldo Carvalho de Melo
2005-07-13 20:48 ` Sam Ravnborg
2005-07-14 10:03 ` Jan Engelhardt
2005-07-13 20:04 ` Jan Engelhardt
2005-07-13 20:45 ` Sam Ravnborg
2005-07-14 3:42 ` Sam Ravnborg
2005-07-14 0:06 ` Roman Zippel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.