diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 7b268350a..6ce330e09 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.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 * core: add option "addreplace" in command /filter (issue #1055, issue #1312) diff --git a/doc/de/autogen/user/weechat_options.adoc b/doc/de/autogen/user/weechat_options.adoc index ac0403492..4ff828c9c 100644 --- a/doc/de/autogen/user/weechat_options.adoc +++ b/doc/de/autogen/user/weechat_options.adoc @@ -596,6 +596,12 @@ ** Werte: beliebige Zeichenkette ** Standardwert: `+"%H:%M:%S"+` +* [[option_weechat.look.buffer_time_same]] *weechat.look.buffer_time_same* +** Beschreibung: pass:none[time displayed for a message with same time as previous message: use a space " " to hide time, another string to display this string instead of time, or an empty string to disable feature (always display time) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)] +** Typ: Zeichenkette +** Werte: beliebige Zeichenkette +** Standardwert: `+""+` + * [[option_weechat.look.color_basic_force_bold]] *weechat.look.color_basic_force_bold* ** Beschreibung: pass:none[erzwingt das Textattribut "fett" für helle Farben und "darkgray", um diese Farben stärker hervorzuheben (diese Einstellung ist standardmäßig deaktiviert: "fett" findet ausschließlich dann Verwendung falls das Terminal weniger als 16 Farben zur Verfügung stellt)] ** Typ: boolesch diff --git a/doc/en/autogen/user/weechat_options.adoc b/doc/en/autogen/user/weechat_options.adoc index fdd4bbe2e..b1f9b6c90 100644 --- a/doc/en/autogen/user/weechat_options.adoc +++ b/doc/en/autogen/user/weechat_options.adoc @@ -596,6 +596,12 @@ ** values: any string ** default value: `+"%H:%M:%S"+` +* [[option_weechat.look.buffer_time_same]] *weechat.look.buffer_time_same* +** description: pass:none[time displayed for a message with same time as previous message: use a space " " to hide time, another string to display this string instead of time, or an empty string to disable feature (always display time) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)] +** type: string +** values: any string +** default value: `+""+` + * [[option_weechat.look.color_basic_force_bold]] *weechat.look.color_basic_force_bold* ** description: pass:none[force "bold" attribute for light colors and "darkgray" in basic colors (this option is disabled by default: bold is used only if terminal has less than 16 colors)] ** type: boolean diff --git a/doc/fr/autogen/user/weechat_options.adoc b/doc/fr/autogen/user/weechat_options.adoc index 62fb67374..e1fe4f425 100644 --- a/doc/fr/autogen/user/weechat_options.adoc +++ b/doc/fr/autogen/user/weechat_options.adoc @@ -596,6 +596,12 @@ ** valeurs: toute chaîne ** valeur par défaut: `+"%H:%M:%S"+` +* [[option_weechat.look.buffer_time_same]] *weechat.look.buffer_time_same* +** description: pass:none[heure affichée pour un message avec la même heure que le message précédent ; utilisez un espace " " pour cacher l'heure, une autre chaîne pour l'afficher à la place de l'heure, ou une chaîne vide pour désactiver cette fonctionnalité (toujours afficher l'heure) (note : le contenu est évalué, donc vous pouvez utiliser des couleurs avec le format "${color:xxx}", voir /help eval)] +** type: chaîne +** valeurs: toute chaîne +** valeur par défaut: `+""+` + * [[option_weechat.look.color_basic_force_bold]] *weechat.look.color_basic_force_bold* ** description: pass:none[forcer l'attribut "bold" (gras) pour les couleurs claires et "darkgray" dans les couleurs de base (cette option est désactivée par défaut : le gras est utilisé seulement si le terminal a moins de 16 couleurs)] ** type: booléen diff --git a/doc/it/autogen/user/weechat_options.adoc b/doc/it/autogen/user/weechat_options.adoc index 9d9dc4b93..758c5ad5b 100644 --- a/doc/it/autogen/user/weechat_options.adoc +++ b/doc/it/autogen/user/weechat_options.adoc @@ -596,6 +596,12 @@ ** valori: qualsiasi stringa ** valore predefinito: `+"%H:%M:%S"+` +* [[option_weechat.look.buffer_time_same]] *weechat.look.buffer_time_same* +** descrizione: pass:none[time displayed for a message with same time as previous message: use a space " " to hide time, another string to display this string instead of time, or an empty string to disable feature (always display time) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)] +** tipo: stringa +** valori: qualsiasi stringa +** valore predefinito: `+""+` + * [[option_weechat.look.color_basic_force_bold]] *weechat.look.color_basic_force_bold* ** descrizione: pass:none[forza l'attributo "bold" per i colori chiari e "darkgray" nei colori di base (questa opzione è disabilitata per default: il grassetto è usato solo se il terminale ha meno di 16 colori)] ** tipo: bool diff --git a/doc/ja/autogen/user/weechat_options.adoc b/doc/ja/autogen/user/weechat_options.adoc index 58341b896..3547acdd6 100644 --- a/doc/ja/autogen/user/weechat_options.adoc +++ b/doc/ja/autogen/user/weechat_options.adoc @@ -596,6 +596,12 @@ ** 値: 未制約文字列 ** デフォルト値: `+"%H:%M:%S"+` +* [[option_weechat.look.buffer_time_same]] *weechat.look.buffer_time_same* +** 説明: pass:none[time displayed for a message with same time as previous message: use a space " " to hide time, another string to display this string instead of time, or an empty string to disable feature (always display time) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)] +** タイプ: 文字列 +** 値: 未制約文字列 +** デフォルト値: `+""+` + * [[option_weechat.look.color_basic_force_bold]] *weechat.look.color_basic_force_bold* ** 説明: pass:none[明るい色と標準的な色の "darkgray" には "太字" 属性を強制 (このオプションはデフォルトでは無効: 太字は端末が 16 色以下の表示能力しかない場合に利用される)] ** タイプ: ブール diff --git a/doc/pl/autogen/user/weechat_options.adoc b/doc/pl/autogen/user/weechat_options.adoc index c72345db5..1682b9f9d 100644 --- a/doc/pl/autogen/user/weechat_options.adoc +++ b/doc/pl/autogen/user/weechat_options.adoc @@ -596,6 +596,12 @@ ** wartości: dowolny ciąg ** domyślna wartość: `+"%H:%M:%S"+` +* [[option_weechat.look.buffer_time_same]] *weechat.look.buffer_time_same* +** opis: pass:none[time displayed for a message with same time as previous message: use a space " " to hide time, another string to display this string instead of time, or an empty string to disable feature (always display time) (note: content is evaluated, so you can use colors with format "${color:xxx}", see /help eval)] +** typ: ciąg +** wartości: dowolny ciąg +** domyślna wartość: `+""+` + * [[option_weechat.look.color_basic_force_bold]] *weechat.look.color_basic_force_bold* ** opis: pass:none[wymusza atrybut "bold" dla jasnych kolorów oraz "darkgray" w kolorach podstawowych (ta opcja jest domyślnie wyłączona: pogrubienie jest używane tylko jeśli terminal obsługuje poniżej 16 kolorów)] ** typ: bool diff --git a/po/cs.po b/po/cs.po index faf9a1d24..424bd3aa1 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: 2019-04-13 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2019-03-17 18:32+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -3056,6 +3056,18 @@ msgstr "" "specifikaci data/času), barvy jsou povoleny ve formátu \"${barva}\", " "například francouzský čas: \"${lightblue}%H${white}%M${lightred}%S\"" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +msgstr "" +"časový formát pro \"time\" položku panelu (viz. man strftime pro specifikaci " +"data/času)" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/de.po b/po/de.po index a33e953eb..66fb29607 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: 2019-04-13 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2019-04-06 22:14+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -3681,6 +3681,21 @@ msgstr "" "Uhrzeit in Graustufen (Unterstützung von 256 Farben notwendig): " "\"${color:252}%H${color:245}%M${color:240}%S\"" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +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" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/es.po b/po/es.po index 28db71529..765d6726a 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: 2019-04-13 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -3181,6 +3181,20 @@ msgstr "" "\"${color}\", ejemplo hora francesa: \"${lightblue}%H${white}%M${lightred}%S" "\"" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +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)" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/fr.po b/po/fr.po index 611ce3393..728d3f11d 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: 2019-04-13 13:45+0200\n" -"PO-Revision-Date: 2019-04-13 13:50+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" +"PO-Revision-Date: 2019-04-13 14:43+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -3580,6 +3580,21 @@ msgstr "" "help eval) ; par exemple l'heure avec des niveaux de gris (requiert le " "support de 256 couleurs) : \"${color:252}%H${color:245}%M${color:240}%S\"" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +msgstr "" +"heure affichée pour un message avec la même heure que le message précédent ; " +"utilisez un espace \" \" pour cacher l'heure, une autre chaîne pour " +"l'afficher à la place de l'heure, ou une chaîne vide pour désactiver cette " +"fonctionnalité (toujours afficher l'heure) (note : le contenu est évalué, " +"donc vous pouvez utiliser des couleurs avec le format \"${color:xxx}\", " +"voir /help eval)" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/hu.po b/po/hu.po index cdb99548a..4e42bb5f8 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: 2019-04-13 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2019-02-28 20:18+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -2685,6 +2685,16 @@ msgid "" "${color:240}%S\"" msgstr "új nap kezdetével megjelenő időbélyeg" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +msgstr "új nap kezdetével megjelenő időbélyeg" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/it.po b/po/it.po index 337d978cf..d5f5ed7a2 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: 2019-04-13 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -3280,6 +3280,20 @@ msgstr "" "formato \"${colore}\", nell'orario italiano ad esempio: \"${lightblue}%H" "${white}%M{lightred}%S\"" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +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)" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/ja.po b/po/ja.po index 5362a694f..f6b4282d3 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: 2019-04-13 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2019-04-01 09:00+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: Polish \n" @@ -3529,6 +3529,19 @@ msgstr "" "przykład czas w odcieniach szarości (wymaga wsparcia dla 256 kolorów):" "\"${color:252}%H${color:245}%M${color:240}%S\"" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +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)" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/pt.po b/po/pt.po index 3630cd74e..4dfd086f5 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: 2019-04-13 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2019-03-21 23:33+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -3483,6 +3483,20 @@ msgstr "" "usando tons de cinzento (requer suporte de 256 cores): \"${color:252}%H" "${color:245}%M${color:240}%S\"" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +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)" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/pt_BR.po b/po/pt_BR.po index abe5322a0..71612a3d9 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 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2019-03-11 21:10+0100\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -3230,6 +3230,18 @@ msgstr "" "de tempo usando escala de cinza (requer suporte à 256 cores): " "\"${color:252}%H${color:245}$M${color:240}%S\"" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +msgstr "" +"formato de tempo para o item de barra \"time\" (veja man strftime para " +"especificadores de data/tempo)" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/ru.po b/po/ru.po index 6483524a4..2907d18a5 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: 2019-04-13 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2019-03-11 21:10+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -2708,6 +2708,16 @@ msgid "" "${color:240}%S\"" msgstr "отображение маркера даты при смене дня" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +msgstr "отображение маркера даты при смене дня" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/tr.po b/po/tr.po index 276fa1536..0c5606b2f 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: 2019-04-13 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -2442,6 +2442,15 @@ msgid "" "${color:240}%S\"" msgstr "" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +msgstr "" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/po/weechat.pot b/po/weechat.pot index 864f42e1d..25b16e164 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 13:45+0200\n" +"POT-Creation-Date: 2019-04-13 14:42+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -2437,6 +2437,15 @@ msgid "" "${color:240}%S\"" msgstr "" +#. TRANSLATORS: string "${color:xxx}" must NOT be translated +msgid "" +"time displayed for a message with same time as previous message: use a space " +"\" \" to hide time, another string to display this string instead of time, " +"or an empty string to disable feature (always display time) (note: content " +"is evaluated, so you can use colors with format \"${color:xxx}\", see /help " +"eval)" +msgstr "" + msgid "" "force \"bold\" attribute for light colors and \"darkgray\" in basic colors " "(this option is disabled by default: bold is used only if terminal has less " diff --git a/src/core/wee-config.c b/src/core/wee-config.c index c11d8dbe1..f635b7cf2 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -98,6 +98,7 @@ struct t_config_option *config_look_buffer_search_force_default; struct t_config_option *config_look_buffer_search_regex; struct t_config_option *config_look_buffer_search_where; struct t_config_option *config_look_buffer_time_format; +struct t_config_option *config_look_buffer_time_same; struct t_config_option *config_look_color_basic_force_bold; struct t_config_option *config_look_color_inactive_buffer; struct t_config_option *config_look_color_inactive_message; @@ -319,6 +320,7 @@ char **config_nick_colors = NULL; int config_num_nick_colors = 0; struct t_hashtable *config_hashtable_nick_color_force = NULL; char *config_item_time_evaluated = NULL; +char *config_buffer_time_same_evaluated = NULL; struct t_hashtable *config_hashtable_completion_partial_templates = NULL; @@ -657,6 +659,27 @@ config_change_buffer_time_format (const void *pointer, void *data, gui_window_ask_refresh (1); } +/* + * Callback for changes on option "weechat.look.buffer_time_same". + */ + +void +config_change_buffer_time_same (const void *pointer, void *data, + struct t_config_option *option) +{ + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) option; + + if (config_buffer_time_same_evaluated) + free (config_buffer_time_same_evaluated); + config_buffer_time_same_evaluated = eval_expression ( + CONFIG_STRING(config_look_buffer_time_same), NULL, NULL, NULL); + + gui_window_ask_refresh (1); +} + /* * Computes the "prefix_max_length" on all buffers. */ @@ -2664,6 +2687,19 @@ config_weechat_init_options () NULL, NULL, NULL, &config_change_buffer_time_format, NULL, NULL, NULL, NULL, NULL); + config_look_buffer_time_same = config_file_new_option ( + weechat_config_file, ptr_section, + "buffer_time_same", "string", + /* TRANSLATORS: string "${color:xxx}" must NOT be translated */ + N_("time displayed for a message with same time as previous message: " + "use a space \" \" to hide time, another string to display this " + "string instead of time, or an empty string to disable feature " + "(always display time) (note: content is evaluated, so you can use " + "colors with format \"${color:xxx}\", see /help eval)"), + NULL, 0, 0, "", NULL, 0, + NULL, NULL, NULL, + &config_change_buffer_time_same, NULL, NULL, + NULL, NULL, NULL); config_look_color_basic_force_bold = config_file_new_option ( weechat_config_file, ptr_section, "color_basic_force_bold", "boolean", @@ -4694,6 +4730,12 @@ config_weechat_free () config_item_time_evaluated = NULL; } + if (config_buffer_time_same_evaluated) + { + free (config_buffer_time_same_evaluated); + config_buffer_time_same_evaluated = NULL; + } + if (config_hashtable_completion_partial_templates) { hashtable_free (config_hashtable_completion_partial_templates); diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 78ee67efa..69b32ad1f 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -149,6 +149,7 @@ extern struct t_config_option *config_look_buffer_search_force_default; extern struct t_config_option *config_look_buffer_search_regex; extern struct t_config_option *config_look_buffer_search_where; extern struct t_config_option *config_look_buffer_time_format; +extern struct t_config_option *config_look_buffer_time_same; extern struct t_config_option *config_look_color_basic_force_bold; extern struct t_config_option *config_look_color_inactive_buffer; extern struct t_config_option *config_look_color_inactive_message; @@ -355,6 +356,7 @@ extern int config_word_chars_input_count; extern char **config_nick_colors; extern int config_num_nick_colors; extern struct t_hashtable *config_hashtable_nick_color_force; +extern char *config_buffer_time_same_evaluated; extern struct t_hashtable *config_hashtable_completion_partial_templates; extern void config_set_nick_colors (); diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index 91b180ef7..0e255bf47 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -681,6 +681,33 @@ gui_chat_display_day_changed (struct t_gui_window *window, free (message_with_color); } +/* + * Checks if time on line is the same as time on previous line. + * + * Returns: + * 1: time is same as time on previous line + * 0: time is different from time on previous line + */ + +int +gui_chat_line_time_is_same_as_previous (struct t_gui_line *line) +{ + struct t_gui_line *prev_line; + + /* previous line is not found => display standard time */ + prev_line = gui_line_get_prev_displayed (line); + if (!prev_line) + return 0; + + /* previous line has no time => display standard time */ + if (!line->data->str_time || !prev_line->data->str_time) + return 0; + + /* time can be hidden/replaced if times are equal */ + return (strcmp (line->data->str_time, prev_line->data->str_time) == 0) ? + 1 : 0; +} + /* * Displays time, buffer name (for merged buffers) and prefix for a line. */ @@ -719,12 +746,49 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, { if (window->win_chat_cursor_y < window->coords_size) window->coords[window->win_chat_cursor_y].time_x1 = window->win_chat_cursor_x; - gui_chat_display_word (window, line, line->data->str_time, - NULL, 1, num_lines, count, - pre_lines_displayed, lines_displayed, - simulate, - CONFIG_BOOLEAN(config_look_color_inactive_time), - 0); + + if (CONFIG_STRING(config_look_buffer_time_same) + && CONFIG_STRING(config_look_buffer_time_same)[0] + && gui_chat_line_time_is_same_as_previous (line)) + { + length_allowed = gui_chat_time_length; + num_spaces = length_allowed - gui_chat_strlen_screen ( + config_buffer_time_same_evaluated); + gui_chat_display_word ( + window, line, config_buffer_time_same_evaluated, + (num_spaces < 0) ? + config_buffer_time_same_evaluated + + gui_chat_string_real_pos (config_buffer_time_same_evaluated, + length_allowed, + 1) : + NULL, + 1, num_lines, count, + pre_lines_displayed, lines_displayed, + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_time), + 0); + for (i = 0; i < num_spaces; i++) + { + gui_chat_display_word ( + window, line, str_space, + NULL, 1, num_lines, count, + pre_lines_displayed, lines_displayed, + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_time), + 0); + } + } + else + { + gui_chat_display_word ( + window, line, line->data->str_time, + NULL, 1, num_lines, count, + pre_lines_displayed, lines_displayed, + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_time), + 0); + } + if (window->win_chat_cursor_y < window->coords_size) window->coords[window->win_chat_cursor_y].time_x2 = window->win_chat_cursor_x - 1;