@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rename ambiguous search-related "documents" to "items"

Summary:
Phorge's search calls all/any objects (tasks, changesets, mockups, commits, users) "documents".
The object types in {Diviner|Legalpad|Phriction} are also called documents.
Also note that the "Document Engine" stuff in PhabricatorSystemSelectViewAsController refers to viewing files in Diffusion (as Jupyter Notebook, as Source) which isn't changed by this patch.

When referring to all and any kind of object types, use the term "item" instead to decrease ambiguity.
This change only covers search UI strings exposed to end users.

Closes T16131

Test Plan:
* `grep -r " Document" .` and `grep -r " document" .` (good luck)
* Go to http://phorge.localhost/search/, check for "Open Documents" in the sidebar
* Go to http://phorge.localhost/search/query/advanced/, check for the "Document Status" checkboxes fields, check for "Document Types" search field, click its Browse button, check the dialog for "Browse Document Types" and "Select a document type"

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: amybones, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16131

Differential Revision: https://we.phorge.it/D26114

+25 -25
+4 -4
src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php
··· 114 114 PhabricatorSearchRelationship::RELATIONSHIP_CLOSED => pht('Closed'), 115 115 ); 116 116 $status_control = id(new AphrontFormCheckboxControl()) 117 - ->setLabel(pht('Document Status')); 117 + ->setLabel(pht('Item Status')); 118 118 foreach ($statuses as $status => $name) { 119 119 $status_control->addCheckbox( 120 120 'statuses[]', ··· 127 127 $type_values = array_fuse($type_values); 128 128 129 129 $types_control = id(new AphrontFormTokenizerControl()) 130 - ->setLabel(pht('Document Types')) 130 + ->setLabel(pht('Item Types')) 131 131 ->setName('types') 132 132 ->setDatasource(new PhabricatorSearchDocumentTypeDatasource()) 133 133 ->setValue($type_values); ··· 180 180 181 181 protected function getBuiltinQueryNames() { 182 182 return array( 183 - 'all' => pht('All Documents'), 184 - 'open' => pht('Open Documents'), 183 + 'all' => pht('All Items'), 184 + 'open' => pht('Open Items'), 185 185 'open-tasks' => pht('Open Tasks'), 186 186 ); 187 187 }
+2 -2
src/applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php
··· 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 6 public function getBrowseTitle() { 7 - return pht('Browse Document Types'); 7 + return pht('Browse Item Types'); 8 8 } 9 9 10 10 public function getPlaceholderText() { 11 - return pht('Select a document type...'); 11 + return pht('Select an item type...'); 12 12 } 13 13 14 14 public function getDatasourceApplicationClass() {
+18 -18
src/docs/user/userguide/search.diviner
··· 1 1 @title Search User Guide 2 2 @group userguide 3 3 4 - Introduction to searching for documents in Phorge. 4 + Introduction to searching for items and objects in Phorge. 5 5 6 6 Overview 7 7 ======== 8 8 9 - Phorge has two major ways to search for documents and objects (like tasks, 9 + Phorge has two major ways to search for items (like tasks, 10 10 code reviews, users, wiki documents, and so on): **global search** and 11 11 **application search**. 12 12 ··· 15 15 search, and helpful if you're searching for a text string. 16 16 17 17 **Application search** allows you to search within an application (like 18 - Maniphest) for documents of a specific type. Because application search is only 18 + Maniphest) for items of a specific type. Because application search is only 19 19 searching one type of object, it can provide more powerful options for 20 20 filtering, ordering, and displaying the results. 21 21 ··· 35 35 dropdown to the left of the search box to select a different search scope. 36 36 37 37 If you choose the **Current Application** scope, Phorge will search for 38 - open documents in the current application. For example, if you're in Maniphest 38 + open items in the current application. For example, if you're in Maniphest 39 39 and run a search, you'll get matching tasks. If you're in Phriction and run a 40 40 search, you'll get matching wiki documents. 41 41 42 42 Some pages (like the 404 page) don't belong to an application, or belong to an 43 - application which doesn't have any searchable documents. In these cases, 44 - Phorge will search all documents. 43 + application which doesn't have any searchable items. In these cases, 44 + Phorge will search all items. 45 45 46 46 To quickly **jump to an object** like a task, enter the object's ID in the 47 47 global search box and search for it. For example, you can enter `T123` or ··· 63 63 64 64 Application search gives you a more powerful way to search one type of document, 65 65 like tasks. Most applications provide application search interfaces for the 66 - documents or objects they let you create: these pages have queries in the left 67 - menu, show objects or documents in the main content area, and have controls 66 + items they let you create: these pages have queries in the left 67 + menu, show items in the main content area, and have controls 68 68 for refining the results. 69 69 70 70 These interfaces support **saved queries** and **typeaheads**. ··· 145 145 See below for more detail. 146 146 147 147 **Substrings**: Normally, query terms are searched for as words, so searching 148 - for `read` won't find documents which only contain the word `threaded`, even 148 + for `read` won't find items which only contain the word `threaded`, even 149 149 though "read" is a substring of "threaded". With the substring operator, `~`, 150 - you can search for substrings instead: the query `~read` will match documents 150 + you can search for substrings instead: the query `~read` will match items 151 151 which contain that text anywhere, even in the middle of a word. 152 152 153 - **Quoted Terms**: When you search for multiple terms, documents which match 153 + **Quoted Terms**: When you search for multiple terms, items which match 154 154 each term will be returned, even if the terms are not adjacent in the document. 155 155 For example, the query `void star` will match a document titled `A star in the 156 156 void`, because it matches both `void` and `star`. To search for an exact 157 157 sequence of terms, quote them: `"void star"`. This query will only match 158 - documents which use those terms as written. 158 + items which use those terms as written. 159 159 160 - **Stemming**: Searching for a term like `rearming` will find documents which 160 + **Stemming**: Searching for a term like `rearming` will find items which 161 161 contain variations of the word, like `rearm`, `rearms`, and `rearmed`. To 162 162 search for an an exact word, quote the term: `"rearming"`. 163 163 164 164 **Field Search**: By default, query terms are searched for in the title, body, 165 165 and comments. If you only want to search for a term in titles, use `title:`. 166 - For example, `title:platypus` only finds documents with that term in the 166 + For example, `title:platypus` only finds items with that term in the 167 167 title. This can be combined with other operators, for example `title:~platypus` 168 168 or `title:"platypus attorney"`. These scopes are also supported: 169 169 ··· 172 172 - `core:...` searches titles and bodies, but not comments. 173 173 - `comment:...` searches only comments. 174 174 175 - **Filtering Matches**: You can remove documents which match certain terms from 176 - the result set with `-`. For example: `platypus -mammal`. Documents which match 175 + **Filtering Matches**: You can remove items which match certain terms from 176 + the result set with `-`. For example: `platypus -mammal`. Items which match 177 177 negated terms will be filtered out of the result set. 178 178 179 179 **Matching Entire Fields**: If you know the exact name of an object and want 180 180 to find only that object, you can use the `=` operator. A query like 181 181 `title:"warp drive"` will find a document titled "Warp Drive", but will also 182 - find documents with longer titles, like "Not a Warp Drive". The `=` operator 183 - requires that the entire field match the query exactly, so //only// documents 182 + find items with longer titles, like "Not a Warp Drive". The `=` operator 183 + requires that the entire field match the query exactly, so //only// items 184 184 exactly titled "Warp Drive" will be matched by the query (but note that the 185 185 query is still case insensitive). 186 186
+1 -1
src/view/page/menu/PhabricatorMainMenuSearchView.php
··· 129 129 130 130 $items[] = array( 131 131 'icon' => 'fa-globe', 132 - 'name' => pht('All Documents'), 132 + 'name' => pht('All Items'), 133 133 'value' => 'all', 134 134 ); 135 135