diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 1d5130a19..085d5b094 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -34,7 +34,7 @@ New features:: * buflist: increase max number of buflist items from 3 to 5 (issue #1703) * fset: add variable `allowed_values` in options, add options fset.color.allowed_values and fset.color.allowed_values_selected * fset: allow long type name in type filter - * irc: add count for all nick modes in output of `/names` (issue #97) + * irc: add count for all nick modes in output of `/names` (issue #97, issue #2020) * irc: add count and mode filter in command `/names` (issue #98) * irc: compute color in case insensitive way, reintroduce infos "irc_nick_color" and "irc_nick_color_name", add support of server name (issue #194) * irc: add buffer for /list reply, add options irc.color.list_buffer_line_selected, irc.color.list_buffer_line_selected_bg, irc.look.list_buffer_sort, irc.look.list_buffer_scroll_horizontal, irc.look.new_list_position, irc.look.list_buffer_topic_strip_colors (issue #1972) diff --git a/po/cs.po b/po/cs.po index 35404a6da..69775b93d 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -10584,6 +10584,18 @@ msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + msgid "op" msgid_plural "ops" msgstr[0] "op" diff --git a/po/de.po b/po/de.po index 7b20e6656..8bfc611c4 100644 --- a/po/de.po +++ b/po/de.po @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-15 12:46+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -13068,6 +13068,16 @@ msgid_plural "regular" msgstr[0] "regulär" msgstr[1] "reguläre" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" + msgid "op" msgid_plural "ops" msgstr[0] "Operator" diff --git a/po/es.po b/po/es.po index 3bb126fec..a672fc077 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Santiago Forero \n" "Language-Team: weechat-dev \n" @@ -11324,6 +11324,16 @@ msgid_plural "regular" msgstr[0] "" msgstr[1] "" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" + msgid "op" msgid_plural "ops" msgstr[0] "op" diff --git a/po/fr.po b/po/fr.po index 9d5253d50..c19f14aef 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" -"PO-Revision-Date: 2023-09-22 23:12+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" +"PO-Revision-Date: 2023-09-22 23:13+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -12771,6 +12771,16 @@ msgid_plural "regular" msgstr[0] "régulier" msgstr[1] "réguliers" +msgid "owner" +msgid_plural "owners" +msgstr[0] "propriétaire" +msgstr[1] "propriétaires" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "admin" +msgstr[1] "admins" + msgid "op" msgid_plural "ops" msgstr[0] "op" diff --git a/po/hu.po b/po/hu.po index bea26eb3d..8f6c6b28d 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -10001,6 +10001,16 @@ msgid_plural "regular" msgstr[0] "" msgstr[1] "" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" + #, fuzzy msgid "op" msgid_plural "ops" diff --git a/po/it.po b/po/it.po index 07c42878b..89fd377ae 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -11051,6 +11051,16 @@ msgid_plural "regular" msgstr[0] "" msgstr[1] "" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" + msgid "op" msgid_plural "ops" msgstr[0] "operatore" diff --git a/po/ja.po b/po/ja.po index cf666a217..b0d0549c3 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: Polish \n" @@ -13517,6 +13517,18 @@ msgstr[0] "%s%s%d%s normal" msgstr[1] "%s%s%d%s normals" msgstr[2] "%s%s%d%s normals" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + msgid "op" msgid_plural "ops" msgstr[0] "op" diff --git a/po/pt.po b/po/pt.po index 34cfc791e..0cdc1b79a 100644 --- a/po/pt.po +++ b/po/pt.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -12008,6 +12008,16 @@ msgid_plural "regular" msgstr[0] "" msgstr[1] "" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" + msgid "op" msgid_plural "ops" msgstr[0] "op" diff --git a/po/pt_BR.po b/po/pt_BR.po index 6be0435d2..cc1eaa5b9 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -10584,6 +10584,16 @@ msgid_plural "regular" msgstr[0] "" msgstr[1] "" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" + msgid "op" msgid_plural "ops" msgstr[0] "operado" diff --git a/po/ru.po b/po/ru.po index 6f6e9ab8c..fe5f6106c 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -10042,6 +10042,18 @@ msgstr[0] "" msgstr[1] "" msgstr[2] "" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + #, fuzzy msgid "op" msgid_plural "ops" diff --git a/po/sr.po b/po/sr.po index 2a857d748..edf712a77 100644 --- a/po/sr.po +++ b/po/sr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -12591,6 +12591,18 @@ msgstr[0] "обичан" msgstr[1] "обична" msgstr[2] "обичних" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + msgid "op" msgid_plural "ops" msgstr[0] "оп" diff --git a/po/tr.po b/po/tr.po index 333a91e0a..4d60f5e21 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2023-09-06 19:13+0200\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -13002,6 +13002,16 @@ msgid_plural "regular" msgstr[0] "%s%s%d%s normal kullanıcı" msgstr[1] "%s%s%d%s normal kullanıcı" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" + msgid "op" msgid_plural "ops" msgstr[0] "operatör" diff --git a/po/weechat.pot b/po/weechat.pot index 3430e7d5b..9805c0e4c 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-09-22 23:07+0200\n" +"POT-Creation-Date: 2023-09-22 23:12+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -9032,6 +9032,16 @@ msgid_plural "regular" msgstr[0] "" msgstr[1] "" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" +msgstr[1] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" +msgstr[1] "" + msgid "op" msgid_plural "ops" msgstr[0] "" diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 370aa0b3f..9a9f0189a 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -6672,6 +6672,16 @@ irc_protocol_get_string_channel_nicks_count (struct t_irc_server *server, /* TRANSLATORS: number of "regular" nicks on a channel (ie not op/halfop/voiced), for example: "56 regular" */ NG_("regular", "regular", nicks_by_mode[i])); } + else if (ptr_prefix_modes[i] == 'q') + { + snprintf (str_mode_name, sizeof (str_mode_name), + "%s", NG_("owner", "owners", nicks_by_mode[i])); + } + else if (ptr_prefix_modes[i] == 'a') + { + snprintf (str_mode_name, sizeof (str_mode_name), + "%s", NG_("admin", "admins", nicks_by_mode[i])); + } else if (ptr_prefix_modes[i] == 'o') { snprintf (str_mode_name, sizeof (str_mode_name), diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index 0aa4926f6..a4b770a14 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -5129,21 +5129,44 @@ TEST(IrcProtocolWithServer, 366) RECV(":server 366 alice #test :End of /NAMES list"); CHECK_CHAN( "--", - "Channel #test: 10 nicks (1 +q, 0 +a, 2 ops, 2 halfops, 2 voiced, 3 regular)", + "Channel #test: 10 nicks (1 owner, 0 admins, 2 ops, 2 halfops, 2 voiced, 3 regular)", "irc_366,irc_numeric,log3"); RECV(":server 353 alice = #test :&karl"); RECV(":server 366 alice #test :End of /NAMES list"); CHECK_CHAN( "--", - "Channel #test: 11 nicks (1 +q, 1 +a, 2 ops, 2 halfops, 2 voiced, 3 regular)", + "Channel #test: 11 nicks (1 owner, 1 admin, 2 ops, 2 halfops, 2 voiced, 3 regular)", "irc_366,irc_numeric,log3"); RECV(":server 353 alice = #test :&mike"); RECV(":server 366 alice #test :End of /NAMES list"); CHECK_CHAN( "--", - "Channel #test: 12 nicks (1 +q, 2 +a, 2 ops, 2 halfops, 2 voiced, 3 regular)", + "Channel #test: 12 nicks (1 owner, 2 admins, 2 ops, 2 halfops, 2 voiced, 3 regular)", + "irc_366,irc_numeric,log3"); + + RECV(":server 353 alice = #test :~olivia"); + RECV(":server 366 alice #test :End of /NAMES list"); + CHECK_CHAN( + "--", + "Channel #test: 13 nicks (2 owners, 2 admins, 2 ops, 2 halfops, 2 voiced, 3 regular)", + "irc_366,irc_numeric,log3"); + + RECV(":server 005 alice PREFIX=(zqaohv)?~&@%+ :are supported"); + + RECV(":server 353 alice = #test :?peggy"); + RECV(":server 366 alice #test :End of /NAMES list"); + CHECK_CHAN( + "--", + "Channel #test: 14 nicks (1 +z, 2 owners, 2 admins, 2 ops, 2 halfops, 2 voiced, 3 regular)", + "irc_366,irc_numeric,log3"); + + RECV(":server 353 alice = #test :?robert"); + RECV(":server 366 alice #test :End of /NAMES list"); + CHECK_CHAN( + "--", + "Channel #test: 15 nicks (2 +z, 2 owners, 2 admins, 2 ops, 2 halfops, 2 voiced, 3 regular)", "irc_366,irc_numeric,log3"); /* channel not found */