1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +01:00

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
This commit is contained in:
epriestley 2016-01-24 09:39:53 -08:00
parent 7bbd949703
commit cb1c3424a8
6 changed files with 24 additions and 22 deletions

View file

@ -190,7 +190,7 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController {
if (!$tasks) { if (!$tasks) {
return $this->renderMiniPanel( return $this->renderMiniPanel(
pht('No "Needs Triage" Tasks'), 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'); $title = pht('Needs Triage');

View file

@ -278,8 +278,9 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
foreach ($tasks as $key => $task) { foreach ($tasks as $key => $task) {
if (!$task->getGroupByProjectPHID()) { if (!$task->getGroupByProjectPHID()) {
// This task is either not in any projects, or only in projects // This task is either not tagged with any projects, or only tagged
// which we're ignoring because they're being queried for explicitly. // with projects which we're ignoring because they're being queried
// for explicitly.
continue; continue;
} }
@ -642,14 +643,14 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
* Return project PHIDs which we should ignore when grouping tasks by * Return project PHIDs which we should ignore when grouping tasks by
* project. For example, if a user issues a query like: * 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 * ...then we don't show "Frontend" or "Bugs" groups in the result set, since
* they're meaningless as all results are in both groups. * they're meaningless as all results are in both groups.
* *
* Similarly, for queries like: * 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 * ...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.) * the case that there are several "any" projects, we do not ignore them.)

View file

@ -44,13 +44,13 @@ final class PhabricatorProjectsEditEngineExtension
$projects_field = id(new PhabricatorProjectsEditField()) $projects_field = id(new PhabricatorProjectsEditField())
->setKey('projectPHIDs') ->setKey('projectPHIDs')
->setLabel(pht('Projects')) ->setLabel(pht('Tags'))
->setEditTypeKey('projects') ->setEditTypeKey('projects')
->setAliases(array('project', 'projects')) ->setAliases(array('project', 'projects', 'tag', 'tags'))
->setIsCopyable(true) ->setIsCopyable(true)
->setUseEdgeTransactions(true) ->setUseEdgeTransactions(true)
->setCommentActionLabel(pht('Change Projects')) ->setCommentActionLabel(pht('Change Project Tags'))
->setDescription(pht('Select projects for the object.')) ->setDescription(pht('Select project tags for the object.'))
->setTransactionType($edge_type) ->setTransactionType($edge_type)
->setMetadataValue('edge:type', $project_edge_type) ->setMetadataValue('edge:type', $project_edge_type)
->setValue($project_phids); ->setValue($project_phids);
@ -58,14 +58,14 @@ final class PhabricatorProjectsEditEngineExtension
$projects_field->setViewer($engine->getViewer()); $projects_field->setViewer($engine->getViewer());
$edit_add = $projects_field->getConduitEditType('projects.add') $edit_add = $projects_field->getConduitEditType('projects.add')
->setConduitDescription(pht('Add projects.')); ->setConduitDescription(pht('Add project tags.'));
$edit_set = $projects_field->getConduitEditType('projects.set') $edit_set = $projects_field->getConduitEditType('projects.set')
->setConduitDescription( ->setConduitDescription(
pht('Set projects, overwriting current value.')); pht('Set project tags, overwriting current value.'));
$edit_rem = $projects_field->getConduitEditType('projects.remove') $edit_rem = $projects_field->getConduitEditType('projects.remove')
->setConduitDescription(pht('Remove projects.')); ->setConduitDescription(pht('Remove project tags.'));
return array( return array(
$projects_field, $projects_field,

View file

@ -41,10 +41,10 @@ final class PhabricatorProjectsSearchEngineExtension
$fields[] = id(new PhabricatorProjectSearchField()) $fields[] = id(new PhabricatorProjectSearchField())
->setKey('projectPHIDs') ->setKey('projectPHIDs')
->setConduitKey('projects') ->setConduitKey('projects')
->setAliases(array('project', 'projects')) ->setAliases(array('project', 'projects', 'tag', 'tags'))
->setLabel(pht('Projects')) ->setLabel(pht('Tags'))
->setDescription( ->setDescription(
pht('Search for objects associated with given projects.')); pht('Search for objects tagged with given projects.'));
return $fields; return $fields;
} }

View file

@ -4,11 +4,11 @@ final class PhabricatorProjectNoProjectsDatasource
extends PhabricatorTypeaheadDatasource { extends PhabricatorTypeaheadDatasource {
public function getBrowseTitle() { public function getBrowseTitle() {
return pht('Browse Not In Any Projects'); return pht('Browse Not Tagged With Any Projects');
} }
public function getPlaceholderText() { public function getPlaceholderText() {
return pht('Type "not in any projects"...'); return pht('Type "not tagged with any projects"...');
} }
public function getDatasourceApplicationClass() { public function getDatasourceApplicationClass() {
@ -18,10 +18,11 @@ final class PhabricatorProjectNoProjectsDatasource
public function getDatasourceFunctions() { public function getDatasourceFunctions() {
return array( return array(
'null' => array( 'null' => array(
'name' => pht('Not In Any Projects'), 'name' => pht('Not Tagged With Any Projects'),
'summary' => pht('Find results which are not in any projects.'), 'summary' => pht(
'Find results which are not tagged with any projects.'),
'description' => pht( '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 ". "projects. It is usually most often used to find objects which ".
"might have slipped through the cracks and not been organized ". "might have slipped through the cracks and not been organized ".
"properly.\n\n%s", "properly.\n\n%s",
@ -60,7 +61,7 @@ final class PhabricatorProjectNoProjectsDatasource
} }
private function buildNullResult() { private function buildNullResult() {
$name = pht('Not In Any Projects'); $name = pht('Not Tagged With Any Projects');
return $this->newFunctionResult() return $this->newFunctionResult()
->setUnique(true) ->setUnique(true)

View file

@ -163,7 +163,7 @@ final class PhabricatorSearchApplicationSearchEngine
->appendControl( ->appendControl(
id(new AphrontFormTokenizerControl()) id(new AphrontFormTokenizerControl())
->setName('projectPHIDs') ->setName('projectPHIDs')
->setLabel(pht('In Any Project')) ->setLabel(pht('Tags'))
->setDatasource(new PhabricatorProjectDatasource()) ->setDatasource(new PhabricatorProjectDatasource())
->setValue($project_phids)); ->setValue($project_phids));
} }