From 4e5443c7f7cae3f3c0bfc7733ca4e26c2135bda7 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 3 Dec 2024 13:12:27 +0800 Subject: [PATCH] * [task#133109,start,1h] add language item and print managedTeam diff. --- module/action/lang/de.php | 3 +++ module/action/lang/en.php | 3 +++ module/action/lang/fr.php | 3 +++ module/action/lang/zh-cn.php | 5 ++++- module/action/model.php | 6 +++++- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/module/action/lang/de.php b/module/action/lang/de.php index dff95e0702..a99bba1bd0 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -236,6 +236,8 @@ $lang->action->desc->verified = '$date, überprüft von $act $lang->action->desc->diff1 = '%s wurde geändert. Es war "%s" und ist jetzt "%s".
' . "\n"; $lang->action->desc->diff2 = '%s wurde geändert. Die Differenz ist ' . "\n" . "
%s
" . "\n
%s
"; $lang->action->desc->diff3 = 'Dateiname %s wurde geändert zu %s .' . "\n"; +$lang->action->desc->addDiff = 'Added "%s"。' . "\n"; +$lang->action->desc->removeDiff = 'Removed "%s"。' . "\n"; $lang->action->desc->linked2bug = '$date Verknüpft mit $extra von $actor'; $lang->action->desc->linked2testtask = '$date, linked to $extra by $actor'; $lang->action->desc->unlinkedfromtesttask = '$date, unlinked from $extra by $actor'; @@ -284,6 +286,7 @@ $lang->action->desc->linkhost = '$date, the host is linked by action->desc->createrepobranch = '$date, $actor created code branch $extra。' . "\n"; $lang->action->desc->unlinkrepobranch = '$date, $actor unlinked code branch $extra.' . "\n"; $lang->action->desc->changedprogram = '$date, $actor adjust the program $extra.' . "\n"; +$lang->action->desc->managedteam = '$date, by $actor managed team.' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor created a child task $extra。' . "\n"; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 8fcbde4622..7a2465c357 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -236,6 +236,8 @@ $lang->action->desc->verified = '$date, verified by $actoraction->desc->diff1 = '%s is changed. It was "%s" and it is "%s".
' . "\n"; $lang->action->desc->diff2 = '%s is changed. The difference is ' . "\n" . "
%s
" . "\n
%s
"; $lang->action->desc->diff3 = 'File Name %s was changed to %s .' . "\n"; +$lang->action->desc->addDiff = 'Added "%s"。' . "\n"; +$lang->action->desc->removeDiff = 'Removed "%s"。' . "\n"; $lang->action->desc->linked2bug = '$date, linked to $extra by $actor'; $lang->action->desc->linked2testtask = '$date, linked to $extra by $actor'; $lang->action->desc->unlinkedfromtesttask = '$date, unlinked from $extra by $actor'; @@ -284,6 +286,7 @@ $lang->action->desc->linkhost = '$date, the host is linked by action->desc->createrepobranch = '$date, $actor created code branch $extra.' . "\n"; $lang->action->desc->unlinkrepobranch = '$date, $actor unlinked code branch $extra.' . "\n"; $lang->action->desc->changedprogram = '$date, $actor adjust the program $extra.' . "\n"; +$lang->action->desc->managedteam = '$date, by $actor managed team.' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor created a child task $extra。' . "\n"; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index da6a761d12..3dd613afc2 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -236,6 +236,8 @@ $lang->action->desc->verified = '$date, verifié par $actor< $lang->action->desc->diff1 = '%s a changé. Il est passé de "%s" à "%s".
' . "\n"; $lang->action->desc->diff2 = '%s a changé. La différence est ' . "\n" . "
%s
" . "\n
%s
"; $lang->action->desc->diff3 = 'Le nom du fichier %s a changé pour %s .' . "\n"; +$lang->action->desc->addDiff = 'Added "%s"。' . "\n"; +$lang->action->desc->removeDiff = 'Removed "%s"。' . "\n"; $lang->action->desc->linked2bug = '$date, affecté à $extra par $actor'; $lang->action->desc->linked2testtask = '$date, linked to $extra by $actor'; $lang->action->desc->unlinkedfromtesttask = '$date, unlinked from $extra by $actor'; @@ -284,6 +286,7 @@ $lang->action->desc->linkhost = '$date, the host is linked by action->desc->createrepobranch = '$date, $actor created code branch $extra.' . "\n"; $lang->action->desc->unlinkrepobranch = '$date, $actor unlinked code branch $extra.' . "\n"; $lang->action->desc->changedprogram = '$date, $actor adjust the program $extra.' . "\n"; +$lang->action->desc->managedteam = '$date, by $actor managed team.' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor a créé un sous-tâche $extra。' . "\n"; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 25a041ba2e..100b115d80 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -236,7 +236,9 @@ $lang->action->desc->verified = '$date, 由 $actor $lang->action->desc->diff1 = '修改了 %s,旧值为 "%s",新值为 "%s"。
' . "\n"; $lang->action->desc->diff2 = '修改了 %s,区别为:' . "\n" . "
%s
" . "\n
%s
"; $lang->action->desc->diff3 = '将文件名 %s 改为 %s 。' . "\n"; -$lang->action->desc->linked2bug = '$date 由 $actor 关联到构建 $extra'; +$lang->action->desc->addDiff = '添加了 "%s"。' . "\n"; +$lang->action->desc->removeDiff = '移除了 "%s"。' . "\n"; +$lang->action->desc->linked2bug = '$date 由 $actor 关联到版本 $extra'; $lang->action->desc->linked2testtask = '$date 由 $actor 关联到测试单 $extra'; $lang->action->desc->unlinkedfromtesttask = '$date 由 $actor 从测试单 $extra 中移除'; $lang->action->desc->resolved = '$date, 由 $actor 解决。' . "\n"; @@ -284,6 +286,7 @@ $lang->action->desc->linkhost = '$date, 由 $actor $lang->action->desc->createrepobranch = '$date, 由 $actor 创建了代码分支 $extra。' . "\n"; $lang->action->desc->unlinkrepobranch = '$date, 由 $actor 取消关联了代码分支 $extra。' . "\n"; $lang->action->desc->changedprogram = '$date, 由 $actor 调整了所属项目集。' . "\n"; +$lang->action->desc->managedteam = '$date, 由 $actor 维护团队。' . "\n"; /* 用来描述和父子任务相关的操作历史记录。*/ $lang->action->desc->createchildren = '$date, 由 $actor 创建子任务 $extra。' . "\n"; diff --git a/module/action/model.php b/module/action/model.php index a79bd095cb..5e757f932b 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1406,7 +1406,11 @@ class actionModel extends model foreach($histories as $history) { $history->fieldLabel = str_pad($history->fieldLabel, $maxLength, $this->lang->action->label->space); - if($history->diff != '') + if(strpos(',project,execution,', ",{$objectType},") !== false && strpos(',addDiff,removeDiff,', ",{$history->field},") !== false) + { + $content .= sprintf($this->lang->action->desc->{$history->field}, $history->diff) . '
'; + } + elseif($history->diff != '') { $history->diff = str_replace(array('', '', '', ''), array('[ins]', '[/ins]', '[del]', '[/del]'), $history->diff); $history->diff = $history->field != 'subversion' && $history->field != 'git' ? htmlSpecialString($history->diff) : $history->diff; // Keep the diff link.