From 0c0c32aec4121ba707027ca41b97e09bce96f3df Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 12 Aug 2025 20:17:20 +0200 Subject: [PATCH] Show "Close/Cancel: " for menus like we do for confirmations For many menus, just "Close" is fine, but some menus act more like confirmations (e.g. the menu that appears when you cherry-pick and get conflicts); in this case, it's good to make it more obvious that hitting esc cancels the whole thing. --- docs/keybindings/Keybindings_en.md | 2 +- docs/keybindings/Keybindings_ja.md | 2 +- docs/keybindings/Keybindings_ko.md | 2 +- docs/keybindings/Keybindings_pl.md | 2 +- docs/keybindings/Keybindings_pt.md | 2 +- docs/keybindings/Keybindings_ru.md | 2 +- docs/keybindings/Keybindings_zh-TW.md | 2 +- pkg/gui/controllers/menu_controller.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index c095dd5e7..b73a505c3 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -256,7 +256,7 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ | Key | Action | Info | |-----|--------|-------------| | `` `` | Execute | | -| `` `` | Close | | +| `` `` | Close/Cancel | | | `` / `` | Filter the current view by text | | ## Reflog diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md index dd358c417..9d8460d96 100644 --- a/docs/keybindings/Keybindings_ja.md +++ b/docs/keybindings/Keybindings_ja.md @@ -302,7 +302,7 @@ _凡例:`<c-b>` はctrl+b、`<a-b>` はalt+b、`B` はshift+bを意味 | Key | Action | Info | |-----|--------|-------------| | `` `` | 実行 | | -| `` `` | 閉じる | | +| `` `` | 閉じる/キャンセル | | | `` / `` | 現在のビューをテキストでフィルタリング | | ## リフログ diff --git a/docs/keybindings/Keybindings_ko.md b/docs/keybindings/Keybindings_ko.md index 0ae0b17a0..1dd33ba54 100644 --- a/docs/keybindings/Keybindings_ko.md +++ b/docs/keybindings/Keybindings_ko.md @@ -128,7 +128,7 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ | Key | Action | Info | |-----|--------|-------------| | `` `` | 실행 | | -| `` `` | 닫기 | | +| `` `` | 닫기/취소 | | | `` / `` | Filter the current view by text | | ## 메인 패널 (Merging) diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md index c9134eec0..f599d6cff 100644 --- a/docs/keybindings/Keybindings_pl.md +++ b/docs/keybindings/Keybindings_pl.md @@ -159,7 +159,7 @@ _Legenda: `` oznacza ctrl+b, `` oznacza alt+b, `B` oznacza shift+b_ | Key | Action | Info | |-----|--------|-------------| | `` `` | Wykonaj | | -| `` `` | Zamknij | | +| `` `` | Zamknij/Anuluj | | | `` / `` | Filtruj bieżący widok po tekście | | ## Panel główny (normalny) diff --git a/docs/keybindings/Keybindings_pt.md b/docs/keybindings/Keybindings_pt.md index b1a86a482..66c92a90e 100644 --- a/docs/keybindings/Keybindings_pt.md +++ b/docs/keybindings/Keybindings_pt.md @@ -221,7 +221,7 @@ _Legend: `` means ctrl+b, `` means alt+b, `B` means shift+b_ | Key | Action | Info | |-----|--------|-------------| | `` `` | Executar | | -| `` `` | Fechar | | +| `` `` | Fechar/Cancelar | | | `` / `` | Filter the current view by text | | ## Painel Principal (Normal) diff --git a/docs/keybindings/Keybindings_ru.md b/docs/keybindings/Keybindings_ru.md index 90bc925c7..efd8a34bf 100644 --- a/docs/keybindings/Keybindings_ru.md +++ b/docs/keybindings/Keybindings_ru.md @@ -227,7 +227,7 @@ _Связки клавиш_ | Key | Action | Info | |-----|--------|-------------| | `` `` | Выполнить | | -| `` `` | Закрыть | | +| `` `` | Закрыть/отменить | | | `` / `` | Filter the current view by text | | ## Панель Подтверждения diff --git a/docs/keybindings/Keybindings_zh-TW.md b/docs/keybindings/Keybindings_zh-TW.md index f25a18acc..a716e6cfd 100644 --- a/docs/keybindings/Keybindings_zh-TW.md +++ b/docs/keybindings/Keybindings_zh-TW.md @@ -119,7 +119,7 @@ _說明:`` 表示 Ctrl+B、`` 表示 Alt+B,`B`表示 Shift+B | Key | Action | Info | |-----|--------|-------------| | `` `` | 執行 | | -| `` `` | 關閉 | | +| `` `` | 關閉/取消 | | | `` / `` | 搜尋 | | ## 子提交 diff --git a/pkg/gui/controllers/menu_controller.go b/pkg/gui/controllers/menu_controller.go index 8baf9104e..25d919f54 100644 --- a/pkg/gui/controllers/menu_controller.go +++ b/pkg/gui/controllers/menu_controller.go @@ -47,7 +47,7 @@ func (self *MenuController) GetKeybindings(opts types.KeybindingsOpts) []*types. { Key: opts.GetKey(opts.Config.Universal.Return), Handler: self.close, - Description: self.c.Tr.Close, + Description: self.c.Tr.CloseCancel, DisplayOnScreen: true, }, }