Merge branch 'fix/ssh-in-menu-bar' into integration/polish

This commit is contained in:
l0ng-ai
2026-08-08 04:50:37 +08:00
5 changed files with 14 additions and 7 deletions
-1
View File
@@ -1304,7 +1304,6 @@ pub fn translate_en(key: L10nKey) -> &'static str {
L10nKey::AppMenuFocusPreviousPane => "Focus Previous Pane",
L10nKey::AppMenuZoomPane => "Zoom Pane",
L10nKey::AppMenuClearScrollback => "Clear Scrollback",
L10nKey::AppMenuEnterFullscreen => "Enter Full Screen",
L10nKey::AppMenuDocumentation => "tty7 Documentation",
L10nKey::AppMenuKeyboardShortcuts => "Keyboard Shortcuts",
L10nKey::AppMenuJoinDiscord => "Join the Discord",
-1
View File
@@ -1344,7 +1344,6 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> {
L10nKey::AppMenuFocusPreviousPane => "前のペインにフォーカス",
L10nKey::AppMenuZoomPane => "ペインを拡大",
L10nKey::AppMenuClearScrollback => "スクロールバックをクリア",
L10nKey::AppMenuEnterFullscreen => "全画面表示",
L10nKey::AppMenuDocumentation => "tty7 ドキュメント",
L10nKey::AppMenuKeyboardShortcuts => "キーボードショートカット",
L10nKey::AppMenuJoinDiscord => "Discord に参加",
-2
View File
@@ -769,7 +769,6 @@ l10n_keys! {
AppMenuFocusPreviousPane,
AppMenuZoomPane,
AppMenuClearScrollback,
AppMenuEnterFullscreen,
AppMenuDocumentation,
AppMenuKeyboardShortcuts,
AppMenuJoinDiscord,
@@ -1638,7 +1637,6 @@ mod tests {
L10nKey::AppMenuFocusPreviousPane,
L10nKey::AppMenuZoomPane,
L10nKey::AppMenuClearScrollback,
L10nKey::AppMenuEnterFullscreen,
L10nKey::AppMenuDocumentation,
L10nKey::AppMenuKeyboardShortcuts,
L10nKey::AppMenuJoinDiscord,
-1
View File
@@ -1236,7 +1236,6 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> {
L10nKey::AppMenuFocusPreviousPane => "聚焦上一个窗格",
L10nKey::AppMenuZoomPane => "缩放窗格",
L10nKey::AppMenuClearScrollback => "清除 scrollback",
L10nKey::AppMenuEnterFullscreen => "进入全屏",
L10nKey::AppMenuDocumentation => "tty7 文档",
L10nKey::AppMenuKeyboardShortcuts => "键盘快捷键",
L10nKey::AppMenuJoinDiscord => "加入 Discord",
+14 -2
View File
@@ -40,6 +40,13 @@ pub(crate) fn set_menus(cx: &mut App) {
MenuItem::action(t(L10nKey::AppMenuNewWorkspace), NewWorkspace),
MenuItem::action(t(L10nKey::AppMenuNewWorktreeTab), NewWorktreeTab),
MenuItem::separator(),
// SSH is one of the reasons to pick tty7 and it had no entry in the
// menu bar at all — the only routes were ⌘P and Settings, both of
// which you have to already know about. Same labels as the palette,
// so there is still one name per thing.
MenuItem::action(t(L10nKey::CmdSshManageProfiles), OpenSshProfiles),
MenuItem::action(t(L10nKey::CmdSshReconnect), RestartSshSession),
MenuItem::separator(),
MenuItem::action(t(L10nKey::AppMenuSplitRight), SplitRight),
MenuItem::action(t(L10nKey::AppMenuSplitDown), SplitDown),
MenuItem::separator(),
@@ -86,13 +93,18 @@ pub(crate) fn set_menus(cx: &mut App) {
MenuItem::action(t(L10nKey::AppMenuCodePanel), ToggleCodePanel),
MenuItem::action(t(L10nKey::AppMenuTabBarPosition), ToggleTabSidebar),
MenuItem::separator(),
MenuItem::action(t(L10nKey::CmdSshRemoteFiles), ToggleSftp),
MenuItem::action(t(L10nKey::CmdSshPortForwarding), ShowSshForwards),
MenuItem::separator(),
MenuItem::action(t(L10nKey::AppMenuFocusNextPane), FocusNextPane),
MenuItem::action(t(L10nKey::AppMenuFocusPreviousPane), FocusPrevPane),
MenuItem::action(t(L10nKey::AppMenuZoomPane), ToggleMaximizePane),
MenuItem::separator(),
MenuItem::action(t(L10nKey::AppMenuClearScrollback), ClearScrollback),
MenuItem::separator(),
MenuItem::action(t(L10nKey::AppMenuEnterFullscreen), ToggleFullscreen),
// No "Enter Full Screen" here: AppKit puts its own at the bottom of
// any menu named View, so ours sat directly above it — the same
// command twice, under two different shortcuts. ⌘↵ still works and
// is listed on the Keybindings page.
]),
Menu::new(t(L10nKey::AppMenuWindow)).items(window_menu_items(cx)),
Menu::new(t(L10nKey::AppMenuHelp)).items([