@@ -24,12 +24,15 @@ Proxy Port=代理端口 | |||||
Remarks=备注 | Remarks=备注 | ||||
OK=确定 | OK=确定 | ||||
Cancel=取消 | Cancel=取消 | ||||
New server=新服务器 | |||||
New server=未配置的服务器 | |||||
QRCode=二维码 | QRCode=二维码 | ||||
Shadowsocks Error: {0}=Shadowsocks 错误: {0} | Shadowsocks Error: {0}=Shadowsocks 错误: {0} | ||||
Port is already used=端口已被占用 | Port is already used=端口已被占用 | ||||
Illegal port number format=非法端口格式 | Illegal port number format=非法端口格式 | ||||
Please add at least one server=请添加至少一个服务器 | Please add at least one server=请添加至少一个服务器 | ||||
Server IP can not be blank=服务器 IP 不能为空 | |||||
Password can not be blank=密码不能为空 | |||||
Port out of range=端口超出范围 | |||||
Shadowsocks {0} Update Found=Shadowsocks {0} 更新 | Shadowsocks {0} Update Found=Shadowsocks {0} 更新 | ||||
Click here to download=点击这里下载 | Click here to download=点击这里下载 | ||||
Shadowsocks is here=Shadowsocks 在这里 | Shadowsocks is here=Shadowsocks 在这里 | ||||
@@ -1,4 +1,5 @@ | |||||
using System; | |||||
using Shadowsocks.Controller; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.IO; | using System.IO; | ||||
using System.Text; | using System.Text; | ||||
@@ -109,7 +110,7 @@ namespace Shadowsocks.Model | |||||
{ | { | ||||
if (!condition) | if (!condition) | ||||
{ | { | ||||
throw new Exception("assertion failure"); | |||||
throw new Exception(I18N.GetString("assertion failure")); | |||||
} | } | ||||
} | } | ||||
@@ -117,7 +118,7 @@ namespace Shadowsocks.Model | |||||
{ | { | ||||
if (port <= 0 || port > 65535) | if (port <= 0 || port > 65535) | ||||
{ | { | ||||
throw new ArgumentException("port out of range"); | |||||
throw new ArgumentException(I18N.GetString("Port out of range")); | |||||
} | } | ||||
} | } | ||||
@@ -125,7 +126,7 @@ namespace Shadowsocks.Model | |||||
{ | { | ||||
if (string.IsNullOrEmpty(password)) | if (string.IsNullOrEmpty(password)) | ||||
{ | { | ||||
throw new ArgumentException("password can not be blank"); | |||||
throw new ArgumentException(I18N.GetString("Password can not be blank")); | |||||
} | } | ||||
} | } | ||||
@@ -133,7 +134,7 @@ namespace Shadowsocks.Model | |||||
{ | { | ||||
if (string.IsNullOrEmpty(server)) | if (string.IsNullOrEmpty(server)) | ||||
{ | { | ||||
throw new ArgumentException("server IP can not be blank"); | |||||
throw new ArgumentException(I18N.GetString("Server IP can not be blank")); | |||||
} | } | ||||
} | } | ||||
@@ -4,6 +4,7 @@ using System.Text; | |||||
using System.IO; | using System.IO; | ||||
using System.Diagnostics; | using System.Diagnostics; | ||||
using SimpleJson; | using SimpleJson; | ||||
using Shadowsocks.Controller; | |||||
namespace Shadowsocks.Model | namespace Shadowsocks.Model | ||||
{ | { | ||||
@@ -21,6 +22,10 @@ namespace Shadowsocks.Model | |||||
{ | { | ||||
get | get | ||||
{ | { | ||||
if (string.IsNullOrEmpty(server)) | |||||
{ | |||||
return I18N.GetString("New server"); | |||||
} | |||||
return string.IsNullOrEmpty(remarks) ? server + ":" + server_port : server + ":" + server_port + " (" + remarks + ")"; | return string.IsNullOrEmpty(remarks) ? server + ":" + server_port : server + ":" + server_port + " (" + remarks + ")"; | ||||
} | } | ||||
} | } | ||||
@@ -119,7 +119,7 @@ namespace Shadowsocks.View | |||||
ServersListBox.Items.Clear(); | ServersListBox.Items.Clear(); | ||||
foreach (Server server in _modifiedConfiguration.configs) | foreach (Server server in _modifiedConfiguration.configs) | ||||
{ | { | ||||
ServersListBox.Items.Add(string.IsNullOrEmpty(server.server) ? I18N.GetString("New server") : server.FriendlyName); | |||||
ServersListBox.Items.Add(server.FriendlyName); | |||||
} | } | ||||
} | } | ||||