From 72a9b87c1c0ecdc5c951a2e9e4d76c729a22e138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 1 Aug 2021 10:30:06 +0200 Subject: [PATCH] irc: display a different message for setname applied on self and other nicks (closes #1676) --- po/cs.po | 8 ++++++-- po/de.po | 12 +++++++++--- po/es.po | 8 ++++++-- po/fr.po | 12 ++++++++---- po/hu.po | 8 ++++++-- po/it.po | 8 ++++++-- po/ja.po | 8 ++++++-- po/pl.po | 12 +++++++++--- po/pt.po | 8 ++++++-- po/pt_BR.po | 8 ++++++-- po/ru.po | 8 ++++++-- po/sr.po | 12 +++++++++--- po/tr.po | 8 ++++++-- po/weechat.pot | 8 ++++++-- src/plugins/irc/irc-protocol.c | 33 ++++++++++++++++++++++++++------- 15 files changed, 121 insertions(+), 40 deletions(-) diff --git a/po/cs.po b/po/cs.po index 26c277ea8..bd7e6fd21 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -9304,7 +9304,11 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s skončil" #, fuzzy, c-format -msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%sSelhalo odnastavení volby \"%s\"" + +#, fuzzy, c-format +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%sSelhalo odnastavení volby \"%s\"" #, c-format diff --git a/po/de.po b/po/de.po index e436c6091..0bd67e5ad 100644 --- a/po/de.po +++ b/po/de.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -11415,8 +11415,14 @@ msgstr "%s%s%s%s%s%s%s%s%s%s hat den IRC verlassen %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s hat den IRC verlassen" -#, c-format -msgid "%sReal name set to: %s" +#, fuzzy, c-format +#| msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%sRealname eingstellt auf: %s" + +#, fuzzy, c-format +#| msgid "%sReal name set to: %s" +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%sRealname eingstellt auf: %s" #, c-format diff --git a/po/es.po b/po/es.po index 6a763dc7c..115c5108f 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -9606,7 +9606,11 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s ha salido" #, fuzzy, c-format -msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%sNo se pudo deshacer la opción \"%s\"" + +#, fuzzy, c-format +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%sNo se pudo deshacer la opción \"%s\"" #, c-format diff --git a/po/fr.po b/po/fr.po index 9607a79fb..859dd52b6 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: 2021-07-10 15:57+0200\n" -"PO-Revision-Date: 2021-07-10 16:01+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" +"PO-Revision-Date: 2021-08-01 10:25+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -11179,8 +11179,12 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s a quitté" #, c-format -msgid "%sReal name set to: %s" -msgstr "%sNom réel défini à : %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%sVotre nom réel a été défini à \"%s\"" + +#, c-format +msgid "%sReal name of %s%s%s has been set to \"%s\"" +msgstr "%sLe nom réel de %s%s%s a été défini à \"%s\"" #, c-format msgid "%s%s: \"%s\" command received without channel" diff --git a/po/hu.po b/po/hu.po index ffaa093fc..02bdd8a44 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -8873,7 +8873,11 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s %s(%s%s%s)%s kilépett" #, fuzzy, c-format -msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%s nem sikerült a modul opciókat elmenteni\n" + +#, fuzzy, c-format +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%s nem sikerült a modul opciókat elmenteni\n" #, fuzzy, c-format diff --git a/po/it.po b/po/it.po index 66f686b7b..362f1441b 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -9767,7 +9767,11 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s si è disconnesso" #, fuzzy, c-format -msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%sImpossibile disabilitare l'opzione \"%s\"" + +#, fuzzy, c-format +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%sImpossibile disabilitare l'opzione \"%s\"" #, c-format diff --git a/po/ja.po b/po/ja.po index 42296a640..58573c3db 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: Polish \n" @@ -10918,8 +10918,14 @@ msgstr "%s%s%s%s%s%s%s%s%s%s wyszedł z IRC %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s wyszedł z IRC" -#, c-format -msgid "%sReal name set to: %s" +#, fuzzy, c-format +#| msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%sUstawiono real name na: %s" + +#, fuzzy, c-format +#| msgid "%sReal name set to: %s" +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%sUstawiono real name na: %s" #, c-format diff --git a/po/pt.po b/po/pt.po index 003fb86a4..f4f2ea3e7 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -10498,7 +10498,11 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s saiu" #, fuzzy, c-format -msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%sFalha ao reinicializar a opção \"%s\"" + +#, fuzzy, c-format +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%sFalha ao reinicializar a opção \"%s\"" #, c-format diff --git a/po/pt_BR.po b/po/pt_BR.po index 848c897f1..8f86781f5 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -9307,7 +9307,11 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "" #, fuzzy, c-format -msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%sFalhou ao desabilitar a opção \"%s\"" + +#, fuzzy, c-format +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%sFalhou ao desabilitar a opção \"%s\"" #, c-format diff --git a/po/ru.po b/po/ru.po index 169ff80d8..9673a3b08 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -8911,7 +8911,11 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s %s(%s%s%s)%s вышел" #, fuzzy, c-format -msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%s не могу сохранить конфигурационный файл pluginов\n" + +#, fuzzy, c-format +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%s не могу сохранить конфигурационный файл pluginов\n" #, fuzzy, c-format diff --git a/po/sr.po b/po/sr.po index 6dfedba0f..fa52402f6 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -10895,8 +10895,14 @@ msgstr "%s%s%s%s%s%s%s%s%s%s је прекинуо %s(%s%s%s)" msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s је прекинуо" -#, c-format -msgid "%sReal name set to: %s" +#, fuzzy, c-format +#| msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%sРеално име је постављено на: %s" + +#, fuzzy, c-format +#| msgid "%sReal name set to: %s" +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%sРеално име је постављено на: %s" #, c-format diff --git a/po/tr.po b/po/tr.po index fb741169d..8fe83a963 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -8465,7 +8465,11 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "%s%s%s%s%s%s%s%s%s%s çıktı" #, fuzzy, c-format -msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "%s\"%s\" seçeneği ayarlanamadı" + +#, fuzzy, c-format +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "%s\"%s\" seçeneği ayarlanamadı" #, c-format diff --git a/po/weechat.pot b/po/weechat.pot index d945d207e..73f249db8 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: 2021-07-10 15:57+0200\n" +"POT-Creation-Date: 2021-08-01 10:24+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -7930,7 +7930,11 @@ msgid "%s%s%s%s%s%s%s%s%s%s has quit" msgstr "" #, c-format -msgid "%sReal name set to: %s" +msgid "%sYour real name has been set to \"%s\"" +msgstr "" + +#, c-format +msgid "%sReal name of %s%s%s has been set to \"%s\"" msgstr "" #, c-format diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 99ba1435d..366ee8b1c 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -2903,12 +2903,15 @@ IRC_PROTOCOL_CALLBACK(quit) IRC_PROTOCOL_CALLBACK(setname) { + int local_setname; struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick; char *pos_realname, *realname_color; IRC_PROTOCOL_MIN_ARGS(3); + local_setname = (irc_server_strcasecmp (server, nick, server->nick) == 0); + pos_realname = (argv_eol[2][0] == ':') ? argv_eol[2] + 1 : argv_eol[2]; if (weechat_hashtable_has_key (server->cap_list, "setname")) @@ -2931,13 +2934,29 @@ IRC_PROTOCOL_CALLBACK(setname) realname_color = irc_color_decode ( pos_realname, weechat_config_boolean (irc_config_network_colors_receive)); - weechat_printf_date_tags ( - irc_msgbuffer_get_target_buffer (server, NULL, command, NULL, NULL), - date, - irc_protocol_tags (command, NULL, NULL, NULL), - _("%sReal name set to: %s"), - weechat_prefix ("network"), - (realname_color) ? realname_color : ""); + if (local_setname) + { + weechat_printf_date_tags ( + irc_msgbuffer_get_target_buffer (server, NULL, command, NULL, NULL), + date, + irc_protocol_tags (command, NULL, NULL, NULL), + _("%sYour real name has been set to \"%s\""), + weechat_prefix ("network"), + (realname_color) ? realname_color : ""); + } + else + { + weechat_printf_date_tags ( + irc_msgbuffer_get_target_buffer (server, NULL, command, NULL, NULL), + date, + irc_protocol_tags (command, NULL, NULL, NULL), + _("%sReal name of %s%s%s has been set to \"%s\""), + weechat_prefix ("network"), + irc_nick_color_for_msg (server, 1, NULL, nick), + nick, + IRC_COLOR_RESET, + (realname_color) ? realname_color : ""); + } if (realname_color) free (realname_color); }