From 913e1cc0bc0c8c29671d3f6532a4b7446536ff72 Mon Sep 17 00:00:00 2001 From: Nobel Date: Thu, 12 Jan 2017 14:55:06 +0800 Subject: [PATCH] Add Commend Export --- ShadowsocksX-NG/HTTPPreferencesWindowController.swift | 2 +- .../zh-Hans.lproj/HTTPPreferencesWindowController.strings | 3 +++ ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ShadowsocksX-NG/HTTPPreferencesWindowController.swift b/ShadowsocksX-NG/HTTPPreferencesWindowController.swift index 318e902..29a8a75 100644 --- a/ShadowsocksX-NG/HTTPPreferencesWindowController.swift +++ b/ShadowsocksX-NG/HTTPPreferencesWindowController.swift @@ -28,7 +28,7 @@ class HTTPPreferencesWindowController: NSWindowController, NSWindowDelegate { } @IBAction func copyExportCommand(_ sender: Any) { - let command = "export http_proxy=http://\(address.stringValue):\(port.stringValue)" + let command = "export http_proxy=http://\(address.stringValue):\(port.stringValue);export https_proxy=http://\(address.stringValue):\(port.stringValue);" NSPasteboard.general().clearContents() NSPasteboard.general().setString(command, forType: NSStringPboardType) let notification = NSUserNotification() diff --git a/ShadowsocksX-NG/zh-Hans.lproj/HTTPPreferencesWindowController.strings b/ShadowsocksX-NG/zh-Hans.lproj/HTTPPreferencesWindowController.strings index 7604bc2..cc82ba2 100644 --- a/ShadowsocksX-NG/zh-Hans.lproj/HTTPPreferencesWindowController.strings +++ b/ShadowsocksX-NG/zh-Hans.lproj/HTTPPreferencesWindowController.strings @@ -13,3 +13,6 @@ /* Class = "NSButtonCell"; title = "Follow Global Mode"; ObjectID = "ofk-Pc-c8f"; */ "ofk-Pc-c8f.title" = "跟随全局模式"; + +/* Class = "NSButton"; title = "Copy Shell Export Command"; ObjectID = "ySG-BC-5r0"; */ +"ySG-BC-5r0.title" = "复制终端 Export 命令"; diff --git a/ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings b/ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings index 10b0b4c..c439ec3 100755 --- a/ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings +++ b/ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings @@ -59,3 +59,9 @@ "Manual" = "手动"; "Show Running Mode On Status Bar" = "在状态栏显示运行模式"; + +/* + * ./HTTPPreferencesWindowController.swift + */ + +"Export Command Copied." = "Export 命令已复制至剪贴板";