修改原有框架中英文映射
This commit is contained in:
@@ -53,7 +53,7 @@ class CodeEngine
|
||||
|
||||
// 判断模板是否存在
|
||||
if (!is_dir($config['template_path'])) {
|
||||
throw new ApiException('模板目录不存在!');
|
||||
throw new ApiException('Template directory not found');
|
||||
}
|
||||
// 判断文件生成目录是否存在
|
||||
if (!is_dir($config['generate_path'])) {
|
||||
@@ -160,7 +160,7 @@ class CodeEngine
|
||||
}
|
||||
|
||||
if (empty($outPath)) {
|
||||
throw new ApiException('文件类型异常,无法生成指定文件!');
|
||||
throw new ApiException('Invalid file type, cannot generate file');
|
||||
}
|
||||
if (!is_dir(dirname($outPath))) {
|
||||
mkdir(dirname($outPath), 0777, true);
|
||||
@@ -176,7 +176,7 @@ class CodeEngine
|
||||
{
|
||||
$rootPath = dirname(base_path()) . DS . $this->value['generate_path'];
|
||||
if (!is_dir($rootPath)) {
|
||||
throw new ApiException('前端目录查找失败,必须与后端目录为同级目录!');
|
||||
throw new ApiException('Frontend directory not found, must be same level as backend');
|
||||
}
|
||||
|
||||
$rootPath = $rootPath . DS . 'src' . DS . 'views' . DS . 'plugin' . DS . $this->value['namespace'];
|
||||
@@ -199,7 +199,7 @@ class CodeEngine
|
||||
}
|
||||
|
||||
if (empty($outPath)) {
|
||||
throw new ApiException('文件类型异常,无法生成指定文件!');
|
||||
throw new ApiException('Invalid file type, cannot generate file');
|
||||
}
|
||||
if (!is_dir(dirname($outPath))) {
|
||||
mkdir(dirname($outPath), 0777, true);
|
||||
|
||||
Reference in New Issue
Block a user