1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

Remove product literal strings in "pht()", part 14

Summary: Ref T13658.

Test Plan: Static checks only, these are mostly obscure or require breaking the install in unusual ways.

Maniphest Tasks: T13658

Differential Revision: https://secure.phabricator.com/D21780
This commit is contained in:
epriestley 2022-04-25 14:33:09 -07:00
parent 0eddc1a62c
commit 67e580be65
10 changed files with 39 additions and 40 deletions

View file

@ -261,9 +261,9 @@ final class PhabricatorConduitAPIController
return array( return array(
'ERR-INVALID-AUTH', 'ERR-INVALID-AUTH',
pht( pht(
'This request originates from outside of the Phabricator '. 'This request originates from outside of the cluster address '.
'cluster address range. Requests signed with trusted '. 'range. Requests signed with trusted device keys must '.
'device keys must originate from within the cluster.'), 'originate from within the cluster.'),
); );
} }
@ -364,9 +364,9 @@ final class PhabricatorConduitAPIController
return array( return array(
'ERR-INVALID-AUTH', 'ERR-INVALID-AUTH',
pht( pht(
'This request originates from outside of the Phabricator '. 'This request originates from outside of the cluster address '.
'cluster address range. Requests signed with cluster API '. 'range. Requests signed with cluster API tokens must '.
'tokens must originate from within the cluster.'), 'originate from within the cluster.'),
); );
} }

View file

@ -87,9 +87,9 @@ final class PhabricatorConduitTokenEditController
if ($token->getTokenType() === PhabricatorConduitToken::TYPE_CLUSTER) { if ($token->getTokenType() === PhabricatorConduitToken::TYPE_CLUSTER) {
$dialog->appendChild( $dialog->appendChild(
pht( pht(
'This token is automatically generated by Phabricator, and used '. 'This token is automatically generated, and used to make '.
'to make requests between nodes in a Phabricator cluster. You '. 'requests between nodes in a cluster. You can not use this '.
'can not use this token in external applications.')); 'token in external applications.'));
} else { } else {
$form->appendChild( $form->appendChild(
id(new AphrontFormTextControl()) id(new AphrontFormTextControl())

View file

@ -80,7 +80,7 @@ final class ConduitConnectConduitAPIMethod extends ConduitAPIMethod {
$ex->setErrorDescription( $ex->setErrorDescription(
pht( pht(
"Your '%s' client version is '%d', which is newer than the ". "Your '%s' client version is '%d', which is newer than the ".
"server version, '%d'. Upgrade your Phabricator install.", "server version, '%d'. Upgrade your server.",
'arc', 'arc',
$client_version, $client_version,
$server_version)); $server_version));

View file

@ -88,7 +88,7 @@ final class PhabricatorConduitSearchEngine
pht('Deprecated Methods'), pht('Deprecated Methods'),
pht( pht(
'Show old methods which will be deleted in a future '. 'Show old methods which will be deleted in a future '.
'version of Phabricator.')), 'version of this software.')),
$is_deprecated)); $is_deprecated));
} }

View file

