From feb51fbca4e9d8a7635d10f5675638991c4e7b0c Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 14 Mar 2010 16:48:15 +0100 Subject: [PATCH] Fix display of host in IRC message 333 (channel topic) --- po/cs.po | 10 +++++----- po/de.po | 10 +++++----- po/es.po | 10 +++++----- po/fr.po | 12 ++++++------ po/hu.po | 6 +++--- po/it.po | 10 +++++----- po/pl.po | 10 +++++----- po/ru.po | 6 +++--- po/weechat.pot | 6 +++--- src/plugins/irc/irc-protocol.c | 28 ++++++++++++++++++++++------ 10 files changed, 62 insertions(+), 46 deletions(-) diff --git a/po/cs.po b/po/cs.po index d54728003..509897f17 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-11 09:20+0100\n" +"POT-Creation-Date: 2010-03-14 16:43+0100\n" "PO-Revision-Date: 2010-03-05 10:43+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -4681,12 +4681,12 @@ msgstr "%sNení nastaveno téma pro kanál %s%s" msgid "%sTopic for %s%s%s is \"%s%s\"" msgstr "%sTéma pro %s%s%s v \"%s%s\"" -#, c-format -msgid "%sTopic set by %s%s%s on %s" +#, fuzzy, c-format +msgid "%sTopic set by %s%s%s%s%s%s%s%s%s on %s" msgstr "%sTéma nastevil %s%s%s v %s" -#, c-format -msgid "%sTopic for %s%s%s set by %s%s%s on %s" +#, fuzzy, c-format +msgid "%sTopic for %s%s%s set by %s%s%s%s%s%s%s%s%s on %s" msgstr "%sTéma pro %s%s%s nastevil %s%s%s v %s" #, c-format diff --git a/po/de.po b/po/de.po index 86083aa56..e3a7d1814 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-11 09:20+0100\n" +"POT-Creation-Date: 2010-03-14 16:43+0100\n" "PO-Revision-Date: 2010-03-04 10:19+0100\n" "Last-Translator: Nils G \n" "Language-Team: weechat-dev \n" @@ -4852,12 +4852,12 @@ msgstr "%sKein Topic für %s%s gesetzt" msgid "%sTopic for %s%s%s is \"%s%s\"" msgstr "%sDas Topic von %s%s%s lautet: \"%s%s\"" -#, c-format -msgid "%sTopic set by %s%s%s on %s" +#, fuzzy, c-format +msgid "%sTopic set by %s%s%s%s%s%s%s%s%s on %s" msgstr "%sTopic gesetzt von %s%s%s, %s" -#, c-format -msgid "%sTopic for %s%s%s set by %s%s%s on %s" +#, fuzzy, c-format +msgid "%sTopic for %s%s%s set by %s%s%s%s%s%s%s%s%s on %s" msgstr "%sTopic für %s%s%s gesetzt von %s%s%s, %s" #, c-format diff --git a/po/es.po b/po/es.po index a7edb3601..cb76151f8 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-11 09:20+0100\n" +"POT-Creation-Date: 2010-03-14 16:43+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -4727,12 +4727,12 @@ msgstr "%sNo hay tema establecido para el canal %s%s" msgid "%sTopic for %s%s%s is \"%s%s\"" msgstr "%sEl tema para %s%s%s es \"%s%s\"" -#, c-format -msgid "%sTopic set by %s%s%s on %s" +#, fuzzy, c-format +msgid "%sTopic set by %s%s%s%s%s%s%s%s%s on %s" msgstr "%sTema establecido por %s%s%s el %s" -#, c-format -msgid "%sTopic for %s%s%s set by %s%s%s on %s" +#, fuzzy, c-format +msgid "%sTopic for %s%s%s set by %s%s%s%s%s%s%s%s%s on %s" msgstr "%sTema para %s%s%s establecido por %s%s%s el %s" #, c-format diff --git a/po/fr.po b/po/fr.po index ac8819fc1..628be3903 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-11 09:20+0100\n" -"PO-Revision-Date: 2010-03-11 09:21+0100\n" +"POT-Creation-Date: 2010-03-14 16:43+0100\n" +"PO-Revision-Date: 2010-03-14 16:44+0100\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -4782,12 +4782,12 @@ msgid "%sTopic for %s%s%s is \"%s%s\"" msgstr "%sLe titre pour %s%s%s est \"%s%s\"" #, c-format -msgid "%sTopic set by %s%s%s on %s" -msgstr "%sTitre défini par %s%s%s le %s" +msgid "%sTopic set by %s%s%s%s%s%s%s%s%s on %s" +msgstr "%sTitre défini par %s%s%s%s%s%s%s%s%s le %s" #, c-format -msgid "%sTopic for %s%s%s set by %s%s%s on %s" -msgstr "%sTitre pour %s%s%s défini par %s%s%s le %s" +msgid "%sTopic for %s%s%s set by %s%s%s%s%s%s%s%s%s on %s" +msgstr "%sTitre pour %s%s%s défini par %s%s%s%s%s%s%s%s%s le %s" #, c-format msgid "%s%s%s%s has invited %s%s%s to %s%s%s" diff --git a/po/hu.po b/po/hu.po index c6b23c289..b31d01bac 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-11 09:20+0100\n" +"POT-Creation-Date: 2010-03-14 16:43+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -4575,11 +4575,11 @@ msgid "%sTopic for %s%s%s is \"%s%s\"" msgstr "A %s%s%s szoba témája: " #, fuzzy, c-format -msgid "%sTopic set by %s%s%s on %s" +msgid "%sTopic set by %s%s%s%s%s%s%s%s%s on %s" msgstr "A témát beállította: %s%s%s, %s" #, fuzzy, c-format -msgid "%sTopic for %s%s%s set by %s%s%s on %s" +msgid "%sTopic for %s%s%s set by %s%s%s%s%s%s%s%s%s on %s" msgstr "A témát beállította: %s%s%s, %s" #, fuzzy, c-format diff --git a/po/it.po b/po/it.po index af709d189..18a9414b3 100644 --- a/po/it.po +++ b/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Weechat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-11 09:20+0100\n" +"POT-Creation-Date: 2010-03-14 16:43+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -4724,12 +4724,12 @@ msgstr "%sNessun argomento impostato per il canale %s%s" msgid "%sTopic for %s%s%s is \"%s%s\"" msgstr "%sL'argomento per %s%s%s è \"%s%s\"" -#, c-format -msgid "%sTopic set by %s%s%s on %s" +#, fuzzy, c-format +msgid "%sTopic set by %s%s%s%s%s%s%s%s%s on %s" msgstr "%sArgomento impostato da %s%s%s il %s" -#, c-format -msgid "%sTopic for %s%s%s set by %s%s%s on %s" +#, fuzzy, c-format +msgid "%sTopic for %s%s%s set by %s%s%s%s%s%s%s%s%s on %s" msgstr "%sArgomento per %s%s%s impostato da %s%s%s il %s" #, c-format diff --git a/po/pl.po b/po/pl.po index 78189551a..10fbba704 100644 --- a/po/pl.po +++ b/po/pl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-11 09:20+0100\n" +"POT-Creation-Date: 2010-03-14 16:43+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Krzysztof Koroscik \n" "Language-Team: Polish\n" @@ -4722,12 +4722,12 @@ msgstr "%sBrak tematu dla kanału %s%s" msgid "%sTopic for %s%s%s is \"%s%s\"" msgstr "%sTemat kanału %s%s%s to \"%s%s\"" -#, c-format -msgid "%sTopic set by %s%s%s on %s" +#, fuzzy, c-format +msgid "%sTopic set by %s%s%s%s%s%s%s%s%s on %s" msgstr "%sTemat ustawiony przez %s%s%s dnia %s" -#, c-format -msgid "%sTopic for %s%s%s set by %s%s%s on %s" +#, fuzzy, c-format +msgid "%sTopic for %s%s%s set by %s%s%s%s%s%s%s%s%s on %s" msgstr "%sTemat kanału %s%s%s ustawiony przez %s%s%s dnia %s" #, c-format diff --git a/po/ru.po b/po/ru.po index c91fde51a..5ddb34146 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-11 09:20+0100\n" +"POT-Creation-Date: 2010-03-14 16:43+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -4579,11 +4579,11 @@ msgid "%sTopic for %s%s%s is \"%s%s\"" msgstr "Тема канала %s%s%s: " #, fuzzy, c-format -msgid "%sTopic set by %s%s%s on %s" +msgid "%sTopic set by %s%s%s%s%s%s%s%s%s on %s" msgstr "Тема установлена пользователем %s%s%s, %s" #, fuzzy, c-format -msgid "%sTopic for %s%s%s set by %s%s%s on %s" +msgid "%sTopic for %s%s%s set by %s%s%s%s%s%s%s%s%s on %s" msgstr "Тема установлена пользователем %s%s%s, %s" #, fuzzy, c-format diff --git a/po/weechat.pot b/po/weechat.pot index b20188aa4..01ef2f22c 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-11 09:20+0100\n" +"POT-Creation-Date: 2010-03-14 16:43+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3926,11 +3926,11 @@ msgid "%sTopic for %s%s%s is \"%s%s\"" msgstr "" #, c-format -msgid "%sTopic set by %s%s%s on %s" +msgid "%sTopic set by %s%s%s%s%s%s%s%s%s on %s" msgstr "" #, c-format -msgid "%sTopic for %s%s%s set by %s%s%s on %s" +msgid "%sTopic for %s%s%s set by %s%s%s%s%s%s%s%s%s on %s" msgstr "" #, c-format diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 0341ccdba..b3361b5ce 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -2800,25 +2800,35 @@ irc_protocol_cmd_333 (struct t_irc_server *server, const char *command, struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick; time_t datetime; + const char *nick, *address; /* 333 message looks like: - :server 333 mynick #channel nick 1205428096 + :server 333 mynick #channel nick!user@host 1205428096 */ IRC_PROTOCOL_MIN_ARGS(6); + nick = irc_protocol_get_nick_from_host (argv[4]); + address = irc_protocol_get_address_from_host (argv[4]); + ptr_channel = irc_channel_search (server, argv[3]); - ptr_nick = irc_nick_search (ptr_channel, argv[4]); + ptr_nick = (ptr_channel) ? irc_nick_search (ptr_channel, nick) : NULL; datetime = (time_t)(atol ((argv_eol[5][0] == ':') ? argv_eol[5] + 1 : argv_eol[5])); if (ptr_channel && ptr_channel->nicks) { weechat_printf_tags (ptr_channel->buffer, irc_protocol_tags (command, "irc_numeric"), - _("%sTopic set by %s%s%s on %s"), + _("%sTopic set by %s%s%s%s%s%s%s%s%s on %s"), weechat_prefix ("network"), IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick), - argv[4], + nick, + IRC_COLOR_CHAT_DELIMITERS, + (address && address[0]) ? " (" : "", + IRC_COLOR_CHAT_HOST, + (address) ? address : "", + IRC_COLOR_CHAT_DELIMITERS, + (address && address[0]) ? ")" : "", IRC_COLOR_CHAT, weechat_util_get_time_string (&datetime)); } @@ -2826,13 +2836,19 @@ irc_protocol_cmd_333 (struct t_irc_server *server, const char *command, { weechat_printf_tags (server->buffer, irc_protocol_tags (command, "irc_numeric"), - _("%sTopic for %s%s%s set by %s%s%s on %s"), + _("%sTopic for %s%s%s set by %s%s%s%s%s%s%s%s%s on %s"), weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, argv[3], IRC_COLOR_CHAT, IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick), - argv[4], + nick, + IRC_COLOR_CHAT_DELIMITERS, + (address && address[0]) ? " (" : "", + IRC_COLOR_CHAT_HOST, + (address) ? address : "", + IRC_COLOR_CHAT_DELIMITERS, + (address && address[0]) ? ")" : "", IRC_COLOR_CHAT, weechat_util_get_time_string (&datetime)); }