diff --git a/src/applications/almanac/management/AlmanacManagementRegisterWorkflow.php b/src/applications/almanac/management/AlmanacManagementRegisterWorkflow.php --- a/src/applications/almanac/management/AlmanacManagementRegisterWorkflow.php +++ b/src/applications/almanac/management/AlmanacManagementRegisterWorkflow.php @@ -188,7 +188,7 @@ $console->writeOut( "%s\n", - pht('Installing device ID...', $raw_device)); + pht('Installing device %s...', $raw_device)); // The permissions on this file are more open because the webserver also // needs to read it. diff --git a/src/applications/conduit/protocol/exception/ConduitMethodDoesNotExistException.php b/src/applications/conduit/protocol/exception/ConduitMethodDoesNotExistException.php --- a/src/applications/conduit/protocol/exception/ConduitMethodDoesNotExistException.php +++ b/src/applications/conduit/protocol/exception/ConduitMethodDoesNotExistException.php @@ -6,7 +6,8 @@ public function __construct($method_name) { parent::__construct( pht( - 'Conduit API method "%s" does not exist.')); + 'Conduit API method "%s" does not exist.', + $method_name)); } } diff --git a/src/applications/config/view/PhabricatorSetupIssueView.php b/src/applications/config/view/PhabricatorSetupIssueView.php --- a/src/applications/config/view/PhabricatorSetupIssueView.php +++ b/src/applications/config/view/PhabricatorSetupIssueView.php @@ -385,7 +385,7 @@ 'p', array(), pht( - 'PHP also loaded these configuration file(s):', + 'PHP also loaded these %d configuration file(s):', count($more_loc))); $info[] = phutil_tag( 'pre', diff --git a/src/applications/differential/event/DifferentialHovercardEventListener.php b/src/applications/differential/event/DifferentialHovercardEventListener.php --- a/src/applications/differential/event/DifferentialHovercardEventListener.php +++ b/src/applications/differential/event/DifferentialHovercardEventListener.php @@ -60,7 +60,7 @@ implode_selected_handle_links(', ', $handles, $reviewer_phids)); if ($tasks) { - $hovercard->addField(pht('Task(s)', count($tasks)), + $hovercard->addField(pht('%d Task(s)', count($tasks)), implode_selected_handle_links(', ', $handles, $tasks)); } diff --git a/src/applications/differential/mail/DifferentialCreateMailReceiver.php b/src/applications/differential/mail/DifferentialCreateMailReceiver.php --- a/src/applications/differential/mail/DifferentialCreateMailReceiver.php +++ b/src/applications/differential/mail/DifferentialCreateMailReceiver.php @@ -79,7 +79,7 @@ count($diffs)); } else { $subject = pht( - 'Diff creation failed; see body for error(s).', + 'Diff creation failed; see body for %d error(s).', count($errors)); } $body = new PhabricatorMetaMTAMailBody(); @@ -87,7 +87,7 @@ if (count($diffs)) { $text_body = ''; $html_body = array(); - $body_label = pht('DIFF LINK(S)', count($diffs)); + $body_label = pht('%d DIFF LINK(S)', count($diffs)); foreach ($diffs as $filename => $diff_uri) { $text_body .= $filename.': '.$diff_uri."\n"; $html_body[] = phutil_tag( @@ -104,7 +104,7 @@ if (count($errors)) { $body_section = new PhabricatorMetaMTAMailSection(); - $body_label = pht('ERROR(S)', count($errors)); + $body_label = pht('%d ERROR(S)', count($errors)); foreach ($errors as $error) { $body_section->addFragment($error); } diff --git a/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php b/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php --- a/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php +++ b/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php @@ -10,40 +10,27 @@ $file = $changeset->getFileType(); $messages = array(); - $none = hsprintf(''); switch ($change) { case DifferentialChangeType::TYPE_ADD: switch ($file) { case DifferentialChangeType::FILE_TEXT: - $messages[] = pht( - 'This file was added.', - $none); + $messages[] = pht('This file was added.'); break; case DifferentialChangeType::FILE_IMAGE: - $messages[] = pht( - 'This image was added.', - $none); + $messages[] = pht('This image was added.'); break; case DifferentialChangeType::FILE_DIRECTORY: - $messages[] = pht( - 'This directory was added.', - $none); + $messages[] = pht('This directory was added.'); break; case DifferentialChangeType::FILE_BINARY: - $messages[] = pht( - 'This binary file was added.', - $none); + $messages[] = pht('This binary file was added.'); break; case DifferentialChangeType::FILE_SYMLINK: - $messages[] = pht( - 'This symlink was added.', - $none); + $messages[] = pht('This symlink was added.'); break; case DifferentialChangeType::FILE_SUBMODULE: - $messages[] = pht( - 'This submodule was added.', - $none); + $messages[] = pht('This submodule was added.'); break; } break; @@ -51,34 +38,22 @@ case DifferentialChangeType::TYPE_DELETE: switch ($file) { case DifferentialChangeType::FILE_TEXT: - $messages[] = pht( - 'This file was deleted.', - $none); + $messages[] = pht('This file was deleted.'); break; case DifferentialChangeType::FILE_IMAGE: - $messages[] = pht( - 'This image was deleted.', - $none); + $messages[] = pht('This image was deleted.'); break; case DifferentialChangeType::FILE_DIRECTORY: - $messages[] = pht( - 'This directory was deleted.', - $none); + $messages[] = pht('This directory was deleted.'); break; case DifferentialChangeType::FILE_BINARY: - $messages[] = pht( - 'This binary file was deleted.', - $none); + $messages[] = pht('This binary file was deleted.'); break; case DifferentialChangeType::FILE_SYMLINK: - $messages[] = pht( - 'This symlink was deleted.', - $none); + $messages[] = pht('This symlink was deleted.'); break; case DifferentialChangeType::FILE_SUBMODULE: - $messages[] = pht( - 'This submodule was deleted.', - $none); + $messages[] = pht('This submodule was deleted.'); break; } break; diff --git a/src/applications/people/controller/PhabricatorPeopleApproveController.php b/src/applications/people/controller/PhabricatorPeopleApproveController.php --- a/src/applications/people/controller/PhabricatorPeopleApproveController.php +++ b/src/applications/people/controller/PhabricatorPeopleApproveController.php @@ -31,8 +31,7 @@ $title = pht( 'Phabricator Account "%s" Approved', - $user->getUsername(), - $admin->getUsername()); + $user->getUsername()); $body = pht( "Your Phabricator account (%s) has been approved by %s. You can ". diff --git a/src/applications/repository/data/PhabricatorRepositoryURINormalizer.php b/src/applications/repository/data/PhabricatorRepositoryURINormalizer.php --- a/src/applications/repository/data/PhabricatorRepositoryURINormalizer.php +++ b/src/applications/repository/data/PhabricatorRepositoryURINormalizer.php @@ -52,7 +52,7 @@ case self::TYPE_MERCURIAL: break; default: - throw new Exception(pht('Unknown URI type "%s"!')); + throw new Exception(pht('Unknown URI type "%s"!', $type)); } $this->type = $type; diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php --- a/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php +++ b/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php @@ -48,7 +48,9 @@ if (empty($refs_raw['data'])) { throw new Exception( - pht('Unable to retrieve details for commit "%s"!')); + pht( + 'Unable to retrieve details for commit "%s"!', + $commit->getPHID())); } $ref = DiffusionCommitRef::newFromConduitResult(head($refs_raw['data'])); diff --git a/src/infrastructure/markup/interpreter/PhabricatorRemarkupCowsayBlockInterpreter.php b/src/infrastructure/markup/interpreter/PhabricatorRemarkupCowsayBlockInterpreter.php --- a/src/infrastructure/markup/interpreter/PhabricatorRemarkupCowsayBlockInterpreter.php +++ b/src/infrastructure/markup/interpreter/PhabricatorRemarkupCowsayBlockInterpreter.php @@ -37,7 +37,8 @@ if ($err) { return $this->markupError( pht( - 'Execution of `cowsay` failed:', $stderr)); + 'Execution of `cowsay` failed: %s', + $stderr)); }