kconfig: drop localization support

The localization support is broken and appears unused.
There is no google hits on the update-po-config target.
And there is no recent (5 years) activity related to the localization.

So lets just drop this as it is no longer used.

Suggested-by: Ulf Magnusson <ulfalizer@gmail.com>
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
Sam Ravnborg 2018-05-22 21:36:12 +02:00 committed by Masahiro Yamada
parent 1c5af5cf93
commit 694c49a7c0
21 changed files with 257 additions and 609 deletions

View file

@ -15,7 +15,7 @@
#include "nconf.h"
#include <ctype.h>
static const char nconf_global_help[] = N_(
static const char nconf_global_help[] =
"Help windows\n"
"------------\n"
"o Global help: Unless in a data entry window, pressing <F1> will give \n"
@ -130,8 +130,8 @@ static const char nconf_global_help[] = N_(
"\n"
"Note that this mode can eventually be a little more CPU expensive than\n"
"the default mode, especially with a larger number of unfolded submenus.\n"
"\n"),
menu_no_f_instructions[] = N_(
"\n",
menu_no_f_instructions[] =
"Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
"\n"
@ -147,8 +147,8 @@ menu_no_f_instructions[] = N_(
"You do not have function keys support.\n"
"Press <1> instead of <F1>, <2> instead of <F2>, etc.\n"
"For verbose global help use key <1>.\n"
"For help related to the current menu entry press <?> or <h>.\n"),
menu_instructions[] = N_(
"For help related to the current menu entry press <?> or <h>.\n",
menu_instructions[] =
"Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
"\n"
@ -163,30 +163,30 @@ menu_instructions[] = N_(
"\n"
"Pressing <1> may be used instead of <F1>, <2> instead of <F2>, etc.\n"
"For verbose global help press <F1>.\n"
"For help related to the current menu entry press <?> or <h>.\n"),
radiolist_instructions[] = N_(
"For help related to the current menu entry press <?> or <h>.\n",
radiolist_instructions[] =
"Press <Up>, <Down>, <Home> or <End> to navigate a radiolist, select\n"
"with <Space>.\n"
"For help related to the current entry press <?> or <h>.\n"
"For global help press <F1>.\n"),
inputbox_instructions_int[] = N_(
"For global help press <F1>.\n",
inputbox_instructions_int[] =
"Please enter a decimal value.\n"
"Fractions will not be accepted.\n"
"Press <Enter> to apply, <Esc> to cancel."),
inputbox_instructions_hex[] = N_(
"Press <Enter> to apply, <Esc> to cancel.",
inputbox_instructions_hex[] =
"Please enter a hexadecimal value.\n"
"Press <Enter> to apply, <Esc> to cancel."),
inputbox_instructions_string[] = N_(
"Press <Enter> to apply, <Esc> to cancel.",
inputbox_instructions_string[] =
"Please enter a string value.\n"
"Press <Enter> to apply, <Esc> to cancel."),
setmod_text[] = N_(
"Press <Enter> to apply, <Esc> to cancel.",
setmod_text[] =
"This feature depends on another feature which has been configured as a\n"
"module. As a result, the current feature will be built as a module too."),
load_config_text[] = N_(
"module. As a result, the current feature will be built as a module too.",
load_config_text[] =
"Enter the name of the configuration file you wish to load.\n"
"Accept the name shown to restore the configuration you last\n"
"retrieved. Leave empty to abort."),
load_config_help[] = N_(
"retrieved. Leave empty to abort.",
load_config_help[] =
"For various reasons, one may wish to keep several different\n"
"configurations available on a single machine.\n"
"\n"
@ -194,11 +194,11 @@ load_config_help[] = N_(
"default one, entering its name here will allow you to load and modify\n"
"that configuration.\n"
"\n"
"Leave empty to abort.\n"),
save_config_text[] = N_(
"Leave empty to abort.\n",
save_config_text[] =
"Enter a filename to which this configuration should be saved\n"
"as an alternate. Leave empty to abort."),
save_config_help[] = N_(
"as an alternate. Leave empty to abort.",
save_config_help[] =
"For various reasons, one may wish to keep several different\n"
"configurations available on a single machine.\n"
"\n"
@ -206,8 +206,8 @@ save_config_help[] = N_(
"and use the current configuration as an alternate to whatever\n"
"configuration options you have selected at that time.\n"
"\n"
"Leave empty to abort.\n"),
search_help[] = N_(
"Leave empty to abort.\n",
search_help[] =
"Search for symbols (configuration variable names CONFIG_*) and display\n"
"their relations. Regular expressions are supported.\n"
"Example: Search for \"^FOO\".\n"
@ -244,7 +244,7 @@ search_help[] = N_(
"USB => find all symbols containing USB\n"
"^USB => find all symbols starting with USB\n"
"USB$ => find all symbols ending with USB\n"
"\n");
"\n";
struct mitem {
char str[256];
@ -388,7 +388,7 @@ static void print_function_line(void)
static void handle_f1(int *key, struct menu *current_item)
{
show_scroll_win(main_window,
_("Global help"), _(nconf_global_help));
"Global help", nconf_global_help);
return;
}
@ -403,8 +403,8 @@ static void handle_f2(int *key, struct menu *current_item)
static void handle_f3(int *key, struct menu *current_item)
{
show_scroll_win(main_window,
_("Short help"),
_(current_instructions));
"Short help",
current_instructions);
return;
}
@ -412,7 +412,7 @@ static void handle_f3(int *key, struct menu *current_item)
static void handle_f4(int *key, struct menu *current_item)
{
int res = btn_dialog(main_window,
_("Show all symbols?"),
"Show all symbols?",
2,
" <Show All> ",
"<Don't show all>");
@ -653,8 +653,8 @@ static int do_exit(void)
return 0;
}
res = btn_dialog(main_window,
_("Do you wish to save your new configuration?\n"
"<ESC> to cancel and resume nconfig."),
"Do you wish to save your new configuration?\n"
"<ESC> to cancel and resume nconfig.",
2,
" <save> ",
"<don't save>");
@ -670,15 +670,15 @@ static int do_exit(void)
if (res)
btn_dialog(
main_window,
_("Error during writing of configuration.\n"
"Your configuration changes were NOT saved."),
"Error during writing of configuration.\n"
"Your configuration changes were NOT saved.",
1,
"<OK>");
break;
default:
btn_dialog(
main_window,
_("Your configuration changes were NOT saved."),
"Your configuration changes were NOT saved.",
1,
"<OK>");
break;
@ -697,12 +697,12 @@ static void search_conf(void)
int dres;
title = str_new();
str_printf( &title, _("Enter (sub)string or regexp to search for "
"(with or without \"%s\")"), CONFIG_);
str_printf( &title, "Enter (sub)string or regexp to search for "
"(with or without \"%s\")", CONFIG_);
again:
dres = dialog_inputbox(main_window,
_("Search Configuration Parameter"),
"Search Configuration Parameter",
str_get(&title),
"", &dialog_input_result, &dialog_input_result_len);
switch (dres) {
@ -710,7 +710,7 @@ again:
break;
case 1:
show_scroll_win(main_window,
_("Search Configuration"), search_help);
"Search Configuration", search_help);
goto again;
default:
str_free(&title);
@ -726,7 +726,7 @@ again:
res = get_relations_str(sym_arr, NULL);
free(sym_arr);
show_scroll_win(main_window,
_("Search Results"), str_get(&res));
"Search Results", str_get(&res));
str_free(&res);
str_free(&title);
}
@ -754,7 +754,7 @@ static void build_conf(struct menu *menu)
switch (ptype) {
case P_MENU:
child_count++;
prompt = _(prompt);
prompt = prompt;
if (single_menu_mode) {
item_make(menu, 'm',
"%s%*c%s",
@ -775,7 +775,7 @@ static void build_conf(struct menu *menu)
item_make(menu, ':',
" %*c*** %s ***",
indent + 1, ' ',
_(prompt));
prompt);
}
break;
default:
@ -783,7 +783,7 @@ static void build_conf(struct menu *menu)
child_count++;
item_make(menu, ':', "---%*c%s",
indent + 1, ' ',
_(prompt));
prompt);
}
}
} else
@ -829,11 +829,11 @@ static void build_conf(struct menu *menu)
}
item_add_str("%*c%s", indent + 1,
' ', _(menu_get_prompt(menu)));
' ', menu_get_prompt(menu));
if (val == yes) {
if (def_menu) {
item_add_str(" (%s)",
_(menu_get_prompt(def_menu)));
menu_get_prompt(def_menu));
item_add_str(" --->");
if (def_menu->list) {
indent += 2;
@ -847,7 +847,7 @@ static void build_conf(struct menu *menu)
if (menu == current_menu) {
item_make(menu, ':',
"---%*c%s", indent + 1,
' ', _(menu_get_prompt(menu)));
' ', menu_get_prompt(menu));
goto conf_childs;
}
child_count++;
@ -894,17 +894,17 @@ static void build_conf(struct menu *menu)
if (tmp < 0)
tmp = 0;
item_add_str("%*c%s%s", tmp, ' ',
_(menu_get_prompt(menu)),
menu_get_prompt(menu),
(sym_has_value(sym) ||
!sym_is_changable(sym)) ? "" :
_(" (NEW)"));
" (NEW)");
goto conf_childs;
}
}
item_add_str("%*c%s%s", indent + 1, ' ',
_(menu_get_prompt(menu)),
menu_get_prompt(menu),
(sym_has_value(sym) || !sym_is_changable(sym)) ?
"" : _(" (NEW)"));
"" : " (NEW)");
if (menu->prompt && menu->prompt->type == P_MENU) {
item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->");
return;
@ -1086,8 +1086,8 @@ static void conf(struct menu *menu)
if (!child_count)
break;
show_menu(prompt ? _(prompt) : _("Main Menu"),
_(menu_instructions),
show_menu(prompt ? prompt : "Main Menu",
menu_instructions,
current_index, &last_top_row);
keypad((menu_win(curses_menu)), TRUE);
while (!global_exit) {
@ -1227,13 +1227,13 @@ static void show_help(struct menu *menu)
help = str_new();
menu_get_ext_help(menu, &help);
show_scroll_win(main_window, _(menu_get_prompt(menu)), str_get(&help));
show_scroll_win(main_window, menu_get_prompt(menu), str_get(&help));
str_free(&help);
}
static void conf_choice(struct menu *menu)
{
const char *prompt = _(menu_get_prompt(menu));
const char *prompt = menu_get_prompt(menu);
struct menu *child = NULL;
struct symbol *active;
int selected_index = 0;
@ -1256,13 +1256,13 @@ static void conf_choice(struct menu *menu)
if (child->sym == sym_get_choice_value(menu->sym))
item_make(child, ':', "<X> %s",
_(menu_get_prompt(child)));
menu_get_prompt(child));
else if (child->sym)
item_make(child, ':', " %s",
_(menu_get_prompt(child)));
menu_get_prompt(child));
else
item_make(child, ':', "*** %s ***",
_(menu_get_prompt(child)));
menu_get_prompt(child));
if (child->sym == active){
last_top_row = top_row(curses_menu);
@ -1270,8 +1270,8 @@ static void conf_choice(struct menu *menu)
}
i++;
}
show_menu(prompt ? _(prompt) : _("Choice Menu"),
_(radiolist_instructions),
show_menu(prompt ? prompt : "Choice Menu",
radiolist_instructions,
selected_index,
&last_top_row);
while (!global_exit) {
@ -1358,19 +1358,19 @@ static void conf_string(struct menu *menu)
switch (sym_get_type(menu->sym)) {
case S_INT:
heading = _(inputbox_instructions_int);
heading = inputbox_instructions_int;
break;
case S_HEX:
heading = _(inputbox_instructions_hex);
heading = inputbox_instructions_hex;
break;
case S_STRING:
heading = _(inputbox_instructions_string);
heading = inputbox_instructions_string;
break;
default:
heading = _("Internal nconf error!");
heading = "Internal nconf error!";
}
res = dialog_inputbox(main_window,
prompt ? _(prompt) : _("Main Menu"),
prompt ? prompt : "Main Menu",
heading,
sym_get_string_value(menu->sym),
&dialog_input_result,
@ -1381,7 +1381,7 @@ static void conf_string(struct menu *menu)
dialog_input_result))
return;
btn_dialog(main_window,
_("You have made an invalid entry."), 0);
"You have made an invalid entry.", 0);
break;
case 1:
show_help(menu);
@ -1410,11 +1410,11 @@ static void conf_load(void)
sym_set_change_count(1);
return;
}
btn_dialog(main_window, _("File does not exist!"), 0);
btn_dialog(main_window, "File does not exist!", 0);
break;
case 1:
show_scroll_win(main_window,
_("Load Alternate Configuration"),
"Load Alternate Configuration",
load_config_help);
break;
case KEY_EXIT:
@ -1441,13 +1441,13 @@ static void conf_save(void)
set_config_filename(dialog_input_result);
return;
}
btn_dialog(main_window, _("Can't create file! "
"Probably a nonexistent directory."),
btn_dialog(main_window, "Can't create file! "
"Probably a nonexistent directory.",
1, "<OK>");
break;
case 1:
show_scroll_win(main_window,
_("Save Alternate Configuration"),
"Save Alternate Configuration",
save_config_help);
break;
case KEY_EXIT:
@ -1480,10 +1480,6 @@ int main(int ac, char **av)
int lines, columns;
char *mode;
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
if (ac > 1 && strcmp(av[1], "-s") == 0) {
/* Silence conf_read() until the real callback is set up */
conf_set_message_callback(NULL);
@ -1541,8 +1537,8 @@ int main(int ac, char **av)
/* check for KEY_FUNC(1) */
if (has_key(KEY_F(1)) == FALSE) {
show_scroll_win(main_window,
_("Instructions"),
_(menu_no_f_instructions));
"Instructions",
menu_no_f_instructions);
}
conf_set_message_callback(conf_message_callback);