diff --git a/ChangeLog.adoc b/ChangeLog.adoc index e231cd40c..4f1ad1ed6 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 syntax highlighting in evaluation of expressions with `raw_hl:string` and `hl:string`, add option weechat.color.eval_syntax_colors (issue #2042) * core: add option `search_history` in command `/input`, add key kbd:[Ctrl+r] to search in commands history, add key context "histsearch" (issue #2040) * core: add option weechat.look.buffer_search_history (issue #2040) * core: add key kbd:[Ctrl+o] to send command found and insert next one in input (issue #2040) diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index fb2d2dec3..746f9e189 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -2567,7 +2567,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test" ==== string_eval_expression _WeeChat ≥ 0.4.0, updated in 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0, -2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0._ +2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0._ Evaluate an expression and return result as a string. Special variables with format `+${variable}+` are expanded (see table below). @@ -2900,11 +2900,21 @@ expanded to last): |=== | Format | Min WeeChat | Description | Examples +| `+${raw_hl:xxx}+` | 4.2.0 +| Raw string (not evaluated), with syntax highlighting (using colors). +| >> `+${raw_hl:${cut:1,,${rev:hello}}}+` + + == `+${cut:1,,${rev:hello}}+` (with colors) + | `+${raw:xxx}+` | 3.1 | Raw string (not evaluated). | >> `+${raw:${info:version}}+` + == `+${info:version}+` +| `+${hl:xxx}+` | 4.2.0 +| String with syntax highlighting (using colors). +| >> `+${hl:${file.section.option}}+` + + == `+test ${variable}+` (with colors) + | `+${name}+` | 3.4 | User variable (defined with `+${define:name,value}+`). | >> `+${name}+` + diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index 5e453ec3a..d2f7e8afd 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -2613,7 +2613,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test" ==== string_eval_expression _WeeChat ≥ 0.4.0, mis à jour dans la 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, -2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0._ +2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0._ Évaluer l'expression et retourner le résultat sous forme de chaîne. Les variables spéciales avec le format `+${variable}+` sont étendues (voir le @@ -2952,11 +2952,22 @@ première étendue à la dernière) : |=== | Format | WeeChat mini | Description | Exemples +| `+${raw_hl:xxx}+` | 4.2.0 +| Chaîne brute (non évaluée), avec mise en évidence de la syntaxe (en utilisant + des couleurs). +| >> `+${raw_hl:${cut:1,,${rev:hello}}}+` + + == `+${cut:1,,${rev:hello}}+` (avec des couleurs) + | `+${raw:xxx}+` | 3.1 | Chaîne brute (non évaluée). | >> `+${raw:${info:version}}+` + == `+${info:version}+` +| `+${hl:xxx}+` | 4.2.0 +| Chaîne avec mise en évidence de la syntaxe (en utilisant des couleurs). +| >> `+${hl:${fichier.section.option}}+` + + == `+test ${variable}+` (avec des couleurs) + | `+${nom}+` | 3.4 | Variable définie par l'utilisateur (avec `+${define:nom,valeur}+`). | >> `+${nom}+` + diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 4c2a28d0c..a327b8d9f 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -2717,7 +2717,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test" ==== string_eval_expression _WeeChat ≥ 0.4.0, updated in 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0, -2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0._ +2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0._ Evaluate an expression and return result as a string. Special variables with format `+${variable}+` are expanded (see table below). @@ -3050,11 +3050,21 @@ expanded to last): |=== | Format | Min WeeChat | Description | Examples +| `+${raw_hl:xxx}+` | 4.2.0 +| Raw string (not evaluated), with syntax highlighting (using colors). +| >> `+${raw_hl:${cut:1,,${rev:hello}}}+` + + == `+${cut:1,,${rev:hello}}+` (with colors) + | `+${raw:xxx}+` | 3.1 | Raw string (not evaluated). | >> `+${raw:${info:version}}+` + == `+${info:version}+` +| `+${hl:xxx}+` | 4.2.0 +| String with syntax highlighting (using colors). +| >> `+${hl:${file.section.option}}+` + + == `+test ${variable}+` (with colors) + | `+${name}+` | 3.4 | User variable (defined with `+${define:name,value}+`). | >> `+${name}+` + diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 0a0e6c240..04c32e39d 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -2637,7 +2637,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test" // TRANSLATION MISSING _WeeChat ≥ 0.4.0, updated in 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0, -2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0._ +2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0._ 式を評価して文字列として返す。`+${variable}+` という書式で書かれた特殊変数は展開されます (以下の表を参照)。 @@ -2980,12 +2980,24 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio // TRANSLATION MISSING | 書式 | Min WeeChat | 説明 | 例 +// TRANLSATION MISSING +| `+${raw_hl:xxx}+` | 4.2.0 +| Raw string (not evaluated), with syntax highlighting (using colors). +| >> `+${raw_hl:${cut:1,,${rev:hello}}}+` + + == `+${cut:1,,${rev:hello}}+` (with colors) + // TRANSLATION MISSING | `+${raw:xxx}+` | 3.1 | Raw string (not evaluated). | >> `+${raw:${info:version}}+` + == `+${info:version}+` +// TRANSLATION MISSING +| `+${hl:xxx}+` | 4.2.0 +| String with syntax highlighting (using colors). +| >> `+${hl:${file.section.option}}+` + + == `+test ${variable}+` (with colors) + // TRANSLATION MISSING | `+${name}+` | 3.4 | User variable (defined with `+${define:name,value}+`). diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index 72a6a91c2..33cfcb522 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -2479,7 +2479,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test" ==== string_eval_expression -_WeeChat ≥ 0.4.0, ажурирано у верзијама 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6 и 3.8, 4.0.0._ +_WeeChat ≥ 0.4.0, ажурирано у верзијама 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6 и 3.8, 4.0.0, 4.2.0._ Израчунава израз и враћа вредност као стринг. Специјалне променљиве у формату `+${променљива}+` се развијају (погледајте табелу испод). @@ -2789,11 +2789,23 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio |=== | Формат | Мин WeeChat | Опис | Примери +// TRANLSATION MISSING +| `+${raw_hl:xxx}+` | 4.2.0 +| Raw string (not evaluated), with syntax highlighting (using colors). +| >> `+${raw_hl:${cut:1,,${rev:hello}}}+` + + == `+${cut:1,,${rev:hello}}+` (with colors) + | `+${raw:xxx}+` | 3.1 | Сирови стринг (не израчунава се). | >> `+${raw:${info:version}}+` + == `+${info:version}+` +// TRANSLATION MISSING +| `+${hl:xxx}+` | 4.2.0 +| String with syntax highlighting (using colors). +| >> `+${hl:${file.section.option}}+` + + == `+test ${variable}+` (with colors) + | `+${име}+` | 3.4 | Корисничка променљива (дефинисана са `+${define:име,вредност}+`). | >> `+${име}+` + diff --git a/po/cs.po b/po/cs.po index 6d0deba12..70768894a 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: 2023-11-11 08:54+0100\n" +"POT-Creation-Date: 2023-11-23 08:13+0100\n" "PO-Revision-Date: 2023-10-20 13:09+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -4792,6 +4792,19 @@ msgid "" "(default value)" msgstr "" +#. TRANSLATORS: please do not translate "lightred:blue" +#, fuzzy +#| msgid "" +#| "text color for nicks (comma separated list of colors, background is " +#| "allowed with format: \"fg:bg\", for example: \"lightred:blue\")" +msgid "" +"text color for syntax highlighting in evaluated strings, with " +"\"${raw_hl:...}\" and \"${hl:...}\" (comma separated list of colors, " +"background is allowed with format: \"fg:bg\", for example: \"lightred:blue\")" +msgstr "" +"barva textu pro přezdívky (čárkou oddělený seznam barev, pozadí je povoleno " +"ve formátu: \"fg:bg\", například: \"lightred:blue\")" + msgid "text color for actions in input line" msgstr "barva textu pro akce ve vstupní řádce" @@ -5696,6 +5709,9 @@ msgstr "Základní barvy WeeChat:" msgid "Nick colors:" msgstr "Barvy přezdívky:" +msgid "Syntax highlighting colors in evaluated strings:" +msgstr "" + msgid "Color aliases:" msgstr "Aliasy barev:" diff --git a/po/de.po b/po/de.po index b07809b1b..11c14ddb1 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: 2023-11-11 08:54+0100\n" +"POT-Creation-Date: 2023-11-23 08:13+0100\n" "PO-Revision-Date: 2023-11-11 13:49+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -2199,7 +2199,6 @@ msgstr "> raw[search_text_here]: Textsuche, im Buffer, ab aktueller Position" msgid "> raw[search_text]: search text in buffer" msgstr "> raw[search_text]: Textsuche im Buffer" -#| msgid "> raw[search_text]: search text in buffer" msgid "> raw[search_history]: search text in command line history" msgstr "> raw[search_history]: suche Text im Befehlszeilenverlauf" @@ -2348,10 +2347,10 @@ msgid "" "search or recalled with \"up\"key) and insert the next history entry in the " "command line without sending it" msgstr "" -"> raw[history_use_get_next]: sendet den aktuellen Verlaufseintrag (welcher" -" mit der Suche gefunden wurde oder mit der „Auf“-Taste ausgewählt wurde) und" -" fügt den nächsten Verlaufseintrag in die Befehlszeile ein, ohne diesen zu" -" senden" +"> raw[history_use_get_next]: sendet den aktuellen Verlaufseintrag (welcher " +"mit der Suche gefunden wurde oder mit der „Auf“-Taste ausgewählt wurde) und " +"fügt den nächsten Verlaufseintrag in die Befehlszeile ein, ohne diesen zu " +"senden" msgid "" "> raw[grab_key]: grab a key (optional argument: delay for end of grab, " @@ -4357,8 +4356,8 @@ msgstr "" msgid "" "default text search command line history: local (buffer) or global history" msgstr "" -"Standard-Befehlszeilenverlauf für die Textsuche: lokaler (Buffer) oder" -" globaler Verlauf" +"Standard-Befehlszeilenverlauf für die Textsuche: lokaler (Buffer) oder " +"globaler Verlauf" msgid "" "force default values for text search in buffer (instead of using values from " @@ -5437,6 +5436,20 @@ msgstr "" "Textsuche); wird ausschließlich dann genutzt, falls die Einstellung weechat." "look.emphasized_attributes keinen Eintrag besitzt (Standardwert)" +#. TRANSLATORS: please do not translate "lightred:blue" +#, fuzzy +#| msgid "" +#| "text color for nicks (comma separated list of colors, background is " +#| "allowed with format: \"fg:bg\", for example: \"lightred:blue\")" +msgid "" +"text color for syntax highlighting in evaluated strings, with " +"\"${raw_hl:...}\" and \"${hl:...}\" (comma separated list of colors, " +"background is allowed with format: \"fg:bg\", for example: \"lightred:blue\")" +msgstr "" +"Textfarbe für Nicks (durch Kommata getrennte Liste von Farben. Eine " +"Hintergrundfarbe kann durch das folgende Format genutzt werden: \"fg:bg\". " +"Zum Beispiel: \"lightred:blue\")" + msgid "text color for actions in input line" msgstr "" "Textfarbe in der Eingabezeile bei Aktivität (z.B. beim Einfügen von Zeilen)" @@ -6437,6 +6450,9 @@ msgstr "WeeChat Basisfarben:" msgid "Nick colors:" msgstr "Farben für Nicks:" +msgid "Syntax highlighting colors in evaluated strings:" +msgstr "" + msgid "Color aliases:" msgstr "Farbnamen:" @@ -6594,11 +6610,9 @@ msgstr "lokal" msgid "global" msgstr "global" -#| msgid "Search" msgid "Search lines" msgstr "Suche Zeilen" -#| msgid "default command:" msgid "Search command" msgstr "Suche Befehl" @@ -16407,8 +16421,7 @@ msgstr "verwaltet Trigger, das Schweizer Armeemesser für WeeChat" msgid "" "list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace " " " -"[\"\" [\"\" [\"\" [\"\" [\"<" -"return_code>\" [\"\"]]]]]] " +"[\"\" [\"\" [\"\" [\"\" [\"\" [\"\"]]]]]] " "|| addinput [] || input|output|recreate || set