diff --git a/shadowsocks-csharp/Controller/I18N.cs b/shadowsocks-csharp/Controller/I18N.cs index 7102b79a..e1e46430 100755 --- a/shadowsocks-csharp/Controller/I18N.cs +++ b/shadowsocks-csharp/Controller/I18N.cs @@ -9,7 +9,6 @@ using System.Windows.Forms; namespace Shadowsocks.Controller { - public static class I18N { public const string I18N_FILE = "i18n.csv"; @@ -76,18 +75,8 @@ namespace Shadowsocks.Controller static I18N() { - string i18n; string locale = CultureInfo.CurrentCulture.Name; - if (!File.Exists(I18N_FILE)) - { - i18n = Resources.i18n_csv; - //File.WriteAllText(I18N_FILE, i18n, Encoding.UTF8); - } - else - { - Logging.Info("Using external translation"); - i18n = File.ReadAllText(I18N_FILE, Encoding.UTF8); - } + string i18n = File.ReadAllText(Utils.GetDataPath(I18N_FILE), Encoding.UTF8); Logging.Info("Current language is: " + locale); Init(i18n, locale); } diff --git a/shadowsocks-csharp/Properties/Resources.Designer.cs b/shadowsocks-csharp/Properties/Resources.Designer.cs index 289d5def..86f61dba 100644 --- a/shadowsocks-csharp/Properties/Resources.Designer.cs +++ b/shadowsocks-csharp/Properties/Resources.Designer.cs @@ -114,32 +114,6 @@ namespace Shadowsocks.Properties { } } - /// - /// 查找类似 en,zh-CN,zh-TW,ja - ///#Restart program to apply translation,,, - ///#This is comment line,,, - ///#Always keep language name at head of file,,, - ///#Language name is output in log,,, - ///"#You can find it by search ""Current language is:""",,, - ///#Please use UTF-8 with BOM encoding so we can edit it in Excel,,, - ///,,, - ///Shadowsocks,Shadowsocks,Shadowsocks,Shadowsocks - ///,,, - ///#Menu,,, - ///,,, - ///System Proxy,系统代理,系統代理,システムプロキシ - ///Disable,禁用,禁用,無効 - ///PAC,PAC 模式,PAC 模式,PAC - ///Global,全局模式,全局模式,全般 - ///Servers,服务器,伺服器,サーバー - ///Edit Servers...,编辑服务器...,編 [字符串的其余部分被截断]"; 的本地化字符串。 - /// - internal static string i18n_csv { - get { - return ResourceManager.GetString("i18n_csv", resourceCulture); - } - } - /// /// 查找 System.Byte[] 类型的本地化资源。 /// diff --git a/shadowsocks-csharp/Properties/Resources.resx b/shadowsocks-csharp/Properties/Resources.resx index a7ee91ff..fcf1c322 100755 --- a/shadowsocks-csharp/Properties/Resources.resx +++ b/shadowsocks-csharp/Properties/Resources.resx @@ -124,9 +124,6 @@ ..\Data\default-abp-rule.js;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - ..\Data\i18n.csv;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - ..\Data\libsscrypto.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/shadowsocks-csharp/View/MenuViewController.cs b/shadowsocks-csharp/View/MenuViewController.cs index 18d0e1b0..192c84b4 100644 --- a/shadowsocks-csharp/View/MenuViewController.cs +++ b/shadowsocks-csharp/View/MenuViewController.cs @@ -320,7 +320,7 @@ namespace Shadowsocks.View CreateMenuItem("Show Logs...", new EventHandler(this.ShowLogItem_Click)), this.VerboseLoggingToggleItem = CreateMenuItem( "Verbose Logging", new EventHandler(this.VerboseLoggingToggleItem_Click) ), this.ShowPluginOutputToggleItem = CreateMenuItem("Show Plugin Output", new EventHandler(this.ShowPluginOutputToggleItem_Click)), - this.WriteI18NFileItem = CreateMenuItem("Write translation template",new EventHandler(WriteI18NFileItem_Click)), + //this.WriteI18NFileItem = CreateMenuItem("Write translation template",new EventHandler(WriteI18NFileItem_Click)), CreateMenuGroup("Updates...", new MenuItem[] { CreateMenuItem("Check for Updates...", new EventHandler(this.checkUpdatesItem_Click)), new MenuItem("-"), @@ -717,11 +717,6 @@ namespace Shadowsocks.View controller.ToggleShowPluginOutput(ShowPluginOutputToggleItem.Checked); } - private void WriteI18NFileItem_Click(object sender, EventArgs e) - { - File.WriteAllText(I18N.I18N_FILE, Resources.i18n_csv, Encoding.UTF8); - } - private void StatisticsConfigItem_Click(object sender, EventArgs e) { StatisticsStrategyConfigurationForm form = new StatisticsStrategyConfigurationForm(controller);