diff --git a/Netch/Controllers/MainController.cs b/Netch/Controllers/MainController.cs index ef685f8e..7faf0d15 100644 --- a/Netch/Controllers/MainController.cs +++ b/Netch/Controllers/MainController.cs @@ -115,7 +115,7 @@ namespace Netch.Controllers PortCheckAndShowMessageBox(Global.Settings.Socks5LocalPort, "Socks5"); - Global.MainForm.StatusText(i18N.Translate("Starting ", ServerController.Name)); + Global.MainForm.StatusText(i18N.TranslateFormat("Starting {0}", ServerController.Name)); if (await Task.Run(() => ServerController.Start(server, mode))) { UsingPorts.Add(StatusPortInfoText.Socks5Port = Global.Settings.Socks5LocalPort); @@ -151,7 +151,7 @@ namespace Netch.Controllers return false; } - Global.MainForm.StatusText(i18N.Translate("Starting ", ModeController.Name)); + Global.MainForm.StatusText(i18N.TranslateFormat("Starting {0}", ModeController.Name)); if (await Task.Run(() => ModeController.Start(server, mode))) { switch (mode.Type) diff --git a/Netch/Forms/MainForm.cs b/Netch/Forms/MainForm.cs index 7ec407ef..28b385b4 100644 --- a/Netch/Forms/MainForm.cs +++ b/Netch/Forms/MainForm.cs @@ -175,6 +175,7 @@ namespace Netch.Forms { i18N.Load(Global.Settings.Language); InitText(); + InitMode(); InitProfile(); } diff --git a/Netch/Forms/SubscribeForm.cs b/Netch/Forms/SubscribeForm.cs index ae41f96b..7372be28 100644 --- a/Netch/Forms/SubscribeForm.cs +++ b/Netch/Forms/SubscribeForm.cs @@ -105,7 +105,7 @@ namespace Netch.Forms if (!LinkTextBox.Text.StartsWith("HTTP://", StringComparison.OrdinalIgnoreCase) && !LinkTextBox.Text.StartsWith("HTTPS://", StringComparison.OrdinalIgnoreCase)) { - MessageBoxX.Show(i18N.Translate("Links must start with http:// or https://")); + MessageBoxX.Show(i18N.Translate("Link must start with http:// or https://")); return; } diff --git a/Netch/Models/Mode.cs b/Netch/Models/Mode.cs index bf0b6ef8..776fb00a 100644 --- a/Netch/Models/Mode.cs +++ b/Netch/Models/Mode.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using Netch.Utils; namespace Netch.Models { @@ -47,7 +48,7 @@ namespace Netch.Models /// 备注 public override string ToString() { - return $"[{Type + 1}] {Remark}"; + return $"[{Type + 1}] {i18N.Translate(Remark)}"; } /// diff --git a/Netch/Resources/zh-CN b/Netch/Resources/zh-CN index 8ebd9303..2a848bc3 100644 --- a/Netch/Resources/zh-CN +++ b/Netch/Resources/zh-CN @@ -15,14 +15,8 @@ "Started": "已启动", "Stopping": "正在停止中", "Stopped": "已停止", - "Starting ": "正在启动 ", - "Starting Tap": "正在启动 TUN/TAP", + "Starting {0}": "正在启动 {0}", "Starting NatTester": "正在启动 NAT 测试", - "Starting LocalDns service": "正在启动本地 DNS 服务", - "Starting Redirector": "正在启动 Redirector", - "Restarting Redirector": "正常启动失败,正在尝试重新启动 Redirector", - "Starting netfilter2 Service": "正在启动 netfilter2 服务", - "Starting dns Service": "正在启动 DNS 服务", "SetupBypass": "设置绕行规则", "Test failed": "测试失败", "Starting update subscription": "正在更新订阅", @@ -116,8 +110,6 @@ "Remark": "备注", "Filename": "文件名", "Use Custom Filename": "使用自定义文件名", - "Stay the same": "保持一致", - "Time data": "时间数据", "Add": "添加", "Scan": "扫描", "Save": "保存", diff --git a/Netch/Utils/ModeHelper.cs b/Netch/Utils/ModeHelper.cs index ced75064..0dd10b24 100644 --- a/Netch/Utils/ModeHelper.cs +++ b/Netch/Utils/ModeHelper.cs @@ -69,7 +69,7 @@ namespace Netch.Utils { string tmp; if ((tmp = splited.ElementAtOrDefault(0)) != null) - mode.Remark = i18N.Translate(tmp); + mode.Remark = tmp; tmp = splited.ElementAtOrDefault(1); mode.Type = tmp != null ? int.Parse(tmp) : 0;