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:
+22
-13
@@ -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",
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user