From 14d9f3a5ebf026d356aa872ee13fa657fecc8ef6 Mon Sep 17 00:00:00 2001 From: liuhong Date: Thu, 8 Dec 2022 15:54:45 +0000 Subject: [PATCH] * Ajdust code Task #78665. --- module/build/control.php | 7 ++++--- module/build/lang/de.php | 6 +++--- module/build/lang/en.php | 6 +++--- module/build/lang/fr.php | 6 +++--- module/build/lang/zh-cn.php | 6 +++--- module/tree/model.php | 2 +- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/module/build/control.php b/module/build/control.php index 947aa35603..2911e0c66e 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -718,6 +718,7 @@ class build extends control $buildStories = $build->allStories ? $this->loadModel('story')->getByList($build->allStories) : array(); $buildBugs = $build->allBugs ? $this->loadModel('bug')->getByList($build->allBugs) : array(); $branchPairs = $this->loadModel('branch')->getPairs($build->product); + $typeName = $this->lang->product->branchName[$build->productType]; $removeBranches = ''; foreach(explode(',', $oldBranch) as $oldBranchID) @@ -742,15 +743,15 @@ class build extends control if($unlinkStoryCounts and $unlinkBugCounts) { - printf($this->lang->build->confirmChangeBuild, $this->lang->product->branchName[$build->productType], trim($removeBranches, ','), $unlinkStoryCounts, $unlinkBugCounts); + printf($this->lang->build->confirmChangeBuild, $typeName, trim($removeBranches, ','), $typeName, $unlinkStoryCounts, $unlinkBugCounts); } elseif($unlinkStoryCounts) { - printf($this->lang->build->confirmRemoveStory, $this->lang->product->branchName[$build->productType], trim($removeBranches, ','), $unlinkStoryCounts); + printf($this->lang->build->confirmRemoveStory, $typeName, trim($removeBranches, ','), $typeName, $unlinkStoryCounts); } elseif($unlinkBugCounts) { - printf($this->lang->build->confirmRemoveBug, $this->lang->product->branchName[$build->productType], trim($removeBranches, ','), $unlinkBugCounts); + printf($this->lang->build->confirmRemoveBug, $typeName, trim($removeBranches, ','), $typeName, $unlinkBugCounts); } } diff --git a/module/build/lang/de.php b/module/build/lang/de.php index 80f5a2d525..0f665094ec 100644 --- a/module/build/lang/de.php +++ b/module/build/lang/de.php @@ -69,9 +69,9 @@ $lang->build->finishStories = " %s {$lang->SRCommon} sind abgeschlossen."; $lang->build->resolvedBugs = ' %s Bugs sind gelöst.'; $lang->build->createdBugs = ' %s Bugs wurden erstellt.'; -$lang->build->confirmChangeBuild = "After branch『%s』disassociation,%s {$lang->SRCommon} and %s Bug will remove synchronization from version, whether to cancel?"; -$lang->build->confirmRemoveStory = "After branch『%s』disassociation,%s {$lang->SRCommon} will remove synchronization from version, whether to cancel?"; -$lang->build->confirmRemoveBug = "After branch『%s』disassociation,%s Bug will remove synchronization from version, whether to cancel?"; +$lang->build->confirmChangeBuild = "After branch『%s』disassociation,under the %s have %s {$lang->SRCommon} and %s Bug will remove synchronization from version, whether to cancel?"; +$lang->build->confirmRemoveStory = "After branch『%s』disassociation,under the %s have %s {$lang->SRCommon} will remove synchronization from version, whether to cancel?"; +$lang->build->confirmRemoveBug = "After branch『%s』disassociation,under the %s have %s Bug will remove synchronization from version, whether to cancel?"; $lang->build->placeholder = new stdclass(); $lang->build->placeholder->scmPath = ' Source code repository, z.B. Subversion/Git Pfad'; diff --git a/module/build/lang/en.php b/module/build/lang/en.php index 90358a0c6a..716c13be7f 100644 --- a/module/build/lang/en.php +++ b/module/build/lang/en.php @@ -69,9 +69,9 @@ $lang->build->finishStories = " Finished {$lang->SRCommon} %s"; $lang->build->resolvedBugs = ' Resolved Bug %s'; $lang->build->createdBugs = ' Reported Bug %s'; -$lang->build->confirmChangeBuild = "After branch『%s』disassociation,%s {$lang->SRCommon} and %s Bug will remove synchronization from version, whether to cancel?"; -$lang->build->confirmRemoveStory = "After branch『%s』disassociation,%s {$lang->SRCommon} will remove synchronization from version, whether to cancel?"; -$lang->build->confirmRemoveBug = "After branch『%s』disassociation,%s Bug will remove synchronization from version, whether to cancel?"; +$lang->build->confirmChangeBuild = "After branch『%s』disassociation,under the %s have %s {$lang->SRCommon} and %s Bug will remove synchronization from version, whether to cancel?"; +$lang->build->confirmRemoveStory = "After branch『%s』disassociation,under the %s have %s {$lang->SRCommon} will remove synchronization from version, whether to cancel?"; +$lang->build->confirmRemoveBug = "After branch『%s』disassociation,under the %s have %s Bug will remove synchronization from version, whether to cancel?"; $lang->build->placeholder = new stdclass(); $lang->build->placeholder->scmPath = ' Source code repository, e.g. Subversion/Git Library path'; diff --git a/module/build/lang/fr.php b/module/build/lang/fr.php index 3d5eebf778..a79244f5ab 100644 --- a/module/build/lang/fr.php +++ b/module/build/lang/fr.php @@ -69,9 +69,9 @@ $lang->build->finishStories = " {$lang->SRCommon} Terminées %s"; $lang->build->resolvedBugs = ' Bugs Résolus %s'; $lang->build->createdBugs = ' Bugs Signalés %s'; -$lang->build->confirmChangeBuild = "After branch『%s』disassociation,%s {$lang->SRCommon} and %s Bug will remove synchronization from version, whether to cancel?"; -$lang->build->confirmRemoveStory = "After branch『%s』disassociation,%s {$lang->SRCommon} will remove synchronization from version, whether to cancel?"; -$lang->build->confirmRemoveBug = "After branch『%s』disassociation,%s Bug will remove synchronization from version, whether to cancel?"; +$lang->build->confirmChangeBuild = "After branch『%s』disassociation,under the %s have %s {$lang->SRCommon} and %s Bug will remove synchronization from version, whether to cancel?"; +$lang->build->confirmRemoveStory = "After branch『%s』disassociation,under the %s have %s {$lang->SRCommon} will remove synchronization from version, whether to cancel?"; +$lang->build->confirmRemoveBug = "After branch『%s』disassociation,under the %s have %s Bug will remove synchronization from version, whether to cancel?"; $lang->build->placeholder = new stdclass(); $lang->build->placeholder->scmPath = ' Répertoire des codes sources, ex: chemin de la bibliothèque Subversion / GitSource'; diff --git a/module/build/lang/zh-cn.php b/module/build/lang/zh-cn.php index 018193ffed..92c27c24f6 100644 --- a/module/build/lang/zh-cn.php +++ b/module/build/lang/zh-cn.php @@ -65,9 +65,9 @@ $lang->build->notice->changeBuilds = "提交测试单的版本,不能修改 $lang->build->notice->autoRelation = "相关版本下完成的需求、解决的Bug、产生的Bug将会自动关联到项目版本中"; $lang->build->notice->createTest = "该版本所属执行已删除,不能提交测试"; -$lang->build->confirmChangeBuild = "%s『%s』解除关联后,%s个{$lang->SRCommon}和%s个Bug将同步从版本移除,是否解除?"; -$lang->build->confirmRemoveStory = "%s『%s』解除关联后,%s个{$lang->SRCommon}将同步从计划中移除,是否解除?"; -$lang->build->confirmRemoveBug = "%s『%s』解除关联后,%s个Bug将同步从计划中移除,是否解除?"; +$lang->build->confirmChangeBuild = "%s『%s』解除关联后,%s下 %s个{$lang->SRCommon}和%s个Bug将同步从版本移除,是否解除?"; +$lang->build->confirmRemoveStory = "%s『%s』解除关联后,%s下 %s个{$lang->SRCommon}将同步从计划中移除,是否解除?"; +$lang->build->confirmRemoveBug = "%s『%s』解除关联后,%s下 %s个Bug将同步从计划中移除,是否解除?"; $lang->build->confirmRemoveTips = "确认删除%s『%s』吗?"; $lang->build->finishStories = " 本次共完成 %s 个{$lang->SRCommon}"; diff --git a/module/tree/model.php b/module/tree/model.php index 63b9cc85e2..aa5141514a 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -158,7 +158,7 @@ class treeModel extends model $branches = array($branch => ''); if($branch != 'all' and strpos('story|bug|case', $type) !== false) { - $product = $this->loadModel('product')->getById($rootID); + $product = $this->loadModel('product')->getById($rootID); if($product and $product->type != 'normal') { $branchPairs = $this->loadModel('branch')->getPairs($rootID, 'all');