配置接口lang请求头
This commit is contained in:
53
server/app/api/lang/en.php
Normal file
53
server/app/api/lang/en.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* API 英文文案(请求头 lang=en 时使用)
|
||||
* key 为中文原文,value 为英文
|
||||
*/
|
||||
return [
|
||||
'success' => 'Success',
|
||||
'fail' => 'Fail',
|
||||
'username、password 不能为空' => 'username and password are required',
|
||||
'请携带 token' => 'Please provide token',
|
||||
'token 无效' => 'Invalid or expired token',
|
||||
'已退出登录' => 'Logged out successfully',
|
||||
'用户不存在' => 'User not found',
|
||||
'username 不能为空' => 'username is required',
|
||||
'密码错误' => 'Wrong password',
|
||||
'账号已被禁用,无法登录' => 'Account is disabled and cannot log in',
|
||||
'购买抽奖券错误' => 'Invalid lottery ticket purchase',
|
||||
'平台币不足' => 'Insufficient balance',
|
||||
'direction 必须为 0 或 1' => 'direction must be 0 or 1',
|
||||
'当前玩家余额%s小于%s无法继续游戏' => 'Balance %s is less than %s, cannot continue',
|
||||
'服务超时,' => 'Service timeout: ',
|
||||
'没有原因' => 'Unknown reason',
|
||||
'缺少参数:agent_id、secret、time、signature 不能为空' => 'Missing parameters: agent_id, secret, time, signature are required',
|
||||
'服务端未配置 API_AUTH_TOKEN_SECRET' => 'API_AUTH_TOKEN_SECRET is not configured',
|
||||
'密钥错误' => 'Invalid secret',
|
||||
'时间戳已过期或无效,请同步时间' => 'Timestamp expired or invalid, please sync time',
|
||||
'签名验证失败' => 'Signature verification failed',
|
||||
'生成 token 失败' => 'Failed to generate token',
|
||||
'coin 不能为空' => 'coin is required',
|
||||
'coin 不能为 0' => 'coin cannot be 0',
|
||||
'余额不足,无法转出' => 'Insufficient balance to transfer',
|
||||
'操作失败:' => 'Operation failed: ',
|
||||
'服务超时,没有原因' => 'Service timeout: Unknown reason',
|
||||
// PlayStartLogic / GameLogic
|
||||
'抽奖券不足' => 'Insufficient lottery tickets',
|
||||
'奖池配置不存在' => 'Lottery config not found',
|
||||
'该方向下暂无可用路径配置' => 'No path config available for this direction',
|
||||
// UserLogic
|
||||
'手机号格式错误,仅支持 +60 开头的马来西亚号码(如 +60123456789)' => 'Invalid phone format, only +60 Malaysia numbers supported (e.g. +60123456789)',
|
||||
// TokenMiddleware / Auth (api/user/*, api/game/*)
|
||||
'请携带 auth-token' => 'Please provide auth-token',
|
||||
'auth-token 已过期' => 'auth-token expired',
|
||||
'auth-token 无效' => 'auth-token invalid',
|
||||
'auth-token 格式无效' => 'auth-token format invalid',
|
||||
'auth-token 无效或已失效' => 'auth-token invalid or expired',
|
||||
'token 已过期,请重新登录' => 'Token expired, please login again',
|
||||
'token 格式无效' => 'Token format invalid',
|
||||
'请注册' => 'Please register',
|
||||
'请重新登录' => 'Please login again',
|
||||
'请重新登录(当前账号已在其他处登录)' => 'Please login again (account logged in elsewhere)',
|
||||
];
|
||||
Reference in New Issue
Block a user