对搜索返回的消息做中英双版本
This commit is contained in:
@@ -231,7 +231,7 @@ class DepositChannel extends Backend
|
||||
}
|
||||
$items = $payload['items'] ?? null;
|
||||
if (!is_array($items)) {
|
||||
return $this->error('items 必须为数组');
|
||||
return $this->error(__('Items must be an array'));
|
||||
}
|
||||
|
||||
return $this->persistChannelList($items);
|
||||
@@ -250,7 +250,7 @@ class DepositChannel extends Backend
|
||||
$got = array_column($clean, 'code');
|
||||
sort($got);
|
||||
if ($expectedCodes !== $got) {
|
||||
return $this->error('请保存全部已注册渠道行(不可缺行)');
|
||||
return $this->error(__('Please save all registered channel rows (no missing rows)'));
|
||||
}
|
||||
$json = DepositChannelLib::encodeForDb($clean);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
@@ -261,7 +261,7 @@ class DepositChannel extends Backend
|
||||
$resourceKey = GameHotDataLock::safeResourceKeyForConfig(DepositChannelLib::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 {
|
||||
|
||||
@@ -264,7 +264,7 @@ class DepositTier extends Backend
|
||||
}
|
||||
$rid = $it['id'] ?? '';
|
||||
if (is_string($rid) && $rid === $newId) {
|
||||
return $this->error('档位 ID 已存在');
|
||||
return $this->error(__('Tier ID already exists'));
|
||||
}
|
||||
}
|
||||
$items[] = $this->normalizeFormRow($payload, $newId);
|
||||
@@ -342,7 +342,7 @@ class DepositTier extends Backend
|
||||
}
|
||||
$items = $payload['items'] ?? null;
|
||||
if (!is_array($items)) {
|
||||
return $this->error('items 必须为数组');
|
||||
return $this->error(__('Items must be an array'));
|
||||
}
|
||||
|
||||
return $this->persistTierList($items);
|
||||
@@ -364,7 +364,7 @@ class DepositTier extends Backend
|
||||
$resourceKey = GameHotDataLock::safeResourceKeyForConfig(DepositTierLib::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 {
|
||||
|
||||
@@ -119,7 +119,7 @@ class FinanceCashierConfig extends Backend
|
||||
$resourceKey = GameHotDataLock::safeResourceKeyForConfig(FinanceCashierConfigLib::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 {
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,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);
|
||||
@@ -108,7 +108,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 {
|
||||
|
||||
Reference in New Issue
Block a user