From bfc39d81799c49d9b6f64413c7bc38165d9869dd Mon Sep 17 00:00:00 2001 From: Charlie Qiu Date: Sun, 2 Oct 2016 01:45:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B6=E7=BA=A7=E8=8F=9C=E5=8D=95=E4=B8=AD?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=90=8D=E5=89=8D=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E6=96=87=E5=AD=97:=E6=9C=8D=E5=8A=A1=E5=99=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ShadowsocksX-NG/AppDelegate.swift | 6 ++++-- ShadowsocksX-NG/Base.lproj/Localizable.strings | 2 ++ ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ShadowsocksX-NG/AppDelegate.swift b/ShadowsocksX-NG/AppDelegate.swift index a0fae32..a2c91d5 100644 --- a/ShadowsocksX-NG/AppDelegate.swift +++ b/ShadowsocksX-NG/AppDelegate.swift @@ -347,11 +347,13 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele for v in defaults.array(forKey: "ServerProfiles")! { let profile = v as! [String:Any] if profile["Id"] as! String == defaults.string(forKey: "ActiveServerProfileId")! { + var profileName :String if profile["Remark"] as! String != "" { - serverMenuText = profile["Remark"] as! String + profileName = profile["Remark"] as! String } else { - serverMenuText = profile["ServerHost"] as! String + profileName = profile["ServerHost"] as! String } + serverMenuText = "\(serverMenuText) - \(profileName)" } } serversMenuItem.title = serverMenuText diff --git a/ShadowsocksX-NG/Base.lproj/Localizable.strings b/ShadowsocksX-NG/Base.lproj/Localizable.strings index 4ca70bf..93b7def 100644 --- a/ShadowsocksX-NG/Base.lproj/Localizable.strings +++ b/ShadowsocksX-NG/Base.lproj/Localizable.strings @@ -45,3 +45,5 @@ "Proxy - Global" = "Proxy - Global"; "Proxy - Manual" = "Proxy - Manual"; + +"Servers" = "Servers"; diff --git a/ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings b/ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings index 47d528d..a56892c 100644 --- a/ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings +++ b/ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings @@ -50,3 +50,4 @@ "Proxy - Manual" = "代理 - 手动"; +"Servers" = "服务器";