From f5059ce55b0b29eb6a654f514eda5abf5e55e9d4 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Wed, 9 Jan 2019 02:27:59 +0530 Subject: [PATCH] macOS: Import sheet button should say 'Import' Signed-off-by: Roopesh Chander --- WireGuard/WireGuard/Base.lproj/Localizable.strings | 1 + WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/WireGuard/WireGuard/Base.lproj/Localizable.strings b/WireGuard/WireGuard/Base.lproj/Localizable.strings index 3cfe1fc..09c669e 100644 --- a/WireGuard/WireGuard/Base.lproj/Localizable.strings +++ b/WireGuard/WireGuard/Base.lproj/Localizable.strings @@ -243,6 +243,7 @@ "macDeleteTunnelConfirmationAlertButtonTitleCancel" = "Cancel"; "macButtonImportTunnels" = "Import tunnel(s) from file"; +"macSheetButtonImport" = "Import"; // Mac detail/edit view fields diff --git a/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift b/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift index b1ed2f5..03b1be7 100644 --- a/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift +++ b/WireGuard/WireGuard/UI/macOS/ImportPanelPresenter.swift @@ -7,6 +7,7 @@ class ImportPanelPresenter { static func presentImportPanel(tunnelsManager: TunnelsManager, sourceVC: NSViewController) { guard let window = sourceVC.view.window else { return } let openPanel = NSOpenPanel() + openPanel.prompt = tr("macSheetButtonImport") openPanel.allowedFileTypes = ["conf", "zip"] openPanel.beginSheetModal(for: window) { [weak tunnelsManager] response in guard let tunnelsManager = tunnelsManager else { return } -- 2.47.2