@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.

Re-word applications "installed" to "enabled" in the UI

Summary:
Change the strings "[un]install[ed]" to "[en|dis]able[d]" throughout the user interface.
This does not touch function names, class names, or config settings which still use the term "install".

Refs T16352

Test Plan: Browse pages and dialogs, I'd guess.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

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

Maniphest Tasks: T16352

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

+66 -65
+1 -1
src/applications/audit/query/PhabricatorCommitSearchEngine.php
··· 236 236 237 237 $bucket = $this->getResultBucket($query); 238 238 239 - // hide "Auditors" on /diffusion/commit/query/all/ if Audit not installed 239 + // hide "Auditors" on /diffusion/commit/query/all/ if Audit not enabled 240 240 $show_auditors = id(new PhabricatorAuditApplication())->isInstalled(); 241 241 $template = id(new DiffusionCommitGraphView()) 242 242 ->setViewer($viewer)
+10 -10
src/applications/base/PhabricatorApplication.php
··· 406 406 407 407 408 408 /** 409 - * Determine if an application is installed, by application class name. 409 + * Determine if an application is enabled, by application class name. 410 410 * 411 - * To check if an application is installed //and// available to a particular 411 + * To check if an application is enabled //and// available to a particular 412 412 * viewer, user @{method:isClassInstalledForViewer}. 413 413 * 414 414 * @param class-string<PhabricatorApplication> $class Application class name. 415 - * @return bool True if the class is installed. 415 + * @return bool True if the application is enabled. 416 416 * @task meta 417 417 */ 418 418 final public static function isClassInstalled($class) { ··· 421 421 422 422 423 423 /** 424 - * Determine if an application is installed and available to a viewer, by 424 + * Determine if an application is enabled and available to a viewer, by 425 425 * application class name. 426 426 * 427 - * To check if an application is installed at all, use 427 + * To check if an application is enabled at all, use 428 428 * @{method:isClassInstalled}. 429 429 * 430 430 * @param class-string<PhabricatorApplication> $class Application class name. 431 431 * @param PhabricatorUser $viewer Viewing user. 432 - * @return bool True if the class is installed for the viewer. 432 + * @return bool True if the application is enabled for the viewer. 433 433 * @task meta 434 434 */ 435 435 final public static function isClassInstalledForViewer( ··· 451 451 } else { 452 452 $application = self::getByClass($class); 453 453 if (!$application->canUninstall()) { 454 - // If the application can not be uninstalled, always allow viewers 454 + // If the application can not be disabled, always allow viewers 455 455 // to see it. In particular, this allows logged-out viewers to see 456 456 // Settings and load global default settings even if the install 457 457 // does not allow public viewers. ··· 471 471 } 472 472 473 473 /** 474 - * Determine if an application is installed at all, and if a viewer is given 474 + * Determine if an application is enabled at all, and if a viewer is given 475 475 * if the application is available to a viewer, by application class name. 476 476 * 477 - * To check if an application is installed at all, use 477 + * To check if an application is enabled at all, use 478 478 * @{method:isClassInstalled}. 479 479 * 480 480 * @param class-string<PhabricatorApplication> $class Application class name. 481 481 * @param PhabricatorUser|null $viewer Viewing user. 482 - * @return bool True if the class is installed or if the installed class is 482 + * @return bool True if the class is enabled or if the enabled application is 483 483 * available to the viewer when a viewer is given. 484 484 * @task meta 485 485 */
+1 -1
src/applications/conduit/method/ConduitAPIMethod.php
··· 269 269 270 270 /** 271 271 * Optionally, return a @{class:PhabricatorApplication} which this call is 272 - * part of. The call will be disabled when the application is uninstalled. 272 + * part of. The call will be disabled when the application is disabled. 273 273 * 274 274 * @return PhabricatorApplication|null Related application. 275 275 */
+1 -1
src/applications/conduit/protocol/exception/ConduitApplicationNotInstalledException.php
··· 6 6 public function __construct(ConduitAPIMethod $method, $application) { 7 7 parent::__construct( 8 8 pht( 9 - "Method '%s' belongs to application '%s', which is not installed.", 9 + "Method '%s' belongs to application '%s', which is not enabled.", 10 10 $method->getAPIMethodName(), 11 11 $application)); 12 12 }
+6 -6
src/applications/config/option/PhabricatorCoreConfigOptions.php
··· 135 135 )) 136 136 ->setSummary( 137 137 pht( 138 - 'Install applications which are still under development.')) 138 + 'Enable applications which are still under development.')) 139 139 ->setDescription( 140 140 pht( 141 141 "IMPORTANT: The upstream does not provide support for prototype ". ··· 143 143 "\n\n". 144 144 "This platform includes prototype applications which are in an ". 145 145 "**early stage of development**. By default, prototype ". 146 - "applications are not installed, because they are often not yet ". 146 + "applications are disabled, because they are often not yet ". 147 147 "developed enough to be generally usable. You can enable ". 148 - "this option to install them if you're developing applications ". 148 + "this option to enable them if you're developing applications ". 149 149 "or are interested in previewing upcoming features.". 150 150 "\n\n". 151 151 "To learn more about prototypes, see [[ %s | %s ]].". 152 152 "\n\n". 153 - "After enabling prototypes, you can selectively uninstall them ". 153 + "After enabling prototypes, you can selectively disable them ". 154 154 "(like normal applications).", 155 155 $proto_doc_href, 156 156 $proto_doc_name)), ··· 239 239 $this->newOption('phabricator.uninstalled-applications', 'set', array()) 240 240 ->setLocked(true) 241 241 ->setLockedMessage(pht( 242 - 'Use the %s to manage installed applications.', 242 + 'Use the %s to manage enabled applications.', 243 243 phutil_tag( 244 244 'a', 245 245 array( ··· 247 247 ), 248 248 pht('Applications application')))) 249 249 ->setDescription( 250 - pht('Array containing list of uninstalled applications.')), 250 + pht('Array containing list of disabled applications.')), 251 251 $this->newOption('phabricator.application-settings', 'wild', array()) 252 252 ->setLocked(true) 253 253 ->setDescription(
+1 -1
src/applications/diffusion/editor/DiffusionCommitEditEngine.php
··· 101 101 102 102 $fields = array(); 103 103 // remove "Change Auditors" from "Add Action" dropdown etc 104 - // if Audit is not installed 104 + // if Audit is disabled 105 105 if (id(new PhabricatorAuditApplication())->isInstalled()) { 106 106 $fields[] = id(new PhabricatorDatasourceEditField()) 107 107 ->setKey('auditors')
+1 -1
src/applications/diffusion/herald/DiffusionAuditorsAddAuditorsHeraldAction.php
··· 9 9 return pht('Add auditors'); 10 10 } 11 11 12 - // hide "Add auditors" Herald action if Audit not installed 12 + // hide "Add auditors" Herald action if Audit is disabled 13 13 public function supportsRuleType($rule_type) { 14 14 if (id(new PhabricatorAuditApplication())->isInstalled()) { 15 15 return ($rule_type != HeraldRuleTypeConfig::RULE_TYPE_PERSONAL);
+1 -1
src/applications/diffusion/herald/DiffusionAuditorsAddSelfHeraldAction.php
··· 9 9 return pht('Add me as an auditor'); 10 10 } 11 11 12 - // hide "Add me as an auditor" Herald action if Audit not installed 12 + // hide "Add me as an auditor" Herald action if Audit is disabled 13 13 public function supportsRuleType($rule_type) { 14 14 if (id(new PhabricatorAuditApplication())->isInstalled()) { 15 15 return ($rule_type == HeraldRuleTypeConfig::RULE_TYPE_PERSONAL);
+1 -1
src/applications/diffusion/herald/DiffusionCommitAuditorsHeraldField.php
··· 5 5 6 6 const FIELDCONST = 'diffusion.commit.auditors'; 7 7 8 - // hide "Auditors" Herald condition if Audit not installed 8 + // hide "Auditors" Herald condition if Audit is disabled 9 9 public function supportsObject($object) { 10 10 if (id(new PhabricatorAuditApplication())->isInstalled()) { 11 11 return ($object instanceof PhabricatorRepositoryCommit);
+1 -1
src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php
··· 6 6 const FIELDCONST = 'diffusion.commit.package.audit'; 7 7 8 8 // hide "Affected packages that need audit" Herald condition 9 - // if Audit not installed 9 + // if Audit is disabled 10 10 public function supportsObject($object) { 11 11 if (id(new PhabricatorAuditApplication())->isInstalled()) { 12 12 return ($object instanceof PhabricatorRepositoryCommit);
+1 -1
src/applications/diffusion/view/DiffusionCommitGraphView.php
··· 181 181 $this->addBuildAction($item_view, $hash); 182 182 } 183 183 184 - // hide Audit entry on /diffusion/commit/query/all if Audit not installed 184 + // hide Audit entry on /diffusion/commit/query/all if Audit is disabled 185 185 if (id(new PhabricatorAuditApplication())->isInstalled()) { 186 186 $this->addAuditAction($item_view, $hash); 187 187 }
+2 -2
src/applications/feed/query/PhabricatorFeedTransactionQuery.php
··· 155 155 ->setAncestorClass(PhabricatorApplicationTransactionQuery::class) 156 156 ->execute(); 157 157 158 - // Remove TransactionQuery classes of uninstalled apps. Increases query 158 + // Remove TransactionQuery classes of disabled apps. Increases query 159 159 // performance and decreases likeliness of a "Query Overheated" error if 160 - // an app got uninstalled so data in it cannot be accessed anymore anyway. 160 + // an app got disabled so data in it cannot be accessed anymore anyway. 161 161 // See https://secure.phabricator.com/T13133, https://we.phorge.it/T15642 162 162 foreach ($queries as $key => $query) { 163 163 $app = $query->getQueryApplicationClass();
+1 -1
src/applications/harbormaster/storage/HarbormasterBuildable.php
··· 78 78 } 79 79 80 80 // Skip all of this logic if the Harbormaster application 81 - // isn't currently installed. 81 + // isn't currently enabled. 82 82 83 83 $harbormaster_app = PhabricatorHarbormasterApplication::class; 84 84 if (!PhabricatorApplication::isClassInstalled($harbormaster_app)) {
+1 -1
src/applications/herald/engine/HeraldEngine.php
··· 729 729 } 730 730 731 731 // The author must be able to create rules for the adapter's content type. 732 - // In particular, this means that the application must be installed and 732 + // In particular, this means that the application must be enabled and 733 733 // accessible to the user. For example, if a user writes a Differential 734 734 // rule and then loses access to Differential, this disables the rule. 735 735 $enabled = HeraldAdapter::getEnabledAdapterMap($rule->getAuthor());
+1 -1
src/applications/herald/query/HeraldRuleQuery.php
··· 94 94 95 95 // Filter out any rules that have invalid adapters, or have adapters the 96 96 // viewer isn't permitted to see or use (for example, Differential rules 97 - // if the user can't use Differential or Differential is not installed). 97 + // if the user can't use Differential or Differential is disabled). 98 98 $types = HeraldAdapter::getEnabledAdapterMap($this->getViewer()); 99 99 foreach ($rules as $key => $rule) { 100 100 if (empty($types[$rule->getContentType()])) {
+5 -5
src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
··· 33 33 ->setHeaderIcon($selected->getIcon()); 34 34 35 35 if ($selected->isInstalled()) { 36 - $header->setStatus('fa-check', 'bluegrey', pht('Installed')); 36 + $header->setStatus('fa-check', 'bluegrey', pht('Enabled')); 37 37 } else { 38 - $header->setStatus('fa-ban', 'dark', pht('Uninstalled')); 38 + $header->setStatus('fa-ban', 'dark', pht('Disabled')); 39 39 } 40 40 41 41 if (!$selected->isFirstParty()) { ··· 222 222 if ($application->isInstalled()) { 223 223 $curtain->addAction( 224 224 id(new PhabricatorActionView()) 225 - ->setName(pht('Uninstall')) 225 + ->setName(pht('Disable')) 226 226 ->setIcon('fa-times') 227 227 ->setDisabled(!$can_edit) 228 228 ->setWorkflow(true) 229 229 ->setHref($uninstall_uri)); 230 230 } else { 231 231 $action = id(new PhabricatorActionView()) 232 - ->setName(pht('Install')) 232 + ->setName(pht('Enable')) 233 233 ->setIcon('fa-plus') 234 234 ->setDisabled(!$can_edit) 235 235 ->setWorkflow(true) ··· 246 246 } else { 247 247 $curtain->addAction( 248 248 id(new PhabricatorActionView()) 249 - ->setName(pht('Uninstall')) 249 + ->setName(pht('Disable')) 250 250 ->setIcon('fa-times') 251 251 ->setWorkflow(true) 252 252 ->setDisabled(true)
+8 -8
src/applications/meta/controller/PhabricatorApplicationUninstallController.php
··· 76 76 ->setTitle(pht('Confirmation')) 77 77 ->appendChild( 78 78 pht( 79 - 'Install %s application?', 79 + 'Enable %s application?', 80 80 $application->getName())) 81 - ->addSubmitButton(pht('Install')); 81 + ->addSubmitButton(pht('Enable')); 82 82 83 83 } else { 84 84 $dialog 85 85 ->setTitle(pht('Information')) 86 - ->appendChild(pht('You cannot install an installed application.')); 86 + ->appendChild(pht('You cannot enable an enabled application.')); 87 87 } 88 88 } else { 89 89 if ($application->canUninstall()) { 90 - $dialog->setTitle(pht('Really Uninstall Application?')); 90 + $dialog->setTitle(pht('Really Disable Application?')); 91 91 92 92 if ($application instanceof PhabricatorHomeApplication) { 93 93 $dialog 94 94 ->appendParagraph( 95 95 pht( 96 - 'Are you absolutely certain you want to uninstall the Home '. 96 + 'Are you absolutely certain you want to disable the Home '. 97 97 'application?')) 98 98 ->appendParagraph( 99 99 pht( ··· 105 105 $dialog 106 106 ->appendParagraph( 107 107 pht( 108 - 'Really uninstall the %s application?', 108 + 'Really disable the %s application?', 109 109 $application->getName())) 110 - ->addSubmitButton(pht('Uninstall')); 110 + ->addSubmitButton(pht('Disable')); 111 111 } 112 112 } else { 113 113 $dialog 114 114 ->setTitle(pht('Information')) 115 115 ->appendChild( 116 116 pht( 117 - 'This application is required and cannot be uninstalled.')); 117 + 'This application is required and cannot be disabled.')); 118 118 } 119 119 } 120 120 return id(new AphrontDialogResponse())->setDialog($dialog);
+4 -4
src/applications/meta/query/PhabricatorAppSearchEngine.php
··· 96 96 ->setValue($saved->getParameter('name'))) 97 97 ->appendChild( 98 98 id(new AphrontFormSelectControl()) 99 - ->setLabel(pht('Installed')) 99 + ->setLabel(pht('Enabled')) 100 100 ->setName('installed') 101 101 ->setValue($this->getBoolFromQuery($saved, 'installed')) 102 102 ->setOptions( 103 103 array( 104 104 '' => pht('Show All Applications'), 105 - 'true' => pht('Show Installed Applications'), 106 - 'false' => pht('Show Uninstalled Applications'), 105 + 'true' => pht('Show Enabled Applications'), 106 + 'false' => pht('Show Disabled Applications'), 107 107 ))) 108 108 ->appendChild( 109 109 id(new AphrontFormSelectControl()) ··· 272 272 } 273 273 274 274 if (!$application->isInstalled()) { 275 - $item->addAttribute(pht('Uninstalled')); 275 + $item->addAttribute(pht('Disabled')); 276 276 $item->setDisabled(true); 277 277 } 278 278
+6 -5
src/applications/meta/xactions/PhabricatorApplicationUninstallTransaction.php
··· 45 45 $content_source = $editor->getContentSource(); 46 46 47 47 // Today, changing config requires "Administrator", but "Can Edit" on 48 - // applications to let you uninstall them may be granted to any user. 48 + // applications to let you disable an application may be granted to any 49 + // user. 49 50 PhabricatorConfigEditor::storeNewValue( 50 51 PhabricatorUser::getOmnipotentUser(), 51 52 $config_entry, ··· 57 58 public function getTitle() { 58 59 if ($this->getNewValue() === 'uninstalled') { 59 60 return pht( 60 - '%s uninstalled this application.', 61 + '%s disabled this application.', 61 62 $this->renderAuthor()); 62 63 } else { 63 64 return pht( 64 - '%s installed this application.', 65 + '%s enabled this application.', 65 66 $this->renderAuthor()); 66 67 } 67 68 } ··· 69 70 public function getTitleForFeed() { 70 71 if ($this->getNewValue() === 'uninstalled') { 71 72 return pht( 72 - '%s uninstalled %s.', 73 + '%s disabled %s.', 73 74 $this->renderAuthor(), 74 75 $this->renderObject()); 75 76 } else { 76 77 return pht( 77 - '%s installed %s.', 78 + '%s enabled %s.', 78 79 $this->renderAuthor(), 79 80 $this->renderObject()); 80 81 }
+1 -1
src/applications/phame/site/PhameSite.php
··· 12 12 $phame_installed = PhabricatorApplication::isClassInstalled( 13 13 PhabricatorPhameApplication::class); 14 14 if (!$phame_installed) { 15 - // Don't activate Phame if the the application is uninstalled. 15 + // Don't activate Phame if the the application is disabled. 16 16 return false; 17 17 } 18 18
+4 -4
src/applications/phid/type/PhabricatorPHIDType.php
··· 169 169 170 170 171 171 /** 172 - * Get all PHID types of applications installed for a given viewer. 172 + * Get all PHID types of applications enabled for a given viewer. 173 173 * 174 174 * @param PhabricatorUser $viewer Viewing user. 175 - * @return array<string, PhabricatorPHIDType> Map of constants to installed 175 + * @return array<string, PhabricatorPHIDType> Map of constants to enabled 176 176 * types. 177 177 */ 178 178 public static function getAllInstalledTypes(PhabricatorUser $viewer) { ··· 186 186 187 187 if ($app_class === null) { 188 188 // If the PHID type isn't bound to an application, include it as 189 - // installed. 189 + // enabled. 190 190 $installed_types[$key] = $type; 191 191 continue; 192 192 } 193 193 194 - // Otherwise, we need to check if this application is installed before 194 + // Otherwise, we need to check if this application is enabled before 195 195 // including the PHID type. 196 196 $app_classes[$app_class][$key] = $type; 197 197 }
+1 -1
src/applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php
··· 26 26 return false; 27 27 } 28 28 29 - // Points are only available if Maniphest is installed. 29 + // Points are only available if Maniphest is enabled. 30 30 $class = PhabricatorManiphestApplication::class; 31 31 if (!PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) { 32 32 return false;
+1 -1
src/applications/project/menuitem/PhabricatorProjectWorkboardProfileMenuItem.php
··· 25 25 public function shouldEnableForObject($object) { 26 26 $viewer = $this->getViewer(); 27 27 28 - // Workboards are only available if Maniphest is installed. 28 + // Workboards are only available if Maniphest is enabled. 29 29 $class = PhabricatorManiphestApplication::class; 30 30 if (!PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) { 31 31 return false;
+1 -1
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
··· 673 673 if (!$this->application) { 674 674 throw new Exception( 675 675 pht( 676 - 'Application "%s" is not installed!', 676 + 'Application "%s" is not enabled!', 677 677 $class)); 678 678 } 679 679 }
+1 -1
src/applications/search/fulltextstorage/PhabricatorFerretFulltextStorageEngine.php
··· 63 63 $search_engine = $engine->newSearchEngine() 64 64 ->setViewer($viewer); 65 65 66 - // Ignore result objects from SearchEngines belonging to uninstalled apps 66 + // Ignore result objects from SearchEngines belonging to disabled apps 67 67 $app_class = $search_engine->getApplicationClassName(); 68 68 $app = PhabricatorApplication::isClassInstalled($app_class); 69 69 if (!$app) {
+1 -1
src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php
··· 153 153 ->execute(); 154 154 155 155 foreach ($editors as $key => $editor) { 156 - // Remove editors for applications which are not installed. 156 + // Remove editors for applications which are not enabled. 157 157 $app = $editor->getEditorApplicationClass(); 158 158 if ($app !== null && $user !== null) { 159 159 if (!PhabricatorApplication::isClassInstalledForViewer($app, $user)) {
+1 -1
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 101 101 /** 102 102 * Get the class name for the application this editor is a part of. 103 103 * 104 - * Uninstalling the application will disable the editor. 104 + * Disabling the application will disable the editor. 105 105 * 106 106 * @return class-string<PhabricatorApplication> Editor's application 107 107 * class name.
+2 -2
src/infrastructure/testing/PhabricatorTestCase.php
··· 94 94 $this->env = PhabricatorEnv::beginScopedEnv(); 95 95 96 96 // NOTE: While running unit tests, we act as though all applications are 97 - // installed, regardless of the install's configuration. Tests which need 98 - // to uninstall applications are responsible for adjusting state themselves 97 + // enabled, regardless of the install's configuration. Tests which need 98 + // to disable applications are responsible for adjusting state themselves 99 99 // (such tests are exceedingly rare). 100 100 101 101 $this->env->overrideEnvConfig(