summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-alias.c4
-rw-r--r--src/core/wee-command.c147
-rw-r--r--src/core/wee-config-file.c51
-rw-r--r--src/core/wee-config-option.c6
-rw-r--r--src/core/wee-config.c5
-rw-r--r--src/core/wee-input.c26
-rw-r--r--src/core/wee-log.c5
-rw-r--r--src/core/wee-upgrade.c11
-rw-r--r--src/core/wee-util.c4
-rw-r--r--src/core/weechat.c49
-rw-r--r--src/core/weechat.h3
-rw-r--r--src/gui/gui-hotlist.c5
-rw-r--r--src/gui/gui-infobar.c3
-rw-r--r--src/gui/gui-keyboard.c11
-rw-r--r--src/gui/gui-log.c3
-rw-r--r--src/plugins/plugin.c40
16 files changed, 170 insertions, 203 deletions
diff --git a/src/core/wee-alias.c b/src/core/wee-alias.c
index dd2836081..fd7829d0c 100644
--- a/src/core/wee-alias.c
+++ b/src/core/wee-alias.c
@@ -165,10 +165,10 @@ alias_get_final_command (struct alias *alias)
if (alias->running)
{
gui_chat_printf (NULL,
- _("%s%s circular reference when calling alias "
+ _("%sError: circular reference when calling alias "
"\"/%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, alias->name);
+ alias->name);
return NULL;
}
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index b8a01c7f7..1212b598c 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -67,6 +67,7 @@ struct command weechat_commands[] =
N_("[action [args] | number | [[server] [channel]]]"),
N_(" action: action to do:\n"
" move: move buffer in the list (may be relative, for example -1)\n"
+ " close: close buffer\n"
" list: list open buffers (no parameter implies this list)\n"
" notify: set notify level for buffer (0=never, 1=highlight, 2=1+msg, "
"3=2+join/part)\n"
@@ -386,10 +387,10 @@ command_alias (struct t_gui_buffer *buffer,
if (!pos[0])
{
gui_chat_printf (NULL,
- _("%s%s missing arguments for \"%s\" "
+ _("%sError: missing arguments for \"%s\" "
"command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "alias");
+ "alias");
return -1;
}
if (!alias_new (arguments, pos))
@@ -407,8 +408,8 @@ command_alias (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%sFailed to create alias \"%s\" => "
- "\"%s\" (not enough memory)"),
+ _("%sError: not enough memory for creating "
+ "alias \"%s\" => \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
arguments, pos);
return -1;
@@ -563,10 +564,10 @@ command_buffer (struct t_gui_buffer *buffer,
if (argc < 2)
{
gui_chat_printf (NULL,
- _("%s%s missing arguments for \"%s\" "
+ _("%sError: missing arguments for \"%s\" "
"command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "buffer");
+ "buffer");
return -1;
}
@@ -589,9 +590,8 @@ command_buffer (struct t_gui_buffer *buffer,
{
/* invalid number */
gui_chat_printf (NULL,
- _("%s%s incorrect buffer number"),
- gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR);
+ _("%sError: incorrect buffer number"),
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return -1;
}
}
@@ -625,10 +625,9 @@ command_buffer (struct t_gui_buffer *buffer,
{
/* invalid highlight level */
gui_chat_printf (NULL,
- _("%s%s incorrect notify level "
+ _("%sError: incorrect notify level "
"(must be between %d and %d)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR,
GUI_BUFFER_NOTIFY_LEVEL_MIN,
GUI_BUFFER_NOTIFY_LEVEL_MAX);
return -1;
@@ -672,10 +671,9 @@ command_buffer (struct t_gui_buffer *buffer,
{
/* invalid number */
gui_chat_printf (NULL,
- _("%s%s incorrect notify level (must "
+ _("%sError: incorrect notify level (must "
"be between %d and %d)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR,
GUI_BUFFER_NOTIFY_LEVEL_MIN,
GUI_BUFFER_NOTIFY_LEVEL_MAX);
return -1;
@@ -817,11 +815,10 @@ command_clear (struct t_gui_buffer *buffer,
if (!ptr_buffer)
{
gui_chat_printf (NULL,
- _("%s%s buffer number \"%s\" not "
+ _("%sError: buffer number \"%s\" not "
"found for \"%s\" command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, argv[i],
- "clear");
+ argv[i], "clear");
return -1;
}
gui_buffer_clear (ptr_buffer);
@@ -829,10 +826,10 @@ command_clear (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s unknown option for \"%s\" "
+ _("%sError: unknown option for \"%s\" "
"command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "clear");
+ "clear");
return -1;
}
}
@@ -898,10 +895,10 @@ command_debug (struct t_gui_buffer *buffer,
if (argc != 1)
{
gui_chat_printf (NULL,
- _("%s%s wrong argument count for \"%s\" "
+ _("%sError: wrong argument count for \"%s\" "
"command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "debug");
+ "debug");
return -1;
}
@@ -922,9 +919,9 @@ command_debug (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s unknown option for \"%s\" command"),
+ _("%sError: unknown option for \"%s\" command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "debug");
+ "debug");
return -1;
}
@@ -1199,9 +1196,9 @@ command_key (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s unable to unbind key \"%s\""),
+ _("%sError: unable to unbind key \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, arguments);
+ arguments);
return -1;
}
}
@@ -1257,9 +1254,9 @@ command_key (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s unknown key function \"%s\""),
+ _("%sError: unknown key function \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, arguments);
+ arguments);
return -1;
}
}
@@ -1279,10 +1276,9 @@ command_key (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s \"-yes\" argument is required for "
+ _("%sError: \"-yes\" argument is required for "
"keys reset (security reason)"),
- gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR);
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return -1;
}
}
@@ -1323,9 +1319,9 @@ command_key (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s unable to bind key \"%s\""),
+ _("%sError: unable to bind key \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, arguments);
+ arguments);
return -1;
}
}
@@ -1563,18 +1559,18 @@ command_plugin (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s unknown option for \"%s\" "
+ _("%sError: unknown option for \"%s\" "
"command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "plugin");
+ "plugin");
}
break;
default:
gui_chat_printf (NULL,
- _("%s%s wrong argument count for \"%s\" "
+ _("%sError: wrong argument count for \"%s\" "
"command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "plugin");
+ "plugin");
}
return 0;
@@ -1619,9 +1615,8 @@ command_save (struct t_gui_buffer *buffer,
gui_chat_prefix[GUI_CHAT_PREFIX_INFO]);
else
gui_chat_printf (NULL,
- _("%s%s failed to save configuration file"),
- gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR);
+ _("%sError: failed to save configuration file"),
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
/* save plugins configuration */
if (plugin_config_write () == 0)
@@ -1629,9 +1624,8 @@ command_save (struct t_gui_buffer *buffer,
gui_chat_prefix[GUI_CHAT_PREFIX_INFO]);
else
gui_chat_printf (NULL,
- _("%s%s failed to save plugins options"),
- gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR);
+ _("%sError: failed to save plugins options"),
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return 0;
}
@@ -1823,9 +1817,8 @@ command_set (struct t_gui_buffer *buffer,
if (!ptr_protocol)
{
gui_chat_printf (NULL,
- _("%s%s protocol \"%s\" not found"),
+ _("%sError: protocol \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR,
option);
}
else
@@ -1843,18 +1836,18 @@ command_set (struct t_gui_buffer *buffer,
break;
default:
gui_chat_printf (NULL,
- _("%s%s incorrect value for "
+ _("%sError: incorrect value for "
"option \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, pos + 1);
+ pos + 1);
break;
}
}
else
gui_chat_printf (NULL,
- _("%s%s config option \"%s\" not found"),
+ _("%sError: config option \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, pos + 1);
+ pos + 1);
}
pos[0] = '.';
}
@@ -1868,11 +1861,11 @@ command_set (struct t_gui_buffer *buffer,
if (ptr_option->handler_change == NULL)
{
gui_chat_printf (NULL,
- _("%s%s option \"%s\" can not be "
+ _("%sError: option \"%s\" can not be "
"changed while WeeChat is "
"running"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, option);
+ option);
}
else
{
@@ -1885,20 +1878,20 @@ command_set (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s incorrect value for "
+ _("%sError: incorrect value for "
"option \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, option);
+ option);
}
}
}
else
{
gui_chat_printf (NULL,
- _("%s%s configuration option \"%s\" not "
+ _("%sError: configuration option \"%s\" not "
"found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, option);
+ option);
}
}
}
@@ -2023,9 +2016,9 @@ command_setp (struct t_gui_buffer *buffer,
if (!pos || !pos[1] || (!plugin_search (option)))
{
gui_chat_printf (NULL,
- _("%s%s plugin \"%s\" not found"),
+ _("%sError: plugin \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, option);
+ option);
}
else
ptr_name = option;
@@ -2047,10 +2040,10 @@ command_setp (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s incorrect value for plugin "
+ _("%sError: incorrect value for plugin "
"option \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, ptr_name);
+ ptr_name);
}
}
}
@@ -2105,7 +2098,7 @@ command_setp (struct t_gui_buffer *buffer,
}
/*
- * cmd_unalias: remove an alias
+ * command_unalias: remove an alias
*/
int
@@ -2127,9 +2120,9 @@ command_unalias (struct t_gui_buffer *buffer,
if (!ptr_weelist)
{
gui_chat_printf (NULL,
- _("%s%s alias or command \"%s\" not found"),
+ _("%sError: alias or command \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, arguments);
+ arguments);
return -1;
}
@@ -2172,27 +2165,24 @@ command_upgrade (struct t_gui_buffer *buffer,
if (ptr_server->child_pid != 0)
{
gui_chat_printf_error (NULL,
- _("%s can't upgrade: connection to at least "
- "one server is pending"),
- WEECHAT_ERROR);
+ _("Error: can't upgrade: connection to at least "
+ "one server is pending"));
return -1;
}*/
/* TODO: remove this test, and fix gnutls save/load in session */
/*if (ptr_server->is_connected && ptr_server->ssl_connected)
{
gui_chat_printf_error_nolog (NULL,
- _("%s can't upgrade: connection to at least "
+ _("Error: can't upgrade: connection to at least "
"one SSL server is active "
- "(should be fixed in a future version)"),
- WEECHAT_ERROR);
+ "(should be fixed in a future version)"));
return -1;
}
if (ptr_server->outqueue)
{
gui_chat_printf_error_nolog (NULL,
- _("%s can't upgrade: anti-flood is active on "
- "at least one server (sending many lines)"),
- WEECHAT_ERROR);
+ _("Error: can't upgrade: anti-flood is active on "
+ "at least one server (sending many lines)"));
return -1;
}
}
@@ -2211,8 +2201,7 @@ command_upgrade (struct t_gui_buffer *buffer,
{
free (filename);
gui_chat_printf_error_nolog (NULL,
- _("%s unable to save session in file"),
- WEECHAT_ERROR);
+ _("Error: unable to save session in file"));
return -1;
}
@@ -2234,8 +2223,7 @@ command_upgrade (struct t_gui_buffer *buffer,
plugin_init (1);
/*string_iconv_fprintf (stderr,
- _("%s exec failed (program: \"%s\"), exiting WeeChat"),
- WEECHAT_ERROR,
+ _("Error: exec failed (program: \"%s\"), exiting WeeChat"),
exec_args[0]);
free (exec_args[0]);
@@ -2406,10 +2394,10 @@ command_window (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s unknown option for \"%s\" "
+ _("%sError: unknown option for \"%s\" "
"command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "window merge");
+ "window merge");
return -1;
}
}
@@ -2418,11 +2406,10 @@ command_window (struct t_gui_buffer *buffer,
if (!gui_window_merge (gui_current_window))
{
gui_chat_printf (NULL,
- _("%s%s can not merge windows, "
+ _("%sError: can not merge windows, "
"there's no other window with same "
"size near current one."),
- gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR);
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return -1;
}
}
@@ -2455,9 +2442,9 @@ command_window (struct t_gui_buffer *buffer,
else
{
gui_chat_printf (NULL,
- _("%s%s unknown option for \"%s\" command"),
+ _("%sError: unknown option for \"%s\" command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "window");
+ "window");
return -1;
}
}
diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c
index 5cabd5a07..1542878df 100644
--- a/src/core/wee-config-file.c
+++ b/src/core/wee-config-file.c
@@ -125,8 +125,9 @@ config_file_read (char **config_sections, struct t_config_option **options,
config_filename);
if ((file = fopen (filename, "r")) == NULL)
{
- gui_chat_printf (NULL, _("%s config file \"%s\" not found.\n"),
- WEECHAT_WARNING, filename);
+ gui_chat_printf (NULL,
+ _("Warning: config file \"%s\" not found.\n"),
+ filename);
free (filename);
return -1;
}
@@ -163,10 +164,9 @@ config_file_read (char **config_sections, struct t_config_option **options,
pos = strchr (line, ']');
if (pos == NULL)
gui_chat_printf (NULL,
- _("%s %s, line %d: invalid syntax, "
+ _("Warning: %s, line %d: invalid syntax, "
"missing \"]\"\n"),
- WEECHAT_WARNING, filename,
- line_number);
+ filename, line_number);
else
{
pos[0] = '\0';
@@ -174,20 +174,18 @@ config_file_read (char **config_sections, struct t_config_option **options,
section = config_option_section_get_index (config_sections, pos);
if (section < 0)
gui_chat_printf (NULL,
- _("%s %s, line %d: unknown section "
+ _("Warning: %s, line %d: unknown section "
"identifier (\"%s\")\n"),
- WEECHAT_WARNING, filename,
- line_number, pos);
+ filename, line_number, pos);
else
{
rc = ((int) (read_functions[section]) (options[section],
NULL, NULL));
if (rc < 0)
gui_chat_printf (NULL,
- _("%s %s, line %d: error "
+ _("Warning: %s, line %d: error "
"reading new section \"%s\"\n"),
- WEECHAT_WARNING, filename,
- line_number, pos);
+ filename, line_number, pos);
}
}
}
@@ -196,10 +194,9 @@ config_file_read (char **config_sections, struct t_config_option **options,
pos = strchr (line, '=');
if (pos == NULL)
gui_chat_printf (NULL,
- _("%s %s, line %d: invalid syntax, "
+ _("Warning: %s, line %d: invalid syntax, "
"missing \"=\"\n"),
- WEECHAT_WARNING, filename,
- line_number);
+ filename, line_number);
else
{
pos[0] = '\0';
@@ -260,27 +257,23 @@ config_file_read (char **config_sections, struct t_config_option **options,
case -1:
if (section < 0)
gui_chat_printf (NULL,
- _("%s %s, line %d: unknown "
+ _("Warning: %s, line %d: unknown "
"option \"%s\" "
"(outside a section)\n"),
- WEECHAT_WARNING,
- filename,
- line_number, line);
+ filename, line_number, line);
else
gui_chat_printf (NULL,
- _("%s %s, line %d: option "
+ _("Warning: %s, line %d: option "
"\"%s\" unknown for "
"section \"%s\"\n"),
- WEECHAT_WARNING, filename,
- line_number, line,
+ filename, line_number, line,
config_sections[section]);
break;
case -2:
gui_chat_printf (NULL,
- _("%s %s, line %d: invalid "
+ _("Warning: %s, line %d: invalid "
"value for option \"%s\"\n"),
- WEECHAT_WARNING, filename,
- line_number, line);
+ filename, line_number, line);
break;
}
}
@@ -451,8 +444,9 @@ config_file_write_default (char **config_sections, struct t_config_option **opti
weechat_home, DIR_SEPARATOR, config_filename);
if ((file = fopen (filename, "w")) == NULL)
{
- gui_chat_printf (NULL, _("%s cannot create file \"%s\"\n"),
- WEECHAT_ERROR, filename);
+ gui_chat_printf (NULL,
+ _("Error: cannot create file \"%s\"\n"),
+ filename);
free (filename);
return -1;
}
@@ -512,8 +506,9 @@ config_file_write (char **config_sections, struct t_config_option **options,
if ((file = fopen (filename2, "w")) == NULL)
{
- gui_chat_printf (NULL, _("%s cannot create file \"%s\"\n"),
- WEECHAT_ERROR, filename2);
+ gui_chat_printf (NULL,
+ _("Error: cannot create file \"%s\"\n"),
+ filename2);
free (filename);
free (filename2);
return -1;
diff --git a/src/core/wee-config-option.c b/src/core/wee-config-option.c
index 9d8decb43..4c1c63e02 100644
--- a/src/core/wee-config-option.c
+++ b/src/core/wee-config-option.c
@@ -449,9 +449,8 @@ config_option_section_option_set_default_values (char **config_sections,
config_options[i][j].default_string);
if (int_value < 0)
gui_chat_printf (NULL,
- _("%s unable to assign default int with "
+ _("Warning: unable to assign default int with "
"string (\"%s\")\n"),
- WEECHAT_WARNING,
config_options[i][j].default_string);
else
*config_options[i][j].ptr_int = int_value;
@@ -464,9 +463,8 @@ config_option_section_option_set_default_values (char **config_sections,
if (!gui_color_assign (config_options[i][j].ptr_int,
config_options[i][j].default_string))
gui_chat_printf (NULL,
- _("%s unable to assign default color "
+ _("Warning: unable to assign default color "
"(\"%s\")\n"),
- WEECHAT_WARNING,
config_options[i][j].default_string);
break;
}
diff --git a/src/core/wee-config.c b/src/core/wee-config.c
index e58014086..4a8f07d96 100644
--- a/src/core/wee-config.c
+++ b/src/core/wee-config.c
@@ -871,9 +871,8 @@ weechat_config_change_save_on_exit ()
{
gui_chat_printf (NULL, "\n");
gui_chat_printf (NULL,
- _("%s you should now issue /save to write "
- "\"save_on_exit\" option in configuration file.\n"),
- WEECHAT_WARNING);
+ _("Warning: you should now issue /save to write "
+ "\"save_on_exit\" option in configuration file.\n"));
}
}
diff --git a/src/core/wee-input.c b/src/core/wee-input.c
index 18671cc90..0ce9260dc 100644
--- a/src/core/wee-input.c
+++ b/src/core/wee-input.c
@@ -100,9 +100,9 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
{
case 0: /* plugin handler KO */
gui_chat_printf (NULL,
- _("%s%s command \"%s\" failed"),
+ _("%sError: command \"%s\" failed"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, command + 1);
+ command + 1);
break;
case 1: /* plugin handler OK, executed */
break;
@@ -120,10 +120,10 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
if (ptr_alias->running == 1)
{
gui_chat_printf (NULL,
- _("%s%s circular reference when "
+ _("%sError: circular reference when "
"calling alias \"/%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, ptr_alias->name);
+ ptr_alias->name);
}
else
{
@@ -240,7 +240,7 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
weechat_commands[i].max_arg)
{
gui_chat_printf (NULL,
- NG_("%s%s wrong argument count "
+ NG_("%sError: wrong argument count "
"for %s command \"%s\" "
"(expected: %d arg)",
"%s%s wrong argument count "
@@ -248,14 +248,14 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
"(expected: %d args)",
weechat_commands[i].max_arg),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, PACKAGE_NAME,
+ PACKAGE_NAME,
command + 1,
weechat_commands[i].max_arg);
}
else
{
gui_chat_printf (NULL,
- NG_("%s%s wrong argument count "
+ NG_("%sError: wrong argument count "
"for %s command \"%s\" "
"(expected: between %d and "
"%d arg)",
@@ -265,7 +265,7 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
"%d args)",
weechat_commands[i].max_arg),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, PACKAGE_NAME,
+ PACKAGE_NAME,
command + 1,
weechat_commands[i].min_arg,
weechat_commands[i].max_arg);
@@ -281,9 +281,9 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
if (return_code < 0)
{
gui_chat_printf (NULL,
- _("%s%s command \"%s\" failed"),
+ _("%sError: command \"%s\" failed"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, command + 1);
+ command + 1);
}
}
string_free_exploded (argv);
@@ -315,18 +315,16 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
else
{
gui_chat_printf_error (NULL,
- _("%s unknown command \"%s\" (type /help for help). "
+ _("Error: unknown command \"%s\" (type /help for help). "
"To send unknown commands to IRC server, enable option "
"irc_send_unknown_commands."),
- WEECHAT_ERROR,
command + 1);
}*/
gui_chat_printf (NULL,
- _("%s%s unknown command \"%s\" (type /help "
+ _("%sError: unknown command \"%s\" (type /help "
"for help)."),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR,
command + 1);
string_free_exploded (argv);
diff --git a/src/core/wee-log.c b/src/core/wee-log.c
index b7c4936d6..0e2619c41 100644
--- a/src/core/wee-log.c
+++ b/src/core/wee-log.c
@@ -104,10 +104,9 @@ weechat_log_init ()
if (!weechat_log_open (NULL, "w"))
{
string_iconv_fprintf (stderr,
- _("%s unable to create/append to log file (weechat.log)\n"
+ _("Error: unable to create/append to log file (weechat.log)\n"
"If another WeeChat process is using this file, try to run WeeChat\n"
- "with another home using \"--dir\" command line option.\n"),
- WEECHAT_ERROR);
+ "with another home using \"--dir\" command line option.\n"));
exit (1);
}
}
diff --git a/src/core/wee-upgrade.c b/src/core/wee-upgrade.c
index 5f4318aa9..0e2bc1c54 100644
--- a/src/core/wee-upgrade.c
+++ b/src/core/wee-upgrade.c
@@ -501,17 +501,16 @@ session_save (char *filename)
void
session_crash (FILE *file, char *message, ...)
{
- char buffer[4096];
+ char buf[4096];
va_list argptr;
va_start (argptr, message);
- vsnprintf (buffer, sizeof (buffer) - 1, message, argptr);
+ vsnprintf (buf, sizeof (buf) - 1, message, argptr);
va_end (argptr);
fclose (file);
gui_main_end ();
- string_iconv_fprintf (stderr, "%s %s\n",
- WEECHAT_ERROR, buffer);
+ string_iconv_fprintf (stderr, "Error: %s\n", buf);
string_iconv_fprintf (stderr,
_("Last operation with session file was at position %ld, "
"read of %d bytes\n"),
@@ -1854,8 +1853,8 @@ session_load (char *filename)
if (unlink (filename) < 0)
{
gui_printf_error_nolog (gui_current_window->buffer,
- _("%s can't delete session file (%s)\n"),
- WEECHAT_WARNING, filename);
+ _("Warning: can't delete session file (%s)\n"),
+ filename);
}
gui_printf_info_nolog (gui_current_window->buffer,
diff --git a/src/core/wee-util.c b/src/core/wee-util.c
index b150fa0b7..70f90094e 100644
--- a/src/core/wee-util.c
+++ b/src/core/wee-util.c
@@ -94,8 +94,8 @@ util_create_dir (char *directory, int permissions)
if (errno != EEXIST)
{
string_iconv_fprintf (stderr,
- _("%s cannot create directory \"%s\"\n"),
- WEECHAT_ERROR, directory);
+ _("Error: cannot create directory \"%s\"\n"),
+ directory);
return 0;
}
return 1;
diff --git a/src/core/weechat.c b/src/core/weechat.c
index 0d3d67fcc..14096db44 100644
--- a/src/core/weechat.c
+++ b/src/core/weechat.c
@@ -126,6 +126,7 @@ void
weechat_display_config_options ()
{
string_iconv_fprintf (stdout,
+ /* TRANSLATORS: %s is "WeeChat" */
_("%s configuration options:\n"),
PACKAGE_NAME);
weechat_config_print_stdout ();
@@ -139,7 +140,9 @@ void
weechat_display_commands ()
{
string_iconv_fprintf (stdout,
- _("%s internal commands:\n"), PACKAGE_NAME);
+ /* TRANSLATORS: %s is "WeeChat" */
+ _("%s internal commands:\n"),
+ PACKAGE_NAME);
string_iconv_fprintf (stdout, "\n");
command_print_stdout (weechat_commands);
}
@@ -177,7 +180,9 @@ weechat_display_keys ()
char *expanded_name;
string_iconv_fprintf (stdout,
- _("%s default keys:\n"), PACKAGE_NAME);
+ /* TRANSLATORS: %s is "WeeChat" */
+ _("%s default keys:\n"),
+ PACKAGE_NAME);
string_iconv_fprintf (stdout, "\n");
for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)
{
@@ -224,9 +229,8 @@ weechat_parse_args (int argc, char *argv[])
else
{
string_iconv_fprintf (stderr,
- _("%s missing argument for \"%s\" "
+ _("Error: missing argument for \"%s\" "
"option\n"),
- WEECHAT_ERROR,
"--config");
weechat_shutdown (EXIT_FAILURE, 0);
}
@@ -239,9 +243,8 @@ weechat_parse_args (int argc, char *argv[])
else
{
string_iconv_fprintf (stderr,
- _("%s missing argument for \"%s\" "
+ _("Error: missing argument for \"%s\" "
"option\n"),
- WEECHAT_ERROR,
"--dir");
weechat_shutdown (EXIT_FAILURE, 0);
}
@@ -281,9 +284,8 @@ weechat_parse_args (int argc, char *argv[])
else
{
string_iconv_fprintf (stderr,
- _("%s missing argument for \"%s\" "
+ _("Error: missing argument for \"%s\" "
"option\n"),
- WEECHAT_ERROR,
"--commands");
weechat_shutdown (EXIT_FAILURE, 0);
}
@@ -300,9 +302,8 @@ weechat_parse_args (int argc, char *argv[])
else
{
string_iconv_fprintf (stderr,
- _("%s missing argument for \"%s\" "
+ _("Error: missing argument for \"%s\" "
"option\n"),
- WEECHAT_ERROR,
"--session");
weechat_shutdown (EXIT_FAILURE, 0);
}
@@ -318,9 +319,9 @@ weechat_parse_args (int argc, char *argv[])
if (irc_server_init_with_url (argv[i], &server_tmp) < 0)
{
string_iconv_fprintf (stderr,
- _("%s invalid syntax for IRC server "
+ _("Warning: invalid syntax for IRC server "
"('%s'), ignored\n"),
- WEECHAT_WARNING, argv[i]);
+ argv[i]);
}
else
{
@@ -334,9 +335,9 @@ weechat_parse_args (int argc, char *argv[])
NULL, NULL, NULL, NULL, 0,
server_tmp.autojoin, 1, NULL))
string_iconv_fprintf (stderr,
- _("%s unable to create server "
+ _("Warning: unable to create server "
"('%s'), ignored\n"),
- WEECHAT_WARNING, argv[i]);
+ argv[i]);
irc_server_destroy (&server_tmp);
server_cmd_line = 1;
}
@@ -344,8 +345,8 @@ weechat_parse_args (int argc, char *argv[])
else
{
string_iconv_fprintf (stderr,
- _("%s unknown parameter '%s', ignored\n"),
- WEECHAT_WARNING, argv[i]);
+ _("Warning: unknown parameter '%s', ignored\n"),
+ argv[i]);
}
}
}
@@ -367,8 +368,7 @@ weechat_create_home_dirs ()
if (!ptr_home)
{
string_iconv_fprintf (stderr,
- _("%s unable to get HOME directory\n"),
- WEECHAT_ERROR);
+ _("Error: unable to get HOME directory\n"));
weechat_shutdown (EXIT_FAILURE, 0);
}
dir_length = strlen (ptr_home) + 10;
@@ -377,9 +377,8 @@ weechat_create_home_dirs ()
if (!weechat_home)
{
string_iconv_fprintf (stderr,
- _("%s not enough memory for home "
- "directory\n"),
- WEECHAT_ERROR);
+ _("Error: not enough memory for home "
+ "directory\n"));
weechat_shutdown (EXIT_FAILURE, 0);
}
snprintf (weechat_home, dir_length, "%s%s.weechat", ptr_home,
@@ -392,8 +391,8 @@ weechat_create_home_dirs ()
if (!S_ISDIR (statinfo.st_mode))
{
string_iconv_fprintf (stderr,
- _("%s home (%s) is not a directory\n"),
- WEECHAT_ERROR, weechat_home);
+ _("Error: home (%s) is not a directory\n"),
+ weechat_home);
weechat_shutdown (EXIT_FAILURE, 0);
}
}
@@ -402,8 +401,8 @@ weechat_create_home_dirs ()
if (!util_create_dir (weechat_home, 0))
{
string_iconv_fprintf (stderr,
- _("%s unable to create \"%s\" directory\n"),
- WEECHAT_ERROR, weechat_home);
+ _("Error: unable to create \"%s\" directory\n"),
+ weechat_home);
weechat_shutdown (EXIT_FAILURE, 0);
}
}
diff --git a/src/core/weechat.h b/src/core/weechat.h
index ef7da227c..cdc53d47a 100644
--- a/src/core/weechat.h
+++ b/src/core/weechat.h
@@ -57,9 +57,6 @@
#define WEECHAT_COPYRIGHT_DATE "(c) 2003-2007"
#define WEECHAT_WEBSITE "http://weechat.flashtux.org"
-#define WEECHAT_ERROR _("WeeChat Error:")
-#define WEECHAT_WARNING _("WeeChat Warning:")
-
/* log file */
#define WEECHAT_LOG_NAME "weechat.log"
diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c
index bda1111b1..0b8049674 100644
--- a/src/gui/gui-hotlist.c
+++ b/src/gui/gui-hotlist.c
@@ -209,9 +209,8 @@ gui_hotlist_add (struct t_gui_buffer *buffer, int priority,
if ((new_hotlist = (struct t_gui_hotlist *) malloc (sizeof (struct t_gui_hotlist))) == NULL)
{
weechat_log_printf (NULL,
- _("%s not enough memory to add a buffer to "
- "hotlist\n"),
- WEECHAT_ERROR);
+ _("Error: not enough memory to add a buffer to "
+ "hotlist\n"));
return;
}
diff --git a/src/gui/gui-infobar.c b/src/gui/gui-infobar.c
index b5a9666f7..9641b09c2 100644
--- a/src/gui/gui-infobar.c
+++ b/src/gui/gui-infobar.c
@@ -72,8 +72,7 @@ gui_infobar_printf (int time_displayed, int color, char *message, ...)
free (buf2);
}
else
- weechat_log_printf (_("%s not enough memory for infobar message\n"),
- WEECHAT_ERROR);
+ weechat_log_printf (_("Error: not enough memory for infobar message\n"));
}
/*
diff --git a/src/gui/gui-keyboard.c b/src/gui/gui-keyboard.c
index 218b286f8..be5f25316 100644
--- a/src/gui/gui-keyboard.c
+++ b/src/gui/gui-keyboard.c
@@ -519,8 +519,8 @@ gui_keyboard_bind (char *key, char *command)
if (!key || !command)
{
- weechat_log_printf (_("%s unable to bind key \"%s\"\n"),
- WEECHAT_ERROR, key);
+ weechat_log_printf (_("Error: unable to bind key \"%s\"\n"),
+ key);
return NULL;
}
@@ -547,8 +547,8 @@ gui_keyboard_bind (char *key, char *command)
}
if (!ptr_function)
{
- weechat_log_printf (_("%s unable to bind key \"%s\" (invalid function name: \"%s\")\n"),
- WEECHAT_ERROR, key, command);
+ weechat_log_printf (_("Error: unable to bind key \"%s\" (invalid function name: \"%s\")\n"),
+ key, command);
return NULL;
}
}
@@ -561,8 +561,7 @@ gui_keyboard_bind (char *key, char *command)
ptr_args);
if (!new_key)
{
- weechat_log_printf (_("%s not enough memory for key binding\n"),
- WEECHAT_ERROR);
+ weechat_log_printf (_("Error: not enough memory for key binding\n"));
return NULL;
}
diff --git a/src/gui/gui-log.c b/src/gui/gui-log.c
index bc2b87a91..253170936 100644
--- a/src/gui/gui-log.c
+++ b/src/gui/gui-log.c
@@ -114,9 +114,8 @@ gui_log_start (struct t_gui_buffer *buffer)
weechat_log_printf (_("Unable to write log file \"%s\"\n"),
buffer->log_filename);
gui_chat_printf (NULL,
- _("%s%s Unable to write log file \"%s\"\n"),
+ _("%sError: Unable to write log file \"%s\"\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR,
buffer->log_filename);
free (buffer->log_filename);
return;
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c
index 32bb9d195..2b0b162fa 100644
--- a/src/plugins/plugin.c
+++ b/src/plugins/plugin.c
@@ -128,9 +128,9 @@ plugin_load (char *filename)
if (!handle)
{
gui_chat_printf (NULL,
- _("%s%s unable to load plugin \"%s\": %s\n"),
+ _("%sError: unable to load plugin \"%s\": %s\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, full_name, dlerror());
+ full_name, dlerror());
free (full_name);
return NULL;
}
@@ -141,10 +141,10 @@ plugin_load (char *filename)
{
dlclose (handle);
gui_chat_printf (NULL,
- _("%s%s symbol \"%s\" not found in "
+ _("%sError: symbol \"%s\" not found in "
"plugin \"%s\", failed to load\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "plugin_name",
+ "plugin_name",
full_name);
free (full_name);
return NULL;
@@ -155,10 +155,10 @@ plugin_load (char *filename)
{
dlclose (handle);
gui_chat_printf (NULL,
- _("%s%s unable to load plugin \"%s\": a plugin "
+ _("%sError: unable to load plugin \"%s\": a plugin "
"with same name already exists\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, full_name);
+ full_name);
free (full_name);
return NULL;
}
@@ -169,10 +169,10 @@ plugin_load (char *filename)
{
dlclose (handle);
gui_chat_printf (NULL,
- _("%s%s symbol \"%s\" not found "
+ _("%sError: symbol \"%s\" not found "
"in plugin \"%s\", failed to load\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "plugin_description",
+ "plugin_description",
full_name);
free (full_name);
return NULL;
@@ -184,10 +184,10 @@ plugin_load (char *filename)
{
dlclose (handle);
gui_chat_printf (NULL,
- _("%s%s symbol \"%s\" not found in "
+ _("%sError: symbol \"%s\" not found in "
"plugin \"%s\", failed to load\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "plugin_version",
+ "plugin_version",
full_name);
free (full_name);
return NULL;
@@ -202,10 +202,10 @@ plugin_load (char *filename)
{
dlclose (handle);
gui_chat_printf (NULL,
- _("%s%s function \"%s\" not "
+ _("%sError: function \"%s\" not "
"found in plugin \"%s\", failed to load\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, "weechat_plugin_init",
+ "weechat_plugin_init",
full_name);
free (full_name);
return NULL;
@@ -287,10 +287,10 @@ plugin_load (char *filename)
if (((t_weechat_init_func *)init_func) (new_plugin) < 0)
{
gui_chat_printf (NULL,
- _("%s%s unable to initialize plugin "
+ _("%sError: unable to initialize plugin "
"\"%s\"\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, full_name);
+ full_name);
plugin_remove (new_plugin);
free (full_name);
return NULL;
@@ -299,10 +299,10 @@ plugin_load (char *filename)
else
{
gui_chat_printf (NULL,
- _("%s%s unable to load plugin \"%s\" "
+ _("%sError: unable to load plugin \"%s\" "
"(not enough memory)\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, full_name);
+ full_name);
free (full_name);
return NULL;
}
@@ -493,9 +493,9 @@ plugin_unload_name (char *name)
else
{
gui_chat_printf (NULL,
- _("%s%s plugin \"%s\" not found\n"),
+ _("%sError: plugin \"%s\" not found\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, name);
+ name);
}
}
@@ -538,9 +538,9 @@ plugin_reload_name (char *name)
else
{
gui_chat_printf (NULL,
- _("%s%s plugin \"%s\" not found\n"),
+ _("%sError: plugin \"%s\" not found\n"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
- WEECHAT_ERROR, name);
+ name);
}
}