From cb1c3424a86a3c49125d4d5df8c96d94f8fa9c17 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 24 Jan 2016 09:39:53 -0800 Subject: [PATCH] Use "tag" more consistenty when referring to associating a project with an object Summary: Ref T10144. This isn't comprehensive, but we can give it a try and see how it feels? - EditEngine forms now say "Tags" instead of "Projects". - Modern SearchEngine forms now say "Tags" instead of "Projects". - For clarity, replaced as much "in project" language as I could find with "tagged with project" language. Test Plan: reading / grepping + used "not tagged with any project" token Reviewers: chad Reviewed By: chad Maniphest Tasks: T10144 Differential Revision: https://secure.phabricator.com/D15108 --- .../controller/PhabricatorHomeMainController.php | 2 +- .../maniphest/query/ManiphestTaskQuery.php | 9 +++++---- .../PhabricatorProjectsEditEngineExtension.php | 14 +++++++------- .../PhabricatorProjectsSearchEngineExtension.php | 6 +++--- .../PhabricatorProjectNoProjectsDatasource.php | 13 +++++++------ .../PhabricatorSearchApplicationSearchEngine.php | 2 +- 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/applications/home/controller/PhabricatorHomeMainController.php b/src/applications/home/controller/PhabricatorHomeMainController.php index 63ce763b69..9d604cf0d6 100644 --- a/src/applications/home/controller/PhabricatorHomeMainController.php +++ b/src/applications/home/controller/PhabricatorHomeMainController.php @@ -190,7 +190,7 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController { if (!$tasks) { return $this->renderMiniPanel( pht('No "Needs Triage" Tasks'), - pht('No tasks in projects you are a member of need triage.')); + pht('No tasks tagged with projects you are a member of need triage.')); } $title = pht('Needs Triage'); diff --git a/src/applications/maniphest/query/ManiphestTaskQuery.php b/src/applications/maniphest/query/ManiphestTaskQuery.php index 5f86c7a68b..4b29ba49f7 100644 --- a/src/applications/maniphest/query/ManiphestTaskQuery.php +++ b/src/applications/maniphest/query/ManiphestTaskQuery.php @@ -278,8 +278,9 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery { foreach ($tasks as $key => $task) { if (!$task->getGroupByProjectPHID()) { - // This task is either not in any projects, or only in projects - // which we're ignoring because they're being queried for explicitly. + // This task is either not tagged with any projects, or only tagged + // with projects which we're ignoring because they're being queried + // for explicitly. continue; } @@ -642,14 +643,14 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery { * Return project PHIDs which we should ignore when grouping tasks by * project. For example, if a user issues a query like: * - * Tasks in all projects: Frontend, Bugs + * Tasks tagged with all projects: Frontend, Bugs * * ...then we don't show "Frontend" or "Bugs" groups in the result set, since * they're meaningless as all results are in both groups. * * Similarly, for queries like: * - * Tasks in any projects: Public Relations + * Tasks tagged with any projects: Public Relations * * ...we ignore the single project, as every result is in that project. (In * the case that there are several "any" projects, we do not ignore them.) diff --git a/src/applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php b/src/applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php index ccb29d86ef..cd481946b2 100644 --- a/src/applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php +++ b/src/applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php @@ -44,13 +44,13 @@ final class PhabricatorProjectsEditEngineExtension $projects_field = id(new PhabricatorProjectsEditField()) ->setKey('projectPHIDs') - ->setLabel(pht('Projects')) + ->setLabel(pht('Tags')) ->setEditTypeKey('projects') - ->setAliases(array('project', 'projects')) + ->setAliases(array('project', 'projects', 'tag', 'tags')) ->setIsCopyable(true) ->setUseEdgeTransactions(true) - ->setCommentActionLabel(pht('Change Projects')) - ->setDescription(pht('Select projects for the object.')) + ->setCommentActionLabel(pht('Change Project Tags')) + ->setDescription(pht('Select project tags for the object.')) ->setTransactionType($edge_type) ->setMetadataValue('edge:type', $project_edge_type) ->setValue($project_phids); @@ -58,14 +58,14 @@ final class PhabricatorProjectsEditEngineExtension $projects_field->setViewer($engine->getViewer()); $edit_add = $projects_field->getConduitEditType('projects.add') - ->setConduitDescription(pht('Add projects.')); + ->setConduitDescription(pht('Add project tags.')); $edit_set = $projects_field->getConduitEditType('projects.set') ->setConduitDescription( - pht('Set projects, overwriting current value.')); + pht('Set project tags, overwriting current value.')); $edit_rem = $projects_field->getConduitEditType('projects.remove') - ->setConduitDescription(pht('Remove projects.')); + ->setConduitDescription(pht('Remove project tags.')); return array( $projects_field, diff --git a/src/applications/project/engineextension/PhabricatorProjectsSearchEngineExtension.php b/src/applications/project/engineextension/PhabricatorProjectsSearchEngineExtension.php index 37d00e9391..031dad7577 100644 --- a/src/applications/project/engineextension/PhabricatorProjectsSearchEngineExtension.php +++ b/src/applications/project/engineextension/PhabricatorProjectsSearchEngineExtension.php @@ -41,10 +41,10 @@ final class PhabricatorProjectsSearchEngineExtension $fields[] = id(new PhabricatorProjectSearchField()) ->setKey('projectPHIDs') ->setConduitKey('projects') - ->setAliases(array('project', 'projects')) - ->setLabel(pht('Projects')) + ->setAliases(array('project', 'projects', 'tag', 'tags')) + ->setLabel(pht('Tags')) ->setDescription( - pht('Search for objects associated with given projects.')); + pht('Search for objects tagged with given projects.')); return $fields; } diff --git a/src/applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php b/src/applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php index 156f04605f..d7d22f2417 100644 --- a/src/applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php +++ b/src/applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php @@ -4,11 +4,11 @@ final class PhabricatorProjectNoProjectsDatasource extends PhabricatorTypeaheadDatasource { public function getBrowseTitle() { - return pht('Browse Not In Any Projects'); + return pht('Browse Not Tagged With Any Projects'); } public function getPlaceholderText() { - return pht('Type "not in any projects"...'); + return pht('Type "not tagged with any projects"...'); } public function getDatasourceApplicationClass() { @@ -18,10 +18,11 @@ final class PhabricatorProjectNoProjectsDatasource public function getDatasourceFunctions() { return array( 'null' => array( - 'name' => pht('Not In Any Projects'), - 'summary' => pht('Find results which are not in any projects.'), + 'name' => pht('Not Tagged With Any Projects'), + 'summary' => pht( + 'Find results which are not tagged with any projects.'), 'description' => pht( - "This function matches results which are not associated with any ". + "This function matches results which are not tagged with any ". "projects. It is usually most often used to find objects which ". "might have slipped through the cracks and not been organized ". "properly.\n\n%s", @@ -60,7 +61,7 @@ final class PhabricatorProjectNoProjectsDatasource } private function buildNullResult() { - $name = pht('Not In Any Projects'); + $name = pht('Not Tagged With Any Projects'); return $this->newFunctionResult() ->setUnique(true) diff --git a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php index e1502294d3..835e483cff 100644 --- a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php +++ b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php @@ -163,7 +163,7 @@ final class PhabricatorSearchApplicationSearchEngine ->appendControl( id(new AphrontFormTokenizerControl()) ->setName('projectPHIDs') - ->setLabel(pht('In Any Project')) + ->setLabel(pht('Tags')) ->setDatasource(new PhabricatorProjectDatasource()) ->setValue($project_phids)); }