translate

This commit is contained in:
wlx 2014-03-03 07:00:54 +00:00
parent e062398cb5
commit c97f552d27
4 changed files with 48 additions and 54 deletions

View File

@ -53,16 +53,10 @@ class AccountController extends Zend_Controller_Action
$this->view->avatar = $avatar->Get($user->email,140);
$this->view->projectType = array(
"" => '',
"国家973计划项目课题" => "国家973计划项目课题",
"国家863计划课题"=>"国家863计划课题",
"国家级科技支撑课题" => "国家级科技支撑课题",
"国家级科技重大专项" => "国家级科技重大专项",
"国家级国家重大工程" => "国家级国家重大工程",
"国家级国家自然科学基金" => "国家级国家自然科学基金",
"国际合作项目"=>"国际合作项目",
"省部级项目" => "省部级项目",
"其他项目工程" => "其他项目工程"
"None" => '',
"National Funding" => "National Funding",
"Thesis or Dissertation"=>"Thesis or Dissertation",
"Others" => "Others"
);
$submit = $this->_getParam('submit');
@ -74,12 +68,12 @@ class AccountController extends Zend_Controller_Action
if($this->db->update("users",$data,"id=$uid"))
{
$this->view->AlertType = "alert-success";
$this->view->msg = "修改成功!";
$this->view->msg = "Update success.";
$this->view->jump_url = "/account/edit";
return true;
}else{
$this->view->AlertType = "alert-error";
$this->view->error = "修改失败,请重试";
$this->view->error = "Update failure.";
$this->view->info = $data;
return true;
}
@ -140,17 +134,17 @@ class AccountController extends Zend_Controller_Action
$this->view->AlertType = "alert-error";
if(strlen($data['password'])>18 || strlen($data['new_password'])>18)
{
$this->view->error = view::Error("密码过长");
$this->view->error = view::Error("Password too long.");
return true;
}
if(strlen($data['new_password'])<=6 || strlen($data['new_password_confrim'])<=6)
{
$this->view->error = view::Error("密码过短请输入大于6位的密码");
$this->view->error = view::Error("Too short password. The min length is 6.");
return true;
}
if(md5($data['new_password']) != md5($data['new_password_confrim']))
{
$this->view->error = view::Error("两次输入的密码不相同");
$this->view->error = view::Error("Twice password are not same.");
return true;
}
@ -160,7 +154,7 @@ class AccountController extends Zend_Controller_Action
if(md5($data['password']) != $row['password'])
{
$this->view->error = view::Error("原密码不正确");
$this->view->error = view::Error("The old password is wrong.");
return true;
}
@ -171,10 +165,10 @@ class AccountController extends Zend_Controller_Action
if($this->db->update("users",$data,"id=$uid"))
{
view::Post($this,array("content"=>'修改成功!','url'=>'/account/secure'));
view::Post($this,array("content"=>'Update success.','url'=>'/account/secure'));
return true;
}else{
$this->view->error = view::Error("修改失败");
$this->view->error = view::Error("Update failure.");
return true;
}
}else{
@ -192,7 +186,7 @@ class AccountController extends Zend_Controller_Action
if(!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i",$email))
{
$this->view->error = view::Error("错误的邮箱格式");
$this->view->error = view::Error("Wrong email.");
return true;
}
@ -202,7 +196,7 @@ class AccountController extends Zend_Controller_Action
if(md5($password) != $row['password'])
{
$this->view->error = view::Error("原密码错误");
$this->view->error = view::Error("The old password is wrong.");
return true;
}
@ -210,10 +204,10 @@ class AccountController extends Zend_Controller_Action
if($this->db->update("users",$data,"id=$uid"))
{
view::Post($this,array("content"=>'修改成功!','url'=>'/account/secure'));
view::Post($this,array("content"=>'Update success.','url'=>'/account/secure'));
return true;
}else{
$this->view->error = view::Error("修改失败");
$this->view->error = view::Error("Update failure.");
return true;
}
}else{
@ -300,7 +294,7 @@ class AccountController extends Zend_Controller_Action
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity())
{
view::Post($this,"您已经登录,无需重复登录",-1);
view::Post($this,"You are login now.",-1);
return true;
}
@ -333,21 +327,21 @@ class AccountController extends Zend_Controller_Action
if(empty($username))
{
$this->setCaptcha($captcha);
$this->view->error = "请输入用户名";
$this->view->error = "Please input the username";
return true;
}
if(empty($password))
{
$this->setCaptcha($captcha);
$this->view->error = "请输入密码";
$this->view->error = "Please input the password.";
return true;
}
if(empty($captchaword))
{
$this->setCaptcha($captcha);
$this->view->error = "请输入验证码";
$this->view->error = "Please input captcha.";
return true;
}
@ -358,14 +352,14 @@ class AccountController extends Zend_Controller_Action
if ($captchaword != $_SESSION['captcha']) {
$this->setCaptcha($captcha);
$this->view->error = "验证码错误";
$this->view->error = "Wrong captcha.";
return true;
}
if (!$this->login($username,$password))
{
$this->setCaptcha($captcha);
$this->view->error = "用户名或密码错误";
$this->view->error = "Wrong username or password.";
$this->view->userid = $username;
return true;
}
@ -373,7 +367,7 @@ class AccountController extends Zend_Controller_Action
{
if(!empty($tohref))
{
view::Post($this,"登录成功,正在跳转",$tohref);
view::Post($this,"Login success, jumping. ",$tohref);
return true;
}
}
@ -553,13 +547,13 @@ class AccountController extends Zend_Controller_Action
$mail->send();
$this->view->messages[]='请检查您的新邮件中的确认激活链接。';
$this->view->messages[]='Please check the activation link in your email.';
$this->view->form=false;//do not echo form
} else
$this->messenger->addMessage('对不起,没有找到对应的电子邮件地址。');
$this->messenger->addMessage('Sorry, the email could not find.');
}
} else
$this->view->messages[]='请输入您的电子邮件地址。您将通过电子邮件收到新密码。';
$this->view->messages[]='Please input your eamil, you will get the password in your email.';
} else {
$sql="select * from users where username=? and activation=?";
$uq=$db->query($sql,array($login,$key));
@ -582,7 +576,7 @@ class AccountController extends Zend_Controller_Action
$mail->addTo($urow->email,$login);
$mail->send();
$this->view->messages[]='请查收您新邮件中的新密码';
$this->view->messages[]='Pleae chech the new password in your mail box.';
$this->view->form=false;//do not echo form
}

