diff options
-rw-r--r-- | ChangeLog.adoc | 2 | ||||
-rw-r--r-- | po/cs.po | 14 | ||||
-rw-r--r-- | po/de.po | 12 | ||||
-rw-r--r-- | po/es.po | 12 | ||||
-rw-r--r-- | po/fr.po | 14 | ||||
-rw-r--r-- | po/hu.po | 12 | ||||
-rw-r--r-- | po/it.po | 12 | ||||
-rw-r--r-- | po/ja.po | 10 | ||||
-rw-r--r-- | po/pl.po | 14 | ||||
-rw-r--r-- | po/pt.po | 12 | ||||
-rw-r--r-- | po/pt_BR.po | 12 | ||||
-rw-r--r-- | po/ru.po | 14 | ||||
-rw-r--r-- | po/sr.po | 14 | ||||
-rw-r--r-- | po/tr.po | 12 | ||||
-rw-r--r-- | po/weechat.pot | 12 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 10 | ||||
-rw-r--r-- | tests/unit/plugins/irc/test-irc-protocol.cpp | 29 |
17 files changed, 198 insertions, 19 deletions
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) @@ -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 <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\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" @@ -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 <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\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" @@ -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 <santiago@forero.xyz>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\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" @@ -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 <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\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" @@ -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 <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\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" @@ -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 <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\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" @@ -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 <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -12303,6 +12303,14 @@ msgid "regular" msgid_plural "regular" msgstr[0] "" +msgid "owner" +msgid_plural "owners" +msgstr[0] "" + +msgid "admin" +msgid_plural "admins" +msgstr[0] "" + msgid "op" msgid_plural "ops" msgstr[0] "オペレータ" @@ -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: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\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" @@ -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 <vascomalmeida@sapo.pt>\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 <ericonr@disroot.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\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" @@ -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 <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\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" @@ -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ć <ivan.pesic@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\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] "оп" @@ -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 <emir_sari@icloud.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\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 <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\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 */ |