summaryrefslogtreecommitdiff
path: root/src/fe-common/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-common/core')
-rw-r--r--src/fe-common/core/fe-common-core.c12
-rw-r--r--src/fe-common/core/fe-settings.c15
-rw-r--r--src/fe-common/core/module-formats.c1
-rw-r--r--src/fe-common/core/module-formats.h3
-rw-r--r--src/fe-common/core/printtext.c4
-rw-r--r--src/fe-common/core/themes.c2
6 files changed, 22 insertions, 15 deletions
diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c
index dba05b06..8cfb3a85 100644
--- a/src/fe-common/core/fe-common-core.c
+++ b/src/fe-common/core/fe-common-core.c
@@ -119,12 +119,12 @@ static void sig_channel_destroyed(CHANNEL_REC *channel)
void fe_common_core_init(void)
{
static struct poptOption options[] = {
- { "connect", 'c', POPT_ARG_STRING, &autocon_server, 0, N_("Automatically connect to server/ircnet"), N_("SERVER") },
- { "password", 'w', POPT_ARG_STRING, &autocon_password, 0, N_("Autoconnect password"), N_("SERVER") },
- { "port", 'p', POPT_ARG_INT, &autocon_port, 0, N_("Autoconnect port"), N_("PORT") },
- { "noconnect", '!', POPT_ARG_NONE, &no_autoconnect, 0, N_("Disable autoconnecting"), NULL },
- { "nick", 'n', POPT_ARG_STRING, &cmdline_nick, 0, N_("Specify nick to use"), NULL },
- { "hostname", 'h', POPT_ARG_STRING, &cmdline_hostname, 0, N_("Specify host name to use"), NULL },
+ { "connect", 'c', POPT_ARG_STRING, &autocon_server, 0, "Automatically connect to server/ircnet", "SERVER" },
+ { "password", 'w', POPT_ARG_STRING, &autocon_password, 0, "Autoconnect password", "SERVER" },
+ { "port", 'p', POPT_ARG_INT, &autocon_port, 0, "Autoconnect port", "PORT" },
+ { "noconnect", '!', POPT_ARG_NONE, &no_autoconnect, 0, "Disable autoconnecting", NULL },
+ { "nick", 'n', POPT_ARG_STRING, &cmdline_nick, 0, "Specify nick to use", NULL },
+ { "hostname", 'h', POPT_ARG_STRING, &cmdline_hostname, 0, "Specify host name to use", NULL },
{ NULL, '\0', 0, NULL }
};
diff --git a/src/fe-common/core/fe-settings.c b/src/fe-common/core/fe-settings.c
index cb12e2d3..90262ee0 100644
--- a/src/fe-common/core/fe-settings.c
+++ b/src/fe-common/core/fe-settings.c
@@ -262,7 +262,7 @@ static void settings_save_fe(const char *fname)
static void settings_save_confirm(const char *line, char *fname)
{
- if (g_strncasecmp(line, _("Y"), 1) == 0)
+ if (line[0] == 'Y')
settings_save_fe(fname);
g_free(fname);
}
@@ -270,6 +270,8 @@ static void settings_save_confirm(const char *line, char *fname)
/* SYNTAX: SAVE [<file>] */
static void cmd_save(const char *data)
{
+ char *format;
+
if (*data == '\0')
data = mainconfig->fname;
@@ -280,14 +282,17 @@ static void cmd_save(const char *data)
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
TXT_CONFIG_MODIFIED, data);
+
+ format = format_get_text(MODULE_NAME, NULL, NULL, NULL,
+ TXT_OVERWRITE_CONFIG);
keyboard_entry_redirect((SIGNAL_FUNC) settings_save_confirm,
- _("Overwrite config (y/N)?"),
- 0, g_strdup(data));
+ format, 0, g_strdup(data));
+ g_free(format);
}
static void settings_clean_confirm(const char *line)
{
- if (g_strncasecmp(line, _("Y"), 1) == 0)
+ if (line[0] == 'Y')
settings_clean_invalid();
}
@@ -295,7 +300,7 @@ static void sig_settings_errors(const char *msg)
{
printtext(NULL, NULL, MSGLEVEL_CLIENTERROR, "%s", msg);
keyboard_entry_redirect((SIGNAL_FUNC) settings_clean_confirm,
- _("Remove unknown settings from config file (Y/n)?"),
+ "Remove unknown settings from config file (Y/n)?",
0, NULL);
}
diff --git a/src/fe-common/core/module-formats.c b/src/fe-common/core/module-formats.c
index a25e8e01..9ccdd10a 100644
--- a/src/fe-common/core/module-formats.c
+++ b/src/fe-common/core/module-formats.c
@@ -222,6 +222,7 @@ FORMAT_REC fecommon_core_formats[] = {
{ "config_reloaded", "Reloaded configuration", 1, { 0 } },
{ "config_modified", "Configuration file was modified since irssi was last started - do you want to overwrite the possible changes?", 1, { 0 } },
{ "glib_error", "{error GLib $0} $1", 2, { 0, 0 } },
+ { "overwrite_config", "Overwrite config (y/N)?", 0 },
{ NULL, NULL, 0 }
};
diff --git a/src/fe-common/core/module-formats.h b/src/fe-common/core/module-formats.h
index 1818041c..e0f31f9a 100644
--- a/src/fe-common/core/module-formats.h
+++ b/src/fe-common/core/module-formats.h
@@ -187,7 +187,8 @@ enum {
TXT_CONFIG_SAVED,
TXT_CONFIG_RELOADED,
TXT_CONFIG_MODIFIED,
- TXT_GLIB_ERROR
+ TXT_GLIB_ERROR,
+ TXT_OVERWRITE_CONFIG
};
extern FORMAT_REC fecommon_core_formats[];
diff --git a/src/fe-common/core/printtext.c b/src/fe-common/core/printtext.c
index ab1eafcd..38de158d 100644
--- a/src/fe-common/core/printtext.c
+++ b/src/fe-common/core/printtext.c
@@ -414,9 +414,9 @@ static void sig_gui_dialog(const char *type, const char *text)
char *format;
if (g_strcasecmp(type, "warning") == 0)
- format = _("%_Warning:%_ %s");
+ format = "%_Warning:%_ %s";
else if (g_strcasecmp(type, "error") == 0)
- format = _("%_Error:%_ %s");
+ format = "%_Error:%_ %s";
else
format = "%s";
diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c
index ac077d9d..de9b6dee 100644
--- a/src/fe-common/core/themes.c
+++ b/src/fe-common/core/themes.c
@@ -788,7 +788,7 @@ static int theme_read(THEME_REC *theme, const char *path, const char *data)
config_parse(config);
if (config_last_error(config) != NULL) {
- str = g_strdup_printf(_("Ignored errors in theme %s:\n%s"),
+ str = g_strdup_printf("Ignored errors in theme %s:\n%s",
theme->name, config_last_error(config));
read_error(str);
g_free(str);