From ca6e483cdc375fabb8c71bb72e47e8bd02883489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 9 Feb 2025 18:28:05 +0100 Subject: [PATCH] relay/api: add a way to toggle between remote and local command execution on remote buffers (issue #2148) New default key: - Alt+Ctrl+l (L): toggle execution of commands: remote/local New options: - relay.api.remote_input_cmd_local: text displayed for command executed locally - relay.api.remote_input_cmd_remote: text displayed for command executed on the remote WeeChat --- CHANGELOG.md | 1 + UPGRADING.md | 13 + doc/de/weechat_user.de.adoc | 12 +- doc/en/weechat_user.en.adoc | 11 +- doc/fr/weechat_user.fr.adoc | 11 +- doc/it/weechat_user.it.adoc | 12 +- doc/ja/weechat_user.ja.adoc | 12 +- doc/pl/weechat_user.pl.adoc | 12 +- doc/sr/weechat_user.sr.adoc | 12 +- po/cs.po | 40 +- po/de.po | 703 ++++++++++++++++-------------- po/es.po | 40 +- po/fr.po | 50 ++- po/hu.po | 40 +- po/it.po | 44 +- po/ja.po | 50 ++- po/pl.po | 54 ++- po/pt.po | 42 +- po/pt_BR.po | 42 +- po/ru.po | 40 +- po/sr.po | 59 ++- po/tr.po | 50 ++- po/weechat.pot | 34 +- src/gui/curses/gui-curses-key.c | 1 + src/plugins/relay/relay-command.c | 24 +- src/plugins/relay/relay-config.c | 34 +- src/plugins/relay/relay-config.h | 4 +- src/plugins/relay/relay.c | 79 ++++ 28 files changed, 998 insertions(+), 528 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8d4bf71b..229cd6630 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - core: add command `/pipe` - relay/api: add resource `POST /api/completion` ([#2207](https://github.com/weechat/weechat/issues/2207)) +- relay/api: add default key `Alt`+`Ctrl`+`l` (L) to toggle between remote and local commands on remote buffers, add option `togglecmd` in command `/remote`, add options relay.api.remote_input_cmd_local and relay.api.remote_input_cmd_remote ([#2148](https://github.com/weechat/weechat/issues/2148)) ### Fixed diff --git a/UPGRADING.md b/UPGRADING.md index e71212e3f..2d84b9315 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -7,6 +7,19 @@ When upgrading from version X to Y, please read and apply all instructions from For a list of all changes in each version, please see [CHANGELOG.md](CHANGELOG.md). +## Version 4.6.0 + +### Relay remote commands + +Commands on remote buffers can now be toggled: execution on remote WeeChat or +locally, with a new default key: `Alt`+`Ctrl`+`l` (L). + +You can add this key with this command: + +```text +/key missing +``` + ## Version 4.3.1 ### Detection of libgcrypt diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc index 5a0510269..b2568096b 100644 --- a/doc/de/weechat_user.de.adoc +++ b/doc/de/weechat_user.de.adoc @@ -1764,11 +1764,13 @@ Sie können mit dem Befehl <> geändert und neue hinzu [width="100%",cols="^.^3,.^8,.^5",options="header"] |=== -| Taste | Beschreibung | Befehl -| kbd:[Alt+m] | schaltet Mausfunktion ein/aus. | `+/mouse toggle+` -| kbd:[Alt+s] | Umschalten der Rechtschreibprüfung. | `+/mute spell toggle+` -| kbd:[Alt+=] | schaltet Filterfunktion an/aus. | `+/filter toggle+` -| kbd:[Alt+-] | schaltet, für den aktuellen Buffer, Filterfunktion an/aus. | `+/filter toggle @+` +| Taste | Beschreibung | Befehl +| kbd:[Alt+m] | schaltet Mausfunktion ein/aus. | `+/mouse toggle+` +| kbd:[Alt+s] | Umschalten der Rechtschreibprüfung. | `+/mute spell toggle+` +| kbd:[Alt+=] | schaltet Filterfunktion an/aus. | `+/filter toggle+` +| kbd:[Alt+-] | schaltet, für den aktuellen Buffer, Filterfunktion an/aus. | `+/filter toggle @+` +// TRANSLATION MISSING +| kbd:[Alt+Ctrl+l] (`L`) | Toggle between remote and local commands on a remote buffer (relay "api"). | `+/remote togglecmd+` |=== [[key_bindings_search_context]] diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc index e52f9a430..c56e6b85b 100644 --- a/doc/en/weechat_user.en.adoc +++ b/doc/en/weechat_user.en.adoc @@ -1753,11 +1753,12 @@ They can be changed and new ones can be added with the <\n" "Language-Team: weechat-dev \n" @@ -2787,6 +2787,11 @@ msgid "" "newline)" msgstr "" +#, fuzzy +#| msgid "reconnect to server(s)" +msgid "raw[-color]: convert colors" +msgstr "znovu připojit k serveru(ům)" + msgid "" "raw[-o]: send command output to the buffer as input; colors are stripped and " "commands are NOT executed (used only with -buffer)" @@ -2813,11 +2818,6 @@ msgid "" "use the current locale)" msgstr "" -#, fuzzy -#| msgid "reconnect to server(s)" -msgid "raw[-color]: convert colors" -msgstr "znovu připojit k serveru(ům)" - msgid "" "If no target is specified (\"-buffer\", \"-file\" or \"-hsignal\"), then the " "command output is sent on the current buffer." @@ -14587,7 +14587,7 @@ msgstr "odpojit z jednoho nebo všech IRC serverů" msgid "" "list|listfull [] || add|addreplace [-