1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: add separate function to get translated help for values of color options

This commit is contained in:
Sébastien Helleu
2023-03-28 22:32:54 +02:00
parent 7c5d484f59
commit 974ac9ad5f
2 changed files with 25 additions and 16 deletions
+22 -13
View File
@@ -2922,6 +2922,27 @@ command_help_list_commands (int verbose)
}
}
/*
* Returns translated help text for values of a color option.
*/
const char *
command_help_option_color_values ()
{
return _("a WeeChat color name (default, black, "
"(dark)gray, white, (light)red, (light)green, "
"brown, yellow, (light)blue, (light)magenta, "
"(light)cyan), a terminal color number or "
"an alias; attributes are allowed before "
"color (for text color only, not "
"background): "
"\"%\" for blink, "
"\".\" for \"dim\" (half bright), "
"\"*\" for bold, "
"\"!\" for reverse, "
"\"/\" for italic, "
"\"_\" for underline");
}
/*
* Callback for command "/help": displays help about commands and options.
*/
@@ -3259,19 +3280,7 @@ COMMAND_CALLBACK(help)
_("type"), _("color"));
gui_chat_printf (NULL, " %s: %s",
_("values"),
_("a WeeChat color name (default, black, "
"(dark)gray, white, (light)red, (light)green, "
"brown, yellow, (light)blue, (light)magenta, "
"(light)cyan), a terminal color number or "
"an alias; attributes are allowed before "
"color (for text color only, not "
"background): "
"\"%\" for blink, "
"\".\" for \"dim\" (half bright), "
"\"*\" for bold, "
"\"!\" for reverse, "
"\"/\" for italic, "
"\"_\" for underline"));
command_help_option_color_values ());
if (ptr_option->default_value)
{
gui_chat_printf (NULL, " %s: %s",
+3 -3
View File
@@ -80,14 +80,14 @@
return WEECHAT_RC_ERROR; \
}
struct t_gui_buffer;
extern void command_init ();
extern void command_startup (int plugins_loaded);
extern const char *command_help_option_color_values ();
extern void command_version_display (struct t_gui_buffer *buffer,
int send_to_buffer_as_input,
int translated_string,
int display_git_version);
extern void command_init ();
extern void command_startup (int plugins_loaded);
#endif /* WEECHAT_COMMAND_H */