diff --git a/src/applications/console/plugin/DarkConsoleEventPlugin.php b/src/applications/console/plugin/DarkConsoleEventPlugin.php index 070227c12d..182e220659 100644 --- a/src/applications/console/plugin/DarkConsoleEventPlugin.php +++ b/src/applications/console/plugin/DarkConsoleEventPlugin.php @@ -7,7 +7,7 @@ final class DarkConsoleEventPlugin extends DarkConsolePlugin { } public function getDescription() { - return pht('Information about Phabricator events and event listeners.'); + return pht('Information about events and event listeners.'); } public function generateData() { diff --git a/src/applications/daemon/application/PhabricatorDaemonsApplication.php b/src/applications/daemon/application/PhabricatorDaemonsApplication.php index 08e81d5d7e..3aa6b2f086 100644 --- a/src/applications/daemon/application/PhabricatorDaemonsApplication.php +++ b/src/applications/daemon/application/PhabricatorDaemonsApplication.php @@ -7,7 +7,7 @@ final class PhabricatorDaemonsApplication extends PhabricatorApplication { } public function getShortDescription() { - return pht('Manage Phabricator Daemons'); + return pht('Manage Daemons'); } public function getBaseURI() { diff --git a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php index b9645323c2..853a797448 100644 --- a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php +++ b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php @@ -93,7 +93,7 @@ abstract class PhabricatorDaemonManagementWorkflow pht( "You are trying to run a daemon as a nonstandard user, ". "and `%s` was not able to `%s` to the correct user. \n". - 'Phabricator is configured to run daemons as "%s", '. + 'The daemons are configured to run as "%s", '. 'but the current user is "%s". '."\n". 'Use `%s` to run as a different user, pass `%s` to ignore this '. 'warning, or edit `%s` to change the configuration.', @@ -154,7 +154,7 @@ abstract class PhabricatorDaemonManagementWorkflow SIGINT, array(__CLASS__, 'ignoreSignal')); - echo "\n phabricator/scripts/daemon/ \$ {$command}\n\n"; + echo "\n scripts/daemon/ \$ {$command}\n\n"; $tempfile = new TempFile('daemon.config'); Filesystem::writeFile($tempfile, json_encode($config)); @@ -579,7 +579,7 @@ abstract class PhabricatorDaemonManagementWorkflow $console->writeErr( "%s\n", pht( - 'PID "%d" is not a known Phabricator daemon PID.', + 'PID "%d" is not a known daemon PID.', $pid)); continue; } else { diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php index 2174f793a4..c8cfe4fd2e 100644 --- a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php +++ b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php @@ -194,7 +194,7 @@ final class PhabricatorDashboardQueryPanelType if (!$engine) { throw new Exception( pht( - 'The application search engine "%s" is not known to Phabricator!', + 'The application search engine "%s" is unknown.', $class)); } diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php index ad62b2a1ef..5b39269bdd 100644 --- a/src/applications/differential/parser/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/DifferentialChangesetParser.php @@ -1816,7 +1816,7 @@ final class DifferentialChangesetParser extends Phobject { $viewstate = $this->getViewState(); $engine_key = $viewstate->getDocumentEngineKey(); - if (strlen($engine_key)) { + if (phutil_nonempty_string($engine_key)) { if (isset($shared_engines[$engine_key])) { $document_engine = $shared_engines[$engine_key]; } else { diff --git a/src/applications/differential/render/DifferentialChangesetTestRenderer.php b/src/applications/differential/render/DifferentialChangesetTestRenderer.php index 56b96dcbca..b4b2122e59 100644 --- a/src/applications/differential/render/DifferentialChangesetTestRenderer.php +++ b/src/applications/differential/render/DifferentialChangesetTestRenderer.php @@ -76,7 +76,7 @@ abstract class DifferentialChangesetTestRenderer $any_new = true; } $num = nonempty($p['line'], '-'); - $render = $p['render']; + $render = (string)$p['render']; $htype = nonempty($p['htype'], '.'); // TODO: This should probably happen earlier, whenever we deal with diff --git a/src/applications/differential/storage/DifferentialDiff.php b/src/applications/differential/storage/DifferentialDiff.php index 78025e44ec..dfa6d1f791 100644 --- a/src/applications/differential/storage/DifferentialDiff.php +++ b/src/applications/differential/storage/DifferentialDiff.php @@ -550,9 +550,9 @@ final class DifferentialDiff 'buildable.revision' => pht('The differential revision ID, if applicable.'), 'repository.callsign' => - pht('The callsign of the repository in Phabricator.'), + pht('The callsign of the repository.'), 'repository.phid' => - pht('The PHID of the repository in Phabricator.'), + pht('The PHID of the repository.'), 'repository.vcs' => pht('The version control system, either "svn", "hg" or "git".'), 'repository.uri' => diff --git a/src/applications/diffusion/management/DiffusionRepositoryURIsManagementPanel.php b/src/applications/diffusion/management/DiffusionRepositoryURIsManagementPanel.php index a795c955a7..c4ce110c5d 100644 --- a/src/applications/diffusion/management/DiffusionRepositoryURIsManagementPanel.php +++ b/src/applications/diffusion/management/DiffusionRepositoryURIsManagementPanel.php @@ -130,19 +130,19 @@ final class DiffusionRepositoryURIsManagementPanel $messages = array(); if ($repository->isHosted()) { if ($is_new) { - $host_message = pht('Phabricator will host this repository.'); + $host_message = pht('This repository will be hosted.'); } else { - $host_message = pht('Phabricator is hosting this repository.'); + $host_message = pht('This repository is observed.'); } $messages[] = $host_message; } else { if ($is_new) { $observe_message = pht( - 'Phabricator will observe a remote repository.'); + 'This repository will be observed.'); } else { $observe_message = pht( - 'This repository is hosted remotely. Phabricator is observing it.'); + 'This remote repository is being observed.'); } $messages[] = $observe_message; diff --git a/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php b/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php index 404ee348f7..8bbcc0f4fa 100644 --- a/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php +++ b/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php @@ -158,7 +158,7 @@ abstract class DoorkeeperFeedWorker extends FeedPushWorker { */ final protected function doWork() { if (PhabricatorEnv::getEnvConfig('phabricator.silent')) { - $this->log("%s\n", pht('Phabricator is running in silent mode.')); + $this->log("%s\n", pht('This software is running in silent mode.')); return; } diff --git a/src/applications/feed/config/PhabricatorFeedConfigOptions.php b/src/applications/feed/config/PhabricatorFeedConfigOptions.php index 29c5a9549b..eac6a097ae 100644 --- a/src/applications/feed/config/PhabricatorFeedConfigOptions.php +++ b/src/applications/feed/config/PhabricatorFeedConfigOptions.php @@ -24,7 +24,7 @@ final class PhabricatorFeedConfigOptions IMPORTANT: Feed hooks are deprecated and have been replaced by Webhooks. You can configure Webhooks in Herald. This configuration option will be removed -in a future version of Phabricator. +in a future version of the software. (This legacy option may be configured with a list of URIs; feed stories will send to these URIs.) diff --git a/src/applications/files/document/PhabricatorDocumentRef.php b/src/applications/files/document/PhabricatorDocumentRef.php index 12d9f4f2fd..98dfda8856 100644 --- a/src/applications/files/document/PhabricatorDocumentRef.php +++ b/src/applications/files/document/PhabricatorDocumentRef.php @@ -112,6 +112,11 @@ final class PhabricatorDocumentRef public function hasAnyMimeType(array $candidate_types) { $mime_full = $this->getMimeType(); + + if (!phutil_nonempty_string($mime_full)) { + return false; + } + $mime_parts = explode(';', $mime_full); $mime_type = head($mime_parts); diff --git a/src/applications/files/document/PhabricatorJSONDocumentEngine.php b/src/applications/files/document/PhabricatorJSONDocumentEngine.php index 42f4469ee6..9797ce3da2 100644 --- a/src/applications/files/document/PhabricatorJSONDocumentEngine.php +++ b/src/applications/files/document/PhabricatorJSONDocumentEngine.php @@ -14,8 +14,12 @@ final class PhabricatorJSONDocumentEngine } protected function getContentScore(PhabricatorDocumentRef $ref) { - if (preg_match('/\.json\z/', $ref->getName())) { - return 2000; + + $name = $ref->getName(); + if ($name !== null) { + if (preg_match('/\.json\z/', $name)) { + return 2000; + } } if ($ref->isProbablyJSON()) { diff --git a/src/applications/files/document/PhabricatorRemarkupDocumentEngine.php b/src/applications/files/document/PhabricatorRemarkupDocumentEngine.php index 296b78196f..053640af5f 100644 --- a/src/applications/files/document/PhabricatorRemarkupDocumentEngine.php +++ b/src/applications/files/document/PhabricatorRemarkupDocumentEngine.php @@ -15,8 +15,11 @@ final class PhabricatorRemarkupDocumentEngine protected function getContentScore(PhabricatorDocumentRef $ref) { $name = $ref->getName(); - if (preg_match('/\\.remarkup\z/i', $name)) { - return 2000; + + if ($name !== null) { + if (preg_match('/\\.remarkup\z/i', $name)) { + return 2000; + } } return 500; diff --git a/src/applications/guides/module/PhabricatorGuideInstallModule.php b/src/applications/guides/module/PhabricatorGuideInstallModule.php index 172ff7a17b..2299bce260 100644 --- a/src/applications/guides/module/PhabricatorGuideInstallModule.php +++ b/src/applications/guides/module/PhabricatorGuideInstallModule.php @@ -7,7 +7,7 @@ final class PhabricatorGuideInstallModule extends PhabricatorGuideModule { } public function getModuleName() { - return pht('Install Phabricator'); + return pht('Install'); } public function getModulePosition() { @@ -66,7 +66,7 @@ final class PhabricatorGuideInstallModule extends PhabricatorGuideModule { $icon_bg = 'bg-sky'; $description = pht( 'Authentication providers allow users to register accounts and '. - 'log in to Phabricator.'); + 'log in.'); } $item = id(new PhabricatorGuideItemView()) @@ -78,7 +78,7 @@ final class PhabricatorGuideInstallModule extends PhabricatorGuideModule { $guide_items->addItem($item); - $title = pht('Configure Phabricator'); + $title = pht('Configure'); $href = PhabricatorEnv::getURI('/config/'); // Just load any config value at all; if one exists the install has figured @@ -95,7 +95,7 @@ final class PhabricatorGuideInstallModule extends PhabricatorGuideModule { $icon = 'fa-sliders'; $icon_bg = 'bg-sky'; $description = pht( - 'Learn how to configure mail and other options in Phabricator.'); + 'Learn how to configure mail and other options.'); } $item = id(new PhabricatorGuideItemView()) @@ -148,7 +148,7 @@ final class PhabricatorGuideInstallModule extends PhabricatorGuideModule { $icon = 'fa-bell'; $icon_bg = 'bg-sky'; $description = pht( - 'Phabricator can deliver notifications in real-time with WebSockets.'); + 'Real-time notifications can be delivered with WebSockets.'); } $item = id(new PhabricatorGuideItemView()) @@ -161,11 +161,12 @@ final class PhabricatorGuideInstallModule extends PhabricatorGuideModule { $guide_items->addItem($item); $intro = pht( - 'Phabricator has been successfully installed. These next guides will '. + '%s has been successfully installed. These next guides will '. 'take you through configuration and new user orientation. '. 'These steps are optional, and you can go through them in any order. '. 'If you want to get back to this guide later on, you can find it in '. - '{icon globe} **Applications** under {icon map-o} **Guides**.'); + '{icon globe} **Applications** under {icon map-o} **Guides**.', + PlatformSymbols::getPlatformServerName()); $intro = new PHUIRemarkupView($viewer, $intro); diff --git a/src/applications/guides/module/PhabricatorGuideQuickStartModule.php b/src/applications/guides/module/PhabricatorGuideQuickStartModule.php index 65b07ffe2c..3486ce4ba0 100644 --- a/src/applications/guides/module/PhabricatorGuideQuickStartModule.php +++ b/src/applications/guides/module/PhabricatorGuideQuickStartModule.php @@ -132,7 +132,7 @@ final class PhabricatorGuideQuickStartModule extends PhabricatorGuideModule { $icon = 'fa-globe'; $icon_bg = 'bg-sky'; $description = - pht('See all the applications included in Phabricator.'); + pht('See all available applications.'); $item = id(new PhabricatorGuideItemView()) ->setTitle($title) @@ -159,7 +159,7 @@ final class PhabricatorGuideQuickStartModule extends PhabricatorGuideModule { $icon = 'fa-group'; $icon_bg = 'bg-sky'; $description = - pht('Invite the rest of your team to get started on Phabricator.'); + pht('Invite the rest of your team to get started.'); } $item = id(new PhabricatorGuideItemView()) @@ -172,11 +172,9 @@ final class PhabricatorGuideQuickStartModule extends PhabricatorGuideModule { } $intro = pht( - 'If you\'re new to Phabricator, these optional steps can help you learn '. - 'the basics. Conceptually, Phabricator is structured as a graph, and '. - 'repositories, tasks, and projects are all independent from each other. '. - 'Feel free to set up Phabricator for how you work best, and explore '. - 'these features at your own pace.'); + 'If you\'re new to this software, these optional steps can help you '. + 'learn the basics. Feel free to set things up for how you work best '. + 'and explore these features at your own pace.'); $intro = new PHUIRemarkupView($viewer, $intro); $intro = id(new PHUIDocumentView())