@ -17,7 +17,7 @@ final class PhabricatorBaseURISetupCheck extends PhabricatorSetupCheck {
$message = pht( $message = pht(
'This request did not include a "Host" header. This may mean that '. 'This request did not include a "Host" header. This may mean that '.
'your webserver (like nginx or apache) is misconfigured so the '. 'your webserver (like nginx or apache) is misconfigured so the '.
'"Host" header is not making it to Phabricator, or that you are '. '"Host" header is not making it to this software, or that you are '.
'making a raw request without a "Host" header using a tool or '. 'making a raw request without a "Host" header using a tool or '.
'library.'. 'library.'.
"\n\n". "\n\n".
@ -38,9 +38,9 @@ final class PhabricatorBaseURISetupCheck extends PhabricatorSetupCheck {
'is required for some browsers to be able to set cookies.'. 'is required for some browsers to be able to set cookies.'.
"\n\n". "\n\n".
'This may mean the base URI is configured incorrectly. You must '. 'This may mean the base URI is configured incorrectly. You must '.
'serve Phabricator from a base URI with a dot (like '. 'serve this software from a base URI with a dot (like '.
'"https://phabricator.mycompany.com"), not a bare domain '. '"https://devtools.example.com"), not a bare domain '.
'(like "https://phabricator/"). If you are trying to use a bare '. '(like "https://devtools/"). If you are trying to use a bare '.
'domain, change your configuration to use a full domain with a dot '. 'domain, change your configuration to use a full domain with a dot '.
'in it instead.'. 'in it instead.'.
"\n\n". "\n\n".
@ -76,7 +76,7 @@ final class PhabricatorBaseURISetupCheck extends PhabricatorSetupCheck {
'will not work properly until you configure it.'. 'will not work properly until you configure it.'.
"\n\n". "\n\n".
'You should set the base URI to the URI you will use to access '. 'You should set the base URI to the URI you will use to access '.
'Phabricator, like "http://phabricator.example.com/".'. 'this server, like "http://devtools.example.com/".'.
"\n\n". "\n\n".
'Include the protocol (http or https), domain name, and port number if '. 'Include the protocol (http or https), domain name, and port number if '.
'you are using a port other than 80 (http) or 443 (https).'. 'you are using a port other than 80 (http) or 443 (https).'.
@ -96,7 +96,7 @@ final class PhabricatorBaseURISetupCheck extends PhabricatorSetupCheck {
->setMessage($message) ->setMessage($message)
->addCommand( ->addCommand(
hsprintf( hsprintf(
'<tt>phabricator/ $</tt> %s', '<tt>$</tt> %s',
csprintf( csprintf(
'./bin/config set phabricator.base-uri %s', './bin/config set phabricator.base-uri %s',
$base_uri_guess))); $base_uri_guess)));

View file

@ -15,7 +15,7 @@ final class PhabricatorBinariesSetupCheck extends PhabricatorSetupCheck {
if (!Filesystem::binaryExists($bin_name)) { if (!Filesystem::binaryExists($bin_name)) {
$message = pht( $message = pht(
"Without '%s', Phabricator can not test for the availability ". "Without '%s', this software can not test for the availability ".
"of other binaries.", "of other binaries.",
$bin_name); $bin_name);
$this->raiseWarning($bin_name, $message); $this->raiseWarning($bin_name, $message);
@ -27,7 +27,7 @@ final class PhabricatorBinariesSetupCheck extends PhabricatorSetupCheck {
if (!Filesystem::binaryExists('diff')) { if (!Filesystem::binaryExists('diff')) {
$message = pht( $message = pht(
"Without '%s', Phabricator will not be able to generate or render ". "Without '%s', this software will not be able to generate or render ".
"diffs in multiple applications.", "diffs in multiple applications.",
'diff'); 'diff');
$this->raiseWarning('diff', $message); $this->raiseWarning('diff', $message);
@ -162,7 +162,7 @@ final class PhabricatorBinariesSetupCheck extends PhabricatorSetupCheck {
$preamble = pht( $preamble = pht(
"The '%s' binary could not be found. Set the webserver's %s ". "The '%s' binary could not be found. Set the webserver's %s ".
"environmental variable to include the directory where it resides, or ". "environmental variable to include the directory where it resides, or ".
"add that directory to '%s' in the Phabricator configuration.", "add that directory to '%s' in configuration.",
$bin, $bin,
'PATH', 'PATH',
'environment.append-paths'); 'environment.append-paths');
@ -170,10 +170,9 @@ final class PhabricatorBinariesSetupCheck extends PhabricatorSetupCheck {
$preamble = pht( $preamble = pht(
"The '%s' binary could not be found. Symlink it into '%s', or set the ". "The '%s' binary could not be found. Symlink it into '%s', or set the ".
"webserver's %s environmental variable to include the directory where ". "webserver's %s environmental variable to include the directory where ".
"it resides, or add that directory to '%s' in the Phabricator ". "it resides, or add that directory to '%s' in configuration.",
"configuration.",
$bin, $bin,
'phabricator/support/bin/', 'support/bin/',
'PATH', 'PATH',
'environment.append-paths'); 'environment.append-paths');
} }
@ -194,19 +193,19 @@ final class PhabricatorBinariesSetupCheck extends PhabricatorSetupCheck {
$message = pht( $message = pht(
'Unable to determine the version number of "%s". Usually, this means '. 'Unable to determine the version number of "%s". Usually, this means '.
'the program changed its version format string recently and Phabricator '. 'the program changed its version format string recently and this '.
'does not know how to parse the new one yet, but might indicate that '. 'software does not know how to parse the new one yet, but might '.
'you have a very old (or broken) binary.'. 'indicate that you have a very old (or broken) binary.'.
"\n\n". "\n\n".
'Because we can not determine the version number, checks against '. 'Because we can not determine the version number, checks against '.
'minimum and known-bad versions will be skipped, so we might fail '. 'minimum and known-bad versions will be skipped, so we might fail '.
'to detect an incompatible binary.'. 'to detect an incompatible binary.'.
"\n\n". "\n\n".
'You may be able to resolve this issue by updating Phabricator, since '. 'You may be able to resolve this issue by updating this server, since '.
'a newer version of Phabricator is likely to be able to parse the '. 'a newer version of the software is likely to be able to parse the '.
'newer version string.'. 'newer version string.'.
"\n\n". "\n\n".
'If updating Phabricator does not fix this, you can report the issue '. 'If updating the software does not fix this, you can report the issue '.
'to the upstream so we can adjust the parser.'. 'to the upstream so we can adjust the parser.'.
"\n\n". "\n\n".
'If you are confident you have a recent version of "%s" installed and '. 'If you are confident you have a recent version of "%s" installed and '.

View file

@ -35,11 +35,11 @@ final class PhabricatorDatabaseSetupCheck extends PhabricatorSetupCheck {
->addPhabricatorConfig('mysql.port') ->addPhabricatorConfig('mysql.port')
->addCommand( ->addCommand(
hsprintf( hsprintf(
'<tt>phabricator/ $</tt> ./bin/config set mysql.host %s', '<tt>$</tt> ./bin/config set mysql.host %s',
$host)) $host))
->addCommand( ->addCommand(
hsprintf( hsprintf(
'<tt>phabricator/ $</tt> ./bin/config set mysql.port %s', '<tt>$</tt> ./bin/config set mysql.port %s',
$port)); $port));
} }
@ -134,7 +134,7 @@ final class PhabricatorDatabaseSetupCheck extends PhabricatorSetupCheck {
->setName(pht('Setup MySQL Schema')) ->setName(pht('Setup MySQL Schema'))
->setMessage($message) ->setMessage($message)
->setIsFatal(true) ->setIsFatal(true)
->addCommand(hsprintf('<tt>phabricator/ $</tt> ./bin/storage upgrade')); ->addCommand(hsprintf('<tt>$</tt> ./bin/storage upgrade'));
return true; return true;
} }
@ -160,7 +160,7 @@ final class PhabricatorDatabaseSetupCheck extends PhabricatorSetupCheck {
->setIsFatal(true) ->setIsFatal(true)
->setMessage($message) ->setMessage($message)
->addCommand( ->addCommand(
hsprintf('<tt>phabricator/ $</tt> ./bin/storage upgrade')); hsprintf('<tt>$</tt> ./bin/storage upgrade'));
return true; return true;
} }
@ -177,7 +177,7 @@ final class PhabricatorDatabaseSetupCheck extends PhabricatorSetupCheck {
'Database host "%s" is configured as a master, but is replicating '. 'Database host "%s" is configured as a master, but is replicating '.
'another host. This is dangerous and can mangle or destroy data. '. 'another host. This is dangerous and can mangle or destroy data. '.
'Only replicas should be replicating. Stop replication on the '. 'Only replicas should be replicating. Stop replication on the '.
'host or reconfigure Phabricator.', 'host or adjust configuration.',
$ref->getRefKey()); $ref->getRefKey());
$this->newIssue('db.master.replicating') $this->newIssue('db.master.replicating')

View file

@ -34,8 +34,8 @@ final class PhabricatorElasticsearchSetupCheck extends PhabricatorSetupCheck {
} catch (Exception $ex) { } catch (Exception $ex) {
$summary = pht('Elasticsearch is not reachable as configured.'); $summary = pht('Elasticsearch is not reachable as configured.');
$message = pht( $message = pht(
'Elasticsearch is configured (with the %s setting) but Phabricator'. 'Elasticsearch is configured (with the %s setting) but an '.
' encountered an exception when trying to test the index.'. 'exception was encountered when trying to test the index.'.
"\n\n". "\n\n".
'%s', '%s',
phutil_tag('tt', array(), 'cluster.search'), phutil_tag('tt', array(), 'cluster.search'),
@ -69,7 +69,7 @@ final class PhabricatorElasticsearchSetupCheck extends PhabricatorSetupCheck {
'Elasticsearch index exists but needs correction.'); 'Elasticsearch index exists but needs correction.');
$message = pht( $message = pht(
'Either the Phabricator schema for Elasticsearch has changed '. 'Either the schema for Elasticsearch has changed '.
'or Elasticsearch created the index automatically. '. 'or Elasticsearch created the index automatically. '.
'Use the following command to rebuild the index.'); 'Use the following command to rebuild the index.');

View file

@ -10,7 +10,7 @@ final class PhabricatorFileinfoSetupCheck extends PhabricatorSetupCheck {
if (!extension_loaded('fileinfo')) { if (!extension_loaded('fileinfo')) {
$message = pht( $message = pht(
"The '%s' extension is not installed. Without '%s', ". "The '%s' extension is not installed. Without '%s', ".
"support, Phabricator may not be able to determine the MIME types ". "support, this software may not be able to determine the MIME types ".
"of uploaded files.", "of uploaded files.",
'fileinfo', 'fileinfo',
'fileinfo'); 'fileinfo');

View file

@ -10,7 +10,7 @@ final class PhabricatorGDSetupCheck extends PhabricatorSetupCheck {
if (!extension_loaded('gd')) { if (!extension_loaded('gd')) {
$message = pht( $message = pht(
"The '%s' extension is not installed. Without '%s', support, ". "The '%s' extension is not installed. Without '%s', support, ".
"Phabricator will not be able to process or resize images ". "this server will not be able to process or resize images ".
"(for example, to generate thumbnails). Install or enable '%s'.", "(for example, to generate thumbnails). Install or enable '%s'.",
'gd', 'gd',
'gd', 'gd',
@ -41,7 +41,7 @@ final class PhabricatorGDSetupCheck extends PhabricatorSetupCheck {
$message = pht( $message = pht(
"The '%s' extension has support for only some image types. ". "The '%s' extension has support for only some image types. ".
"Phabricator will be unable to process images of the missing ". "This server will be unable to process images of the missing ".
"types until you build '%s' with support for them. ". "types until you build '%s' with support for them. ".
"Supported types: %s. Missing types: %s.", "Supported types: %s. Missing types: %s.",
'gd', 'gd',