mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
Getting rid of gettext, moved some _(..) texts to themes and left some error
messages hard coded. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1503 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
fe5c94b050
commit
c2b2d45bd6
28 changed files with 61 additions and 950 deletions
|
|
@ -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 }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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[];
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ static void cmd_oper_got_pass(const char *password, OPER_PASS_REC *rec)
|
|||
/* SYNTAX: OPER [<nick> [<password>]] */
|
||||
static void cmd_oper(const char *data, IRC_SERVER_REC *server)
|
||||
{
|
||||
char *nick, *password;
|
||||
char *nick, *password, *format;
|
||||
void *free_arg;
|
||||
|
||||
g_return_if_fail(data != NULL);
|
||||
|
|
@ -414,9 +414,13 @@ static void cmd_oper(const char *data, IRC_SERVER_REC *server)
|
|||
rec->server = server;
|
||||
rec->nick = g_strdup(*nick != '\0' ? nick : server->nick);
|
||||
|
||||
format = format_get_text(MODULE_NAME, NULL, server, NULL,
|
||||
IRCTXT_ASK_OPER_PASS);
|
||||
|
||||
keyboard_entry_redirect((SIGNAL_FUNC) cmd_oper_got_pass,
|
||||
_("Operator password:"),
|
||||
format,
|
||||
ENTRY_REDIRECT_FLAG_HIDDEN, rec);
|
||||
g_free(format);
|
||||
|
||||
signal_stop();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ FORMAT_REC fecommon_irc_formats[] = {
|
|||
{ "silenced", "Silenced {nick $0}", 1, { 0 } },
|
||||
{ "unsilenced", "Unsilenced {nick $0}", 1, { 0 } },
|
||||
{ "silence_line", "{nick $0}: silence {ban $1}", 2, { 0, 0 } },
|
||||
{ "ask_oper_pass", "Operator password:", 0 },
|
||||
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -130,7 +130,8 @@ enum {
|
|||
|
||||
IRCTXT_SILENCED,
|
||||
IRCTXT_UNSILENCED,
|
||||
IRCTXT_SILENCE_LINE
|
||||
IRCTXT_SILENCE_LINE,
|
||||
IRCTXT_ASK_OPER_PASS
|
||||
};
|
||||
|
||||
extern FORMAT_REC fecommon_irc_formats[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue