Browse Source

调整文案及翻译

Qiu Yuzhou 5 years ago
parent
commit
56c0ef68ae

+ 1 - 2
ShadowsocksX-NG.xcodeproj/project.pbxproj

@@ -169,7 +169,7 @@
 		9B16E5991F99FD0700E54DC5 /* icons8-Blind Filled-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icons8-Blind Filled-50.png"; sourceTree = "<group>"; };
 		9B172A601D0ADA5B00B87B9A /* genstrings.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = genstrings.py; sourceTree = "<group>"; };
 		9B172A6B1D0ADDDD00B87B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
-		9B172A6D1D0ADDE800B87B9A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		9B172A6D1D0ADDE800B87B9A /* zh-Hans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
 		9B2080482326AC460075386C /* kcptun.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = kcptun.sh; sourceTree = "<group>"; };
 		9B2080492326AC460075386C /* client */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = client; sourceTree = "<group>"; };
 		9B2491B51D0ACC3A003BBECC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/PreferencesWindowController.xib; sourceTree = "<group>"; };
@@ -610,7 +610,6 @@
 			developmentRegion = English;
 			hasScannedForEncodings = 0;
 			knownRegions = (
-				English,
 				en,
 				Base,
 				"zh-Hans",

+ 18 - 14
ShadowsocksX-NG/AppDelegate.swift

@@ -404,7 +404,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
     
     @IBAction func exportDiagnosis(_ sender: NSMenuItem) {
         let savePanel = NSSavePanel()
-        savePanel.title = "Save All Server URLs To File".localized
+        savePanel.title = "Save Diagnosis to File".localized
         savePanel.canCreateDirectories = true
         savePanel.allowedFileTypes = ["txt"]
         savePanel.isExtensionHidden = false
@@ -438,7 +438,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
         let defaults = UserDefaults.standard
         let mode = defaults.string(forKey: "ShadowsocksRunningMode")
         
-        var serverMenuText = "Servers".localized
+        var serverMenuText = "Servers - (No Selected)".localized
 
         let mgr = ServerProfileManager.instance
         for p in mgr.profiles {
@@ -449,7 +449,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
                 } else {
                     profileName = p.serverHost
                 }
-                serverMenuText = "\(serverMenuText) - \(profileName)"
+                serverMenuText = "Servers".localized + " - \(profileName)"
+                break
             }
         }
         serversMenuItem.title = serverMenuText
@@ -581,22 +582,25 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
             let urls: [URL] = userInfo["urls"] as! [URL]
             
             let mgr = ServerProfileManager.instance
-            
-            var subtitle: String = ""
-            if userInfo["source"] as! String == "qrcode" {
-                subtitle = "By scan QR Code".localized
-            } else if userInfo["source"] as! String == "url" {
-                subtitle = "By handle SS URL".localized
-            } else if userInfo["source"] as! String == "pasteboard" {
-                subtitle = "By import from pasteboard".localized
-            }
-            
             let addCount = mgr.addServerProfileByURL(urls: urls)
             
             if addCount > 0 {
+                var subtitle: String = ""
+                if userInfo["source"] as! String == "qrcode" {
+                    subtitle = "By scan QR Code".localized
+                } else if userInfo["source"] as! String == "url" {
+                    subtitle = "By handle SS URL".localized
+                } else if userInfo["source"] as! String == "pasteboard" {
+                    subtitle = "By import from pasteboard".localized
+                }
+                
                 sendNotify("Add \(addCount) Shadowsocks Server Profile".localized, subtitle, "")
             } else {
-                sendNotify("", "", "Not found valid qrcode or url of shadowsocks profile".localized)
+                if userInfo["source"] as! String == "qrcode" {
+                    sendNotify("", "", "Not found valid QRCode of shadowsocks profile".localized)
+                } else if userInfo["source"] as! String == "url" {
+                    sendNotify("", "", "Not found valid URL of shadowsocks profile".localized)
+                }
             }
         }
     }

+ 50 - 27
ShadowsocksX-NG/Base.lproj/Localizable.strings

@@ -1,61 +1,84 @@
+
+
+
+
+
+
 /*
  * SHARED STRINGS
  */
 
 /*
- * ./PACUtils.swift
+ * ./ShadowsocksX-NG/UserRulesController.swift
  */
 
-"PAC has been updated by latest GFW List." = "PAC has been updated by latest GFW List.";
+"PAC has been updated by User Rules." = "PAC has been updated by User Rules.";
 
-"Failed to download latest GFW List." = "Failed to download latest GFW List.";
+"It's failed to update PAC by User Rules." = "It's failed to update PAC by User Rules.";
 
 /*
- * ./PreferencesWindowController.swift
+ * ./ShadowsocksX-NG/AppDelegate.swift
  */
 
-"New Server" = "New Server";
+"Global Mode" = "Global Mode";
 
-/*
- * ./AppDelegate.swift
- */
+"Manual Mode" = "Manual Mode";
 
-"Add \(addCount) Shadowsocks Server Profile" = "Add \(addCount) Shadowsocks Server Profile";
+"Auto Mode By PAC" = "Auto Mode By PAC";
+
+"Shadowsocks: On" = "Shadowsocks: On";
+
+"Shadowsocks: Off" = "Shadowsocks: Off";
+
+"Export Command Copied." = "Export Command Copied.";
+
+"Save Diagnosis to File" = "Save Diagnosis to File";
+
+"Servers" = "Servers";
 
-"Not found valid qrcode or url of shadowsocks profile" = "Not found valid qrcode or url of shadowsocks profile";
+"Turn Shadowsocks Off" = "Turn Shadowsocks Off";
+
+"Turn Shadowsocks On" = "Turn Shadowsocks On";
 
 "By scan QR Code" = "By scan QR Code";
 
-"By Handle SS URL" = "By Handle SS URL";
+"By handle SS URL" = "By handle SS URL";
 
-" Encryption Method: \(profile.method)" = " Encryption Method: \(profile.method)";
+"By import from pasteboard" = "By import from pasteboard";
 
-"Current server profile is not valid." = "Current server profile is not valid.";
+"Add \(addCount) Shadowsocks Server Profile" = "Add \(addCount) Shadowsocks Server Profile";
 
-"No current server profile." = "No current server profile.";
+"Not found valid QRCode of shadowsocks profile" = "Not found valid QRCode of shadowsocks profile";
 
-"Shadowsocks: On" = "Shadowsocks: On";
+"Not found valid URL of shadowsocks profile" = "Not found valid URL of shadowsocks profile";
 
-"Turn Shadowsocks Off" = "Turn Shadowsocks Off";
+/*
+ * ./ShadowsocksX-NG/ShareServerProfilesWindowController.swift
+ */
 
-"Shadowsocks: Off" = "Shadowsocks: Off";
+"Save QRCode As File" = "Save QRCode As File";
 
-"Turn Shadowsocks On" = "Turn Shadowsocks On";
+"Save All Server URLs To File" = "Save All Server URLs To File";
 
-"Proxy - Auto By PAC" = "Proxy - Auto By PAC";
+/*
+ * ./ShadowsocksX-NG/PACUtils.swift
+ */
 
-"Proxy - Global" = "Proxy - Global";
+"PAC has been updated by latest GFW List." = "PAC has been updated by latest GFW List.";
 
-"Proxy - Manual" = "Proxy - Manual";
+"Failed to download latest GFW List." = "Failed to download latest GFW List.";
 
-"Servers" = "Servers";
+/*
+ * ./ShadowsocksX-NG/ImportWindowController.swift
+ */
 
-"Auto" = "PAC";
+"Success to add \(addCount) server." = "Success to add \(addCount) server.";
 
-"Global" = "Global";
+"Not found valid shadowsocks server urls." = "Not found valid shadowsocks server urls.";
 
-"Manual" = "Manual";
+/*
+ * ./ShadowsocksX-NG/PreferencesWindowController.swift
+ */
 
-"Show Running Mode On Status Bar" = "Show Running Mode On Status Bar";
+"New Server" = "New Server";
 
-"Timeout" = "Timeout";

+ 1 - 1
ShadowsocksX-NG/ShareServerProfilesWindowController.swift

