From 6a80b6a588c86e9684510548336f3ba1e7f50cfd Mon Sep 17 00:00:00 2001 From: lkassianik Date: Fri, 23 May 2014 13:50:20 -0700 Subject: [PATCH] "Blocks" instead of "Dependent Tasks" Summary: Fixes T5021, UI labels for the fields, "Edit Dependencies" in the action list, transaction strings ("added dependent tasks", etc), UI strings in the dependencies dialog (title/submit/etc) Test Plan: Open task, edit blocks, dialog should have new term, task history should show "blocks" instead of "dependencies" Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T5021 Differential Revision: https://secure.phabricator.com/D9270 --- .../ManiphestTaskDetailController.php | 8 ++--- .../PhabricatorSearchAttachController.php | 8 +++++ .../edges/constants/PhabricatorEdgeConfig.php | 7 +++-- .../PhabricatorBaseEnglishTranslation.php | 30 ++++++++++++++++++- 4 files changed, 45 insertions(+), 8 deletions(-) diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index c75f4d0673..9bb4ad7604 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -470,8 +470,8 @@ final class ManiphestTaskDetailController extends ManiphestController { $view->addAction( id(new PhabricatorActionView()) - ->setName(pht('Edit Dependencies')) - ->setHref("/search/attach/{$phid}/TASK/dependencies/") + ->setName(pht('Edit Blocking Tasks')) + ->setHref("/search/attach/{$phid}/TASK/blocks/") ->setWorkflow(true) ->setIcon('fa-link') ->setDisabled(!$can_edit) @@ -593,9 +593,9 @@ final class ManiphestTaskDetailController extends ManiphestController { $edge_types = array( PhabricatorEdgeConfig::TYPE_TASK_DEPENDED_ON_BY_TASK - => pht('Dependent Tasks'), + => pht('Blocking Tasks'), PhabricatorEdgeConfig::TYPE_TASK_DEPENDS_ON_TASK - => pht('Depends On'), + => pht('Blocked By'), PhabricatorEdgeConfig::TYPE_TASK_HAS_RELATED_DREV => pht('Differential Revisions'), PhabricatorEdgeConfig::TYPE_TASK_HAS_MOCK diff --git a/src/applications/search/controller/PhabricatorSearchAttachController.php b/src/applications/search/controller/PhabricatorSearchAttachController.php index 42bc95a8cc..2218ee5662 100644 --- a/src/applications/search/controller/PhabricatorSearchAttachController.php +++ b/src/applications/search/controller/PhabricatorSearchAttachController.php @@ -13,6 +13,7 @@ final class PhabricatorSearchAttachController const ACTION_ATTACH = 'attach'; const ACTION_MERGE = 'merge'; const ACTION_DEPENDENCIES = 'dependencies'; + const ACTION_BLOCKS = 'blocks'; const ACTION_EDGE = 'edge'; public function willProcessRequest(array $data) { @@ -47,6 +48,7 @@ final class PhabricatorSearchAttachController switch ($this->action) { case self::ACTION_EDGE: case self::ACTION_DEPENDENCIES: + case self::ACTION_BLOCKS: case self::ACTION_ATTACH: $edge_type = $this->getEdgeType($object_type, $attach_type); break; @@ -260,6 +262,12 @@ final class PhabricatorSearchAttachController $button_text = "Save Dependencies"; $instructions = null; break; + case self::ACTION_BLOCKS: + $dialog_title = pht('Edit Blocking Tasks'); + $header_text = pht('Current Blocking Tasks'); + $button_text = pht('Save Blocking Tasks'); + $instructions = null; + break; } return array( diff --git a/src/infrastructure/edges/constants/PhabricatorEdgeConfig.php b/src/infrastructure/edges/constants/PhabricatorEdgeConfig.php index 91283a6aee..378dfe9cc0 100644 --- a/src/infrastructure/edges/constants/PhabricatorEdgeConfig.php +++ b/src/infrastructure/edges/constants/PhabricatorEdgeConfig.php @@ -292,10 +292,11 @@ final class PhabricatorEdgeConfig extends PhabricatorEdgeConstants { case self::TYPE_DREV_HAS_COMMIT: return '%s added %d commit(s): %s.'; case self::TYPE_TASK_DEPENDS_ON_TASK: + return '%s added %d blocking task(s): %s.'; case self::TYPE_DREV_DEPENDS_ON_DREV: return '%s added %d dependencie(s): %s.'; case self::TYPE_TASK_DEPENDED_ON_BY_TASK: - return '%s added %d dependent task(s): %s.'; + return '%s added %d blocked task(s): %s.'; case self::TYPE_COMMIT_HAS_TASK: case self::TYPE_DREV_HAS_RELATED_TASK: case self::TYPE_MOCK_HAS_TASK: @@ -369,9 +370,9 @@ final class PhabricatorEdgeConfig extends PhabricatorEdgeConstants { case self::TYPE_DREV_HAS_COMMIT: return '%s removed %d commit(s): %s.'; case self::TYPE_TASK_DEPENDS_ON_TASK: - return '%s removed %d dependencie(s): %s.'; + return '%s removed %d blocking task(s): %s.'; case self::TYPE_TASK_DEPENDED_ON_BY_TASK: - return '%s removed %d dependent task(s): %s.'; + return '%s removed %d blocked task(s): %s.'; case self::TYPE_COMMIT_HAS_TASK: case self::TYPE_DREV_HAS_RELATED_TASK: case self::TYPE_MOCK_HAS_TASK: diff --git a/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php index 451da3d1ca..acabccf577 100644 --- a/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php +++ b/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php @@ -354,12 +354,40 @@ abstract class PhabricatorBaseEnglishTranslation ), ), + '%s added %d blocking task(s): %s.' => array( + array( + '%s added a blocking task: %3$s.', + '%s added blocking tasks: %3$s.' + ), + ), + + '%s added %d blocked task(s): %s.' => array( + array( + '%s added a blocked task: %3$s.', + '%s added blocked tasks: %3$s.' + ) + ), + + '%s removed %d blocking task(s): %s.' => array( + array( + '%s removed a blocking task: %3$s.', + '%s removed blocking tasks: %3$s.' + ), + ), + + '%s removed %d blocked task(s): %s.' => array( + array( + '%s removed a blocked task: %3$s.', + '%s removed blocked tasks: %3$s.' + ) + ), + '%s edited answer(s), added %d: %s; removed %d: %s.' => '%s edited answers, added: %3$s; removed: %5$s', '%s added %d answer(s): %s.' => array( array( - '%s added a answer: %3$s.', + '%s added an answer: %3$s.', '%s added answers: %3$s.', ), ),