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

@@ -31,12 +31,20 @@ final class AphrontDialogView extends AphrontView {
return $this->title;
}
public function addSubmitButton($text = 'Okay') {
public function addSubmitButton($text = null) {
if (!$text) {
$text = pht('Okay');
}
$this->submitButton = $text;
return $this;
}
public function addCancelButton($uri, $text = 'Cancel') {
public function addCancelButton($uri, $text = null) {
if (!$text) {
$text = pht('Cancel');
}
$this->cancelURI = $uri;
$this->cancelText = $text;
return $this;
@@ -102,7 +110,7 @@ final class AphrontDialogView extends AphrontView {
if (!$this->user) {
throw new Exception(
"You must call setUser() when rendering an AphrontDialogView.");
pht("You must call setUser() when rendering an AphrontDialogView."));
}
$more = $this->class;