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" = "服务器";