phtize all the things

Summary: `pht`ize a whole bunch of strings in rP.

Test Plan: Intense eyeballing.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12797
This commit is contained in:
Joshua Spence
2015-05-22 17:27:56 +10:00
parent d3268aecc2
commit 36e2d02d6e
928 changed files with 5267 additions and 4239 deletions

View File

@@ -35,11 +35,11 @@ final class DiffusionMercurialServeSSHWorkflow
$args = $this->getArgs();
if (!$args->getArg('stdio')) {
throw new Exception('Expected `hg ... --stdio`!');
throw new Exception(pht('Expected `%s`!', 'hg ... --stdio'));
}
if ($args->getArg('command') !== array('serve')) {
throw new Exception('Expected `hg ... serve`!');
throw new Exception(pht('Expected `%s`!', 'hg ... serve'));
}
if ($this->shouldProxy()) {

View File

@@ -207,7 +207,7 @@ final class DiffusionMercurialWireClientSSHProtocolChannel
break;
}
} else {
throw new Exception("Bad parser state '{$this->state}'!");
throw new Exception(pht("Bad parser state '%s'!", $this->state));
}
}

View File

@@ -154,8 +154,7 @@ abstract class DiffusionSSHWorkflow extends PhabricatorSSHWorkflow {
if (!preg_match($regex, $path, $matches)) {
throw new Exception(
pht(
'Unrecognized repository path "%s". Expected a path like '.
'"%s".',
'Unrecognized repository path "%s". Expected a path like "%s".',
$path,
'/diffusion/X/'));
}

View File

@@ -83,7 +83,8 @@ final class DiffusionSubversionServeSSHWorkflow
if (!$exec_channel->isOpenForReading()) {
throw new Exception(
pht(
'svnserve subprocess exited before emitting a protocol frame.'));
'%s subprocess exited before emitting a protocol frame.',
'svnserve'));
}
}
@@ -141,7 +142,7 @@ final class DiffusionSubversionServeSSHWorkflow
$args = $this->getArgs();
if (!$args->getArg('tunnel')) {
throw new Exception('Expected `svnserve -t`!');
throw new Exception(pht('Expected `%s`!', 'svnserve -t'));
}
if ($this->shouldProxy()) {
@@ -350,8 +351,9 @@ final class DiffusionSubversionServeSSHWorkflow
if ($proto !== 'svn+ssh') {
throw new Exception(
pht(
'Protocol for URI "%s" MUST be "svn+ssh".',
$uri_string));
'Protocol for URI "%s" MUST be "%s".',
$uri_string,
'svn+ssh'));
}
$path = $uri->getPath();
@@ -360,7 +362,8 @@ final class DiffusionSubversionServeSSHWorkflow
if (preg_match('(/\\.\\./)', $path)) {
throw new Exception(
pht(
'String "/../" is invalid in path specification "%s".',
'String "%s" is invalid in path specification "%s".',
'/../',
$uri_string));
}

View File

@@ -50,7 +50,7 @@ final class DiffusionMercurialWireSSHTestCase extends PhabricatorTestCase {
$this->assertTrue(
($caught instanceof Exception),
"No extra messages for '{$file}'.");
pht("No extra messages for '%s'.", $file));
}
}