1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 05:45:41 +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
+166 -141
View File
File diff suppressed because it is too large Load Diff
+178 -155
View File
File diff suppressed because it is too large Load Diff
+162 -138
View File
File diff suppressed because it is too large Load Diff
+151 -166
View File
File diff suppressed because it is too large Load Diff
+124 -90
View File
File diff suppressed because it is too large Load Diff
+165 -142
View File
File diff suppressed because it is too large Load Diff
+177 -154
View File
File diff suppressed because it is too large Load Diff
+178 -155
View File
File diff suppressed because it is too large Load Diff
+175 -152
View File
File diff suppressed because it is too large Load Diff
+164 -141
View File
File diff suppressed because it is too large Load Diff
+127 -94
View File
File diff suppressed because it is too large Load Diff
+141 -142
View File
File diff suppressed because it is too large Load Diff
+74 -81
View File
File diff suppressed because it is too large Load Diff
+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
File diff suppressed because it is too large Load Diff
+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
File diff suppressed because it is too large Load Diff