From b341c66bc59b537c72d644311775d39b0f3c3c44 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 29 Mar 2024 10:17:52 +0800 Subject: [PATCH] * Fix bug#46269. --- module/story/control.php | 8 ++++---- module/story/lang/de.php | 4 ++-- module/story/lang/en.php | 4 ++-- module/story/lang/fr.php | 4 ++-- module/story/lang/vi.php | 4 ++-- module/story/lang/zh-cn.php | 4 ++-- module/story/model.php | 2 ++ 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 6e252a50ca..e2de127c2c 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -904,8 +904,8 @@ class story extends control continue; } - if($story->parent == -1) $skippedStory[] = $story->id; - if($story->status == 'closed') $closedStory[] = $story->id; + if($story->parent == -1) $skippedStory[] = '#' . $story->id; + if($story->status == 'closed') $closedStory[] = '#' . $story->id; if($story->parent == -1 || $story->status == 'closed') unset($stories[$story->id]); if(!empty($story->twins)) @@ -922,8 +922,8 @@ class story extends control if($storyCount == count($closedStory)) return $this->send(array('result' => 'fail', 'load' => array('alert' => $this->lang->story->notice->closed, 'locate' => $this->session->storyList))); $errorTips = ''; - if($closedStory) $errorTips .= sprintf($this->lang->story->closedStory, implode(',', $closedStory)); - if($skippedStory) $errorTips .= sprintf($this->lang->story->skipStory, implode(',', $skippedStory)); + if($closedStory) $errorTips .= sprintf($this->lang->story->closedStory, implode(' ', $closedStory)); + if($skippedStory) $errorTips .= sprintf($this->lang->story->skipStory, implode(' ', $skippedStory)); $this->view->productID = $productID; $this->view->stories = $stories; diff --git a/module/story/lang/de.php b/module/story/lang/de.php index 8c8eb2b442..5f7133ca3a 100644 --- a/module/story/lang/de.php +++ b/module/story/lang/de.php @@ -96,8 +96,8 @@ $lang->story->deleteAction = "Delete Story"; $lang->story->exportAction = "Export Story"; $lang->story->reportAction = "Story Report"; -$lang->story->skipStory = '%s is a parent story. It cannot be closed.'; -$lang->story->closedStory = 'Story %s is closed and will not be closed.'; +$lang->story->skipStory = "{$lang->SRCommon} %s is parent stories, and this operation has been filtered."; +$lang->story->closedStory = "{$lang->SRCommon} %s is closed, and this operation has been filtered."; $lang->story->batchToTaskTips = "Only active {$lang->SRCommon} can be converted into tasks."; $lang->story->successToTask = "Converted to task."; $lang->story->storyRound = '%s time estimation'; diff --git a/module/story/lang/en.php b/module/story/lang/en.php index 12e250eee7..582334bb0f 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -96,8 +96,8 @@ $lang->story->deleteAction = "Delete {$lang->SRCommon}"; $lang->story->exportAction = "Export {$lang->SRCommon}"; $lang->story->reportAction = "Report"; -$lang->story->skipStory = '%s is a parent story. It cannot be closed.'; -$lang->story->closedStory = 'Story %s is closed and will not be closed.'; +$lang->story->skipStory = "{$lang->SRCommon} %s is parent stories, and this operation has been filtered."; +$lang->story->closedStory = "{$lang->SRCommon} %s is closed, and this operation has been filtered."; $lang->story->batchToTaskTips = "Only active {$lang->SRCommon} can be converted into tasks."; $lang->story->successToTask = "Converted to task."; $lang->story->storyRound = '%s time estimation'; diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php index 4a3efc7fb4..51ae6e61f8 100644 --- a/module/story/lang/fr.php +++ b/module/story/lang/fr.php @@ -96,8 +96,8 @@ $lang->story->deleteAction = "Supprimer Story"; $lang->story->exportAction = "Exporter Story"; $lang->story->reportAction = "Rapport de Story"; -$lang->story->skipStory = '%s is a parent story. It cannot be closed.'; -$lang->story->closedStory = 'Story %s is closed and will not be closed.'; +$lang->story->skipStory = "{$lang->SRCommon} %s is parent stories, and this operation has been filtered."; +$lang->story->closedStory = "{$lang->SRCommon} %s is closed, and this operation has been filtered."; $lang->story->batchToTaskTips = "Only active {$lang->SRCommon} can be converted into tasks."; $lang->story->successToTask = "Converted to task."; $lang->story->storyRound = '%s time estimation'; diff --git a/module/story/lang/vi.php b/module/story/lang/vi.php index 5c3e9a0089..6897d640b3 100644 --- a/module/story/lang/vi.php +++ b/module/story/lang/vi.php @@ -86,8 +86,8 @@ $lang->story->deleteAction = "Delete {$lang->SRCommon}"; $lang->story->exportAction = "Export {$lang->SRCommon}"; $lang->story->reportAction = "Report"; -$lang->story->skipStory = '%s is a parent story. It cannot be closed.'; -$lang->story->closedStory = 'Story %s is closed and will not be closed.'; +$lang->story->skipStory = "{$lang->SRCommon} %s is parent stories, and this operation has been filtered."; +$lang->story->closedStory = "{$lang->SRCommon} %s is closed, and this operation has been filtered."; $lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->SRCommon} and link {$lang->SRCommon} to the task. The closed {$lang->SRCommon} will not be converted into tasks."; $lang->story->successToTask = "Converted to task."; $lang->story->storyRound = '%s time estimation'; diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index 353be320e7..171e3e92a8 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -96,8 +96,8 @@ $lang->story->deleteAction = "删除{$lang->SRCommon}"; $lang->story->exportAction = "导出{$lang->SRCommon}"; $lang->story->reportAction = "统计报表"; -$lang->story->skipStory = '需求:%s 为父需求,将不会被关闭。'; -$lang->story->closedStory = '需求:%s 已关闭,将不会被关闭。'; +$lang->story->skipStory = "{$lang->SRCommon} %s 为父需求,本次操作已被过滤。"; +$lang->story->closedStory = "{$lang->SRCommon} %s 已关闭,本次操作已被过滤。"; $lang->story->batchToTaskTips = "只有激活状态的{$lang->SRCommon}才能转为任务。"; $lang->story->successToTask = '批量转任务成功'; $lang->story->storyRound = '第 %s 轮估算'; diff --git a/module/story/model.php b/module/story/model.php index 5d2af7ceea..80a9deee62 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3761,6 +3761,8 @@ class storyModel extends model $storyLang->notice->closed = str_replace($SRCommon, $URCommon, $storyLang->notice->closed); $storyLang->notice->reviewerNotEmpty = str_replace($SRCommon, $URCommon, $storyLang->notice->reviewerNotEmpty); + $storyLang->skipStory = str_replace($SRCommon, $URCommon, $storyLang->skipStory); + $storyLang->closedStory = str_replace($SRCommon, $URCommon, $storyLang->closedStory); $storyLang->report->charts['storiesPerProduct'] = str_replace($SRCommon, $URCommon, $storyLang->report->charts['storiesPerProduct']); $storyLang->report->charts['storiesPerModule'] = str_replace($SRCommon, $URCommon, $storyLang->report->charts['storiesPerModule']);