diff options
author | EGRY Gabor <gaboregry1@t-online.hu> | 2008-01-11 17:42:54 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2008-01-28 17:14:39 -0500 |
commit | 75c0a8a55c31c0a21f7e9e64bc45e87e228a98f6 (patch) | |
tree | e2e5652ee20f30ac7f8d73e2abc2a089218b3e89 /scripts/kconfig | |
parent | 413f006bab3845f12d7b2338a9b548aaf7808548 (diff) |
kconfig: gettext support for lxdialog
Gettext support for lxdialog.
Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/POTFILES.in | 6 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/checklist.c | 4 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/dialog.h | 6 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/inputbox.c | 4 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/menubox.c | 6 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/textbox.c | 2 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/yesno.c | 4 |
7 files changed, 22 insertions, 10 deletions
diff --git a/scripts/kconfig/POTFILES.in b/scripts/kconfig/POTFILES.in index 19d0e63fb7ba..967457396990 100644 --- a/scripts/kconfig/POTFILES.in +++ b/scripts/kconfig/POTFILES.in | |||
@@ -1,3 +1,9 @@ | |||
1 | scripts/kconfig/lxdialog/checklist.c | ||
2 | scripts/kconfig/lxdialog/inputbox.c | ||
3 | scripts/kconfig/lxdialog/menubox.c | ||
4 | scripts/kconfig/lxdialog/textbox.c | ||
5 | scripts/kconfig/lxdialog/util.c | ||
6 | scripts/kconfig/lxdialog/yesno.c | ||
1 | scripts/kconfig/mconf.c | 7 | scripts/kconfig/mconf.c |
2 | scripts/kconfig/conf.c | 8 | scripts/kconfig/conf.c |
3 | scripts/kconfig/confdata.c | 9 | scripts/kconfig/confdata.c |
diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c index cf697080dddd..b2a878c936d6 100644 --- a/scripts/kconfig/lxdialog/checklist.c +++ b/scripts/kconfig/lxdialog/checklist.c | |||
@@ -97,8 +97,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected) | |||
97 | int x = width / 2 - 11; | 97 | int x = width / 2 - 11; |
98 | int y = height - 2; | 98 | int y = height - 2; |
99 | 99 | ||
100 | print_button(dialog, "Select", y, x, selected == 0); | 100 | print_button(dialog, gettext("Select"), y, x, selected == 0); |
101 | print_button(dialog, " Help ", y, x + 14, selected == 1); | 101 | print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); |
102 | 102 | ||
103 | wmove(dialog, y, x + 1 + 14 * selected); | 103 | wmove(dialog, y, x + 1 + 14 * selected); |
104 | wrefresh(dialog); | 104 | wrefresh(dialog); |
diff --git a/scripts/kconfig/lxdialog/dialog.h b/scripts/kconfig/lxdialog/dialog.h index c4ad37fd922c..b5211fce0d94 100644 --- a/scripts/kconfig/lxdialog/dialog.h +++ b/scripts/kconfig/lxdialog/dialog.h | |||
@@ -26,6 +26,12 @@ | |||
26 | #include <string.h> | 26 | #include <string.h> |
27 | #include <stdbool.h> | 27 | #include <stdbool.h> |
28 | 28 | ||
29 | #ifndef KBUILD_NO_NLS | ||
30 | # include <libintl.h> | ||
31 | #else | ||
32 | # define gettext(Msgid) ((const char *) (Msgid)) | ||
33 | #endif | ||
34 | |||
29 | #ifdef __sun__ | 35 | #ifdef __sun__ |
30 | #define CURS_MACROS | 36 | #define CURS_MACROS |
31 | #endif | 37 | #endif |
diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c index 05e72066b359..4946bd02b46d 100644 --- a/scripts/kconfig/lxdialog/inputbox.c +++ b/scripts/kconfig/lxdialog/inputbox.c | |||
@@ -31,8 +31,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected) | |||
31 | int x = width / 2 - 11; | 31 | int x = width / 2 - 11; |
32 | int y = height - 2; | 32 | int y = height - 2; |
33 | 33 | ||
34 | print_button(dialog, " Ok ", y, x, selected == 0); | 34 | print_button(dialog, gettext(" Ok "), y, x, selected == 0); |
35 | print_button(dialog, " Help ", y, x + 14, selected == 1); | 35 | print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); |
36 | 36 | ||
37 | wmove(dialog, y, x + 1 + 14 * selected); | 37 | wmove(dialog, y, x + 1 + 14 * selected); |
38 | wrefresh(dialog); | 38 | wrefresh(dialog); |
diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c index 0d83159d9012..fa9d633f293c 100644 --- a/scripts/kconfig/lxdialog/menubox.c +++ b/scripts/kconfig/lxdialog/menubox.c | |||
@@ -157,9 +157,9 @@ static void print_buttons(WINDOW * win, int height, int width, int selected) | |||
157 | int x = width / 2 - 16; | 157 | int x = width / 2 - 16; |
158 | int y = height - 2; | 158 | int y = height - 2; |
159 | 159 | ||
160 | print_button(win, "Select", y, x, selected == 0); | 160 | print_button(win, gettext("Select"), y, x, selected == 0); |
161 | print_button(win, " Exit ", y, x + 12, selected == 1); | 161 | print_button(win, gettext(" Exit "), y, x + 12, selected == 1); |
162 | print_button(win, " Help ", y, x + 24, selected == 2); | 162 | print_button(win, gettext(" Help "), y, x + 24, selected == 2); |
163 | 163 | ||
164 | wmove(win, y, x + 1 + 12 * selected); | 164 | wmove(win, y, x + 1 + 12 * selected); |
165 | wrefresh(win); | 165 | wrefresh(win); |
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c index fabfc1ad789d..c704712d0227 100644 --- a/scripts/kconfig/lxdialog/textbox.c +++ b/scripts/kconfig/lxdialog/textbox.c | |||
@@ -114,7 +114,7 @@ do_resize: | |||
114 | 114 | ||
115 | print_title(dialog, title, width); | 115 | print_title(dialog, title, width); |
116 | 116 | ||
117 | print_button(dialog, " Exit ", height - 2, width / 2 - 4, TRUE); | 117 | print_button(dialog, gettext(" Exit "), height - 2, width / 2 - 4, TRUE); |
118 | wnoutrefresh(dialog); | 118 | wnoutrefresh(dialog); |
119 | getyx(dialog, cur_y, cur_x); /* Save cursor position */ | 119 | getyx(dialog, cur_y, cur_x); /* Save cursor position */ |
120 | 120 | ||
diff --git a/scripts/kconfig/lxdialog/yesno.c b/scripts/kconfig/lxdialog/yesno.c index ee0a04e3e012..4e6e8090c20b 100644 --- a/scripts/kconfig/lxdialog/yesno.c +++ b/scripts/kconfig/lxdialog/yesno.c | |||
@@ -29,8 +29,8 @@ static void print_buttons(WINDOW * dialog, int height, int width, int selected) | |||
29 | int x = width / 2 - 10; | 29 | int x = width / 2 - 10; |
30 | int y = height - 2; | 30 | int y = height - 2; |
31 | 31 | ||
32 | print_button(dialog, " Yes ", y, x, selected == 0); | 32 | print_button(dialog, gettext(" Yes "), y, x, selected == 0); |
33 | print_button(dialog, " No ", y, x + 13, selected == 1); | 33 | print_button(dialog, gettext(" No "), y, x + 13, selected == 1); |
34 | 34 | ||
35 | wmove(dialog, y, x + 1 + 13 * selected); | 35 | wmove(dialog, y, x + 1 + 13 * selected); |
36 | wrefresh(dialog); | 36 | wrefresh(dialog); |