修改中文为英文

This commit is contained in:
Li Jianxuan 2014-04-23 04:30:30 +00:00
parent 0708a3be3b
commit 71d20e35a9
2 changed files with 16 additions and 16 deletions

View File

@ -140,9 +140,9 @@ class Account extends \Zend_Controller_Plugin_Abstract
}else{ }else{
if($id === false) if($id === false)
{ {
return array('error'=>'服务器开小差了,请稍后再试'); return array('error'=>'A error occurred,try later');
}else{ }else{
return array('error'=>'服务器处理中遇到错误,请联系管理员'); return array('error'=>'A error occurred,try later');
} }
} }
@ -210,9 +210,9 @@ class Account extends \Zend_Controller_Plugin_Abstract
return array('success'=>1); return array('success'=>1);
}else{ }else{
return array("error"=>"用户信息验证失败,请重新登录"); return array("error"=>"Wrong information with in your private data");
} }
return array('error'=>'处理中发现错误,请重试'); return array('error'=>'A error occurred');
} }
//注册信息参数 //注册信息参数
@ -287,7 +287,7 @@ class Account extends \Zend_Controller_Plugin_Abstract
unset($data['password_new']); unset($data['password_new']);
unset($data['password_confirm']); unset($data['password_confirm']);
}else{ }else{
return "参数错误"; return "A error occurred";
} }
$dbh = new dbh(); $dbh = new dbh();
@ -317,7 +317,7 @@ class Account extends \Zend_Controller_Plugin_Abstract
if(!isset($row['username']) || empty($row['username'])) if(!isset($row['username']) || empty($row['username']))
{ {
return array('error'=>"此邮箱并未注册",'place'=>'email'); return array('error'=>"this email was not found",'place'=>'email');
} }
$salt = md5($email.'--'.time().'--'.$row['username']); $salt = md5($email.'--'.time().'--'.$row['username']);
@ -327,7 +327,7 @@ class Account extends \Zend_Controller_Plugin_Abstract
if($state<1) if($state<1)
{ {
return array('error'=>"处理中出现错误,请重试",'place'=>'email'); return array('error'=>"A error occurred",'place'=>'email');
} }
$mail_data = array( $mail_data = array(
@ -363,12 +363,12 @@ class Account extends \Zend_Controller_Plugin_Abstract
if(!isset($row['username']) || empty($row['username'])) if(!isset($row['username']) || empty($row['username']))
{ {
return array('error'=>"您提供的校验码不正确,请重新申请重置密码",'place'=>'confirm_password'); return array('error'=>"captcha is wrong",'place'=>'confirm_password');
} }
if($row['username'] !== $data['username']) if($row['username'] !== $data['username'])
{ {
return array('error'=>"您提供的校验码不正确,请重新申请重置密码",'place'=>'confirm_password'); return array('error'=>"captcha is wrong,please reset password again",'place'=>'confirm_password');
} }
$sql = "UPDATE {$this->memberTable} SET password='".md5($data['password'])."',salt='' WHERE id={$row['id']}"; $sql = "UPDATE {$this->memberTable} SET password='".md5($data['password'])."',salt='' WHERE id={$row['id']}";

View File

@ -35,25 +35,25 @@ class LoginOperate implements \Users\Event\LoginEvent
if(!is_array($data)) if(!is_array($data))
{ {
return "参数错误"; return "parameter error";
} }
if(empty($data['username'])) if(empty($data['username']))
{ {
return array('error'=>"请输入用户名",'place'=>'username'); return array('error'=>"Username is required",'place'=>'username');
} }
if(!empty($data['username'])) if(!empty($data['username']))
{ {
if(mb_strlen($data['username'])<2) if(mb_strlen($data['username'])<2)
{ {
return array('error'=>"用户名长度应该大于两个字符",'place'=>'username'); return array('error'=>"Username is too short (minimum is 3 characters)",'place'=>'username');
} }
} }
if(empty($data['password'])) if(empty($data['password']))
{ {
return array('error'=>"请输入密码",'place'=>'password'); return array('error'=>"Password is required",'place'=>'password');
} }
$sql = "SELECT id,{$this->FieldPasword} FROM {$this->tbl_member} WHERE {$this->FieldUsername}=?"; $sql = "SELECT id,{$this->FieldPasword} FROM {$this->tbl_member} WHERE {$this->FieldUsername}=?";
@ -65,15 +65,15 @@ class LoginOperate implements \Users\Event\LoginEvent
{ {
if(strlen($row[$this->FieldPasword]) !== 32) if(strlen($row[$this->FieldPasword]) !== 32)
{ {
return array('error'=>"您的密码或因安全原因或其他问题已经被重置,请先<a href='/account/forgotpassword'>重置密码</a>再登陆",'place'=>'password'); return array('error'=>"your password had been reset,<a href='/account/forgotpassword'>reset password</a>",'place'=>'password');
} }
if($row[$this->FieldPasword] !== md5($data['password'])) if($row[$this->FieldPasword] !== md5($data['password']))
{ {
return array('error'=>"密码错误",'place'=>'password'); return array('error'=>"wrong password",'place'=>'password');
} }
return true; return true;
}else{ }else{
return array('error'=>"用户不存在",'place'=>'username'); return array('error'=>"wrong password",'place'=>'username');
} }
}//checkParam }//checkParam