1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 06:16:40 +02:00

core: fix and normalize error messages

This commit is contained in:
Sébastien Helleu
2020-11-17 21:54:24 +01:00
parent 21eadc9488
commit 5cbda03fca
24 changed files with 2152 additions and 1917 deletions
+2 -2
View File
@@ -278,8 +278,8 @@ hook_command (struct t_weechat_plugin *plugin, const char *command,
if (hook_command_search (plugin, command))
{
gui_chat_printf (NULL,
_("%sError: another command \"%s\" already exists "
"for plugin \"%s\""),
_("%sAnother command \"%s\" already exists for "
"plugin \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
command,
plugin_get_name (plugin));
+2 -2
View File
@@ -202,8 +202,8 @@ hook_fd_exec ()
{
HOOK_FD(ptr_hook, error) = errno;
gui_chat_printf (NULL,
_("%sError: bad file descriptor (%d) "
"used in hook_fd"),
_("%sBad file descriptor (%d) used in "
"hook_fd"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
HOOK_FD(ptr_hook, fd));
}
+121 -113
View File
@@ -252,8 +252,7 @@ COMMAND_CALLBACK(bar)
if (type < 0)
{
gui_chat_printf (NULL,
_("%sError: wrong type \"%s\" for bar "
"\"%s\""),
_("%sInvalid type \"%s\" for bar \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
str_type, argv[2]);
free (str_type);
@@ -263,8 +262,7 @@ COMMAND_CALLBACK(bar)
if (position < 0)
{
gui_chat_printf (NULL,
_("%sError: wrong position \"%s\" for bar "
"\"%s\""),
_("%sInvalid position \"%s\" for bar \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[4], argv[2]);
free (str_type);
@@ -299,8 +297,7 @@ COMMAND_CALLBACK(bar)
}
else
{
gui_chat_printf (NULL, _("%sError: failed to create bar "
"\"%s\""),
gui_chat_printf (NULL, _("%sFailed to create bar \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
}
@@ -308,8 +305,7 @@ COMMAND_CALLBACK(bar)
else
{
gui_chat_printf (NULL,
_("%sError: wrong size \"%s\" for bar "
"\"%s\""),
_("%sInvalid size \"%s\" for bar \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[5], argv[2]);
free (str_type);
@@ -358,7 +354,7 @@ COMMAND_CALLBACK(bar)
if (!ptr_bar)
{
gui_chat_printf (NULL,
_("%sError: unknown bar \"%s\""),
_("%sBar \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -381,7 +377,7 @@ COMMAND_CALLBACK(bar)
if (!ptr_bar)
{
gui_chat_printf (NULL,
_("%sError: unknown bar \"%s\""),
_("%sBar \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -389,8 +385,7 @@ COMMAND_CALLBACK(bar)
if (!gui_bar_set (ptr_bar, argv[3], argv_eol[4]))
{
gui_chat_printf (NULL,
_("%sError: unable to set option \"%s\" for "
"bar \"%s\""),
_("%sUnable to set option \"%s\" for bar \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[3], argv[2]);
return WEECHAT_RC_OK;
@@ -406,7 +401,7 @@ COMMAND_CALLBACK(bar)
if (!ptr_bar)
{
gui_chat_printf (NULL,
_("%sError: unknown bar \"%s\""),
_("%sBar \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -424,7 +419,7 @@ COMMAND_CALLBACK(bar)
if (!ptr_bar)
{
gui_chat_printf (NULL,
_("%sError: unknown bar \"%s\""),
_("%sBar \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -442,7 +437,7 @@ COMMAND_CALLBACK(bar)
if (!ptr_bar)
{
gui_chat_printf (NULL,
_("%sError: unknown bar \"%s\""),
_("%sBar \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -472,14 +467,14 @@ COMMAND_CALLBACK(bar)
if (!ptr_window)
{
gui_chat_printf (NULL,
_("%sError: window not found for \"%s\" command"),
_("%sWindow not found for \"%s\" command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], "bar");
return WEECHAT_RC_OK;
}
if (!gui_bar_scroll (ptr_bar, ptr_window, argv_eol[4]))
{
gui_chat_printf (NULL,
_("%sError: unable to scroll bar \"%s\""),
_("%sUnable to scroll bar \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -508,7 +503,7 @@ command_buffer_check_number (long number)
{
/* invalid number */
gui_chat_printf (NULL,
_("%sError: buffer number %d is out of range "
_("%sBuffer number \"%d\" is out of range "
"(it must be between 1 and %d)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
number,
@@ -622,7 +617,7 @@ COMMAND_CALLBACK(buffer)
if (gui_buffer_is_reserved_name (argv[arg_name]))
{
gui_chat_printf (NULL,
_("%sError: name \"%s\" is reserved for WeeChat"),
_("%sBuffer name \"%s\" is reserved for WeeChat"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[arg_name]);
return WEECHAT_RC_OK;
@@ -728,8 +723,9 @@ COMMAND_CALLBACK(buffer)
{
/* invalid number */
gui_chat_printf (NULL,
_("%sError: incorrect buffer number"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
_("%sInvalid buffer number: \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
}
}
@@ -747,16 +743,32 @@ COMMAND_CALLBACK(buffer)
/* search buffers to swap */
ptr_buffer = gui_buffer_search_by_number_or_name (argv[2]);
ptr_buffer2 = (argc > 3) ?
gui_buffer_search_by_number_or_name (argv[3]) : buffer;
if (!ptr_buffer || !ptr_buffer2)
if (!ptr_buffer)
{
/* invalid buffer name/number */
gui_chat_printf (NULL,
_("%sError: buffer not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
_("%sBuffer \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
}
if (argc > 3)
{
ptr_buffer2 = gui_buffer_search_by_number_or_name (argv[3]);
if (!ptr_buffer2)
{
/* invalid buffer name/number */
gui_chat_printf (NULL,
_("%sBuffer \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[3]);
return WEECHAT_RC_OK;
}
}
else
{
ptr_buffer2 = buffer;
}
gui_buffer_swap (ptr_buffer->number, ptr_buffer2->number);
@@ -820,8 +832,9 @@ COMMAND_CALLBACK(buffer)
if (!ptr_buffer)
{
gui_chat_printf (NULL,
_("%sError: buffer not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
_("%sBuffer \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
}
gui_buffer_merge (buffer, ptr_buffer);
@@ -847,8 +860,9 @@ COMMAND_CALLBACK(buffer)
{
/* invalid number */
gui_chat_printf (NULL,
_("%sError: incorrect buffer number"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
_("%sInvalid buffer number: \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
}
if (!command_buffer_check_number ((int)number))
@@ -942,7 +956,7 @@ COMMAND_CALLBACK(buffer)
if (CONFIG_BOOLEAN(config_look_buffer_auto_renumber))
{
gui_chat_printf (NULL,
_("%sError: renumbering is allowed only if option "
_("%sRenumbering is allowed only if option "
"weechat.look.buffer_auto_renumber is off"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return WEECHAT_RC_OK;
@@ -958,8 +972,9 @@ COMMAND_CALLBACK(buffer)
{
/* invalid number */
gui_chat_printf (NULL,
_("%sError: incorrect buffer number"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
_("%sInvalid buffer number: \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[i + 2]);
return WEECHAT_RC_OK;
}
if ((i == 2) && !command_buffer_check_number ((int)numbers[i]))
@@ -1079,8 +1094,7 @@ COMMAND_CALLBACK(buffer)
* buffer to close with matching number
*/
gui_chat_printf (NULL,
_("%sError: WeeChat main buffer can't be "
"closed"),
_("%sWeeChat main buffer can't be closed"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
}
}
@@ -1114,7 +1128,7 @@ COMMAND_CALLBACK(buffer)
if (!config_weechat_notify_set (buffer, argv_eol[2]))
{
gui_chat_printf (NULL,
_("%sError: unable to set notify level \"%s\""),
_("%sUnable to set notify level \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv_eol[2]);
}
@@ -1276,8 +1290,9 @@ COMMAND_CALLBACK(buffer)
{
/* invalid number */
gui_chat_printf (NULL,
_("%sError: incorrect buffer number"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
_("%sInvalid buffer number: \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[1] + 1);
return WEECHAT_RC_OK;
}
}
@@ -1346,8 +1361,9 @@ COMMAND_CALLBACK(buffer)
{
/* invalid number */
gui_chat_printf (NULL,
_("%sError: incorrect buffer number"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
_("%sInvalid buffer number: \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[1] + 1);
return WEECHAT_RC_OK;
}
}
@@ -1381,8 +1397,9 @@ COMMAND_CALLBACK(buffer)
{
/* invalid number */
gui_chat_printf (NULL,
_("%sError: incorrect buffer number"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
_("%sInvalid buffer number: \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[1] + 1);
return WEECHAT_RC_OK;
}
return WEECHAT_RC_OK;
@@ -1635,8 +1652,9 @@ COMMAND_CALLBACK(command)
if (!ptr_buffer)
{
gui_chat_printf (NULL,
_("%sError: buffer not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
_("%sBuffer \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
}
index_args = 3;
@@ -2254,8 +2272,7 @@ COMMAND_CALLBACK(filter)
{
gui_chat_printf_date_tags (NULL, 0,
GUI_FILTER_TAG_NO_FILTER,
_("%sError: filter \"%s\" not "
"found"),
_("%sFilter \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -2312,8 +2329,7 @@ COMMAND_CALLBACK(filter)
{
gui_chat_printf_date_tags (NULL, 0,
GUI_FILTER_TAG_NO_FILTER,
_("%sError: filter \"%s\" not "
"found"),
_("%sFilter \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -2361,8 +2377,7 @@ COMMAND_CALLBACK(filter)
{
gui_chat_printf_date_tags (NULL, 0,
GUI_FILTER_TAG_NO_FILTER,
_("%sError: filter \"%s\" not "
"found"),
_("%sFilter \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -2388,8 +2403,8 @@ COMMAND_CALLBACK(filter)
if ((strcmp (argv[4], "*") == 0) && (strcmp (argv_eol[5], "*") == 0))
{
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
_("%sError: you must specify at least "
"tags or regex for filter"),
_("%sYou must specify at least tags "
"or regex for filter"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return WEECHAT_RC_OK;
}
@@ -2437,7 +2452,7 @@ COMMAND_CALLBACK(filter)
else
{
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
_("%sError: unable to rename filter "
_("%sUnable to rename filter "
"\"%s\" to \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2], argv[3]);
@@ -2447,7 +2462,7 @@ COMMAND_CALLBACK(filter)
else
{
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
_("%sError: filter \"%s\" not found"),
_("%sFilter \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -2490,7 +2505,7 @@ COMMAND_CALLBACK(filter)
else
{
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
_("%sError: filter \"%s\" not found"),
_("%sFilter \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -3432,7 +3447,7 @@ command_key_reset (int context, const char *key)
if (!ptr_new_key)
{
gui_chat_printf (NULL,
_("%sError: unable to bind key \"%s\""),
_("%sUnable to bind key \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
key);
return WEECHAT_RC_OK;
@@ -3455,7 +3470,7 @@ command_key_reset (int context, const char *key)
if (!rc)
{
gui_chat_printf (NULL,
_("%sError: unable to unbind key \"%s\""),
_("%sUnable to unbind key \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
key);
return WEECHAT_RC_OK;
@@ -3471,7 +3486,7 @@ command_key_reset (int context, const char *key)
if (!ptr_new_key)
{
gui_chat_printf (NULL,
_("%sError: unable to bind key \"%s\""),
_("%sUnable to bind key \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
key);
return WEECHAT_RC_OK;
@@ -3592,10 +3607,10 @@ COMMAND_CALLBACK(key)
&& !gui_key_is_safe (GUI_KEY_CONTEXT_DEFAULT, argv[2]))
{
gui_chat_printf (NULL,
_("%sError: it is not safe to bind key \"%s\" because "
"it does not start with a ctrl or meta code (tip: "
"use alt-k to find key codes); if you want to "
"bind this key anyway, turn off option "
_("%sIt is not safe to bind key \"%s\" because "
"it does not start with a ctrl or meta code "
"(tip: use alt-k to find key codes); if you "
"want to bind this key anyway, turn off option "
"weechat.look.key_bind_safe"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
@@ -3608,7 +3623,7 @@ COMMAND_CALLBACK(key)
if (!ptr_new_key)
{
gui_chat_printf (NULL,
_("%sError: unable to bind key \"%s\""),
_("%sUnable to bind key \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -3626,7 +3641,7 @@ COMMAND_CALLBACK(key)
if (context < 0)
{
gui_chat_printf (NULL,
_("%sError: context \"%s\" not found"),
_("%sContext \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -3661,10 +3676,10 @@ COMMAND_CALLBACK(key)
&& !gui_key_is_safe (context, argv[3]))
{
gui_chat_printf (NULL,
_("%sError: it is not safe to bind key \"%s\" because "
"it does not start with a ctrl or meta code (tip: "
"use alt-k to find key codes); if you want to "
"bind this key anyway, turn off option "
_("%sIt is not safe to bind key \"%s\" because "
"it does not start with a ctrl or meta code "
"(tip: use alt-k to find key codes); if you "
"want to bind this key anyway, turn off option "
"weechat.look.key_bind_safe"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[3]);
@@ -3678,7 +3693,7 @@ COMMAND_CALLBACK(key)
if (!ptr_new_key)
{
gui_chat_printf (NULL,
_("%sError: unable to bind key \"%s\""),
_("%sUnable to bind key \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[3]);
return WEECHAT_RC_OK;
@@ -3698,7 +3713,7 @@ COMMAND_CALLBACK(key)
if (!rc)
{
gui_chat_printf (NULL,
_("%sError: unable to unbind key \"%s\""),
_("%sUnable to unbind key \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -3717,7 +3732,7 @@ COMMAND_CALLBACK(key)
if (context < 0)
{
gui_chat_printf (NULL,
_("%sError: context \"%s\" not found"),
_("%sContext \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -3729,7 +3744,7 @@ COMMAND_CALLBACK(key)
if (!rc)
{
gui_chat_printf (NULL,
_("%sError: unable to unbind key \"%s\""),
_("%sUnable to unbind key \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[3]);
return WEECHAT_RC_OK;
@@ -3755,7 +3770,7 @@ COMMAND_CALLBACK(key)
if (context < 0)
{
gui_chat_printf (NULL,
_("%sError: context \"%s\" not found"),
_("%sContext \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -3787,7 +3802,7 @@ COMMAND_CALLBACK(key)
else
{
gui_chat_printf (NULL,
_("%sError: \"-yes\" argument is required for "
_("%sArgument \"-yes\" is required for "
"keys reset (security reason)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return WEECHAT_RC_OK;
@@ -4075,7 +4090,7 @@ COMMAND_CALLBACK(layout)
if (!ptr_layout)
{
gui_chat_printf (NULL,
_("%sError: unknown layout \"%s\""),
_("%sLayout \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -4084,7 +4099,7 @@ COMMAND_CALLBACK(layout)
if (ptr_layout2)
{
gui_chat_printf (NULL,
_("%sError: layout \"%s\" already exists for "
_("%sLayout \"%s\" already exists for "
"\"%s\" command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[3], "layout rename");
@@ -4906,7 +4921,7 @@ COMMAND_CALLBACK(print)
if (gui_buffer_is_reserved_name (argv[arg_new_buffer_name]))
{
gui_chat_printf (NULL,
_("%sError: name \"%s\" is reserved for WeeChat"),
_("%sBuffer name \"%s\" is reserved for WeeChat"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[arg_new_buffer_name]);
return WEECHAT_RC_OK;
@@ -5042,8 +5057,7 @@ COMMAND_CALLBACK(proxy)
if (type < 0)
{
gui_chat_printf (NULL,
_("%sError: wrong type \"%s\" for proxy "
"\"%s\""),
_("%sInvalid type \"%s\" for proxy \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[3], argv[2]);
return WEECHAT_RC_OK;
@@ -5063,8 +5077,7 @@ COMMAND_CALLBACK(proxy)
}
else
{
gui_chat_printf (NULL, _("%sError: failed to add proxy "
"\"%s\""),
gui_chat_printf (NULL, _("%sFailed to add proxy \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
}
@@ -5072,8 +5085,7 @@ COMMAND_CALLBACK(proxy)
else
{
gui_chat_printf (NULL,
_("%sError: wrong port \"%s\" for proxy "
"\"%s\""),
_("%sInvalid port \"%s\" for proxy \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[5], argv[2]);
return WEECHAT_RC_OK;
@@ -5096,7 +5108,7 @@ COMMAND_CALLBACK(proxy)
if (!ptr_proxy)
{
gui_chat_printf (NULL,
_("%sError: unknown proxy \"%s\""),
_("%sProxy \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -5115,7 +5127,7 @@ COMMAND_CALLBACK(proxy)
if (!ptr_proxy)
{
gui_chat_printf (NULL,
_("%sError: unknown proxy \"%s\""),
_("%sProxy \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2]);
return WEECHAT_RC_OK;
@@ -5123,8 +5135,7 @@ COMMAND_CALLBACK(proxy)
if (!proxy_set (ptr_proxy, argv[3], argv_eol[4]))
{
gui_chat_printf (NULL,
_("%sError: unable to set option \"%s\" for "
"proxy \"%s\""),
_("%sUnable to set option \"%s\" for proxy \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[3], argv[2]);
return WEECHAT_RC_OK;
@@ -5216,7 +5227,7 @@ command_reload_file (struct t_config_file *config_file)
else
{
gui_chat_printf (NULL,
_("%sError: failed to reload options from %s"),
_("%sFailed to reload options from %s"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
config_file->filename);
}
@@ -5351,8 +5362,9 @@ COMMAND_CALLBACK(repeat)
{
/* invalid count */
gui_chat_printf (NULL,
_("%sError: incorrect number"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
_("%sInvalid number: \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[arg_count]);
return WEECHAT_RC_OK;
}
@@ -5411,7 +5423,7 @@ command_save_file (struct t_config_file *config_file)
else
{
gui_chat_printf (NULL,
_("%sError: failed to save options to %s"),
_("%sFailed to save options to %s"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
config_file->filename);
}
@@ -5534,8 +5546,7 @@ COMMAND_CALLBACK(secure)
&& (strlen (argv_eol[2]) > SECURE_PASSPHRASE_MAX_LENGTH))
{
gui_chat_printf (NULL,
_("%sError: passphrase is too long "
"(max: %d chars)"),
_("%sPassphrase is too long (max: %d chars)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
SECURE_PASSPHRASE_MAX_LENGTH);
return WEECHAT_RC_OK;
@@ -5966,8 +5977,7 @@ COMMAND_CALLBACK(set)
else
{
gui_chat_printf (NULL,
_("%sError: failed to set variable "
"\"%s\": %s"),
_("%sFailed to set variable \"%s\": %s"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2],
strerror (errno));
@@ -5985,8 +5995,7 @@ COMMAND_CALLBACK(set)
else
{
gui_chat_printf (NULL,
_("%sError: failed to unset variable "
"\"%s\": %s"),
_("%sFailed to unset variable \"%s\": %s"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[2],
strerror (errno));
@@ -6060,13 +6069,13 @@ COMMAND_CALLBACK(set)
{
case WEECHAT_CONFIG_OPTION_SET_ERROR:
gui_chat_printf (NULL,
_("%sError: failed to set option \"%s\""),
_("%sFailed to set option \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[1]);
return WEECHAT_RC_OK;
case WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND:
gui_chat_printf (NULL,
_("%sError: option \"%s\" not found"),
_("%sOption \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[1]);
return WEECHAT_RC_OK;
@@ -6347,7 +6356,7 @@ COMMAND_CALLBACK(upgrade)
if (!upgrade_weechat_save ())
{
gui_chat_printf (NULL,
_("%sError: unable to save session in file"),
_("%sUnable to save session in file"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
if (ptr_binary)
free (ptr_binary);
@@ -6715,17 +6724,18 @@ COMMAND_CALLBACK(window)
if (error && !error[0])
ptr_win = gui_window_search_by_number (number);
else
ptr_win = NULL;
{
/* invalid number */
gui_chat_printf (NULL,
_("%sInvalid window number: \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
argv[3]);
return WEECHAT_RC_OK;
}
win_args = 4;
}
if (!ptr_win)
{
/* invalid number */
gui_chat_printf (NULL,
_("%sError: incorrect window number"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return WEECHAT_RC_OK;
}
/* page up */
if (string_strcasecmp (argv[1], "page_up") == 0)
@@ -6908,9 +6918,8 @@ COMMAND_CALLBACK(window)
if (!gui_window_merge (ptr_win))
{
gui_chat_printf (NULL,
_("%sError: can not merge windows, "
"there's no other window with same "
"size near current one"),
_("%sCan not merge windows, there's no other "
"window with same size near current one"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return WEECHAT_RC_OK;
}
@@ -6924,9 +6933,8 @@ COMMAND_CALLBACK(window)
if (!gui_window_close (ptr_win))
{
gui_chat_printf (NULL,
_("%sError: can not close window, "
"there's no other window with same "
"size near current one"),
_("%sCan not close window, there's no other "
"window with same size near current one"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return WEECHAT_RC_OK;
}
+2 -2
View File
@@ -589,7 +589,7 @@ config_file_new_option (struct t_config_file *config_file,
}
if (var_type < 0)
{
gui_chat_printf (NULL, "%sError: unknown option type \"%s\"",
gui_chat_printf (NULL, "%sUnknown option type \"%s\"",
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
type);
goto error;
@@ -2411,7 +2411,7 @@ config_file_write_internal (struct t_config_file *config_file,
if (!config_file->file)
{
gui_chat_printf (NULL,
_("%sError: cannot create file \"%s\""),
_("%sCannot create file \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
filename2);
goto error;
+1 -1
View File
@@ -1724,7 +1724,7 @@ config_weechat_palette_create_option_cb (const void *pointer, void *data,
else
{
gui_chat_printf (NULL,
_("%sError: palette option must be numeric"),
_("%sPalette option must be numeric"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
}
+4 -4
View File
@@ -177,7 +177,7 @@ input_exec_command (struct t_gui_buffer *buffer,
else
{
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
_("%sError: unknown command \"%s\" "
_("%sUnknown command \"%s\" "
"(type /help for help)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
command_name);
@@ -187,7 +187,7 @@ input_exec_command (struct t_gui_buffer *buffer,
case HOOK_COMMAND_EXEC_AMBIGUOUS_PLUGINS:
/* command is ambiguous (exists for other plugins) */
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
_("%sError: ambiguous command \"%s\": "
_("%sAmbiguous command \"%s\": "
"it exists in many plugins and not in "
"\"%s\" plugin"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
@@ -201,7 +201,7 @@ input_exec_command (struct t_gui_buffer *buffer,
* start with this name)
*/
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
_("%sError: incomplete command \"%s\" "
_("%sIncomplete command \"%s\" "
"and multiple commands start with "
"this name"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
@@ -211,7 +211,7 @@ input_exec_command (struct t_gui_buffer *buffer,
case HOOK_COMMAND_EXEC_RUNNING:
/* command is running */
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
_("%sError: too many calls to command "
_("%sToo many calls to command "
"\"%s\" (looping)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
command_name);
+3 -3
View File
@@ -194,9 +194,9 @@ secure_config_reload_cb (const void *pointer, void *data,
if (secure_hashtable_data_encrypted->items_count > 0)
{
gui_chat_printf (NULL,
_("%sError: not possible to reload file sec.conf "
"because there is still encrypted data (use /secure "
"decrypt, see /help secure)"),
_("%sUnable to reload file sec.conf because there is "
"still encrypted data (use /secure decrypt, see "
"/help secure)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return WEECHAT_CONFIG_READ_FILE_NOT_FOUND;
}
+7 -7
View File
@@ -153,8 +153,8 @@ util_setrlimit_resource (const char *resource_name, long limit)
if (limit < -1)
{
gui_chat_printf (NULL,
_("%sError: invalid limit for resource \"%s\": "
"%s (must be >= -1)"),
_("%sInvalid limit for resource \"%s\": %s "
"(must be >= -1)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
resource_name, str_limit);
return;
@@ -176,8 +176,8 @@ util_setrlimit_resource (const char *resource_name, long limit)
else
{
gui_chat_printf (NULL,
_("%sError: unable to set resource limit "
"\"%s\" to %s: error %d %s"),
_("%sUnable to set resource limit \"%s\" to "
"%s: error %d %s"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
resource_name, str_limit,
errno, strerror (errno));
@@ -187,7 +187,7 @@ util_setrlimit_resource (const char *resource_name, long limit)
}
gui_chat_printf (NULL,
_("%sError: unknown resource limit \"%s\" (see /help "
_("%sUnknown resource limit \"%s\" (see /help "
"weechat.startup.sys_rlimit)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
resource_name);
@@ -228,8 +228,8 @@ util_setrlimit ()
else
{
gui_chat_printf (NULL,
_("%sError: invalid limit for resource "
"\"%s\": %s (must be >= -1)"),
_("%sInvalid limit for resource \"%s\": "
"%s (must be >= -1)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
items[i], pos + 1);
}
+4 -6
View File
@@ -659,8 +659,7 @@ gui_buffer_new (struct t_weechat_plugin *plugin,
if (gui_buffer_search_by_name (plugin_get_name (plugin), name))
{
gui_chat_printf (NULL,
_("%sError: a buffer with same name (%s) already "
"exists"),
_("%sA buffer with same name (%s) already exists"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
name);
return NULL;
@@ -669,8 +668,7 @@ gui_buffer_new (struct t_weechat_plugin *plugin,
if (gui_buffers_count >= GUI_BUFFERS_MAX)
{
gui_chat_printf (NULL,
_("%sError: maximum number of buffers is reached "
"(%d)"),
_("%sMaximum number of buffers is reached (%d)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
GUI_BUFFERS_MAX);
return NULL;
@@ -3536,8 +3534,8 @@ gui_buffer_merge (struct t_gui_buffer *buffer,
|| (target_buffer->type != GUI_BUFFER_TYPE_FORMATTED))
{
gui_chat_printf (NULL,
_("%sError: it is only possible to merge buffers "
"with formatted content"),
_("%sIt is only possible to merge buffers with "
"formatted content"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
return;
}
+1 -1
View File
@@ -271,7 +271,7 @@ gui_filter_new_error (const char *name, const char *error)
{
gui_chat_printf_date_tags (
NULL, 0, GUI_FILTER_TAG_NO_FILTER,
_("%sError adding filter \"%s\": %s"),
_("%sUnable to add filter \"%s\": %s"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
(name) ? name : "",
error);
+23 -25
View File
@@ -367,8 +367,7 @@ plugin_call_init (struct t_weechat_plugin *plugin, int argc, char **argv)
else
{
gui_chat_printf (NULL,
_("%sError: unable to initialize plugin "
"\"%s\""),
_("%sUnable to initialize plugin \"%s\""),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
plugin->filename);
}
@@ -416,7 +415,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
if (!handle)
{
gui_chat_printf (NULL,
_("%sError: unable to load plugin \"%s\": %s"),
_("%sUnable to load plugin \"%s\": %s"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
filename, dlerror ());
gui_chat_printf (NULL,
@@ -432,8 +431,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
if (!name)
{
gui_chat_printf (NULL,
_("%sError: symbol \"%s\" not found in "
"plugin \"%s\", failed to load"),
_("%sSymbol \"%s\" not found in plugin \"%s\", "
"failed to load"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
"weechat_plugin_name",
filename);
@@ -446,8 +445,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
if (!api_version)
{
gui_chat_printf (NULL,
_("%sError: symbol \"%s\" not found in "
"plugin \"%s\", failed to load"),
_("%sSymbol \"%s\" not found in plugin \"%s\", "
"failed to load"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
"weechat_plugin_api_version",
filename);
@@ -462,8 +461,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
if (strcmp (api_version, WEECHAT_PLUGIN_API_VERSION) != 0)
{
gui_chat_printf (NULL,
_("%sError: API mismatch for plugin \"%s\" (current "
"API: \"%s\", plugin API: \"%s\"), failed to load"),
_("%sAPI mismatch for plugin \"%s\" (current API: "
"\"%s\", plugin API: \"%s\"), failed to load"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
filename,
WEECHAT_PLUGIN_API_VERSION,
@@ -481,8 +480,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
if (plugin_search (name))
{
gui_chat_printf (NULL,
_("%sError: unable to load plugin \"%s\": a plugin "
"with same name already exists"),
_("%sUnable to load plugin \"%s\": a plugin with "
"same name already exists"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
filename);
dlclose (handle);
@@ -494,8 +493,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
if (!description)
{
gui_chat_printf (NULL,
_("%sError: symbol \"%s\" not found "
"in plugin \"%s\", failed to load"),
_("%sSymbol \"%s\" not found in plugin \"%s\", "
"failed to load"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
"weechat_plugin_description",
filename);
@@ -508,8 +507,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
if (!author)
{
gui_chat_printf (NULL,
_("%sError: symbol \"%s\" not found "
"in plugin \"%s\", failed to load"),
_("%sSymbol \"%s\" not found in plugin \"%s\", "
"failed to load"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
"weechat_plugin_author",
filename);
@@ -522,8 +521,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
if (!version)
{
gui_chat_printf (NULL,
_("%sError: symbol \"%s\" not found in "
"plugin \"%s\", failed to load"),
_("%sSymbol \"%s\" not found in plugin \"%s\", "
"failed to load"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
"weechat_plugin_version",
filename);
@@ -536,8 +535,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
if (!license)
{
gui_chat_printf (NULL,
_("%sError: symbol \"%s\" not found in "
"plugin \"%s\", failed to load"),
_("%sSymbol \"%s\" not found in plugin \"%s\", "
"failed to load"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
"weechat_plugin_license",
filename);
@@ -553,8 +552,8 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
if (!init_func)
{
gui_chat_printf (NULL,
_("%sError: function \"%s\" not "
"found in plugin \"%s\", failed to load"),
_("%sFunction \"%s\" not found in plugin \"%s\", "
"failed to load"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
"weechat_plugin_init",
filename);
@@ -943,8 +942,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
else
{
gui_chat_printf (NULL,
_("%sError: unable to load plugin \"%s\" "
"(not enough memory)"),
_("%sUnable to load plugin \"%s\" (not enough memory)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
filename);
dlclose (handle);
@@ -1257,7 +1255,7 @@ plugin_unload_name (const char *name)
else
{
gui_chat_printf (NULL,
_("%sError: plugin \"%s\" not found"),
_("%sPlugin \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
name);
}
@@ -1311,7 +1309,7 @@ plugin_reload_name (const char *name, int argc, char **argv)
else
{
gui_chat_printf (NULL,
_("%sError: plugin \"%s\" not found"),
_("%sPlugin \"%s\" not found"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
name);
}