diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 2b4de3fbd..4000ebb53 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele New features:: + * core: add variable `${highlight}` in option weechat.look.buffer_time_format (issue #2079) * core: convert option weechat.look.hotlist_sort to a list of fields (issue #2097) * core: rename variables with creation time in hdata "hotlist": "creation_time.tv_sec" to "time" and "creation_time.tv_usec" to "time_usec" * core: add unique identifier "id" in buffer (issue #2081) diff --git a/po/cs.po b/po/cs.po index 1b0e6d338..c9520386b 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: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -4282,10 +4282,15 @@ msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" "formát času zobrazeného na každém řádku v bufferu (viz. man strftime pro " "specifikaci data/času), barvy jsou povoleny ve formátu \"${barva}\", " diff --git a/po/de.po b/po/de.po index 6fe34a226..13c0a8659 100644 --- a/po/de.po +++ b/po/de.po @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2024-03-07 11:51+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -4800,14 +4800,28 @@ msgstr "" "(prefix), Präfix und Nachricht (prefix_message)" #. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +#| msgid "" +#| "time format for each line displayed in buffers (see man strftime for date/" +#| "time specifiers, extra specifiers are supported, see function " +#| "util_strftimeval in Plugin API reference) (note: content is evaluated, so " +#| "you can use colors with format \"${color:xxx}\", see /help eval); for " +#| "example time using grayscale: " +#| "\"${color:252}%H${color:243}%M${color:237}%S\", the same with " +#| "milliseconds: \"${color:252}%H${color:243}%M${color:237}%S.%.3\"" msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" "Format für die Uhrzeit, die in jeder Zeile eines Buffers dargestellt wird " "(siehe man strftime, welche Platzhalter für Datum und Uhrzeit verwendet " diff --git a/po/es.po b/po/es.po index 95c3f770f..97e5d8083 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: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: Santiago Forero \n" "Language-Team: weechat-dev \n" @@ -4399,10 +4399,15 @@ msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" "formato de hora en el registro (ver el manual de strftime para los " "especificadores de fecha/hora), se pueden usar colores con el formato " diff --git a/po/fr.po b/po/fr.po index bc80c2120..cade61189 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: 2024-03-15 19:13+0100\n" -"PO-Revision-Date: 2024-03-15 19:18+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" +"PO-Revision-Date: 2024-03-16 09:39+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -4698,19 +4698,30 @@ msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" "format de date/heure pour chaque ligne affichée dans les tampons (voir man " "strftime pour le format de date/heure, des caractères de conversion " "supplémentaires sont supportés, voir la fonction util_strftimeval dans la " "Référence API extension) (note : le contenu est évalué, donc vous pouvez " -"utiliser des couleurs avec le format \"${color:xxx}\", voir /help eval) ; " -"par exemple l'heure avec des niveaux de gris : " -"\"${color:252}%H${color:243}%M${color:237}%S\", le même format avec des " -"millisecondes : \"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"utiliser des couleurs avec le format \"${color:xxx}\", voir /help eval) ; la " +"variable \"${highlight}\" peut être utilisée dans une condition pour avoir " +"un format spécifique aux lignes avec highlight ; par exemple l'heure avec " +"des niveaux de gris : \"${color:252}%H${color:243}%M${color:237}%S\", le " +"même format avec des millisecondes : " +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", fond rouge in cas de " +"highlight : \"${if:${highlight}?${color:,red}}%H:%M:%S\", fond rouge en cas " +"de highlight avec des niveaux de gris : \"${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S:" +"${color:252}%H${color:243}%M${color:237}%S}\"" #. TRANSLATORS: string "${color:xxx}" must NOT be translated msgid "" diff --git a/po/hu.po b/po/hu.po index 34094938c..569380480 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: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -4081,10 +4081,15 @@ msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "új nap kezdetével megjelenő időbélyeg" #. TRANSLATORS: string "${color:xxx}" must NOT be translated diff --git a/po/it.po b/po/it.po index 59be0d775..683441f79 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: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -4310,10 +4310,15 @@ msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" "formato dell'ora per ogni riga visualizzata nei buffer (consultare man " "strftime per gli specificatori data/ora), i colori sono consentiti nel " diff --git a/po/ja.po b/po/ja.po index e11aa769a..579b68cd2 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: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: weechat-dev \n" @@ -4546,14 +4546,28 @@ msgstr "" "i wiadomości" #. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +#| msgid "" +#| "time format for each line displayed in buffers (see man strftime for date/" +#| "time specifiers, extra specifiers are supported, see function " +#| "util_strftimeval in Plugin API reference) (note: content is evaluated, so " +#| "you can use colors with format \"${color:xxx}\", see /help eval); for " +#| "example time using grayscale: " +#| "\"${color:252}%H${color:243}%M${color:237}%S\", the same with " +#| "milliseconds: \"${color:252}%H${color:243}%M${color:237}%S.%.3\"" msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" "format czasu używany dla każdej linii w buforach (zobacz man strftime dla " "specyfikatorów daty/czasu, dodatkowe specyfikatory są wspierane, zobacz " diff --git a/po/pt.po b/po/pt.po index 1aab66d8b..3d67a63d2 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: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -4467,10 +4467,15 @@ msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" "formato de data/hora de cada linha mostrada no buffer (ver man strftime para " "especificadores de data/hora) (nota: o conteúdo é avaliado, por isso pode " diff --git a/po/pt_BR.po b/po/pt_BR.po index 9936a7be0..3c506adec 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: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2024-02-17 10:07+0100\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -4336,10 +4336,15 @@ msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" "formato de tempo para cada linha mostrada nos buffers (veja man strftime " "para especificadores de data/tempo) (nota: o conteúdo é avaliado, então voce " diff --git a/po/ru.po b/po/ru.po index 4b7a8c88a..1c1a021a3 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: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -4106,10 +4106,15 @@ msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "отображение маркера даты при смене дня" #. TRANSLATORS: string "${color:xxx}" must NOT be translated diff --git a/po/sr.po b/po/sr.po index dca55b901..f8131ce0e 100644 --- a/po/sr.po +++ b/po/sr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2024-03-06 20:32+0100\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -4560,14 +4560,28 @@ msgstr "" "подразумевана претрага текста у баферу: у поруци, префиксу, префиксу и поруци" #. TRANSLATORS: string "${color:xxx}" must NOT be translated +#, fuzzy +#| msgid "" +#| "time format for each line displayed in buffers (see man strftime for date/" +#| "time specifiers, extra specifiers are supported, see function " +#| "util_strftimeval in Plugin API reference) (note: content is evaluated, so " +#| "you can use colors with format \"${color:xxx}\", see /help eval); for " +#| "example time using grayscale: " +#| "\"${color:252}%H${color:243}%M${color:237}%S\", the same with " +#| "milliseconds: \"${color:252}%H${color:243}%M${color:237}%S.%.3\"" msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" "формат времена за сваку линију која се приказује у баферима (погледајте man " "strftime за спецификаторе датума/времена, подржани су додатни спецификатори, " diff --git a/po/tr.po b/po/tr.po index 18393b38f..7a53f6e18 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: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2024-03-06 20:33+0100\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -4482,10 +4482,15 @@ msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" "arabelleklerde görüntülenen her satır için zaman biçimi (tarih/zaman " "belirticileri için man strftime yapın) (not: içerik değerlendirilir, böylece " diff --git a/po/weechat.pot b/po/weechat.pot index e09102ed5..4d0669ed5 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: 2024-03-15 19:13+0100\n" +"POT-Creation-Date: 2024-03-16 09:38+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -3830,10 +3830,15 @@ msgid "" "time format for each line displayed in buffers (see man strftime for date/" "time specifiers, extra specifiers are supported, see function " "util_strftimeval in Plugin API reference) (note: content is evaluated, so " -"you can use colors with format \"${color:xxx}\", see /help eval); for " -"example time using grayscale: " +"you can use colors with format \"${color:xxx}\", see /help eval); variable " +"\"${highlight}\" can be used in a condition to have a format specific to " +"lines with highlight; for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", the same with milliseconds: " -"\"${color:252}%H${color:243}%M${color:237}%S.%.3\"" +"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", red background in case " +"of highlight: \"${if:${highlight}?${color:,red}}%H:%M:%S\", red background " +"in case of highlight with grayscale: ${if:${highlight}?${color:" +"yellow,124}%H${color:187}%M${color:181}%S.%.3:" +"${color:252}%H${color:243}%M${color:237}%S.%.3}" msgstr "" #. TRANSLATORS: string "${color:xxx}" must NOT be translated diff --git a/src/core/core-config.c b/src/core/core-config.c index 0a0b07845..34ef55851 100644 --- a/src/core/core-config.c +++ b/src/core/core-config.c @@ -3321,11 +3321,18 @@ config_weechat_init_options () "strftime for date/time specifiers, extra specifiers are " "supported, see function util_strftimeval in Plugin API reference) " "(note: content is evaluated, so you can use colors with format " - "\"${color:xxx}\", see /help eval); " + "\"${color:xxx}\", see /help eval); variable \"${highlight}\" " + "can be used in a condition to have a format specific to lines " + "with highlight; " "for example time using grayscale: " "\"${color:252}%H${color:243}%M${color:237}%S\", " "the same with milliseconds: " - "\"${color:252}%H${color:243}%M${color:237}%S.%.3\""), + "\"${color:252}%H${color:243}%M${color:237}%S.%.3\", " + "red background in case of highlight: " + "\"${if:${highlight}?${color:,red}}%H:%M:%S\", " + "red background in case of highlight with grayscale: " + "${if:${highlight}?${color:yellow,124}%H${color:187}%M${color:181}%S.%.3:" + "${color:252}%H${color:243}%M${color:237}%S.%.3}"), NULL, 0, 0, "%H:%M:%S", NULL, 0, NULL, NULL, NULL, &config_change_buffer_time_format, NULL, NULL, diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index a1ff81322..53d029b27 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -390,12 +390,13 @@ gui_chat_get_word_info (struct t_gui_window *window, */ char * -gui_chat_get_time_string (time_t date, int date_usec) +gui_chat_get_time_string (time_t date, int date_usec, int highlight) { char text_time[128], text_time2[(128*3)+16], text_time_char[2]; char *text_with_color; int i, time_first_digit, time_last_digit, last_color; struct timeval tv; + struct t_hashtable *extra_vars; if (date == 0) return NULL; @@ -413,7 +414,15 @@ gui_chat_get_time_string (time_t date, int date_usec) if (strstr (text_time, "${")) { - text_with_color = eval_expression (text_time, NULL, NULL, NULL); + extra_vars = hashtable_new (32, + WEECHAT_HASHTABLE_STRING, + WEECHAT_HASHTABLE_STRING, + NULL, NULL); + if (extra_vars) + hashtable_set (extra_vars, "highlight", (highlight) ? "1" : "0"); + text_with_color = eval_expression (text_time, NULL, extra_vars, NULL); + if (extra_vars) + hashtable_free (extra_vars); if (text_with_color) { if (strcmp (text_time, text_with_color) != 0) @@ -510,7 +519,7 @@ gui_chat_get_time_length () length = 0; gettimeofday (&tv_now, NULL); - text_time = gui_chat_get_time_string (tv_now.tv_sec, tv_now.tv_usec); + text_time = gui_chat_get_time_string (tv_now.tv_sec, tv_now.tv_usec, 0); if (text_time) { @@ -543,7 +552,8 @@ gui_chat_change_time_format () free (ptr_line->data->str_time); ptr_line->data->str_time = gui_chat_get_time_string ( ptr_line->data->date, - ptr_line->data->date_usec); + ptr_line->data->date_usec, + ptr_line->data->highlight); } } } diff --git a/src/gui/gui-chat.h b/src/gui/gui-chat.h index 18a3b9bba..3ef59f587 100644 --- a/src/gui/gui-chat.h +++ b/src/gui/gui-chat.h @@ -90,7 +90,8 @@ extern void gui_chat_get_word_info (struct t_gui_window *window, int *word_end_offset, int *word_length_with_spaces, int *word_length); -extern char *gui_chat_get_time_string (time_t date, int date_usec); +extern char *gui_chat_get_time_string (time_t date, int date_usec, + int highlight); extern int gui_chat_get_time_length (); extern void gui_chat_change_time_format (); extern int gui_chat_buffer_valid (struct t_gui_buffer *buffer, diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c index 43eb68baa..bfdd2f1d8 100644 --- a/src/gui/gui-line.c +++ b/src/gui/gui-line.c @@ -1528,7 +1528,6 @@ gui_line_new (struct t_gui_buffer *buffer, int y, new_line->data->date_usec = date_usec; new_line->data->date_printed = date_printed; new_line->data->date_usec_printed = date_usec_printed; - new_line->data->str_time = gui_chat_get_time_string (date, date_usec); gui_line_tags_alloc (new_line->data, tags); new_line->data->refresh_needed = 0; new_line->data->prefix = (prefix) ? @@ -1540,6 +1539,8 @@ gui_line_new (struct t_gui_buffer *buffer, int y, gui_line_set_highlight (new_line, max_notify_level); if (new_line->data->highlight && (new_line->data->notify_level >= 0)) new_line->data->notify_level = GUI_HOTLIST_HIGHLIGHT; + new_line->data->str_time = gui_chat_get_time_string ( + date, date_usec, new_line->data->highlight); } else { @@ -1642,6 +1643,30 @@ gui_line_hook_update (struct t_gui_line *line, } } + ptr_value2 = hashtable_get (hashtable2, "notify_level"); + if (ptr_value2) + { + error = NULL; + value = strtol (ptr_value2, &error, 10); + if (error && !error[0] && (value >= -1) && (value <= GUI_HOTLIST_MAX)) + { + notify_level_updated = 1; + line->data->notify_level = value; + } + } + + ptr_value2 = hashtable_get (hashtable2, "highlight"); + if (ptr_value2) + { + error = NULL; + value = strtol (ptr_value2, &error, 10); + if (error && !error[0]) + { + highlight_updated = 1; + line->data->highlight = (value) ? 1 : 0; + } + } + ptr_value2 = hashtable_get (hashtable2, "date"); if (ptr_value2) { @@ -1654,7 +1679,8 @@ gui_line_hook_update (struct t_gui_line *line, free (line->data->str_time); line->data->str_time = gui_chat_get_time_string ( line->data->date, - line->data->date_usec); + line->data->date_usec, + line->data->highlight); } } @@ -1670,7 +1696,8 @@ gui_line_hook_update (struct t_gui_line *line, free (line->data->str_time); line->data->str_time = gui_chat_get_time_string ( line->data->date, - line->data->date_usec); + line->data->date_usec, + line->data->highlight); } } @@ -1710,30 +1737,6 @@ gui_line_hook_update (struct t_gui_line *line, gui_line_tags_alloc (line->data, ptr_value2); } - ptr_value2 = hashtable_get (hashtable2, "notify_level"); - if (ptr_value2) - { - error = NULL; - value = strtol (ptr_value2, &error, 10); - if (error && !error[0] && (value >= -1) && (value <= GUI_HOTLIST_MAX)) - { - notify_level_updated = 1; - line->data->notify_level = value; - } - } - - ptr_value2 = hashtable_get (hashtable2, "highlight"); - if (ptr_value2) - { - error = NULL; - value = strtol (ptr_value2, &error, 10); - if (error && !error[0]) - { - highlight_updated = 1; - line->data->highlight = (value) ? 1 : 0; - } - } - ptr_value = hashtable_get (hashtable, "prefix"); ptr_value2 = hashtable_get (hashtable2, "prefix"); if (ptr_value2 && (!ptr_value || (strcmp (ptr_value, ptr_value2) != 0))) @@ -2218,7 +2221,8 @@ gui_line_hdata_line_data_update_cb (void *data, free (line_data->str_time); line_data->str_time = gui_chat_get_time_string ( line_data->date, - line_data->date_usec); + line_data->date_usec, + line_data->highlight); rc++; update_coords = 1; } @@ -2234,7 +2238,8 @@ gui_line_hdata_line_data_update_cb (void *data, free (line_data->str_time); line_data->str_time = gui_chat_get_time_string ( line_data->date, - line_data->date_usec); + line_data->date_usec, + line_data->highlight); rc++; update_coords = 1; } diff --git a/tests/unit/gui/test-gui-line.cpp b/tests/unit/gui/test-gui-line.cpp index 02a0beaee..bc3aa1c64 100644 --- a/tests/unit/gui/test-gui-line.cpp +++ b/tests/unit/gui/test-gui-line.cpp @@ -854,7 +854,7 @@ TEST(GuiLine, New) gettimeofday (&date_printed, NULL); date.tv_sec = date_printed.tv_sec - 1; date.tv_usec = date_printed.tv_usec; - str_time = gui_chat_get_time_string (date.tv_sec, date.tv_usec); + str_time = gui_chat_get_time_string (date.tv_sec, date.tv_usec, 0); POINTERS_EQUAL(NULL, gui_line_new (