diff --git a/src/applications/console/plugin/DarkConsoleEventPlugin.php b/src/applications/console/plugin/DarkConsoleEventPlugin.php --- a/src/applications/console/plugin/DarkConsoleEventPlugin.php +++ b/src/applications/console/plugin/DarkConsoleEventPlugin.php @@ -7,7 +7,7 @@ } 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 --- a/src/applications/daemon/application/PhabricatorDaemonsApplication.php +++ b/src/applications/daemon/application/PhabricatorDaemonsApplication.php @@ -7,7 +7,7 @@ } 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 --- a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php +++ b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php @@ -93,7 +93,7 @@ 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 @@ 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 @@ $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 --- a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php +++ b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php @@ -194,7 +194,7 @@ 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 --- a/src/applications/differential/parser/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/DifferentialChangesetParser.php @@ -1816,7 +1816,7 @@ $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 --- a/src/applications/differential/render/DifferentialChangesetTestRenderer.php +++ b/src/applications/differential/render/DifferentialChangesetTestRenderer.php @@ -76,7 +76,7 @@ $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 --- a/src/applications/differential/storage/DifferentialDiff.php +++ b/src/applications/differential/storage/DifferentialDiff.php @@ -550,9 +550,9 @@ '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 --- a/src/applications/diffusion/management/DiffusionRepositoryURIsManagementPanel.php +++ b/src/applications/diffusion/management/DiffusionRepositoryURIsManagementPanel.php @@ -130,19 +130,19 @@ $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 --- a/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php +++ b/src/applications/doorkeeper/worker/DoorkeeperFeedWorker.php @@ -158,7 +158,7 @@ */ 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 --- a/src/applications/feed/config/PhabricatorFeedConfigOptions.php +++ b/src/applications/feed/config/PhabricatorFeedConfigOptions.php @@ -24,7 +24,7 @@ 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 --- a/src/applications/files/document/PhabricatorDocumentRef.php +++ b/src/applications/files/document/PhabricatorDocumentRef.php @@ -112,6 +112,11 @@ 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 --- a/src/applications/files/document/PhabricatorJSONDocumentEngine.php +++ b/src/applications/files/document/PhabricatorJSONDocumentEngine.php @@ -14,8 +14,12 @@ } 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 --- a/src/applications/files/document/PhabricatorRemarkupDocumentEngine.php +++ b/src/applications/files/document/PhabricatorRemarkupDocumentEngine.php @@ -15,8 +15,11 @@ 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 --- a/src/applications/guides/module/PhabricatorGuideInstallModule.php +++ b/src/applications/guides/module/PhabricatorGuideInstallModule.php @@ -7,7 +7,7 @@ } public function getModuleName() { - return pht('Install Phabricator'); + return pht('Install'); } public function getModulePosition() { @@ -66,7 +66,7 @@ $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 @@ $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 @@ $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 @@ $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 @@ $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 --- a/src/applications/guides/module/PhabricatorGuideQuickStartModule.php +++ b/src/applications/guides/module/PhabricatorGuideQuickStartModule.php @@ -132,7 +132,7 @@ $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 @@ $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 @@ } $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())