View File

@ -11,7 +11,7 @@ class OrderOperate implements \Order\Listener\OrderEvents
//!!!!!!important!!!!!
//不同项目使用时是否要修改此项??
public $tbl_metadata = "heihemetadata";
public $tbl_metadata = "normalmetadata";
public $tbl_dataorder = "dataorder";
function __construct($db = NULL)
@ -35,17 +35,17 @@ class OrderOperate implements \Order\Listener\OrderEvents
try{
if($this->checkOrderUUID($uuid) !== false)
{
return "此数据尚未正式发布,还不能申请";
return "This data could not be ordered.";
}
if($this->checkOrderNum(true,$uid) === false)
{
return "您的数据篮中存放的数据已达到可申请的数量";
return "Max items reached in your order.";
}
if($this->checkOrderHas($uuid,$uid))
{
return "此数据已经在数据篮中";
return "You have already ordered this item.";
}
}catch(Exception $e)
{

View File

@ -11,7 +11,7 @@ class PdfForm implements \Order\Listener\PdfFormEvents
//!!!!!!important!!!!!
//不同项目使用时是否要修改此项??
public $tbl_metadata = "heihemetadata";
public $tbl_metadata = "normalmetadata";
public $tbl_dataorder = "dataorder";
function __construct($db = NULL)
@ -35,17 +35,17 @@ class PdfForm implements \Order\Listener\PdfFormEvents
try{
if($this->checkOrderUUID($uuid) !== false)
{
return "此数据尚未正式发布,还不能申请";
return "This data could not be ordered.";
}
if($this->checkOrderNum(true,$uid) === false)
{
return "您的数据篮中存放的数据已达到可申请的数量";
return "Max items reached in your order.";
}
if($this->checkOrderHas($uuid,$uid))
{
return "此数据已经在数据篮中";
return "You have already ordered this item.";
}
}catch(Exception $e)
{
@ -62,62 +62,62 @@ class PdfForm implements \Order\Listener\PdfFormEvents
if(empty($formData['realname']))
{
return "请输入真实姓名";
return "Please input your real name";
}
if(empty($formData['email']))
{
return "请输入Email";
return "Please input your Email";
}
if (!preg_match('/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/',$formData['email']))
{
return "请输入正确的电子邮件地址";
return "Please correct the email";
}
if(empty($formData['phone']))
{
return "请输入联系电话";
return "Please input your phone";
}
if(empty($formData['unit']))
{
return "请输入单位";
return "Please input your company or organization.";
}
if(empty($formData['address']))
{
return "请输入地址";
return "Please input your address.";
}
if(empty($formData['postcode']) || !is_numeric($formData['postcode']))
{
return "请输入邮政编码";
return "Please input the post code.";
}
if(empty($formData['project_id']))
{
return "请输入项目编号";
return "Please input the fund number.";
}
if(empty($formData['project_type']))
{
return "请选择项目类型";
return "Please choice the fund type.";
}
if(empty($formData['project_title']))
{
return "请填写项目标题";
return "Please input the fund title.";
}
if(empty($formData['project_leader']))
{
return "请填写项目负责人";
return "Please input the fund PI.";
}
if(empty($formData['project']))
{
return "请填写用途";
return "Please input your usage.";
}
return true;

View File

@ -13,7 +13,7 @@ class PdfOperate implements \Order\Listener\PdfEvents
//!!!!!!important!!!!!
//不同项目使用时是否要修改此项??
public $tbl_metadata = "heihemetadata";
public $tbl_metadata = "normalmetadata";
public $tbl_dataorder = "dataorder";
public $tbl_offlineapp = "offlineapp";