@@ -72,7 +72,7 @@ class ShareServerProfilesWindowController: NSWindowController
     @IBAction func saveQRCodeAsFile(_ sender: NSButton) {
         if let img = qrCodeImageView.image {
             let savePanel = NSSavePanel()
-            savePanel.title = "Save All Server URLs To File".localized
+            savePanel.title = "Save QRCode As File".localized
             savePanel.canCreateDirectories = true
             savePanel.allowedFileTypes = ["gif"]
             savePanel.isExtensionHidden = false

+ 5 - 1
ShadowsocksX-NG/Utils.swift

@@ -10,7 +10,11 @@ import Foundation
 
 extension String {
     var localized: String {
-        return NSLocalizedString(self, tableName: nil, bundle: Bundle.main, value: "", comment: "")
+        return NSLocalizedString(self, tableName: "Localizable", comment: "")
+    }
+    
+    func localized(withComment:String) -> String {
+        return NSLocalizedString(self, tableName: "Localizable", comment: withComment)
     }
 }
 

+ 38 - 24
ShadowsocksX-NG/zh-Hans.lproj/Localizable.strings

@@ -2,8 +2,6 @@
 
 
 
-
-
 /*
  * SHARED STRINGS
  */
@@ -14,29 +12,27 @@
 
 "PAC has been updated by latest GFW List." = "已经使用最新的 GFW List 更新PAC";
 
-"Failed to download latest GFW List." = "下载 GFW List 失败";
-
-/*
- * ./PreferencesWindowController.swift
- */
+"It's failed to update PAC by User Rules." = "更新 PAC 失败";
 
-"New Server" = "新服务器";
+"Failed to download latest GFW List." = "下载最新的 GFW 列表失败";
 
 /*
  * ./AppDelegate.swift
  */
 
-"Add \(addCount) Shadowsocks Server Profile" = "已添加\(addCount)个Shadowsocks服务器配置";
+"Save Diagnosis to File" = "保存诊断信息到文件";
 
-"Not found valid qrcode or url of shadowsocks profile" = "没有找到有效的shadowsocks配置二维码或链接";
+"Global Mode" = "全局模式";
 
-"By scan QR Code" = "通过扫描二维码";
+"Manual Mode" = "手动模式";
 
-" Encription Method: \(profile.method)" = " 加密方法: \(profile.method)";
+"Auto Mode By PAC" = "PAC自动模式";
 
-"Current server profile is not valid." = "当前服务器配置无效";
+"Add \(addCount) Shadowsocks Server Profile" = "已添加\(addCount)个Shadowsocks服务器配置";
+
+"Not found valid qrcode or url of shadowsocks profile" = "没有找到有效的shadowsocks配置二维码或链接";
 
-"No current server profile." = "未设置当前服务器配置";
+"By scan QR Code" = "通过扫描二维码";
 
 "Shadowsocks: On" = "Shadowsocks: On";
 
@@ -46,21 +42,15 @@
 
 "Turn Shadowsocks On" = "打开 Shadowsocks";
 
-"Proxy - Auto By PAC" = "代理 - PAC自动(⌃⌘P)";
-
-"Proxy - Global" = "代理 - 全局(⌃⌘P)";
-
-"Proxy - Manual" = "代理 - 手动";
-
 "Servers" = "服务器";
 
-"Auto" = "自动";
+"Servers - (No Selected)" = "服务器 - (未选择)";
 
-"Global" = "全局";
+"Add \(addCount) Shadowsocks Server Profile" = "新增 \(addCount) 个 Shadowsocks 服务器配置";
 
-"Manual" = "手动";
+"Not found valid QRCode of shadowsocks profile" = "未找到有效的 shadowsocks 二维码";
 
-"Show Running Mode On Status Bar" = "在状态栏显示运行模式";
+"Not found valid URL of shadowsocks profile" = "未找到有效的 shadowsocks 链接";
 
 /*
  * ./HTTPPreferencesWindowController.swift
@@ -69,3 +59,27 @@
 "Export Command Copied." = "Export 命令已复制至剪贴板";
 
 "Timeout" = "超时";
+
+/*
+ * ./ShadowsocksX-NG/ShareServerProfilesWindowController.swift
+ */
+
+"Save All Server URLs To File" = "保存所有服务器 URL 到文件";
+
+"Save QRCode As File" = "保存 QRCode 为文件";
+
+/*
+ * ./ShadowsocksX-NG/ImportWindowController.swift
+ */
+
+"Success to add \(addCount) server." = "成功添加 \(addCount) 个服务器";
+
+"Not found valid shadowsocks server urls." = "未找到有效的shadowsocks服务器URL";
+
+/*
+ * ./ShadowsocksX-NG/PreferencesWindowController.swift
+ */
+
+"New Server" = "新建服务器";
+
+

+ 1 - 1
ShadowsocksX-NG/zh-Hans.lproj/MainMenu.strings

@@ -114,4 +114,4 @@
 "eNh-vY-utd.title" = "导出诊断信息...";
 
 /* Class = "NSMenuItem"; title = "Import Server URLs..."; ObjectID = "geG-dQ-OYl"; */
-"geG-dQ-OYl.title" = "导入服务器URLs...";
+"geG-dQ-OYl.title" = "导入服务器URL...";