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

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

@@ -88,14 +88,14 @@ class StreakWinReward extends Backend
}
$payload = $request->post('rows');
if (!is_array($payload)) {
return $this->error('参数错误');
return $this->error(__('Invalid parameters'));
}
$encoded = StreakWinRewardLib::encodeForDb($payload);
$now = time();
$resourceKey = GameHotDataLock::safeResourceKeyForConfig(StreakWinRewardLib::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 {
Db::startTrans();
@@ -125,7 +125,7 @@ class StreakWinReward extends Backend
StreakWinRewardLib::clearCache();
GameHotDataCoordinator::afterGameConfigKeyCommitted(StreakWinRewardLib::CONFIG_KEY);
return $this->success('保存成功');
return $this->success(__('Saved successfully'));
} finally {
GameHotDataLock::release(GameHotDataLock::TYPE_GAME_CONFIG, $resourceKey, $lock['token'], $lock['redis_lock']);
}