对搜索返回的消息做中英双版本

This commit is contained in:
2026-04-28 15:22:50 +08:00
parent 85133ee92b
commit 9bc439ea5e
32 changed files with 575 additions and 183 deletions

View File

@@ -35,7 +35,7 @@ class PlayRecord extends Backend
if ($response !== null) {
return $response;
}
return $this->error('游玩记录由游戏接口生成,禁止后台手工新增');
return $this->error(__('Play record is generated by game API; manual creation is not allowed'));
}
public function edit(WebmanRequest $request): Response
@@ -44,7 +44,7 @@ class PlayRecord extends Backend
if ($response !== null) {
return $response;
}
return $this->error('游玩记录不可编辑');
return $this->error(__('Play record cannot be edited'));
}
public function del(WebmanRequest $request): Response
@@ -53,7 +53,7 @@ class PlayRecord extends Backend
if ($response !== null) {
return $response;
}
return $this->error('游玩记录不可删除');
return $this->error(__('Play record cannot be deleted'));
}
public function sortable(WebmanRequest $request): Response
@@ -62,7 +62,7 @@ class PlayRecord extends Backend
if ($response !== null) {
return $response;
}
return $this->error('不支持排序');
return $this->error(__('Sorting is not supported'));
}
protected function _index(): Response

View File

@@ -38,7 +38,7 @@ class Record extends Backend
if ($response !== null) {
return $response;
}
return $this->error('游戏对局记录由系统自动生成,禁止后台手工新增');
return $this->error(__('Game record is generated by system; manual creation is not allowed'));
}
public function edit(WebmanRequest $request): Response
@@ -48,7 +48,7 @@ class Record extends Backend
return $response;
}
if ($request->method() === 'POST') {
return $this->error('游戏对局记录不可编辑');
return $this->error(__('Game record cannot be edited'));
}
$pk = $this->model->getPk();
$id = $request->get($pk);
@@ -65,7 +65,7 @@ class Record extends Backend
if ($response !== null) {
return $response;
}
return $this->error('游戏对局记录不可删除');
return $this->error(__('Game record cannot be deleted'));
}
public function abnormalList(WebmanRequest $request): Response

View File

@@ -81,7 +81,7 @@ class ZiHuaDictionary extends Backend
}
$items = $payload['items'] ?? null;
if (!is_array($items)) {
return $this->error('items 必须为数组');
return $this->error(__('Items must be an array'));
}
try {
$clean = ZiHuaDictionaryLib::prepareItemsForSave($items);
@@ -94,7 +94,7 @@ class ZiHuaDictionary extends Backend
$resourceKey = GameHotDataLock::safeResourceKeyForConfig(ZiHuaDictionaryLib::CONFIG_KEY);
$lock = GameHotDataLock::tryAcquire(GameHotDataLock::TYPE_GAME_CONFIG, $resourceKey);
if (!$lock['acquired']) {
return $this->error('该配置正在被其他操作占用,请稍后再试');
return $this->error(__('This config is locked by another operation, please try again later'));
}
try {
try {