diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-28 22:32:54 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-28 22:32:54 +0200 |
commit | 974ac9ad5fe5846f7b56d2b2a91fbf4c1f7c6dac (patch) | |
tree | 9c2de6a46d1abf9c284909ddc288f447ba63bc7d | |
parent | 7c5d484f592f2cdd27cd9c87aa606730fd623b70 (diff) | |
download | weechat-974ac9ad5fe5846f7b56d2b2a91fbf4c1f7c6dac.zip |
core: add separate function to get translated help for values of color options
-rw-r--r-- | src/core/wee-command.c | 35 | ||||
-rw-r--r-- | src/core/wee-command.h | 6 |
2 files changed, 25 insertions, 16 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 272fe3d97..8baab8a34 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -2923,6 +2923,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", diff --git a/src/core/wee-command.h b/src/core/wee-command.h index 0decd8737..1039d3238 100644 --- a/src/core/wee-command.h +++ b/src/core/wee-command.h @@ -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 */ |