update texts

This commit is contained in:
clowwindy
2014-12-20 18:19:43 +08:00
parent eaaacd398d
commit e943247150
4 changed files with 16 additions and 7 deletions
+4 -1
View File
@@ -24,12 +24,15 @@ Proxy Port=代理端口
Remarks=备注
OK=确定
Cancel=取消
New server=新服务器
New server=未配置的服务器
QRCode=二维码
Shadowsocks Error: {0}=Shadowsocks 错误: {0}
Port is already used=端口已被占用
Illegal port number format=非法端口格式
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} 更新
Click here to download=点击这里下载
Shadowsocks is here=Shadowsocks 在这里
+6 -5
View File
@@ -1,4 +1,5 @@
using System;
using Shadowsocks.Controller;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
@@ -109,7 +110,7 @@ namespace Shadowsocks.Model
{
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)
{
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))
{
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))
{
throw new ArgumentException("server IP can not be blank");
throw new ArgumentException(I18N.GetString("Server IP can not be blank"));
}
}
+5
View File
@@ -4,6 +4,7 @@ using System.Text;
using System.IO;
using System.Diagnostics;
using SimpleJson;
using Shadowsocks.Controller;
namespace Shadowsocks.Model
{
@@ -21,6 +22,10 @@ namespace Shadowsocks.Model
{
get
{
if (string.IsNullOrEmpty(server))
{
return I18N.GetString("New server");
}
return string.IsNullOrEmpty(remarks) ? server + ":" + server_port : server + ":" + server_port + " (" + remarks + ")";
}
}
+1 -1
View File
@@ -119,7 +119,7 @@ namespace Shadowsocks.View
ServersListBox.Items.Clear();
foreach (Server server in _modifiedConfiguration.configs)
{
ServersListBox.Items.Add(string.IsNullOrEmpty(server.server) ? I18N.GetString("New server") : server.FriendlyName);
ServersListBox.Items.Add(server.FriendlyName);
}
}