From 92510eefb15fe6c140b295487a1e0830d29e2029 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 22 Mar 2015 19:20:17 -0400 Subject: [PATCH] Improve and translate pull-request --- app/Action/TaskMoveColumnAssigned.php | 7 +++---- app/Action/TaskMoveColumnUnAssigned.php | 7 +++---- app/Locale/da_DK/translations.php | 4 ++++ app/Locale/de_DE/translations.php | 4 ++++ app/Locale/es_ES/translations.php | 4 ++++ app/Locale/fi_FI/translations.php | 4 ++++ app/Locale/fr_FR/translations.php | 4 ++++ app/Locale/hu_HU/translations.php | 4 ++++ app/Locale/it_IT/translations.php | 4 ++++ app/Locale/ja_JP/translations.php | 4 ++++ app/Locale/nl_NL/translations.php | 4 ++++ app/Locale/pl_PL/translations.php | 4 ++++ app/Locale/pt_BR/translations.php | 4 ++++ app/Locale/ru_RU/translations.php | 4 ++++ app/Locale/sr_Latn_RS/translations.php | 4 ++++ app/Locale/sv_SE/translations.php | 4 ++++ app/Locale/th_TH/translations.php | 4 ++++ app/Locale/tr_TR/translations.php | 4 ++++ app/Locale/zh_CN/translations.php | 4 ++++ app/Model/TaskPosition.php | 6 ++++-- 20 files changed, 78 insertions(+), 10 deletions(-) diff --git a/app/Action/TaskMoveColumnAssigned.php b/app/Action/TaskMoveColumnAssigned.php index 0f47ee197..decf4b010 100644 --- a/app/Action/TaskMoveColumnAssigned.php +++ b/app/Action/TaskMoveColumnAssigned.php @@ -34,8 +34,8 @@ class TaskMoveColumnAssigned extends Base public function getActionRequiredParameters() { return array( - 'src_column_id' => t('From column'), - 'dest_column_id' => t('To column') + 'src_column_id' => t('Source column'), + 'dest_column_id' => t('Destination column') ); } @@ -85,7 +85,6 @@ class TaskMoveColumnAssigned extends Base */ public function hasRequiredCondition(array $data) { - return $data['column_id'] == $this->getParam('src_column_id') && - $data['owner_id']; + return $data['column_id'] == $this->getParam('src_column_id') && $data['owner_id']; } } diff --git a/app/Action/TaskMoveColumnUnAssigned.php b/app/Action/TaskMoveColumnUnAssigned.php index 66159b0ce..b773252d9 100644 --- a/app/Action/TaskMoveColumnUnAssigned.php +++ b/app/Action/TaskMoveColumnUnAssigned.php @@ -34,8 +34,8 @@ class TaskMoveColumnUnAssigned extends Base public function getActionRequiredParameters() { return array( - 'src_column_id' => t('From column'), - 'dest_column_id' => t('To column') + 'src_column_id' => t('Source column'), + 'dest_column_id' => t('Destination column') ); } @@ -85,7 +85,6 @@ class TaskMoveColumnUnAssigned extends Base */ public function hasRequiredCondition(array $data) { - return $data['column_id'] == $this->getParam('src_column_id') && - !$data['owner_id']; + return $data['column_id'] == $this->getParam('src_column_id') && ! $data['owner_id']; } } diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index 1732e7bb1..c12e6d9b6 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index 3ab31d972..3a3d145e8 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index f186dfc8d..00b342dde 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index f235cc129..d1ae24128 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 1aadb3937..340d16b1f 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -806,4 +806,8 @@ return array( 'Unable to remove this budget line.' => 'Impossible de supprimer cette ligne budgétaire.', 'USD - US Dollar' => 'USD - Dollar américain', 'Remaining' => 'Restant', + 'Destination column' => 'Colonne de destination', + 'Move the task to another column when assigned to a user' => 'Déplacer la tâche dans une autre colonne lorsque celle-ci est assignée à quelqu\'un', + 'Move the task to another column when assignee is cleared' => 'Déplacer la tâche dans une autre colonne lorsque celle-ci n\'est plus assignée', + 'Source column' => 'Colonne d\'origine', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 75cdbebcf..a8d5b6378 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index d5fd69027..6e704ca15 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index 6e3c14c82..438341452 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index 2b434d53d..00ef6023b 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index 4bee7c42a..2f5be941a 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index edba2cae4..6edf5d0d9 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 6a2ed0730..8f597adcc 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index 83d6eaa3a..9c7f63a85 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index 5b3b31c3e..212440a7e 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 4b41e6251..bc94adf4a 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index 488526f08..0272a7f80 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index 31d636322..e99fedab8 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -804,4 +804,8 @@ return array( // 'Unable to remove this budget line.' => '', // 'USD - US Dollar' => '', // 'Remaining' => '', + // 'Destination column' => '', + // 'Move the task to another column when assigned to a user' => '', + // 'Move the task to another column when assignee is cleared' => '', + // 'Source column' => '', ); diff --git a/app/Model/TaskPosition.php b/app/Model/TaskPosition.php index c2b5cb86e..6dd10b026 100644 --- a/app/Model/TaskPosition.php +++ b/app/Model/TaskPosition.php @@ -21,6 +21,7 @@ class TaskPosition extends Base * @param integer $column_id Column id * @param integer $position Position (must be >= 1) * @param integer $swimlane_id Swimlane id + * @param boolean $fire_events Fire events * @return boolean */ public function movePosition($project_id, $task_id, $column_id, $position, $swimlane_id = 0, $fire_events = true) @@ -30,13 +31,14 @@ class TaskPosition extends Base $result = $this->calculateAndSave($project_id, $task_id, $column_id, $position, $swimlane_id); if ($result) { - + if ($original_task['swimlane_id'] != $swimlane_id) { $this->calculateAndSave($project_id, 0, $column_id, 1, $original_task['swimlane_id']); } - if ($fire_events) + if ($fire_events) { $this->fireEvents($original_task, $column_id, $position, $swimlane_id); + } } return $result;