diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_options.adoc | 8 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_options.adoc | 8 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_options.adoc | 8 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_options.adoc | 8 | ||||
-rw-r--r-- | doc/ja/autogen/user/weechat_options.adoc | 8 | ||||
-rw-r--r-- | doc/pl/autogen/user/weechat_options.adoc | 8 | ||||
-rw-r--r-- | po/cs.po | 21 | ||||
-rw-r--r-- | po/de.po | 22 | ||||
-rw-r--r-- | po/es.po | 21 | ||||
-rw-r--r-- | po/fr.po | 29 | ||||
-rw-r--r-- | po/hu.po | 19 | ||||
-rw-r--r-- | po/it.po | 21 | ||||
-rw-r--r-- | po/ja.po | 20 | ||||
-rw-r--r-- | po/pl.po | 20 | ||||
-rw-r--r-- | po/pt.po | 21 | ||||
-rw-r--r-- | po/pt_BR.po | 21 | ||||
-rw-r--r-- | po/ru.po | 19 | ||||
-rw-r--r-- | po/tr.po | 15 | ||||
-rw-r--r-- | po/weechat.pot | 15 | ||||
-rw-r--r-- | src/core/wee-config.c | 39 | ||||
-rw-r--r-- | src/core/wee-config.h | 2 | ||||
-rw-r--r-- | src/gui/gui-line.c | 127 |
23 files changed, 393 insertions, 88 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 6ce330e09..23a2730af 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: + * core: add option weechat.look.prefix_same_nick_middle (issue #930, issue #931) * core: add option weechat.look.buffer_time_same (issue #1127) * core: use seconds by default in /repeat interval, allow unit for the interval * core: allow text in addition to a command in command /repeat diff --git a/doc/de/autogen/user/weechat_options.adoc b/doc/de/autogen/user/weechat_options.adoc index 4ff828c9c..b702158fb 100644 --- a/doc/de/autogen/user/weechat_options.adoc +++ b/doc/de/autogen/user/weechat_options.adoc @@ -1053,7 +1053,13 @@ ** Standardwert: `+"<--"+` * [[option_weechat.look.prefix_same_nick]] *weechat.look.prefix_same_nick* -** Beschreibung: pass:none[setzt ein Präfix welches anstelle des Nicks der Nachricht vorangestellt wird, sofern die vorherige Nachricht von dem selben Nick geschrieben wurde. Wird ein Leerzeichen (" ") genutzt, dann wird der Nachricht kein Präfix vorangestellt. Um diese Funktion zu deaktivieren und den Nick als Präfix zu nutzen darf keine Zeichenkette angegeben werden] +** Beschreibung: pass:none[prefix displayed for a message with same nick as previous but not next message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] +** Typ: Zeichenkette +** Werte: beliebige Zeichenkette +** Standardwert: `+""+` + +* [[option_weechat.look.prefix_same_nick_middle]] *weechat.look.prefix_same_nick_middle* +** Beschreibung: pass:none[prefix displayed for a message with same nick as previous and next message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette ** Standardwert: `+""+` diff --git a/doc/en/autogen/user/weechat_options.adoc b/doc/en/autogen/user/weechat_options.adoc index b1f9b6c90..4a7d79bb1 100644 --- a/doc/en/autogen/user/weechat_options.adoc +++ b/doc/en/autogen/user/weechat_options.adoc @@ -1053,7 +1053,13 @@ ** default value: `+"<--"+` * [[option_weechat.look.prefix_same_nick]] *weechat.look.prefix_same_nick* -** description: pass:none[prefix displayed for a message with same nick as previous message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] +** description: pass:none[prefix displayed for a message with same nick as previous but not next message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] +** type: string +** values: any string +** default value: `+""+` + +* [[option_weechat.look.prefix_same_nick_middle]] *weechat.look.prefix_same_nick_middle* +** description: pass:none[prefix displayed for a message with same nick as previous and next message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] ** type: string ** values: any string ** default value: `+""+` diff --git a/doc/fr/autogen/user/weechat_options.adoc b/doc/fr/autogen/user/weechat_options.adoc index e1fe4f425..d30c8f26f 100644 --- a/doc/fr/autogen/user/weechat_options.adoc +++ b/doc/fr/autogen/user/weechat_options.adoc @@ -1053,7 +1053,13 @@ ** valeur par défaut: `+"<--"+` * [[option_weechat.look.prefix_same_nick]] *weechat.look.prefix_same_nick* -** description: pass:none[préfixe affiché pour un message avec le même pseudo que le précédent message : utiliser un espace " " pour cacher le préfixe, une autre chaîne pour l'afficher à la place du préfixe, ou une chaîne vide pour désactiver cette fonctionnalité (afficher le préfixe)] +** description: pass:none[préfixe affiché pour un message avec le même pseudo que le précédent message mais pas le message suivant : utiliser un espace " " pour cacher le préfixe, une autre chaîne pour l'afficher à la place du préfixe, ou une chaîne vide pour désactiver cette fonctionnalité (afficher le préfixe)] +** type: chaîne +** valeurs: toute chaîne +** valeur par défaut: `+""+` + +* [[option_weechat.look.prefix_same_nick_middle]] *weechat.look.prefix_same_nick_middle* +** description: pass:none[préfixe affiché pour un message avec le même pseudo que le précédent message et le message suivant : utiliser un espace " " pour cacher le préfixe, une autre chaîne pour l'afficher à la place du préfixe, ou une chaîne vide pour désactiver cette fonctionnalité (afficher le préfixe)] ** type: chaîne ** valeurs: toute chaîne ** valeur par défaut: `+""+` diff --git a/doc/it/autogen/user/weechat_options.adoc b/doc/it/autogen/user/weechat_options.adoc index 758c5ad5b..c8e1b02bf 100644 --- a/doc/it/autogen/user/weechat_options.adoc +++ b/doc/it/autogen/user/weechat_options.adoc @@ -1053,7 +1053,13 @@ ** valore predefinito: `+"<--"+` * [[option_weechat.look.prefix_same_nick]] *weechat.look.prefix_same_nick* -** descrizione: pass:none[prefisso mostrato per un messaggio con lo stesso nick del messaggio precedente: usare uno spazio " " per nascondere il prefisso, un'altra stringa per mostrare la stringa invece del prefisso, o una stringa vuota per disabilitare questa funzionalità (mostra prefisso)] +** descrizione: pass:none[prefix displayed for a message with same nick as previous but not next message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] +** tipo: stringa +** valori: qualsiasi stringa +** valore predefinito: `+""+` + +* [[option_weechat.look.prefix_same_nick_middle]] *weechat.look.prefix_same_nick_middle* +** descrizione: pass:none[prefix displayed for a message with same nick as previous and next message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] ** tipo: stringa ** valori: qualsiasi stringa ** valore predefinito: `+""+` diff --git a/doc/ja/autogen/user/weechat_options.adoc b/doc/ja/autogen/user/weechat_options.adoc index 3547acdd6..42cef1761 100644 --- a/doc/ja/autogen/user/weechat_options.adoc +++ b/doc/ja/autogen/user/weechat_options.adoc @@ -1053,7 +1053,13 @@ ** デフォルト値: `+"<--"+` * [[option_weechat.look.prefix_same_nick]] *weechat.look.prefix_same_nick* -** 説明: pass:none[同じニックネームからの連続したメッセージに前置するプレフィックス: 空白文字 " " の場合はプレフィックスを隠す、これ以外の文字列の場合はそれをプレフィックスとして用いる、空文字の場合はプレフィックス表示機能を使わない] +** 説明: pass:none[prefix displayed for a message with same nick as previous but not next message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] +** タイプ: 文字列 +** 値: 未制約文字列 +** デフォルト値: `+""+` + +* [[option_weechat.look.prefix_same_nick_middle]] *weechat.look.prefix_same_nick_middle* +** 説明: pass:none[prefix displayed for a message with same nick as previous and next message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] ** タイプ: 文字列 ** 値: 未制約文字列 ** デフォルト値: `+""+` diff --git a/doc/pl/autogen/user/weechat_options.adoc b/doc/pl/autogen/user/weechat_options.adoc index 1682b9f9d..ed44960ac 100644 --- a/doc/pl/autogen/user/weechat_options.adoc +++ b/doc/pl/autogen/user/weechat_options.adoc @@ -1053,7 +1053,13 @@ ** domyślna wartość: `+"<--"+` * [[option_weechat.look.prefix_same_nick]] *weechat.look.prefix_same_nick* -** opis: pass:none[prefiks wyświetlany dla wiadomości z takim samym nickiem jak poprzednia wiadomość: spacja (" ") chowa prefiks, inny ciąg wyświetlany zamiast prefiksu lub pusty ciąg dla wyłączenia opcji (wyświetlanie przedrostka)] +** opis: pass:none[prefix displayed for a message with same nick as previous but not next message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] +** typ: ciąg +** wartości: dowolny ciąg +** domyślna wartość: `+""+` + +* [[option_weechat.look.prefix_same_nick_middle]] *weechat.look.prefix_same_nick_middle* +** opis: pass:none[prefix displayed for a message with same nick as previous and next message: use a space " " to hide prefix, another string to display this string instead of prefix, or an empty string to disable feature (display prefix)] ** typ: ciąg ** wartości: dowolny ciąg ** domyślna wartość: `+""+` @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-03-17 18:32+0100\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3534,11 +3534,24 @@ msgstr "" "zobrazit '+' pokud je jméno bufferu zkráceno (při spojení vice bufferů se " "stejným číslem)" +#, fuzzy msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" msgstr "" +"časový formát pro \"time\" položku panelu (viz. man strftime pro specifikaci " +"data/času)" + +#, fuzzy +msgid "" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" +msgstr "" +"časový formát pro \"time\" položku panelu (viz. man strftime pro specifikaci " +"data/času)" msgid "string displayed after prefix" msgstr "řetězec zobrazený za prefixem" @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-04-13 18:46+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -4290,10 +4290,24 @@ msgstr "" "abgeschnitten wird (wenn mehrere Buffer zusammengefügt wurden und diese " "somit die selbe Nummer besitzen) (es darf nur ein Zeichen genutzt werden)" +#, fuzzy msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" +msgstr "" +"setzt ein Präfix welches anstelle des Nicks der Nachricht vorangestellt " +"wird, sofern die vorherige Nachricht von dem selben Nick geschrieben wurde. " +"Wird ein Leerzeichen (\" \") genutzt, dann wird der Nachricht kein Präfix " +"vorangestellt. Um diese Funktion zu deaktivieren und den Nick als Präfix zu " +"nutzen darf keine Zeichenkette angegeben werden" + +#, fuzzy +msgid "" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" msgstr "" "setzt ein Präfix welches anstelle des Nicks der Nachricht vorangestellt " "wird, sofern die vorherige Nachricht von dem selben Nick geschrieben wurde. " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3700,10 +3700,23 @@ msgstr "" "buffers unidos con el mismo número) (tiene que ser exactamente un carácter " "en pantalla)" +#, fuzzy +msgid "" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" +msgstr "" +"prefijo mostrado por un mensaje con el mismo nick que en el mensaje previo: " +"usar un espacio \" \" para ocultar el prefijo, una cadena para mostrar esta " +"en lugar del prefijo, o una cadena vacía para desactivar esta característica " +"(mostrar prefijo)" + +#, fuzzy msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" msgstr "" "prefijo mostrado por un mensaje con el mismo nick que en el mensaje previo: " "usar un espacio \" \" para ocultar el prefijo, una cadena para mostrar esta " @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" -"PO-Revision-Date: 2019-04-13 14:43+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" +"PO-Revision-Date: 2019-04-13 20:32+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -4167,14 +4167,25 @@ msgstr "" "caractère à l'écran)" msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" msgstr "" -"préfixe affiché pour un message avec le même pseudo que le précédent " -"message : utiliser un espace \" \" pour cacher le préfixe, une autre chaîne " -"pour l'afficher à la place du préfixe, ou une chaîne vide pour désactiver " -"cette fonctionnalité (afficher le préfixe)" +"préfixe affiché pour un message avec le même pseudo que le précédent message " +"mais pas le message suivant : utiliser un espace \" \" pour cacher le " +"préfixe, une autre chaîne pour l'afficher à la place du préfixe, ou une " +"chaîne vide pour désactiver cette fonctionnalité (afficher le préfixe)" + +msgid "" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" +msgstr "" +"préfixe affiché pour un message avec le même pseudo que le précédent message " +"et le message suivant : utiliser un espace \" \" pour cacher le préfixe, une " +"autre chaîne pour l'afficher à la place du préfixe, ou une chaîne vide pour " +"désactiver cette fonctionnalité (afficher le préfixe)" msgid "string displayed after prefix" msgstr "chaîne affichée après le préfixe" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-02-28 20:18+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3093,11 +3093,20 @@ msgid "" "with same number) (must be exactly one char on screen)" msgstr "" +#, fuzzy msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" -msgstr "" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" +msgstr "új nap kezdetével megjelenő időbélyeg" + +#, fuzzy +msgid "" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" +msgstr "új nap kezdetével megjelenő időbélyeg" #, fuzzy msgid "string displayed after prefix" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3807,10 +3807,23 @@ msgstr "" "vengono uniti con lo stesso numero) (deve essere esattamente un carattere su " "schermo)" +#, fuzzy +msgid "" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" +msgstr "" +"prefisso mostrato per un messaggio con lo stesso nick del messaggio " +"precedente: usare uno spazio \" \" per nascondere il prefisso, un'altra " +"stringa per mostrare la stringa invece del prefisso, o una stringa vuota per " +"disabilitare questa funzionalità (mostra prefisso)" + +#, fuzzy msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" msgstr "" "prefisso mostrato per un messaggio con lo stesso nick del messaggio " "precedente: usare uno spazio \" \" per nascondere il prefisso, un'altra " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-04-01 09:00+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -4016,10 +4016,22 @@ msgstr "" "バッファ名が切り詰められた場合に表示する文字 (多くのバッファが同じ番号を持つ" "ようにマージされた場合) (画面上のちょうど 1 文字)" +#, fuzzy +msgid "" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" +msgstr "" +"同じニックネームからの連続したメッセージに前置するプレフィックス: 空白文字 " +"\" \" の場合はプレフィックスを隠す、これ以外の文字列の場合はそれをプレフィッ" +"クスとして用いる、空文字の場合はプレフィックス表示機能を使わない" + +#, fuzzy msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" msgstr "" "同じニックネームからの連続したメッセージに前置するプレフィックス: 空白文字 " "\" \" の場合はプレフィックスを隠す、これ以外の文字列の場合はそれをプレフィッ" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-03-21 23:32+0100\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" @@ -4095,10 +4095,22 @@ msgstr "" "znak wyświetlany jeśli nazwa bufora została obcięta (kiedy wiele buforów " "jest scalonych z takim samym numerem)(dokładnie jeden znak na ekranie)" +#, fuzzy +msgid "" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" +msgstr "" +"prefiks wyświetlany dla wiadomości z takim samym nickiem jak poprzednia " +"wiadomość: spacja (\" \") chowa prefiks, inny ciąg wyświetlany zamiast " +"prefiksu lub pusty ciąg dla wyłączenia opcji (wyświetlanie przedrostka)" + +#, fuzzy msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" msgstr "" "prefiks wyświetlany dla wiadomości z takim samym nickiem jak poprzednia " "wiadomość: spacja (\" \") chowa prefiks, inny ciąg wyświetlany zamiast " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-03-21 23:33+0100\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -4038,10 +4038,23 @@ msgstr "" "caráter a apresentar se o nome do buffer for truncado (no caso em que vários " "buffers são unidos no mesmo número) (deve ser exatamente um caráter no ecrã)" +#, fuzzy +msgid "" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" +msgstr "" +"prefixo apresentado para uma mensagem do mesmo nick que a mensagem anterior: " +"use espaço \" \" para ocultar o prefixo, outra cadeia para exibí-la em vez " +"do prefixo, ou uma cadeia vazia para desativar a funcionalidade (exibir o " +"prefixo)" + +#, fuzzy msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" msgstr "" "prefixo apresentado para uma mensagem do mesmo nick que a mensagem anterior: " "use espaço \" \" para ocultar o prefixo, outra cadeia para exibí-la em vez " diff --git a/po/pt_BR.po b/po/pt_BR.po index 71612a3d9..e2687f992 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: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-03-11 21:10+0100\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3704,11 +3704,24 @@ msgstr "" "buffers são mesclados com o mesmo número) (precisa ser exatamente um " "caractere na tela)" +#, fuzzy msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" msgstr "" +"formato de tempo para o item de barra \"time\" (veja man strftime para " +"especificadores de data/tempo)" + +#, fuzzy +msgid "" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" +msgstr "" +"formato de tempo para o item de barra \"time\" (veja man strftime para " +"especificadores de data/tempo)" msgid "string displayed after prefix" msgstr "cadeia de caracteres mostrada após prefixo" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-03-11 21:10+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3126,11 +3126,20 @@ msgid "" "with same number) (must be exactly one char on screen)" msgstr "" +#, fuzzy msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" -msgstr "" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" +msgstr "отображение маркера даты при смене дня" + +#, fuzzy +msgid "" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" +msgstr "отображение маркера даты при смене дня" #, fuzzy msgid "string displayed after prefix" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+0200\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2829,9 +2829,16 @@ msgid "" msgstr "" msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" +msgstr "" + +msgid "" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" msgstr "" msgid "string displayed after prefix" diff --git a/po/weechat.pot b/po/weechat.pot index 25b16e164..f9d62c1e3 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: 2019-04-13 14:42+0200\n" +"POT-Creation-Date: 2019-04-13 20:30+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" @@ -2824,9 +2824,16 @@ msgid "" msgstr "" msgid "" -"prefix displayed for a message with same nick as previous message: use a " -"space \" \" to hide prefix, another string to display this string instead of " -"prefix, or an empty string to disable feature (display prefix)" +"prefix displayed for a message with same nick as previous but not next " +"message: use a space \" \" to hide prefix, another string to display this " +"string instead of prefix, or an empty string to disable feature (display " +"prefix)" +msgstr "" + +msgid "" +"prefix displayed for a message with same nick as previous and next message: " +"use a space \" \" to hide prefix, another string to display this string " +"instead of prefix, or an empty string to disable feature (display prefix)" msgstr "" msgid "string displayed after prefix" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index f635b7cf2..7d515acb6 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -171,6 +171,7 @@ struct t_config_option *config_look_prefix_buffer_align_max; struct t_config_option *config_look_prefix_buffer_align_more; struct t_config_option *config_look_prefix_buffer_align_more_after; struct t_config_option *config_look_prefix_same_nick; +struct t_config_option *config_look_prefix_same_nick_middle; struct t_config_option *config_look_prefix_suffix; struct t_config_option *config_look_quote_nick_prefix; struct t_config_option *config_look_quote_nick_suffix; @@ -303,6 +304,7 @@ struct t_config_option *config_plugin_save_config_on_unload; int config_length_nick_prefix_suffix = 0; int config_length_prefix_same_nick = 0; +int config_length_prefix_same_nick_middle = 0; struct t_hook *config_day_change_timer = NULL; int config_day_change_old_day = -1; int config_emphasized_attributes = 0; @@ -816,6 +818,26 @@ config_change_prefix_same_nick (const void *pointer, void *data, } /* + * Callback for changes on option "weechat.look.prefix_same_nick_middle". + */ + +void +config_change_prefix_same_nick_middle (const void *pointer, void *data, + struct t_config_option *option) +{ + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) option; + + config_length_prefix_same_nick_middle = + gui_chat_strlen_screen (CONFIG_STRING(config_look_prefix_same_nick_middle)); + + config_compute_prefix_max_length_all_buffers (); + gui_window_ask_refresh (1); +} + +/* * Callback for changes on option "weechat.look.eat_newline_glitch". */ @@ -3394,13 +3416,24 @@ config_weechat_init_options () weechat_config_file, ptr_section, "prefix_same_nick", "string", N_("prefix displayed for a message with same nick as previous " - "message: use a space \" \" to hide prefix, another string to " - "display this string instead of prefix, or an empty string to " - "disable feature (display prefix)"), + "but not next message: use a space \" \" to hide prefix, another " + "string to display this string instead of prefix, or an empty " + "string to disable feature (display prefix)"), NULL, 0, 0, "", NULL, 0, NULL, NULL, NULL, &config_change_prefix_same_nick, NULL, NULL, NULL, NULL, NULL); + config_look_prefix_same_nick_middle = config_file_new_option ( + weechat_config_file, ptr_section, + "prefix_same_nick_middle", "string", + N_("prefix displayed for a message with same nick as previous " + "and next message: use a space \" \" to hide prefix, another " + "string to display this string instead of prefix, or an empty " + "string to disable feature (display prefix)"), + NULL, 0, 0, "", NULL, 0, + NULL, NULL, NULL, + &config_change_prefix_same_nick_middle, NULL, NULL, + NULL, NULL, NULL); config_look_prefix_suffix = config_file_new_option ( weechat_config_file, ptr_section, "prefix_suffix", "string", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 69b32ad1f..d3fc51694 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -222,6 +222,7 @@ extern struct t_config_option *config_look_prefix_buffer_align_max; extern struct t_config_option *config_look_prefix_buffer_align_more; extern struct t_config_option *config_look_prefix_buffer_align_more_after; extern struct t_config_option *config_look_prefix_same_nick; +extern struct t_config_option *config_look_prefix_same_nick_middle; extern struct t_config_option *config_look_prefix_suffix; extern struct t_config_option *config_look_quote_nick_prefix; extern struct t_config_option *config_look_quote_nick_suffix; @@ -342,6 +343,7 @@ extern struct t_config_option *config_plugin_save_config_on_unload; extern int config_length_nick_prefix_suffix; extern int config_length_prefix_same_nick; +extern int config_length_prefix_same_nick_middle; extern int config_emphasized_attributes; extern regex_t *config_highlight_regex; extern char ***config_highlight_tags; diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c index 16e92e02f..c54cb643b 100644 --- a/src/gui/gui-line.c +++ b/src/gui/gui-line.c @@ -181,6 +181,58 @@ gui_line_prefix_is_same_nick_as_previous (struct t_gui_line *line) } /* + * Checks if prefix on line is a nick and is the same as nick on next line. + * + * Returns: + * 1: prefix is a nick and same as nick on next line + * 0: prefix is not a nick, or different from nick on next line + */ + +int +gui_line_prefix_is_same_nick_as_next (struct t_gui_line *line) +{ + const char *nick, *nick_next; + struct t_gui_line *next_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; + + /* next line is not found => display standard prefix */ + next_line = gui_line_get_next_displayed (line); + if (!next_line) + return 0; + + /* buffer is not the same as next line => display standard prefix */ + if (line->data->buffer != next_line->data->buffer) + return 0; + + /* + * next line does not have a tag beginning with "prefix_nick" + * => display standard prefix + */ + if (!gui_line_search_tag_starting_with (next_line, "prefix_nick")) + return 0; + + /* no nick on next line => display standard prefix */ + nick_next = gui_line_get_nick_tag (next_line); + if (!nick_next) + return 0; + + /* prefix can be hidden/replaced if nicks are equal */ + return (strcmp (nick, nick_next) == 0) ? 1 : 0; +} + +/* * Gets prefix and its length (for display only). * * If the prefix can be hidden (same nick as previous message), and if the @@ -199,33 +251,68 @@ gui_line_get_prefix_for_display (struct t_gui_line *line, && 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) + if (CONFIG_STRING(config_look_prefix_same_nick_middle) + && CONFIG_STRING(config_look_prefix_same_nick_middle)[0] + && gui_line_prefix_is_same_nick_as_next (line)) { - /* return empty prefix */ - if (prefix) - *prefix = gui_chat_prefix_empty; - if (length) - *length = 0; - if (color) - *color = NULL; + /* same nick: return empty prefix or value from option */ + if (strcmp (CONFIG_STRING(config_look_prefix_same_nick_middle), " ") == 0) + { + /* return empty prefix */ + if (prefix) + *prefix = gui_chat_prefix_empty; + if (length) + *length = 0; + if (color) + *color = NULL; + } + else + { + /* return prefix from option "weechat.look.prefix_same_nick_middle" */ + if (prefix) + *prefix = CONFIG_STRING(config_look_prefix_same_nick_middle); + if (length) + *length = config_length_prefix_same_nick_middle; + if (color) + { + tag_prefix_nick = gui_line_search_tag_starting_with (line, + "prefix_nick_"); + *color = (tag_prefix_nick) ? (char *)(tag_prefix_nick + 12) : NULL; + } + } + if (prefix_is_nick) + *prefix_is_nick = 0; } else { - /* return prefix from option "weechat.look.prefix_same_nick" */ - if (prefix) - *prefix = CONFIG_STRING(config_look_prefix_same_nick); - if (length) - *length = config_length_prefix_same_nick; - if (color) + /* same nick: return empty prefix or value from option */ + if (strcmp (CONFIG_STRING(config_look_prefix_same_nick), " ") == 0) + { + /* return empty prefix */ + if (prefix) + *prefix = gui_chat_prefix_empty; + if (length) + *length = 0; + if (color) + *color = NULL; + } + else { - tag_prefix_nick = gui_line_search_tag_starting_with (line, - "prefix_nick_"); - *color = (tag_prefix_nick) ? (char *)(tag_prefix_nick + 12) : NULL; + /* return prefix from option "weechat.look.prefix_same_nick" */ + if (prefix) + *prefix = CONFIG_STRING(config_look_prefix_same_nick); + if (length) + *length = config_length_prefix_same_nick; + if (color) + { + tag_prefix_nick = gui_line_search_tag_starting_with (line, + "prefix_nick_"); + *color = (tag_prefix_nick) ? (char *)(tag_prefix_nick + 12) : NULL; + } } + if (prefix_is_nick) + *prefix_is_nick = 0; } - if (prefix_is_nick) - *prefix_is_nick = 0; } else { |