pht() for view and form elements

Summary:
actually just wanted to `pht()` the //Cancel// button.

includes `pht()`ed exceptions.

refrained from `pht()`-ing `phabricator_relative_date()` since I wasn't too sure about the effects.

Test Plan: visited all form elements that I remembered - looks reasonable

Reviewers: epriestley, chad, btrahan

Reviewed By: chad

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5175
This commit is contained in:
Anh Nhan Nguyen
2013-03-01 15:37:32 -08:00
committed by epriestley
parent bedc06b1bc
commit 8e51764118
23 changed files with 78 additions and 63 deletions

View File

@@ -21,12 +21,12 @@ final class AphrontFormPolicyControl extends AphrontFormControl {
$this->capability = $capability;
$labels = array(
PhabricatorPolicyCapability::CAN_VIEW => 'Visible To',
PhabricatorPolicyCapability::CAN_EDIT => 'Editable By',
PhabricatorPolicyCapability::CAN_JOIN => 'Joinable By',
PhabricatorPolicyCapability::CAN_VIEW => pht('Visible To'),
PhabricatorPolicyCapability::CAN_EDIT => pht('Editable By'),
PhabricatorPolicyCapability::CAN_JOIN => pht('Joinable By'),
);
$this->setLabel(idx($labels, $this->capability, 'Unknown Policy'));
$this->setLabel(idx($labels, $this->capability, pht('Unknown Policy')));
return $this;
}
@@ -52,10 +52,10 @@ final class AphrontFormPolicyControl extends AphrontFormControl {
protected function renderInput() {
if (!$this->object) {
throw new Exception("Call setPolicyObject() before rendering!");
throw new Exception(pht("Call setPolicyObject() before rendering!"));
}
if (!$this->capability) {
throw new Exception("Call setCapability() before rendering!");
throw new Exception(pht("Call setCapability() before rendering!"));
}
$policy = $this->object->getPolicy($this->capability);