From 3a1208836ca2dfac0010aef7c5aff9b75197e75e Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Fri, 10 May 2019 01:00:10 +0530 Subject: [PATCH] macOS: Some menu item titles are automatically inferred --- WireGuard/WireGuard/Base.lproj/Localizable.strings | 3 --- WireGuard/WireGuard/UI/macOS/MainMenu.swift | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/WireGuard/WireGuard/Base.lproj/Localizable.strings b/WireGuard/WireGuard/Base.lproj/Localizable.strings index 58c472a..fead210 100644 --- a/WireGuard/WireGuard/Base.lproj/Localizable.strings +++ b/WireGuard/WireGuard/Base.lproj/Localizable.strings @@ -314,8 +314,6 @@ "macMenuCloseWindow" = "Close Window"; "macMenuEdit" = "Edit"; -"macMenuUndo" = "Undo"; -"macMenuRedo" = "Redo"; "macMenuCut" = "Cut"; "macMenuCopy" = "Copy"; "macMenuPaste" = "Paste"; @@ -329,7 +327,6 @@ "macMenuWindow" = "Window"; "macMenuMinimize" = "Minimize"; "macMenuZoom" = "Zoom"; -"macMenuFullScreen" = "Full Screen"; // Mac manage tunnels window diff --git a/WireGuard/WireGuard/UI/macOS/MainMenu.swift b/WireGuard/WireGuard/UI/macOS/MainMenu.swift index 3c2e89f..27b674d 100644 --- a/WireGuard/WireGuard/UI/macOS/MainMenu.swift +++ b/WireGuard/WireGuard/UI/macOS/MainMenu.swift @@ -80,8 +80,8 @@ class MainMenu: NSMenu { private func createEditMenu() -> NSMenu { let menu = NSMenu(title: tr("macMenuEdit")) - menu.addItem(withTitle: tr("macMenuUndo"), action: #selector(UndoActionRespondable.undo(_:)), keyEquivalent:"z") - menu.addItem(withTitle: tr("macMenuRedo"), action: #selector(UndoActionRespondable.redo(_:)), keyEquivalent:"Z") + menu.addItem(withTitle: "", action: #selector(UndoActionRespondable.undo(_:)), keyEquivalent:"z") + menu.addItem(withTitle: "", action: #selector(UndoActionRespondable.redo(_:)), keyEquivalent:"Z") menu.addItem(NSMenuItem.separator()) @@ -117,7 +117,7 @@ class MainMenu: NSMenu { menu.addItem(NSMenuItem.separator()) - let fullScreenMenuItem = menu.addItem(withTitle: tr("macMenuFullScreen"), action: #selector(NSWindow.toggleFullScreen(_:)), keyEquivalent:"f") + let fullScreenMenuItem = menu.addItem(withTitle: "", action: #selector(NSWindow.toggleFullScreen(_:)), keyEquivalent:"f") fullScreenMenuItem.keyEquivalentModifierMask = [.command, .control] return menu