diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e3ab0066..249ea36d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ SPDX-License-Identifier: GPL-3.0-or-later ## Version 4.9.0 (under dev) +### Added + +- typing: add option typing.look.item_text ([#2305](https://github.com/weechat/weechat/issues/2305)) + ### Fixed - core: fix buffer size in function util_parse_time, causing buffer overflow error in unit tests diff --git a/po/cs.po b/po/cs.po index 558b9f2d7..a52702b6e 100644 --- a/po/cs.po +++ b/po/cs.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -16978,7 +16978,7 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s%s: \"%s\" není validní regulární výraz (%s)" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" +msgid "Typing: " msgstr "" msgid "" @@ -17012,6 +17012,11 @@ msgid "" "truncate content)" msgstr "" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "" diff --git a/po/de.po b/po/de.po index b4ba71723..134465615 100644 --- a/po/de.po +++ b/po/de.po @@ -28,8 +28,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" -"PO-Revision-Date: 2026-03-09 22:49+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" +"PO-Revision-Date: 2026-03-09 23:53+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" "Language: de_DE\n" @@ -18522,8 +18522,8 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s%s: ungültiger regulärer Ausdruck in Trigger: \"%s\"" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" -msgstr "Tippstatus:" +msgid "Typing: " +msgstr "Tippstatus: " msgid "" "number of seconds after paused status has been set: if reached, the typing " @@ -18571,6 +18571,11 @@ msgstr "" "maximale Anzahl von Zeichen, die im Bar-Item \"typing\" angezeigt werden (0 " "= Inhalt nicht abschneiden)" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "Tippstatus von Benutzern" diff --git a/po/es.po b/po/es.po index 3cf30f5a3..621c02a58 100644 --- a/po/es.po +++ b/po/es.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" "PO-Revision-Date: 2026-03-09 22:44+0100\n" "Last-Translator: Santiago Forero \n" "Language-Team: weechat-dev \n" @@ -17270,7 +17270,7 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s%s: error al compilar la expresión regular \"%s\"" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" +msgid "Typing: " msgstr "" msgid "" @@ -17304,6 +17304,11 @@ msgid "" "truncate content)" msgstr "" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "" diff --git a/po/fr.po b/po/fr.po index 393c42514..57aa832a6 100644 --- a/po/fr.po +++ b/po/fr.po @@ -23,8 +23,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" -"PO-Revision-Date: 2026-03-09 23:30+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" +"PO-Revision-Date: 2026-03-09 23:57+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -18180,8 +18180,8 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s%s : expression régulière invalide dans le trigger : \"%s\"" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" -msgstr "Écrit :" +msgid "Typing: " +msgstr "Écrit : " msgid "" "number of seconds after paused status has been set: if reached, the typing " @@ -18230,6 +18230,14 @@ msgstr "" "nombre maximum de caractères affichés dans l'objet de barre \"typing\" (0 = " "ne pas tronquer le contenu)" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" +"texte à afficher avant les pseudos dans l'objet de barre \"typing\" ; si " +"défini, il est utilisé à la place de la chaîne traduite \"Typing: \" qui est " +"utilisée par défaut" + msgid "Typing status of users" msgstr "Statut d'écriture des utilisateurs" diff --git a/po/hu.po b/po/hu.po index 89ebd263c..c12b75d7a 100644 --- a/po/hu.po +++ b/po/hu.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -16196,7 +16196,7 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s nincs elég memória az információs pult üzenethez\n" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" +msgid "Typing: " msgstr "" msgid "" @@ -16230,6 +16230,11 @@ msgid "" "truncate content)" msgstr "" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "" diff --git a/po/it.po b/po/it.po index e7a3ee110..6febad65f 100644 --- a/po/it.po +++ b/po/it.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" "PO-Revision-Date: 2026-03-09 22:44+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -17365,7 +17365,7 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s%s: errore nella compilazione dell'espressione regolare \"%s\"" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" +msgid "Typing: " msgstr "" msgid "" @@ -17399,6 +17399,11 @@ msgid "" "truncate content)" msgstr "" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "" diff --git a/po/ja.po b/po/ja.po index 39624d420..c7391d106 100644 --- a/po/ja.po +++ b/po/ja.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: weechat-dev \n" "Language: pl\n" @@ -17664,8 +17664,8 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s%s: nieprawidłowe wyrażenie regularne w triggerze: \"%s\"" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" -msgstr "Typing:" +msgid "Typing: " +msgstr "Typing: " msgid "" "number of seconds after paused status has been set: if reached, the typing " @@ -17712,6 +17712,11 @@ msgstr "" "maksymalna ilość znaków wyświetlana w elemencie paska \"typing\" (0 = nie " "ograniczaj zawartości)" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "Status pisania użytkowników" diff --git a/po/pt.po b/po/pt.po index 290b7ca07..8b0d73881 100644 --- a/po/pt.po +++ b/po/pt.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -17848,7 +17848,7 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s%s: expressão regular inválida no acionador: \"%s\"" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" +msgid "Typing: " msgstr "" msgid "" @@ -17882,6 +17882,11 @@ msgid "" "truncate content)" msgstr "" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index b530ff169..e3af8e608 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -46,7 +46,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -16752,7 +16752,7 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s%s: erro ao compilar expressão regular \"%s\"" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" +msgid "Typing: " msgstr "" msgid "" @@ -16786,6 +16786,11 @@ msgid "" "truncate content)" msgstr "" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "" diff --git a/po/ru.po b/po/ru.po index 2f5a8e389..dbbe75967 100644 --- a/po/ru.po +++ b/po/ru.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -16248,7 +16248,7 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s недостаточно памяти для сообщения в строке информации\n" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" +msgid "Typing: " msgstr "" msgid "" @@ -16282,6 +16282,11 @@ msgid "" "truncate content)" msgstr "" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "" diff --git a/po/sr.po b/po/sr.po index 06f910560..5db56dc4e 100644 --- a/po/sr.po +++ b/po/sr.po @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" -"PO-Revision-Date: 2026-03-09 22:50+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" +"PO-Revision-Date: 2026-03-09 23:54+0100\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" "Language: sr\n" @@ -17634,8 +17634,8 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s%s: неважећи регуларни израз у окидачу: „%s”" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" -msgstr "Куцање:" +msgid "Typing: " +msgstr "Куцање: " msgid "" "number of seconds after paused status has been set: if reached, the typing " @@ -17680,6 +17680,11 @@ msgstr "" "макс број карактера који се приказује у ставци траке \"typing\" (0 = садржај " "се не одсеца)" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "Статус куцања корисника" diff --git a/po/tr.po b/po/tr.po index 78f165817..43de3f991 100644 --- a/po/tr.po +++ b/po/tr.po @@ -23,8 +23,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" -"PO-Revision-Date: 2026-03-09 22:45+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" +"PO-Revision-Date: 2026-03-09 23:54+0100\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" "Language: tr\n" @@ -18085,8 +18085,8 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "%s%s: Tetikte geçersiz düzenli ifade: \"%s\"" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" -msgstr "Yazıyor:" +msgid "Typing: " +msgstr "Yazıyor: " msgid "" "number of seconds after paused status has been set: if reached, the typing " @@ -18130,6 +18130,11 @@ msgstr "" "\"yazıyor\" çubuk ögesinde görüntülenecek en çok karakter sayısı (0 = " "içeriği kısaltma)" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "Kullanıcıların metin yazma durumu" diff --git a/po/weechat.pot b/po/weechat.pot index f65ca18fe..dbd97558a 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-03-09 23:00+0100\n" +"POT-Creation-Date: 2026-03-09 23:56+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -14844,7 +14844,7 @@ msgid "%s%s: invalid regular expression in trigger: \"%s\"" msgstr "" #. TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible -msgid "Typing:" +msgid "Typing: " msgstr "" msgid "" @@ -14878,6 +14878,11 @@ msgid "" "truncate content)" msgstr "" +msgid "" +"text to display before the nicks in the bar item \"typing\"; if set, it is " +"used instead of the translated string \"Typing: \" which is used by default" +msgstr "" + msgid "Typing status of users" msgstr "" diff --git a/src/plugins/typing/typing-bar-item.c b/src/plugins/typing/typing-bar-item.c index 1e87e88b6..3dce4c096 100644 --- a/src/plugins/typing/typing-bar-item.c +++ b/src/plugins/typing/typing-bar-item.c @@ -79,6 +79,7 @@ typing_bar_item_typing (const void *pointer, void *data, { struct t_hashtable *ptr_nicks; char **str_nicks_typing, **str_typing, *str_typing_cut; + const char *ptr_text; int max_length; /* make C compiler happy */ @@ -103,9 +104,13 @@ typing_bar_item_typing (const void *pointer, void *data, &typing_bar_item_nicks_map_cb, str_nicks_typing); str_typing = weechat_string_dyn_alloc (256); - /* TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible */ - weechat_string_dyn_concat (str_typing, _("Typing:"), -1); - weechat_string_dyn_concat (str_typing, " ", -1); + ptr_text = weechat_config_string (typing_config_look_item_text); + if (!ptr_text || !ptr_text[0]) + { + /* TRANSLATORS: this text is displayed before the list of nicks typing in the bar item "typing", it must be as short as possible */ + ptr_text = _("Typing: "); + } + weechat_string_dyn_concat (str_typing, ptr_text, -1); weechat_string_dyn_concat (str_typing, *str_nicks_typing, -1); weechat_string_dyn_free (str_nicks_typing, 1); diff --git a/src/plugins/typing/typing-config.c b/src/plugins/typing/typing-config.c index 95439a97f..65901708c 100644 --- a/src/plugins/typing/typing-config.c +++ b/src/plugins/typing/typing-config.c @@ -47,6 +47,7 @@ struct t_config_option *typing_config_look_enabled_nicks = NULL; struct t_config_option *typing_config_look_enabled_self = NULL; struct t_config_option *typing_config_look_input_min_chars = NULL; struct t_config_option *typing_config_look_item_max_length = NULL; +struct t_config_option *typing_config_look_item_text = NULL; /* @@ -103,6 +104,22 @@ typing_config_change_item_max_length (const void *pointer, void *data, weechat_bar_item_update (TYPING_BAR_ITEM_NAME); } +/* + * Callback for changes on options "typing.look.item_text". + */ + +void +typing_config_change_item_text (const void *pointer, void *data, + struct t_config_option *option) +{ + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) option; + + weechat_bar_item_update (TYPING_BAR_ITEM_NAME); +} + /* * Initializes typing configuration file. * @@ -187,6 +204,17 @@ typing_config_init (void) NULL, NULL, NULL, &typing_config_change_item_max_length, NULL, NULL, NULL, NULL, NULL); + typing_config_look_item_text = weechat_config_new_option ( + typing_config_file, typing_config_section_look, + "item_text", "string", + N_("text to display before the nicks in the bar item \"typing\"; " + "if set, it is used instead of the translated string \"Typing: \" " + "which is used by default"), + NULL, 0, 0, "", NULL, 0, + NULL, NULL, NULL, + &typing_config_change_item_text, NULL, NULL, + NULL, NULL, NULL); + } return 1; diff --git a/src/plugins/typing/typing-config.h b/src/plugins/typing/typing-config.h index b1bbc4b13..fe7d80292 100644 --- a/src/plugins/typing/typing-config.h +++ b/src/plugins/typing/typing-config.h @@ -32,6 +32,7 @@ extern struct t_config_option *typing_config_look_enabled_nicks; extern struct t_config_option *typing_config_look_enabled_self; extern struct t_config_option *typing_config_look_input_min_chars; extern struct t_config_option *typing_config_look_item_max_length; +extern struct t_config_option *typing_config_look_item_text; extern int typing_config_init (void); extern int typing_config_read (void);