From 7610dc94d401233142a849f1c5c1b6ce5ae5da3c Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Sun, 17 Mar 2019 20:19:25 +0530 Subject: [PATCH] macOS: Localize tooltips --- WireGuard/WireGuard/Base.lproj/Localizable.strings | 5 +++++ .../ViewController/TunnelDetailTableViewController.swift | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/WireGuard/WireGuard/Base.lproj/Localizable.strings b/WireGuard/WireGuard/Base.lproj/Localizable.strings index b42d40f..e9658d2 100644 --- a/WireGuard/WireGuard/Base.lproj/Localizable.strings +++ b/WireGuard/WireGuard/Base.lproj/Localizable.strings @@ -352,3 +352,8 @@ "macAppExitingWithActiveTunnelInfo" = "The tunnel will remain active after exiting. You may disable it by reopening this application or through the Network panel in System Preferences."; "macPrivacyNoticeMessage" = "Privacy notice: be sure you trust this configuration file"; "macPrivacyNoticeInfo" = "You will be prompted by the system to allow or disallow adding a VPN configuration. While this application does not send any information to the WireGuard project, information is by design sent to the servers specified inside of the configuration file you have just added, which configures your computer to use those servers as a VPN. Be certain that you trust this configuration before clicking “Allow” in the following dialog."; + +// Mac tooltip + +"macToolTipEditTunnel" = "Edit tunnel (⌘E)"; +"macToolTipToggleStatus" = "Toggle status (⌘T)"; diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift index 9d77542..ec8850a 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift @@ -56,7 +56,7 @@ class TunnelDetailTableViewController: NSViewController { button.title = tr("Edit") button.setButtonType(.momentaryPushIn) button.bezelStyle = .rounded - button.toolTip = "Edit tunnel (⌘E)" + button.toolTip = tr("macToolTipEditTunnel") return button }() @@ -406,7 +406,7 @@ extension TunnelDetailTableViewController: NSTableViewDelegate { let cell: ButtonRow = tableView.dequeueReusableCell() cell.buttonTitle = TunnelDetailTableViewController.localizedToggleStatusActionText(forStatus: tunnel.status) cell.isButtonEnabled = (tunnel.status == .active || tunnel.status == .inactive) - cell.buttonToolTip = "Toggle status (⌘T)" + cell.buttonToolTip = tr("macToolTipToggleStatus") cell.onButtonClicked = { [weak self] in self?.handleToggleActiveStatusAction() }