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

@@ -9,7 +9,7 @@ require_once $root.'/scripts/__init_script__.php';
$ssh_log = PhabricatorSSHLog::getLog();
$args = new PhutilArgumentParser($argv);
$args->setTagline('execute SSH requests');
$args->setTagline(pht('execute SSH requests'));
$args->setSynopsis(<<<EOSYNOPSIS
**ssh-exec** --phabricator-ssh-user __user__ [--ssh-command __commmand__]
**ssh-exec** --phabricator-ssh-device __device__ [--ssh-command __commmand__]
@@ -50,7 +50,8 @@ $args->parse(
'help' => pht(
'Provide a command to execute. This makes testing this script '.
'easier. When running normally, the command is read from the '.
'environment (SSH_ORIGINAL_COMMAND), which is populated by sshd.'),
'environment (%s), which is populated by sshd.',
'SSH_ORIGINAL_COMMAND'),
),
));
@@ -84,9 +85,11 @@ try {
if ($user_name && $device_name) {
throw new Exception(
pht(
'The --phabricator-ssh-user and --phabricator-ssh-device flags are '.
'mutually exclusive. You can not authenticate as both a user ("%s") '.
'and a device ("%s"). Specify one or the other, but not both.',
'The %s and %s flags are mutually exclusive. You can not '.
'authenticate as both a user ("%s") and a device ("%s"). '.
'Specify one or the other, but not both.',
'--phabricator-ssh-user',
'--phabricator-ssh-device',
$user_name,
$device_name));
} else if (strlen($user_name)) {
@@ -104,9 +107,10 @@ try {
if (!$remote_address) {
throw new Exception(
pht(
'Unable to identify remote address from the SSH_CLIENT environment '.
'Unable to identify remote address from the %s environment '.
'variable. Device authentication is accepted only from trusted '.
'sources.'));
'sources.',
'SSH_CLIENT'));
}
if (!PhabricatorEnv::isClusterAddress($remote_address)) {
@@ -134,8 +138,9 @@ try {
} else {
throw new Exception(
pht(
'This script must be invoked with either the --phabricator-ssh-user '.
'or --phabricator-ssh-device flag.'));
'This script must be invoked with either the %s or %s flag.',
'--phabricator-ssh-user',
'--phabricator-ssh-device'));
}
if ($args->getArg('ssh-command')) {
@@ -199,10 +204,12 @@ try {
"You haven't specified a command to run. This means you're requesting ".
"an interactive shell, but Phabricator does not provide an ".
"interactive shell over SSH.\n\n".
"Usually, you should run a command like `git clone` or `hg push` ".
"Usually, you should run a command like `%s` or `%s` ".
"rather than connecting directly with SSH.\n\n".
"Supported commands are: %s.",
$user->getUsername(),
'git clone',
'hg push',
implode(', ', $workflow_names)));
}
@@ -225,7 +232,7 @@ try {
$parsed_args = new PhutilArgumentParser($parseable_argv);
if (empty($workflow_names[$command])) {
throw new Exception('Invalid command.');
throw new Exception(pht('Invalid command.'));
}
$workflow = $parsed_args->parseWorkflows($workflows);
@@ -235,17 +242,17 @@ try {
$sock_stdin = fopen('php://stdin', 'r');
if (!$sock_stdin) {
throw new Exception('Unable to open stdin.');
throw new Exception(pht('Unable to open stdin.'));
}
$sock_stdout = fopen('php://stdout', 'w');
if (!$sock_stdout) {
throw new Exception('Unable to open stdout.');
throw new Exception(pht('Unable to open stdout.'));
}
$sock_stderr = fopen('php://stderr', 'w');
if (!$sock_stderr) {
throw new Exception('Unable to open stderr.');
throw new Exception(pht('Unable to open stderr.'));
}
$socket_channel = new PhutilSocketChannel(