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:
@@ -22,7 +22,7 @@ final class PhrictionHistoryConduitAPIMethod extends PhrictionConduitAPIMethod {
|
||||
|
||||
protected function defineErrorTypes() {
|
||||
return array(
|
||||
'ERR-BAD-DOCUMENT' => 'No such document exists.',
|
||||
'ERR-BAD-DOCUMENT' => pht('No such document exists.'),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ final class PhrictionInfoConduitAPIMethod extends PhrictionConduitAPIMethod {
|
||||
|
||||
protected function defineErrorTypes() {
|
||||
return array(
|
||||
'ERR-BAD-DOCUMENT' => 'No such document exists.',
|
||||
'ERR-BAD-DOCUMENT' => pht('No such document exists.'),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,15 +9,15 @@ final class PhrictionActionConstants extends PhrictionConstants {
|
||||
const ACTION_MOVE_HERE = 'move here';
|
||||
|
||||
public static function getActionPastTenseVerb($action) {
|
||||
static $map = array(
|
||||
self::ACTION_CREATE => 'created',
|
||||
self::ACTION_EDIT => 'edited',
|
||||
self::ACTION_DELETE => 'deleted',
|
||||
self::ACTION_MOVE_AWAY => 'moved',
|
||||
self::ACTION_MOVE_HERE => 'moved',
|
||||
$map = array(
|
||||
self::ACTION_CREATE => pht('created'),
|
||||
self::ACTION_EDIT => pht('edited'),
|
||||
self::ACTION_DELETE => pht('deleted'),
|
||||
self::ACTION_MOVE_AWAY => pht('moved'),
|
||||
self::ACTION_MOVE_HERE => pht('moved'),
|
||||
);
|
||||
|
||||
return idx($map, $action, "brazenly {$action}'d");
|
||||
return idx($map, $action, pht("brazenly %s'd", $action));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,15 +9,15 @@ final class PhrictionChangeType extends PhrictionConstants {
|
||||
const CHANGE_STUB = 4;
|
||||
|
||||
public static function getChangeTypeLabel($const) {
|
||||
static $map = array(
|
||||
self::CHANGE_EDIT => 'Edit',
|
||||
self::CHANGE_DELETE => 'Delete',
|
||||
self::CHANGE_MOVE_HERE => 'Move Here',
|
||||
self::CHANGE_MOVE_AWAY => 'Move Away',
|
||||
self::CHANGE_STUB => 'Created through child',
|
||||
$map = array(
|
||||
self::CHANGE_EDIT => pht('Edit'),
|
||||
self::CHANGE_DELETE => pht('Delete'),
|
||||
self::CHANGE_MOVE_HERE => pht('Move Here'),
|
||||
self::CHANGE_MOVE_AWAY => pht('Move Away'),
|
||||
self::CHANGE_STUB => pht('Created through child'),
|
||||
);
|
||||
|
||||
return idx($map, $const, '???');
|
||||
return idx($map, $const, pht('Unknown'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ final class PhrictionDocumentController
|
||||
|
||||
$core_content = $notice->render();
|
||||
} else {
|
||||
throw new Exception("Unknown document status '{$doc_status}'!");
|
||||
throw new Exception(pht("Unknown document status '%s'!", $doc_status));
|
||||
}
|
||||
|
||||
$move_notice = null;
|
||||
|
||||
@@ -96,10 +96,13 @@ final class PhrictionEditController
|
||||
|
||||
$draft_note = new PHUIInfoView();
|
||||
$draft_note->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
|
||||
$draft_note->setTitle('Recovered Draft');
|
||||
$draft_note->appendChild(hsprintf(
|
||||
'<p>Showing a saved draft of your edits, you can %s.</p>',
|
||||
$discard));
|
||||
$draft_note->setTitle(pht('Recovered Draft'));
|
||||
$draft_note->appendChild(
|
||||
hsprintf(
|
||||
'<p>%s</p>',
|
||||
pht(
|
||||
'Showing a saved draft of your edits, you can %s.',
|
||||
$discard)));
|
||||
} else {
|
||||
$content_text = $content->getContent();
|
||||
$draft_note = null;
|
||||
|
||||
@@ -87,7 +87,7 @@ final class PhrictionHistoryController
|
||||
$color = 'green';
|
||||
break;
|
||||
default:
|
||||
throw new Exception('Unknown change type!');
|
||||
throw new Exception(pht('Unknown change type!'));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ final class PhrictionReplyHandler
|
||||
|
||||
public function validateMailReceiver($mail_receiver) {
|
||||
if (!($mail_receiver instanceof PhrictionDocument)) {
|
||||
throw new Exception('Mail receiver is not a PhrictionDocument!');
|
||||
throw new Exception(
|
||||
pht('Mail receiver is not a %s!', 'PhrictionDocument'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ final class PhrictionDocumentQuery
|
||||
case self::STATUS_ANY:
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Unknown status '{$this->status}'!");
|
||||
throw new Exception(pht("Unknown status '%s'!", $this->status));
|
||||
}
|
||||
|
||||
$where[] = $this->buildPagingClause($conn);
|
||||
|
||||
@@ -101,7 +101,7 @@ final class PhrictionDocument extends PhrictionDAO
|
||||
);
|
||||
|
||||
if (empty($types[$type])) {
|
||||
throw new Exception("Unknown URI type '{$type}'!");
|
||||
throw new Exception(pht("Unknown URI type '%s'!", $type));
|
||||
}
|
||||
|
||||
$prefix = $types[$type];
|
||||
|
||||
Reference in New Issue
Block a user