修改原有框架中英文映射

This commit is contained in:
2026-03-17 18:09:10 +08:00
parent e7b8f4cae9
commit bdf50e61f5
81 changed files with 1956 additions and 735 deletions

View File

@@ -63,7 +63,7 @@ class GenerateTablesLogic extends BaseLogic
$data = config('think-orm.connections');
$config = $data[$source];
if (!$config) {
throw new ApiException('数据库配置读取失败');
throw new ApiException('Failed to read database config');
}
$prefix = $config['prefix'] ?? '';
@@ -262,10 +262,10 @@ class GenerateTablesLogic extends BaseLogic
{
$table = $this->model->findOrEmpty($id);
if (!in_array($table['template'], ["plugin", "app"])) {
throw new ApiException('应用类型必须为plugin或者app');
throw new ApiException('App type must be plugin or app');
}
if (empty($table['namespace'])) {
throw new ApiException('请先设置应用名称');
throw new ApiException('Please set app name first');
}
$columns = $this->columnLogic->where('table_id', $id)
@@ -320,11 +320,11 @@ class GenerateTablesLogic extends BaseLogic
{
$table = $this->model->where('id', $id)->findOrEmpty();
if ($table->isEmpty()) {
throw new ApiException('请选择要生成的表');
throw new ApiException('Please select tables to generate');
}
$debug = config('app.debug', true);
if (!$debug) {
throw new ApiException('非调试模式下,不允许生成文件');
throw new ApiException('File generation not allowed in non-debug mode');
}
$this->updateMenu($table);
$this->genModule($id);