Skip to content

Commit 8079310

Browse files
zhouxin宋辰轩
zhouxin
authored and
宋辰轩
committed
* [bug#59297,done,0.2h] add tips when no project in doc block.
1 parent 0674230 commit 8079310

File tree

5 files changed

+6
-0
lines changed

5 files changed

+6
-0
lines changed

module/doc/lang/de.php

+1
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@
262262

263263
$lang->doc->tips = new stdclass();
264264
$lang->doc->tips->noProduct = 'No product, please create first';
265+
$lang->doc->tips->noProject = 'No project, please create first';
265266
$lang->doc->tips->noExecution = 'No execution, please create first';
266267
$lang->doc->tips->noCaselib = 'No caselib, please create first';
267268

module/doc/lang/en.php

+1
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263

264264
$lang->doc->tips = new stdclass();
265265
$lang->doc->tips->noProduct = 'No product, please create first';
266+
$lang->doc->tips->noProject = 'No project, please create first';
266267
$lang->doc->tips->noExecution = 'No execution, please create first';
267268
$lang->doc->tips->noCaselib = 'No caselib, please create first';
268269

module/doc/lang/fr.php

+1
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@
262262

263263
$lang->doc->tips = new stdclass();
264264
$lang->doc->tips->noProduct = 'No product, please create first';
265+
$lang->doc->tips->noProject = 'No project, please create first';
265266
$lang->doc->tips->noExecution = 'No execution, please create first';
266267
$lang->doc->tips->noCaselib = 'No caselib, please create first';
267268

module/doc/lang/zh-cn.php

+1
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263

264264
$lang->doc->tips = new stdclass();
265265
$lang->doc->tips->noProduct = '暂时没有产品,请先创建';
266+
$lang->doc->tips->noProject = '暂时没有项目,请先创建';
266267
$lang->doc->tips->noExecution = '暂时没有执行,请先创建';
267268
$lang->doc->tips->noCaselib = '暂时没有用例库,请先创建';
268269

module/projectstory/control.php

+2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ public function story(int $projectID = 0, int $productID = 0, string $branch = '
4141
{
4242
if($from == 'doc')
4343
{
44+
$this->app->loadLang('doc');
4445
$projects = $this->loadModel('project')->getPairsByProgram();
46+
if(empty($projects)) return $this->send(array('result' => 'fail', 'message' => $this->lang->doc->tips->noProject));
4547

4648
if(!$projectID)
4749
{

0 commit comments

Comments
 (0)