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

@@ -32,7 +32,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
public abstract function getName();
public function getShortDescription() {
return $this->getName().' Application';
return pht('%s Application', $this->getName());
}
public function isInstalled() {
@@ -254,7 +254,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
}
public function getAppEmailBlurb() {
throw new Exception('Not Implemented.');
throw new PhutilMethodNotImplementedException();
}
@@ -371,7 +371,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
}
if (!$selected) {
throw new Exception("No application '{$class_name}'!");
throw new Exception(pht("No application '%s'!", $class_name));
}
return $selected;
@@ -531,7 +531,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
private function getCustomCapabilitySpecification($capability) {
$custom = $this->getCustomCapabilities();
if (!isset($custom[$capability])) {
throw new Exception("Unknown capability '{$capability}'!");
throw new Exception(pht("Unknown capability '%s'!", $capability));
}
return $custom[$capability];
}

View File

@@ -316,7 +316,7 @@ abstract class PhabricatorController extends AphrontController {
public function getApplicationURI($path = '') {
if (!$this->getCurrentApplication()) {
throw new Exception('No application!');
throw new Exception(pht('No application!'));
}
return $this->getCurrentApplication()->getApplicationURI($path);
}
@@ -388,8 +388,8 @@ abstract class PhabricatorController extends AphrontController {
if (isset($seen[$hash])) {
$seen[] = get_class($response);
throw new Exception(
'Cycle while reducing proxy responses: '.
implode(' -> ', $seen));
pht('Cycle while reducing proxy responses: %s',
implode(' -> ', $seen)));
}
$seen[$hash] = get_class($response);

View File

@@ -63,7 +63,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
// Test standard defaults.
$this->checkAccess(
'Default',
pht('Default'),
id(clone $controller),
$request,
array(
@@ -82,7 +82,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
$env->overrideEnvConfig('auth.require-email-verification', true);
$this->checkAccess(
'Email Verification Required',
pht('Email Verification Required'),
id(clone $controller),
$request,
array(
@@ -97,7 +97,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
));
$this->checkAccess(
'Email Verification Required, With Exception',
pht('Email Verification Required, With Exception'),
id(clone $controller)->setConfig('email', false),
$request,
array(
@@ -116,7 +116,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
// Test admin access.
$this->checkAccess(
'Admin Required',
pht('Admin Required'),
id(clone $controller)->setConfig('admin', true),
$request,
array(
@@ -134,7 +134,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
// Test disabled access.
$this->checkAccess(
'Allow Disabled',
pht('Allow Disabled'),
id(clone $controller)->setConfig('enabled', false),
$request,
array(
@@ -152,7 +152,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
// Test no login required.
$this->checkAccess(
'No Login Required',
pht('No Login Required'),
id(clone $controller)->setConfig('login', false),
$request,
array(
@@ -170,7 +170,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
// Test public access.
$this->checkAccess(
'Public Access',
pht('Public Access'),
id(clone $controller)->setConfig('public', true),
$request,
array(
@@ -185,7 +185,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
$env->overrideEnvConfig('policy.allow-public', true);
$this->checkAccess(
'Public + configured',
pht('Public + configured'),
id(clone $controller)->setConfig('public', true),
$request,
array(
@@ -210,7 +210,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
$app_controller = id(clone $controller)->setCurrentApplication($app);
$this->checkAccess(
'Application Controller',
pht('Application Controller'),
$app_controller,
$request,
array(
@@ -225,7 +225,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
));
$this->checkAccess(
'Application Controller',
pht('Application Controller'),
id(clone $app_controller)->setConfig('login', false),
$request,
array(
@@ -259,7 +259,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
$this->assertTrue(
($result === null),
"Expect user '{$uname}' to be allowed access to '{$label}'.");
pht("Expect user '%s' to be allowed access to '%s'.", $uname, $label));
}
foreach ($no as $user) {
@@ -274,7 +274,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
$this->assertFalse(
($result === null),
"Expect user '{$uname}' to be denied access to '{$label}'.");
pht("Expect user '%s' to be denied access to '%s'.", $uname, $label));
}
}