diff --git a/doc/de/autogen/user/weechat_commands.txt b/doc/de/autogen/user/weechat_commands.txt index 74b553a4c..1667ac31f 100644 --- a/doc/de/autogen/user/weechat_commands.txt +++ b/doc/de/autogen/user/weechat_commands.txt @@ -201,48 +201,48 @@ infolists: zeigt Information über die Infolists an add [,...] del |-all - list: alle Filter auflisten - enable: Filter wird aktiviert (Filter werden standardmäßig aktiviert) -disable: Filter deaktivieren - toggle: Filter de-/aktivieren - name: Name des Filters - add: Filter hinzufügen - del: Filter entfernen - -all: entfernt alle Filter - buffer: durch Kommata getrennte Liste von Buffern in denen der Filter aktiv sein soll: - - ist der vollständige Name eines Buffers inklusive seiner Erweiterung (Beispiel: "irc.freenode.#weechat") - - "*" anwenden auf alle Buffer - - beginnt ein Name mit '!' wird für diesen Buffer kein Filter genutzt - - ein Name darf mit '*' beginnen oder enden um mehrere Buffer auszuwählen - tags: durch Kommata getrennte Liste von Schlagwörtern. Zum Beispiel: "irc_join,irc_part,irc_quit" - regex: regulärer Ausdruck um in einer Zeile zu suchen - - das Präfix (z.B. Nick) wird mittels '\t' von der Nachricht getrennt. Sonderzeichen wie '|' müssen mit einer Escapesequenz : '\|' eingebunden werden) - - wird ein regulärer Ausdruck mit '!' eingeleitet dann wird das übereinstimmende Ergebnis umgekehrt (nutze '\!' um mit '!' zu beginnen) - - es werden zwei reguläre Ausdrücke erstellt: Der erste für den Präfix und der zweite für die eigentliche Nachricht - - reguläre Ausdrücke unterscheiden nicht zwischen Groß- und Kleinschreibung. Um zwischen Groß- und Kleinschreibung zu unterscheiden müssen diese mit "(?-i)" eingeleitet werden. + list: list all filters + enable: enable filters (filters are enabled by default) +disable: disable filters + toggle: toggle filters + name: filter name + add: add a filter + del: delete a filter + -all: delete all filters + buffer: comma separated list of buffers where filter is active: + - this is full name including plugin (example: "irc.freenode.#weechat") + - "*" means all buffers + - a name starting with '!' is excluded + - name can start or end with '*' to match many buffers + tags: comma separated list of tags, for example: "irc_join,irc_part,irc_quit" + regex: regular expression to search in line + - use '\t' to separate prefix from message, special chars like '|' must be escaped: '\|' + - if regex starts with '!', then matching result is reversed (use '\!' to start with '!') + - two regular expressions are created: one for prefix and one for message + - regex are case insensitive, they can start by "(?-i)" to become case sensitive -Die Tastenvoreinstellung alt+'=' schaltet die Filterfunktion an/aus. +The default key alt+'=' toggles filtering on/off. -Die am häufigsten gebrauchten Tags lauten: - no_filter, no_highlight, no_log, log0..log9 (log Level), +Tags most commonly used: + no_filter, no_highlight, no_log, log0..log9 (log level), notify_none, notify_message, notify_private, notify_highlight, - nick_xxx (xxx ist durch den Nicknamen zu ersetzen), - irc_xxx (xxx ist durch einen IRC-Befehl/-Nummer zu ersetzen, siehe /server raw) + nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of nick), + irc_xxx (xxx is command name or number, see /server raw), irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info. -Mittels "/debug tags" kann man sich die Tags jeder einzelnen Zeile darstellen zu lassen. +To see tags for lines in buffers: /debug tags -Beispiele: - aktiviert einen einfachen IRC Filter für join/part/quit/nick Nachrichten für alle Buffer: +Examples: + use IRC smart filter on all buffers: /filter add irc_smart * irc_smart_filter * - aktiviert einen einfachen IRC Filter für join/part/quit/nick Nachrichten der für alle Buffer genutzt wird, außer Buffer die "#weechat" im Namen tragen: + use IRC smart filter on all buffers except those with "#weechat" in name: /filter add irc_smart *,!*#weechat* irc_smart_filter * - filtert alle IRC join/part/quit Nachrichten: + filter all IRC join/part/quit messages: /filter add joinquit * irc_join,irc_part,irc_quit * - filtert Nicks wenn diese den Channel betreten oder durch den Befehl "/names:" angezeigt werden: + filter nicks displayed when joining channels or with /names: /filter add nicks * irc_366 * - filtert Nick "toto" im IRC Channel #weechat: + filter nick "toto" on IRC channel #weechat: /filter add toto irc.freenode.#weechat nick_toto * - filtert Zeilen die "weechat sucks" im IRC Channel #weechat enthalten: + filter lines containing "weechat sucks" on IRC channel #weechat: /filter add sucks irc.freenode.#weechat * weechat sucks ........................................ diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt index a09a26ca3..f8224ed72 100644 --- a/doc/en/autogen/user/weechat_commands.txt +++ b/doc/en/autogen/user/weechat_commands.txt @@ -226,7 +226,7 @@ The default key alt+'=' toggles filtering on/off. Tags most commonly used: no_filter, no_highlight, no_log, log0..log9 (log level), notify_none, notify_message, notify_private, notify_highlight, - nick_xxx (xxx is nick in message), + nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of nick), irc_xxx (xxx is command name or number, see /server raw), irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info. To see tags for lines in buffers: /debug tags diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt index f17c48f3c..798f266b3 100644 --- a/doc/fr/autogen/user/weechat_commands.txt +++ b/doc/fr/autogen/user/weechat_commands.txt @@ -226,7 +226,7 @@ La touche par défaut alt+'=' active/désactive le filtrage. Les tags les plus couramment utilisés: no_filter, no_highlight, no_log, log0..log9 (niveau de log), notify_none, notify_message, notify_private, notify_highlight, - nick_xxx (xxx est le pseudo dans le message), + nick_xxx (xxx est le pseudo dans le message), prefix_nick_ccc (ccc est la couleur du pseudo), irc_xxx (xxx est un nom de commande ou nombre, voir /server raw), irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info. Pour voir les tags des lignes affichées: /debug tags diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt index 41a355d59..080f66699 100644 --- a/doc/it/autogen/user/weechat_commands.txt +++ b/doc/it/autogen/user/weechat_commands.txt @@ -201,49 +201,49 @@ infolists: mostra informazioni sulle liste info add [,...] ] del |-all - list: elenca tutti i filtri - enable: abilita filtri (i filtri sono abilitati di default) -disable: disabilita filtri - toggle: abilita/disabilita filtri - nome: nome del filtro - add: aggiunge un filtro - del: elimina un filtro - -all: elimina tutti i filtri - buffer: elenco separato da virgole di buffer in cui il filtro è attivo: - - nome completo che include il plugin (esempio: "irc.freenode.#weechat) - - "*" indica tutti i buffer - - un nome preceduto da '!' viene escluso - - un nome può iniziare o terminare con '*' per includere più buffer - tag: elenco di tag separati da virgole, per esempio: "irc_join,irc_part,irc_quit" - regex: espressione regolare da cercare nella riga - - usare '\t' per separare il prefisso dal messaggio, caratteri speciali come "|" vanno preceduti dal carattere escape: '\|') - - se l'espressione regolare inizia con '!', il risultato corrispondente viene invertito (usare '\!' per iniziare con '!') + list: list all filters + enable: enable filters (filters are enabled by default) +disable: disable filters + toggle: toggle filters + name: filter name + add: add a filter + del: delete a filter + -all: delete all filters + buffer: comma separated list of buffers where filter is active: + - this is full name including plugin (example: "irc.freenode.#weechat") + - "*" means all buffers + - a name starting with '!' is excluded + - name can start or end with '*' to match many buffers + tags: comma separated list of tags, for example: "irc_join,irc_part,irc_quit" + regex: regular expression to search in line + - use '\t' to separate prefix from message, special chars like '|' must be escaped: '\|' + - if regex starts with '!', then matching result is reversed (use '\!' to start with '!') + - two regular expressions are created: one for prefix and one for message + - regex are case insensitive, they can start by "(?-i)" to become case sensitive - - vengono create due espressioni regolari: una per il prefisso e l'altra per il messaggio - - le espressioni regolari non sono sensibili alle maiuscole, possono iniziare con "(?-i)" per diventare sensibili alle maiuscole +The default key alt+'=' toggles filtering on/off. -Il tasto predefinito alt+'=' abilita/disabilita il filtro. - -Tag usati di frequente: - no_filter, no_highlight, no_log, log0..log9 (livello di log), +Tags most commonly used: + no_filter, no_highlight, no_log, log0..log9 (log level), notify_none, notify_message, notify_private, notify_highlight, - nick_xxx (xxx è il nick nel messaggio), - irc_xxx (xxx è il nome comando o il numero, consultare /server raw), irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info. -Per mostrare i tag per le righe nei buffer: /debug tags + nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of nick), + irc_xxx (xxx is command name or number, see /server raw), + irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info. +To see tags for lines in buffers: /debug tags -Esempi: - usa il filtro intelligente IRC per tutti i buffer: - /filter add irc_smart * irc_smart_filter * - usa il filtro intelligente IRC su tutti i buffer tranne quelli che contengono "#weechat" nel nome: - /filter add irc_smart *,!*weechat* irc_smart_filter - filtra tutti i messaggi entrata/uscita/abbandono di IRC: - /filter add joinquit * irc_join,irc_part,irc_quit * - filtra i nick visualizzati all'ingresso in un canale o con /names: +Examples: + use IRC smart filter on all buffers: + /filter add irc_smart * irc_smart_filter * + use IRC smart filter on all buffers except those with "#weechat" in name: + /filter add irc_smart *,!*#weechat* irc_smart_filter * + filter all IRC join/part/quit messages: + /filter add joinquit * irc_join,irc_part,irc_quit * + filter nicks displayed when joining channels or with /names: /filter add nicks * irc_366 * - filtra il nick "tizio" sul canale IRC #weechat: - /filter add tizio irc.freenode.#weechat nick_tizio * - filtra le righe contententi "weechat fa schifo" sul canale IRC #weechat: - /filter add schifo irc.freenode.#weechat * weechat fa schifo + filter nick "toto" on IRC channel #weechat: + /filter add toto irc.freenode.#weechat nick_toto * + filter lines containing "weechat sucks" on IRC channel #weechat: + /filter add sucks irc.freenode.#weechat * weechat sucks ........................................ [[command_weechat_help]] diff --git a/po/cs.po b/po/cs.po index ca5537398..91792004a 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-28 21:44+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -1218,7 +1218,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/po/de.po b/po/de.po index 40b11b33d..8f0016fef 100644 --- a/po/de.po +++ b/po/de.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-28 21:44+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" "PO-Revision-Date: 2012-03-27 22:46+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -1233,6 +1233,7 @@ msgstr "" "list || enable|disable|toggle [] || add [,...] " " || del |-all" +#, fuzzy msgid "" " list: list all filters\n" " enable: enable filters (filters are enabled by default)\n" @@ -1265,7 +1266,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/po/es.po b/po/es.po index 25904a48c..c9b18e7f7 100644 --- a/po/es.po +++ b/po/es.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-28 21:44+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -1209,6 +1209,7 @@ msgstr "" "list || enable|disable|toggle [] || add [," "...] || del |-all" +#, fuzzy msgid "" " list: list all filters\n" " enable: enable filters (filters are enabled by default)\n" @@ -1241,7 +1242,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/po/fr.po b/po/fr.po index c10ea89a4..add1ad0f0 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-28 21:44+0200\n" -"PO-Revision-Date: 2012-03-28 21:45+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" +"PO-Revision-Date: 2012-04-02 15:20+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -1242,7 +1242,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" @@ -1296,7 +1297,8 @@ msgstr "" "Les tags les plus couramment utilisés:\n" " no_filter, no_highlight, no_log, log0..log9 (niveau de log),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx est le pseudo dans le message),\n" +" nick_xxx (xxx est le pseudo dans le message), prefix_nick_ccc (ccc est la " +"couleur du pseudo),\n" " irc_xxx (xxx est un nom de commande ou nombre, voir /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/po/hu.po b/po/hu.po index 31affa39d..aa5152374 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-28 21:44+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1152,7 +1152,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/po/it.po b/po/it.po index ad1d6ed17..10a5f7316 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-28 21:44+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -1199,6 +1199,7 @@ msgstr "" "list || enable|disable|toggle [] || add [,...] " " ] || del |-all" +#, fuzzy msgid "" " list: list all filters\n" " enable: enable filters (filters are enabled by default)\n" @@ -1231,7 +1232,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/po/ja.po b/po/ja.po index cfa0e7f99..d56770938 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-28 21:44+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: \"AYANOKOUZI, Ryuunosuke\" \n" "Language-Team: Japanese\n" @@ -1185,6 +1185,7 @@ msgstr "" "list || enable|disable|toggle [] || add [,...] " " || del |-all" +#, fuzzy msgid "" " list: list all filters\n" " enable: enable filters (filters are enabled by default)\n" @@ -1217,7 +1218,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/po/pl.po b/po/pl.po index ea2a8b2a8..4ee063197 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-28 21:44+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -1213,6 +1213,7 @@ msgstr "" "list || enable|disable|toggle [] || add [,...] " " || del |-all" +#, fuzzy msgid "" " list: list all filters\n" " enable: enable filters (filters are enabled by default)\n" @@ -1245,7 +1246,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 05047e09b..8fbb5313f 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-28 21:44+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -1282,7 +1282,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/po/ru.po b/po/ru.po index 9d264e3a6..536bb59ac 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-28 21:44+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -1170,7 +1170,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/po/weechat.pot b/po/weechat.pot index 70387aac0..b67a1d112 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: 2012-03-28 21:44+0200\n" +"POT-Creation-Date: 2012-04-03 21:15+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1012,7 +1012,8 @@ msgid "" "Tags most commonly used:\n" " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, notify_highlight,\n" -" nick_xxx (xxx is nick in message),\n" +" nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of " +"nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, " "irc_smart_filter, away_info.\n" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index d92a8dfe2..bd41b2bb4 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -5659,7 +5659,8 @@ command_init () " no_filter, no_highlight, no_log, log0..log9 (log level),\n" " notify_none, notify_message, notify_private, " "notify_highlight,\n" - " nick_xxx (xxx is nick in message),\n" + " nick_xxx (xxx is nick in message), " + "prefix_nick_ccc (ccc is color of nick),\n" " irc_xxx (xxx is command name or number, see /server raw),\n" " irc_numeric, irc_error, irc_action, irc_ctcp, " "irc_ctcp_reply, irc_smart_filter, away_info.\n" diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index cbdedbe98..509a6f406 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -575,8 +575,9 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, int simulate) { char str_space[] = " ", str_plus[] = "+"; - char *prefix_no_color, *prefix_highlighted, *ptr_prefix; - const char *short_name; + char *prefix_no_color, *prefix_highlighted, *ptr_prefix, *ptr_prefix2; + char *ptr_prefix_color; + const char *short_name, *str_color; int i, length, length_allowed, num_spaces, prefix_length, extra_spaces; int chars_displayed; struct t_gui_lines *mixed_lines; @@ -738,8 +739,30 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, } } + /* get prefix for display */ + gui_line_get_prefix_for_display (line, &ptr_prefix, &prefix_length, + &ptr_prefix_color); + if (ptr_prefix) + { + ptr_prefix2 = NULL; + if (ptr_prefix_color && ptr_prefix_color[0]) + { + str_color = gui_color_get_custom (ptr_prefix_color); + if (str_color && str_color[0]) + { + length = strlen (str_color) + strlen (ptr_prefix) + 1; + ptr_prefix2 = malloc (length); + if (ptr_prefix2) + { + snprintf (ptr_prefix2, length, "%s%s", + str_color, ptr_prefix); + } + } + } + ptr_prefix = (ptr_prefix2) ? ptr_prefix2 : strdup (ptr_prefix); + } + /* display prefix */ - gui_line_get_prefix_for_display (line, &ptr_prefix, &prefix_length); if (ptr_prefix && (ptr_prefix[0] || (CONFIG_INTEGER(config_look_prefix_align) != CONFIG_LOOK_PREFIX_ALIGN_NONE))) @@ -921,6 +944,8 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, lines_displayed, simulate, 0); } } + if (ptr_prefix) + free (ptr_prefix); } /* diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 1e1ee32a8..814619ad9 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -3364,11 +3364,10 @@ gui_buffer_dump_hexa (struct t_gui_buffer *buffer) free (message_without_colors); tags = string_build_with_split_string ((const char **)ptr_line->data->tags_array, ","); - log_printf (" tags: %s, displayed: %d, highlight: %d, prefix_same_nick: %d", + log_printf (" tags: '%s', displayed: %d, highlight: %d", (tags) ? tags : "(none)", ptr_line->data->displayed, - ptr_line->data->highlight, - ptr_line->data->prefix_same_nick); + ptr_line->data->highlight); if (tags) free (tags); snprintf (buf, sizeof (buf), "%s", ctime (&ptr_line->data->date)); @@ -3554,13 +3553,12 @@ gui_buffer_print_log () tags = string_build_with_split_string ((const char **)ptr_line->data->tags_array, ","); log_printf (" line N-%05d: y:%d, str_time:'%s', tags:'%s', " - "displayed:%d, highlight:%d, prefix_same_nick:%d, " - "refresh_needed:%d, prefix:'%s'", + "displayed:%d, highlight:%d, refresh_needed:%d, " + "prefix:'%s'", num, ptr_line->data->y, ptr_line->data->str_time, (tags) ? tags : "", (int)(ptr_line->data->displayed), (int)(ptr_line->data->highlight), - (int)(ptr_line->data->prefix_same_nick), (int)(ptr_line->data->refresh_needed), ptr_line->data->prefix); log_printf (" data: '%s'", diff --git a/src/gui/gui-filter.c b/src/gui/gui-filter.c index c503954af..fa149b37b 100644 --- a/src/gui/gui-filter.c +++ b/src/gui/gui-filter.c @@ -133,11 +133,9 @@ void gui_filter_buffer (struct t_gui_buffer *buffer) { struct t_gui_line *ptr_line; - int line_displayed, lines_hidden, prev_line_changed, line_changed; + int line_displayed, lines_hidden; lines_hidden = 0; - prev_line_changed = 0; - line_changed = 0; buffer->lines->prefix_max_length = CONFIG_INTEGER(config_look_prefix_align_min); @@ -154,20 +152,10 @@ gui_filter_buffer (struct t_gui_buffer *buffer) /* force chat refresh if at least one line changed */ if (ptr_line->data->displayed != line_displayed) - { - line_changed = 1; gui_buffer_ask_chat_refresh (buffer, 2); - } - else - line_changed = 0; ptr_line->data->displayed = line_displayed; - if (line_changed || prev_line_changed) - gui_line_set_prefix_same_nick (ptr_line); - - prev_line_changed = line_changed; - if (!line_displayed) lines_hidden = 1; } diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c index 6b865b816..23399e822 100644 --- a/src/gui/gui-line.c +++ b/src/gui/gui-line.c @@ -83,6 +83,58 @@ gui_lines_free (struct t_gui_lines *lines) free (lines); } +/* + * gui_line_prefix_is_same_nick_as_previous: return 1 if prefix on line is a + * nick and is the same as nick on + * previour line, otherwise 0 + */ + +int +gui_line_prefix_is_same_nick_as_previous (struct t_gui_line *line) +{ + const char *nick, *nick_previous; + struct t_gui_line *prev_line; + + /* + * if line is not displayed, has a highlight, or does not have a tag + * beginning with "prefix_nick" => display standard prefix + */ + if (!line->data->displayed || line->data->highlight + || !gui_line_search_tag_starting_with (line, "prefix_nick")) + return 0; + + /* no nick on line => display standard prefix */ + nick = gui_line_get_nick_tag (line); + if (!nick) + return 0; + + /* + * previous line is not found => display standard prefix + */ + prev_line = gui_line_get_prev_displayed (line); + if (!prev_line) + return 0; + + /* buffer is not the same as previous line => display standard prefix */ + if (line->data->buffer != prev_line->data->buffer) + return 0; + + /* + * previous line does not have a tag beginning with "prefix_nick" + * => display standard prefix + */ + if (!gui_line_search_tag_starting_with (prev_line, "prefix_nick")) + return 0; + + /* no nick on previous line => display standard prefix */ + nick_previous = gui_line_get_nick_tag (prev_line); + if (!nick_previous) + return 0; + + /* prefix can be hidden/replaced if nicks are equal */ + return (strcmp (nick, nick_previous) == 0) ? 1 : 0; +} + /* * gui_line_get_prefix_for_display: get prefix and its length (for display only) * if the prefix can be hidden (same nick as @@ -94,29 +146,50 @@ gui_lines_free (struct t_gui_lines *lines) void gui_line_get_prefix_for_display (struct t_gui_line *line, - char **prefix, int *length) + char **prefix, int *length, + char **color) { - if (line->data->prefix_same_nick - && CONFIG_STRING(config_look_prefix_same_nick) - && CONFIG_STRING(config_look_prefix_same_nick)[0]) + const char *tag_prefix_nick; + + if (CONFIG_STRING(config_look_prefix_same_nick) + && CONFIG_STRING(config_look_prefix_same_nick)[0] + && gui_line_prefix_is_same_nick_as_previous (line)) { /* same nick: return empty prefix or value from option */ if (strcmp (CONFIG_STRING(config_look_prefix_same_nick), " ") == 0) { - *prefix = gui_chat_prefix_empty; - *length = 0; + if (prefix) + *prefix = gui_chat_prefix_empty; + if (length) + *length = 0; + if (color) + *color = NULL; } else { - *prefix = CONFIG_STRING(config_look_prefix_same_nick); - *length = config_length_prefix_same_nick; + if (prefix) + *prefix = CONFIG_STRING(config_look_prefix_same_nick); + if (length) + *length = config_length_prefix_same_nick; + if (color) + { + *color = NULL; + tag_prefix_nick = gui_line_search_tag_starting_with (line, + "prefix_nick_"); + if (tag_prefix_nick) + *color = (char *)(tag_prefix_nick + 12); + } } } else { /* not same nick: return prefix from line */ - *prefix = line->data->prefix; - *length = line->data->prefix_length; + if (prefix) + *prefix = line->data->prefix; + if (length) + *length = line->data->prefix_length; + if (color) + *color = NULL; } } @@ -129,7 +202,6 @@ gui_line_get_align (struct t_gui_buffer *buffer, struct t_gui_line *line, int with_suffix, int first_line) { int length_time, length_buffer, length_suffix, prefix_length; - char *ptr_prefix; /* return immediately if alignment for end of lines is "time" */ if (!first_line @@ -179,7 +251,7 @@ gui_line_get_align (struct t_gui_buffer *buffer, struct t_gui_line *line, return length_time + length_buffer; } - gui_line_get_prefix_for_display (line, &ptr_prefix, &prefix_length); + gui_line_get_prefix_for_display (line, NULL, &prefix_length, NULL); if (CONFIG_INTEGER(config_look_prefix_align) == CONFIG_LOOK_PREFIX_ALIGN_NONE) { @@ -420,6 +492,31 @@ gui_line_match_tags (struct t_gui_line *line, int tags_count, return 0; } +/* + * gui_line_search_tag_starting_with: return pointer on tag starting with "tag", + * NULL if such tag is not found + */ + +const char * +gui_line_search_tag_starting_with (struct t_gui_line *line, const char *tag) +{ + int i, length; + + if (!line || !tag) + return NULL; + + length = strlen (tag); + + for (i = 0; i < line->data->tags_count; i++) + { + if (strncmp (line->data->tags_array[i], tag, length) == 0) + return line->data->tags_array[i]; + } + + /* tag not found */ + return NULL; +} + /* * gui_line_get_nick_tag: get nick in tags: return "xxx" if tag "nick_xxx" * is found @@ -428,14 +525,13 @@ gui_line_match_tags (struct t_gui_line *line, int tags_count, const char * gui_line_get_nick_tag (struct t_gui_line *line) { - int i; + const char *tag; - for (i = 0; i < line->data->tags_count; i++) - { - if (strncmp (line->data->tags_array[i], "nick_", 5) == 0) - return line->data->tags_array[i] + 5; - } - return NULL; + tag = gui_line_search_tag_starting_with (line, "nick_"); + if (!tag) + return NULL; + + return tag + 5; } /* @@ -572,50 +668,18 @@ void gui_line_compute_prefix_max_length (struct t_gui_lines *lines) { struct t_gui_line *ptr_line; - char *ptr_prefix; int prefix_length; lines->prefix_max_length = CONFIG_INTEGER(config_look_prefix_align_min); for (ptr_line = lines->first_line; ptr_line; ptr_line = ptr_line->next_line) { - gui_line_get_prefix_for_display (ptr_line, &ptr_prefix, &prefix_length); + gui_line_get_prefix_for_display (ptr_line, NULL, &prefix_length, NULL); if (prefix_length > lines->prefix_max_length) lines->prefix_max_length = prefix_length; } } -/* - * gui_line_set_prefix_same_nick: set the "prefix_same_nick" flag in a line - */ - -void -gui_line_set_prefix_same_nick (struct t_gui_line *line) -{ - const char *nick, *nick_previous; - struct t_gui_line *prev_line; - - /* - * check if prefix can be hidden: if nick is the same as previous message - * on this buffer - */ - line->data->prefix_same_nick = 0; - if (line->data->displayed && !line->data->highlight) - { - nick = gui_line_get_nick_tag (line); - if (nick) - { - prev_line = gui_line_get_prev_displayed (line); - if (prev_line) - { - nick_previous = gui_line_get_nick_tag (prev_line); - if (nick_previous && (strcmp (nick, nick_previous) == 0)) - line->data->prefix_same_nick = 1; - } - } - } -} - /* * gui_line_add_to_list: add a line to a "t_gui_lines" structure */ @@ -624,7 +688,6 @@ void gui_line_add_to_list (struct t_gui_lines *lines, struct t_gui_line *line) { - char *ptr_prefix; int prefix_length; if (!lines->first_line) @@ -635,10 +698,8 @@ gui_line_add_to_list (struct t_gui_lines *lines, line->next_line = NULL; lines->last_line = line; - gui_line_set_prefix_same_nick (line); - /* adjust "prefix_max_length" if this prefix length is > max */ - gui_line_get_prefix_for_display (line, &ptr_prefix, &prefix_length); + gui_line_get_prefix_for_display (line, NULL, &prefix_length, NULL); if (prefix_length > lines->prefix_max_length) lines->prefix_max_length = prefix_length; @@ -658,7 +719,6 @@ gui_line_remove_from_list (struct t_gui_buffer *buffer, struct t_gui_window *ptr_win; struct t_gui_window_scroll *ptr_scroll; int i, update_prefix_max_length, prefix_length; - char *ptr_prefix; for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) { @@ -684,7 +744,7 @@ gui_line_remove_from_list (struct t_gui_buffer *buffer, } } - gui_line_get_prefix_for_display (line, &ptr_prefix, &prefix_length); + gui_line_get_prefix_for_display (line, NULL, &prefix_length, NULL); update_prefix_max_length = (prefix_length == lines->prefix_max_length); @@ -1395,8 +1455,6 @@ gui_line_add_to_infolist (struct t_infolist *infolist, return 0; if (!infolist_new_var_integer (ptr_item, "highlight", line->data->highlight)) return 0; - if (!infolist_new_var_integer (ptr_item, "prefix_same_nick", line->data->prefix_same_nick)) - return 0; if (!infolist_new_var_string (ptr_item, "prefix", line->data->prefix)) return 0; if (!infolist_new_var_string (ptr_item, "message", line->data->message)) diff --git a/src/gui/gui-line.h b/src/gui/gui-line.h index eba7b090b..59ce95973 100644 --- a/src/gui/gui-line.h +++ b/src/gui/gui-line.h @@ -37,8 +37,6 @@ struct t_gui_line_data char **tags_array; /* tags for line */ char displayed; /* 1 if line is displayed */ char highlight; /* 1 if line has highlight */ - char prefix_same_nick; /* 1 if prefix can be hidden */ - /* (same nick as previous message) */ char refresh_needed; /* 1 if refresh asked (free buffer) */ char *prefix; /* prefix for line (may be NULL) */ int prefix_length; /* prefix length (on screen) */ @@ -70,7 +68,8 @@ struct t_gui_lines extern struct t_gui_lines *gui_lines_alloc (); extern void gui_lines_free (struct t_gui_lines *lines); extern void gui_line_get_prefix_for_display (struct t_gui_line *line, - char **prefix, int *length); + char **prefix, int *length, + char **color); extern int gui_line_get_align (struct t_gui_buffer *buffer, struct t_gui_line *line, int with_suffix, int first_line); @@ -86,6 +85,8 @@ extern int gui_line_match_regex (struct t_gui_line *line, regex_t *regex_message); extern int gui_line_match_tags (struct t_gui_line *line, int tags_count, char **tags_array); +extern const char *gui_line_search_tag_starting_with (struct t_gui_line *line, + const char *tag); extern const char *gui_line_get_nick_tag (struct t_gui_line *line); extern int gui_line_has_highlight (struct t_gui_line *line); extern void gui_line_compute_buffer_max_length (struct t_gui_buffer *buffer,