diff --git a/src/applications/config/check/PhabricatorSetupCheckPygment.php b/src/applications/config/check/PhabricatorSetupCheckPygment.php index b1bad2a853..81515fc6cc 100644 --- a/src/applications/config/check/PhabricatorSetupCheckPygment.php +++ b/src/applications/config/check/PhabricatorSetupCheckPygment.php @@ -3,7 +3,6 @@ final class PhabricatorSetupCheckPygment extends PhabricatorSetupCheck { protected function executeChecks() { - $pygment = PhabricatorEnv::getEnvConfig('pygments.enabled'); if ($pygment) { @@ -47,6 +46,24 @@ final class PhabricatorSetupCheckPygment extends PhabricatorSetupCheck { ->addPhabricatorConfig('environment.append-paths'); } } + } else { + $summary = pht('Pygments should be installed and enabled '. + 'to provide advanced syntax highlighting.'); + + $message = pht('Phabricator can highlight a few languages by default, '. + 'but installing and enabling Pygments (a third-party highlighting '. + 'tool) will add syntax highlighting for many more languages. '."\n\n". + 'For instructions on installing and enabling Pygments, see the '. + '%s configuration option.'."\n\n". + 'If you do not want to install Pygments, you can ignore this issue.', + phutil_tag('tt', array(), 'pygments.enabled')); + + $this + ->newIssue('pygments.noenabled') + ->setName(pht('Install Pygments to Improve Syntax Highlighting')) + ->setSummary($summary) + ->setMessage($message) + ->addRelatedPhabricatorConfig('pygments.enabled'); } } }