Mark some strings for translation
Summary: Add some more `pht`izations. Test Plan: Eyeball it. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: hach-que, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D13200
This commit is contained in:
@@ -87,7 +87,7 @@ final class AlmanacBindingEditController
|
||||
->appendControl(
|
||||
id(new AphrontFormTokenizerControl())
|
||||
->setName('interfacePHIDs')
|
||||
->setLabel('Interface')
|
||||
->setLabel(pht('Interface'))
|
||||
->setLimit(1)
|
||||
->setDatasource(new AlmanacInterfaceDatasource())
|
||||
->setValue($v_interface)
|
||||
|
||||
@@ -38,7 +38,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||
$crumbs->addTextCrumb(pht('Console'));
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText('Console')
|
||||
->setHeaderText(pht('Console'))
|
||||
->appendChild($menu);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
|
||||
@@ -44,7 +44,9 @@ final class PhabricatorAuditCommentEditor extends PhabricatorEditor {
|
||||
|
||||
return array(
|
||||
'diffusion-audit-'.$commit->getPHID(),
|
||||
'Commit r'.$repository->getCallsign().$commit->getCommitIdentifier(),
|
||||
pht(
|
||||
'Commit %s',
|
||||
'r'.$repository->getCallsign().$commit->getCommitIdentifier()),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ final class ConpherenceRoomTestCase extends ConpherenceTestCase {
|
||||
->setNewValue(array('+' => $participant_phids));
|
||||
$xactions[] = id(new ConpherenceTransaction())
|
||||
->setTransactionType(ConpherenceTransaction::TYPE_TITLE)
|
||||
->setNewValue('Test');
|
||||
->setNewValue(pht('Test'));
|
||||
|
||||
id(new ConpherenceEditor())
|
||||
->setActor($creator)
|
||||
|
||||
@@ -160,8 +160,8 @@ final class ConpherenceThreadTestCase extends ConpherenceTestCase {
|
||||
list($errors, $conpherence) = ConpherenceEditor::createThread(
|
||||
$creator,
|
||||
$participant_phids,
|
||||
'Test',
|
||||
'Test',
|
||||
pht('Test'),
|
||||
pht('Test'),
|
||||
PhabricatorContentSource::newConsoleSource());
|
||||
return $conpherence;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ final class DifferentialTransaction extends PhabricatorApplicationTransaction {
|
||||
const TYPE_UPDATE = 'differential:update';
|
||||
const TYPE_ACTION = 'differential:action';
|
||||
const TYPE_STATUS = 'differential:status';
|
||||
|
||||
|
||||
const MAILTAG_REVIEWERS = 'differential-reviewers';
|
||||
const MAILTAG_CLOSED = 'differential-committed';
|
||||
const MAILTAG_CC = 'differential-cc';
|
||||
|
||||
@@ -190,7 +190,7 @@ final class DifferentialChangesetListView extends AphrontView {
|
||||
} else {
|
||||
$detail->setAutoload(isset($this->visibleChangesets[$key]));
|
||||
if (isset($this->visibleChangesets[$key])) {
|
||||
$load = 'Loading...';
|
||||
$load = pht('Loading...');
|
||||
} else {
|
||||
$load = javelin_tag(
|
||||
'a',
|
||||
|
||||
@@ -78,7 +78,7 @@ final class DifferentialResultsTableView extends AphrontView {
|
||||
'href' => '#',
|
||||
'mustcapture' => true,
|
||||
),
|
||||
'Hide');
|
||||
pht('Hide'));
|
||||
|
||||
$rows[] = javelin_tag(
|
||||
'tr',
|
||||
|
||||
@@ -36,15 +36,14 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||
}
|
||||
|
||||
public function render() {
|
||||
|
||||
$this->requireResource('differential-core-view-css');
|
||||
$this->requireResource('differential-revision-history-css');
|
||||
|
||||
$data = array(
|
||||
array(
|
||||
'name' => 'Base',
|
||||
'name' => pht('Base'),
|
||||
'id' => null,
|
||||
'desc' => 'Base',
|
||||
'desc' => pht('Base'),
|
||||
'age' => null,
|
||||
'obj' => null,
|
||||
),
|
||||
@@ -53,7 +52,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||
$seq = 0;
|
||||
foreach ($this->diffs as $diff) {
|
||||
$data[] = array(
|
||||
'name' => 'Diff '.(++$seq),
|
||||
'name' => pht('Diff %d', ++$seq),
|
||||
'id' => $diff->getID(),
|
||||
'desc' => $diff->getDescription(),
|
||||
'age' => $diff->getDateCreated(),
|
||||
|
||||
@@ -116,7 +116,7 @@ final class DiffusionLintController extends DiffusionController {
|
||||
->setValue($owners))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Filter'));
|
||||
->setValue(pht('Filter')));
|
||||
$content[] = id(new AphrontListFilterView())->appendChild($form);
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ final class DiffusionRepositoryEditHostingController
|
||||
'%s: This repository is hosted elsewhere, so Phabricator can not '.
|
||||
'perform writes. This mode will act like "Read Only" for '.
|
||||
'repositories hosted elsewhere.',
|
||||
phutil_tag('strong', array(), 'WARNING')),
|
||||
phutil_tag('strong', array(), pht('WARNING'))),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ final class DiffusionHistoryTableView extends DiffusionView {
|
||||
$summary = AphrontTableView::renderSingleDisplayLine(
|
||||
$history->getSummary());
|
||||
} else {
|
||||
$summary = phutil_tag('em', array(), "Importing\xE2\x80\xA6");
|
||||
$summary = phutil_tag('em', array(), pht("Importing\xE2\x80\xA6"));
|
||||
}
|
||||
|
||||
$build = null;
|
||||
|
||||
@@ -29,8 +29,7 @@ final class DoorkeeperObjectRef extends Phobject {
|
||||
|
||||
public function getExternalObject() {
|
||||
if (!$this->externalObject) {
|
||||
throw new Exception(
|
||||
'Call attachExternalObject() before getExternalObject()!');
|
||||
throw new PhutilInvalidStateException('attachExternalObject');
|
||||
}
|
||||
return $this->externalObject;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ abstract class DrydockBlueprintImplementation {
|
||||
$resource->endReadLocking();
|
||||
if ($allocated) {
|
||||
$resource->saveTransaction();
|
||||
$this->log('Allocated Lease');
|
||||
$this->log(pht('Allocated Lease'));
|
||||
} else {
|
||||
$resource->killTransaction();
|
||||
$this->log(pht('Failed to Allocate Lease'));
|
||||
|
||||
@@ -80,7 +80,9 @@ final class DrydockWorkingCopyBlueprintImplementation
|
||||
$this->log(pht('Complete.'));
|
||||
|
||||
$resource = $this->newResourceTemplate(
|
||||
'Working Copy ('.$repository->getCallsign().')');
|
||||
pht(
|
||||
'Working Copy (%s)',
|
||||
$repository->getCallsign()));
|
||||
$resource->setStatus(DrydockResourceStatus::STATUS_OPEN);
|
||||
$resource->setAttribute('lease.host', $host_lease->getID());
|
||||
$resource->setAttribute('path', $path);
|
||||
|
||||
@@ -43,16 +43,16 @@ final class DrydockLogListView extends AphrontView {
|
||||
$table->setDeviceReadyTable(true);
|
||||
$table->setHeaders(
|
||||
array(
|
||||
'Resource',
|
||||
'Lease',
|
||||
'Message',
|
||||
'Date',
|
||||
pht('Resource'),
|
||||
pht('Lease'),
|
||||
pht('Message'),
|
||||
pht('Date'),
|
||||
));
|
||||
$table->setShortHeaders(
|
||||
array(
|
||||
'R',
|
||||
'L',
|
||||
'Message',
|
||||
pht('Message'),
|
||||
'',
|
||||
));
|
||||
$table->setColumnClasses(
|
||||
|
||||
@@ -109,7 +109,7 @@ final class PhabricatorFactHomeController extends PhabricatorFactController {
|
||||
->setUser($user)
|
||||
->appendChild(
|
||||
id(new AphrontFormSelectControl())
|
||||
->setLabel('Y-Axis')
|
||||
->setLabel(pht('Y-Axis'))
|
||||
->setName('y1')
|
||||
->setOptions($options))
|
||||
->appendChild(
|
||||
|
||||
@@ -82,7 +82,7 @@ final class HarbormasterPlanRunController extends HarbormasterController {
|
||||
$plan->getID()))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('Buildable Name')
|
||||
->setLabel(pht('Buildable Name'))
|
||||
->setName('buildablePHID')
|
||||
->setError($e_name)
|
||||
->setValue($v_name));
|
||||
|
||||
@@ -183,9 +183,9 @@ final class HeraldTranscript extends HeraldDAO
|
||||
|
||||
public function getMetadataMap() {
|
||||
return array(
|
||||
'Run At Epoch' => date('F jS, g:i:s A', $this->time),
|
||||
'Run On Host' => $this->host,
|
||||
'Run Duration' => (int)(1000 * $this->duration).' ms',
|
||||
pht('Run At Epoch') => date('F jS, g:i:s A', $this->time),
|
||||
pht('Run On Host') => $this->host,
|
||||
pht('Run Duration') => (int)(1000 * $this->duration).' ms',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -212,16 +212,16 @@ EOTEXT
|
||||
|
||||
$status_example = array(
|
||||
'open' => array(
|
||||
'name' => 'Open',
|
||||
'name' => pht('Open'),
|
||||
'special' => 'default',
|
||||
),
|
||||
'closed' => array(
|
||||
'name' => 'Closed',
|
||||
'name' => pht('Closed'),
|
||||
'special' => 'closed',
|
||||
'closed' => true,
|
||||
),
|
||||
'duplicate' => array(
|
||||
'name' => 'Duplicate',
|
||||
'name' => pht('Duplicate'),
|
||||
'special' => 'duplicate',
|
||||
'closed' => true,
|
||||
),
|
||||
|
||||
@@ -34,16 +34,16 @@ final class ManiphestTaskStatusTestCase extends PhabricatorTestCase {
|
||||
|
||||
$valid = array(
|
||||
'open' => array(
|
||||
'name' => 'Open',
|
||||
'name' => pht('Open'),
|
||||
'special' => 'default',
|
||||
),
|
||||
'closed' => array(
|
||||
'name' => 'Closed',
|
||||
'name' => pht('Closed'),
|
||||
'special' => 'closed',
|
||||
'closed' => true,
|
||||
),
|
||||
'duplicate' => array(
|
||||
'name' => 'Duplicate',
|
||||
'name' => pht('Duplicate'),
|
||||
'special' => 'duplicate',
|
||||
'closed' => true,
|
||||
),
|
||||
@@ -52,7 +52,7 @@ final class ManiphestTaskStatusTestCase extends PhabricatorTestCase {
|
||||
|
||||
// We should raise on a bad key.
|
||||
$bad_key = $valid;
|
||||
$bad_key['!'] = array('name' => 'Exclaim');
|
||||
$bad_key['!'] = array('name' => pht('Exclaim'));
|
||||
$this->assertConfigValid(false, pht('Bad Key'), $bad_key);
|
||||
|
||||
// We should raise on a value type.
|
||||
@@ -68,7 +68,7 @@ final class ManiphestTaskStatusTestCase extends PhabricatorTestCase {
|
||||
// We should raise on two statuses with the same special.
|
||||
$double_close = $valid;
|
||||
$double_close['finished'] = array(
|
||||
'name' => 'Finished',
|
||||
'name' => pht('Finished'),
|
||||
'special' => 'closed',
|
||||
'closed' => true,
|
||||
);
|
||||
|
||||
@@ -589,7 +589,7 @@ final class ManiphestReportController extends ManiphestController {
|
||||
$cname[] = $label;
|
||||
$cclass[] = 'n';
|
||||
}
|
||||
$cname[] = 'Total';
|
||||
$cname[] = pht('Total');
|
||||
$cclass[] = 'n';
|
||||
$cname[] = javelin_tag(
|
||||
'span',
|
||||
|
||||
@@ -53,16 +53,16 @@ final class PhabricatorApplicationUninstallController
|
||||
if ($this->action == 'install') {
|
||||
if ($selected->canUninstall()) {
|
||||
$dialog
|
||||
->setTitle('Confirmation')
|
||||
->setTitle(pht('Confirmation'))
|
||||
->appendChild(
|
||||
pht(
|
||||
'Install %s application?',
|
||||
$selected->getName()))
|
||||
->addSubmitButton('Install');
|
||||
->addSubmitButton(pht('Install'));
|
||||
|
||||
} else {
|
||||
$dialog
|
||||
->setTitle('Information')
|
||||
->setTitle(pht('Information'))
|
||||
->appendChild(pht('You cannot install an installed application.'));
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -23,7 +23,7 @@ final class PhabricatorMetaMTAMailgunReceiveController
|
||||
|
||||
if (!$this->verifyMessage()) {
|
||||
throw new Exception(
|
||||
'Mail signature is not valid. Check your Mailgun API key.');
|
||||
pht('Mail signature is not valid. Check your Mailgun API key.'));
|
||||
}
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
@@ -18,7 +18,7 @@ final class PhabricatorMailReceiverTestCase extends PhabricatorTestCase {
|
||||
foreach ($same as $address) {
|
||||
$this->assertTrue(
|
||||
PhabricatorMailReceiver::matchAddresses($base, $address),
|
||||
"Address {$address}");
|
||||
pht('Address %s', $address));
|
||||
}
|
||||
|
||||
$diff = array(
|
||||
|
||||
@@ -72,9 +72,9 @@ final class PhabricatorPeopleDatasource
|
||||
}
|
||||
|
||||
if ($this->enrichResults) {
|
||||
$display_type = 'User';
|
||||
$display_type = pht('User');
|
||||
if ($user->getIsAdmin()) {
|
||||
$display_type = 'Administrator';
|
||||
$display_type = pht('Administrator');
|
||||
}
|
||||
$result->setDisplayType($display_type);
|
||||
$result->setImageURI($handles[$user->getPHID()]->getImageURI());
|
||||
|
||||
@@ -15,7 +15,7 @@ final class PhabricatorPhameApplication extends PhabricatorApplication {
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return 'Blog';
|
||||
return pht('Blog');
|
||||
}
|
||||
|
||||
public function getTitleGlyph() {
|
||||
|
||||
@@ -167,13 +167,13 @@ final class PhamePost extends PhameDAO
|
||||
|
||||
if ($current == 'facebook' ||
|
||||
PhabricatorFacebookAuthProvider::getFacebookApplicationID()) {
|
||||
$options['facebook'] = 'Facebook';
|
||||
$options['facebook'] = pht('Facebook');
|
||||
}
|
||||
if ($current == 'disqus' ||
|
||||
PhabricatorEnv::getEnvConfig('disqus.shortname')) {
|
||||
$options['disqus'] = 'Disqus';
|
||||
$options['disqus'] = pht('Disqus');
|
||||
}
|
||||
$options['none'] = 'None';
|
||||
$options['none'] = pht('None');
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ final class PholioMockEditController extends PholioController {
|
||||
$mock_xactions[$type_cc] = array('=' => $v_cc);
|
||||
|
||||
if (!strlen($request->getStr('name'))) {
|
||||
$e_name = 'Required';
|
||||
$e_name = pht('Required');
|
||||
$errors[] = pht('You must give the mock a name.');
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,9 @@ final class PhortuneProductListController extends PhabricatorController {
|
||||
$title = pht('Product List');
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb('Products', $this->getApplicationURI('product/'));
|
||||
$crumbs->addTextCrumb(
|
||||
pht('Products'),
|
||||
$this->getApplicationURI('product/'));
|
||||
$crumbs->addAction(
|
||||
id(new PHUIListItemView())
|
||||
->setName(pht('Create Product'))
|
||||
|
||||
@@ -44,12 +44,10 @@ final class PhortuneProviderActionController
|
||||
return $response;
|
||||
}
|
||||
|
||||
$title = 'Phortune';
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$response,
|
||||
array(
|
||||
'title' => $title,
|
||||
'title' => pht('Phortune'),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ final class PhabricatorXHPASTViewRunController
|
||||
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Parse'));
|
||||
->setValue(pht('Parse')));
|
||||
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Generate XHP AST'))
|
||||
|
||||
@@ -78,7 +78,7 @@ final class PhragmentBrowseController extends PhragmentController {
|
||||
$item->addAttribute(pht('Deleted'));
|
||||
}
|
||||
} else {
|
||||
$item->addAttribute('Directory');
|
||||
$item->addAttribute(pht('Directory'));
|
||||
}
|
||||
$list->addItem($item);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ final class PhragmentHistoryController extends PhragmentController {
|
||||
|
||||
if ($version->getFilePHID() === null) {
|
||||
$item->setDisabled(true);
|
||||
$item->addAttribute('Deletion');
|
||||
$item->addAttribute(pht('Deletion'));
|
||||
}
|
||||
|
||||
if (!$first && $can_edit) {
|
||||
|
||||
@@ -89,8 +89,8 @@ final class PhragmentSnapshotCreateController extends PhragmentController {
|
||||
'tr',
|
||||
array(),
|
||||
array(
|
||||
phutil_tag('th', array(), 'Fragment'),
|
||||
phutil_tag('th', array(), 'Version'),
|
||||
phutil_tag('th', array(), pht('Fragment')),
|
||||
phutil_tag('th', array(), pht('Version')),
|
||||
));
|
||||
$rows[] = phutil_tag(
|
||||
'tr',
|
||||
|
||||
@@ -68,7 +68,7 @@ final class PhragmentZIPController extends PhragmentController {
|
||||
}
|
||||
|
||||
if (!$zip->open((string)$temp, ZipArchive::CREATE)) {
|
||||
throw new Exception('Unable to create ZIP archive!');
|
||||
throw new Exception(pht('Unable to create ZIP archive!'));
|
||||
}
|
||||
|
||||
$mappings = $this->getFragmentMappings($fragment, $fragment->getPath());
|
||||
|
||||
@@ -227,7 +227,7 @@ final class PhabricatorProjectEditorTestCase extends PhabricatorTestCase {
|
||||
|
||||
private function createProject(PhabricatorUser $user) {
|
||||
$project = PhabricatorProject::initializeNewProject($user);
|
||||
$project->setName('Test Project '.mt_rand());
|
||||
$project->setName(pht('Test Project %d', mt_rand()));
|
||||
$project->save();
|
||||
|
||||
return $project;
|
||||
@@ -247,7 +247,7 @@ final class PhabricatorProjectEditorTestCase extends PhabricatorTestCase {
|
||||
|
||||
$user = new PhabricatorUser();
|
||||
$user->setUsername('unittestuser'.$rand);
|
||||
$user->setRealName('Unit Test User '.$rand);
|
||||
$user->setRealName(pht('Unit Test User %d', $rand));
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ final class PhabricatorProjectDatasource
|
||||
$proj_result = id(new PhabricatorTypeaheadResult())
|
||||
->setName($all_strings)
|
||||
->setDisplayName($proj->getName())
|
||||
->setDisplayType('Project')
|
||||
->setDisplayType(pht('Project'))
|
||||
->setURI('/tag/'.$proj->getPrimarySlug().'/')
|
||||
->setPHID($proj->getPHID())
|
||||
->setIcon($proj->getIcon())
|
||||
|
||||
@@ -250,7 +250,7 @@ final class ReleephRequestEditController extends ReleephBranchController {
|
||||
->addHiddenInput('requestIdentifierRaw', 'D'.$diff_rev_id)
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
->setLabel('Diff')
|
||||
->setLabel(pht('Diff'))
|
||||
->setValue($title));
|
||||
} else {
|
||||
$origin = $branch->getURI();
|
||||
|
||||
@@ -51,7 +51,7 @@ final class DifferentialReleephRequestFieldSpecification {
|
||||
}
|
||||
|
||||
public function renderLabelForRevisionView() {
|
||||
return 'Releeph';
|
||||
return pht('Releeph');
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDs() {
|
||||
@@ -246,7 +246,7 @@ final class DifferentialReleephRequestFieldSpecification {
|
||||
}
|
||||
|
||||
public function renderLabelForCommitMessage() {
|
||||
return 'Releeph';
|
||||
return pht('Releeph');
|
||||
}
|
||||
|
||||
public function shouldAppearOnCommitMessageTemplate() {
|
||||
|
||||
@@ -8,7 +8,7 @@ final class ReleephAuthorFieldSpecification
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return 'Author';
|
||||
return pht('Author');
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForPropertyView() {
|
||||
|
||||
@@ -8,7 +8,7 @@ final class ReleephBranchCommitFieldSpecification
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return 'Commit';
|
||||
return pht('Commit');
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForPropertyView() {
|
||||
|
||||
@@ -8,7 +8,7 @@ final class ReleephDiffMessageFieldSpecification
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return 'Message';
|
||||
return pht('Message');
|
||||
}
|
||||
|
||||
public function getStyleForPropertyView() {
|
||||
|
||||
@@ -8,7 +8,7 @@ final class ReleephIntentFieldSpecification
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return 'Intent';
|
||||
return pht('Intent');
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForPropertyView() {
|
||||
|
||||
@@ -37,7 +37,7 @@ abstract class ReleephLevelFieldSpecification
|
||||
}
|
||||
|
||||
$control = id(new AphrontFormRadioButtonControl())
|
||||
->setLabel('Level')
|
||||
->setLabel(pht('Level'))
|
||||
->setName($control_name)
|
||||
->setValue($level);
|
||||
|
||||
@@ -75,7 +75,7 @@ abstract class ReleephLevelFieldSpecification
|
||||
|
||||
public function validate($value) {
|
||||
if ($value === null) {
|
||||
$this->error = 'Required';
|
||||
$this->error = pht('Required');
|
||||
$label = $this->getName();
|
||||
throw new ReleephFieldParseException(
|
||||
$this,
|
||||
|
||||
@@ -8,7 +8,7 @@ final class ReleephOriginalCommitFieldSpecification
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return 'Commit';
|
||||
return pht('Commit');
|
||||
}
|
||||
|
||||
public function getRequiredHandlePHIDsForPropertyView() {
|
||||
|
||||
@@ -44,7 +44,7 @@ final class ReleephReasonFieldSpecification
|
||||
|
||||
public function validate($reason) {
|
||||
if (!$reason) {
|
||||
$this->error = 'Required';
|
||||
$this->error = pht('Required');
|
||||
throw new ReleephFieldParseException(
|
||||
$this,
|
||||
pht('You must give a reason for your request.'));
|
||||
@@ -53,8 +53,8 @@ final class ReleephReasonFieldSpecification
|
||||
|
||||
public function renderHelpForArcanist() {
|
||||
$text = pht(
|
||||
"Fully explain why you are requesting this code be included ".
|
||||
"in the next release.\n");
|
||||
'Fully explain why you are requesting this code be included '.
|
||||
'in the next release.')."\n";
|
||||
return phutil_console_wrap($text, 8);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ final class ReleephSeverityFieldSpecification
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return 'Severity';
|
||||
return pht('Severity');
|
||||
}
|
||||
|
||||
public function getStorageKey() {
|
||||
|
||||
@@ -14,7 +14,7 @@ final class ReleephSummaryFieldSpecification
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return 'Summary';
|
||||
return pht('Summary');
|
||||
}
|
||||
|
||||
public function getStorageKey() {
|
||||
@@ -25,7 +25,7 @@ final class ReleephSummaryFieldSpecification
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
return id(new AphrontFormTextControl())
|
||||
->setLabel('Summary')
|
||||
->setLabel(pht('Summary'))
|
||||
->setName('summary')
|
||||
->setError($this->error)
|
||||
->setValue($this->getValue())
|
||||
|
||||
@@ -157,11 +157,11 @@ final class ReleephRequestSearchEngine
|
||||
if (ReleephDefaultFieldSelector::isFacebook()) {
|
||||
return array(
|
||||
'' => pht('(All Severities)'),
|
||||
11 => 'HOTFIX',
|
||||
12 => 'PIGGYBACK',
|
||||
13 => 'RELEASE',
|
||||
14 => 'DAILY',
|
||||
15 => 'PARKING',
|
||||
11 => pht('HOTFIX'),
|
||||
12 => pht('PIGGYBACK'),
|
||||
13 => pht('RELEASE'),
|
||||
14 => pht('DAILY'),
|
||||
15 => pht('PARKING'),
|
||||
);
|
||||
} else {
|
||||
return array(
|
||||
|
||||
@@ -18,7 +18,7 @@ final class PhabricatorRepositoryType {
|
||||
|
||||
public static function getNameForRepositoryType($type) {
|
||||
$map = self::getAllRepositoryTypes();
|
||||
return idx($map, $type, 'Unknown');
|
||||
return idx($map, $type, pht('Unknown'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -100,7 +100,10 @@ final class PhabricatorMercurialGraphStream
|
||||
}
|
||||
|
||||
throw new Exception(
|
||||
"No such {$until_type} '{$until_name}' in repository!");
|
||||
pht(
|
||||
"No such %s '%s' in repository!",
|
||||
$until_type,
|
||||
$until_name));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -68,7 +68,10 @@ abstract class PhabricatorRepositoryEngine {
|
||||
$matches = null;
|
||||
if (!preg_match('/^\s*Fetch URL:\s*(.*?)\s*$/m', $remotes, $matches)) {
|
||||
throw new Exception(
|
||||
"Expected 'Fetch URL' in 'git remote show -n origin'.");
|
||||
pht(
|
||||
"Expected '%s' in '%s'.",
|
||||
'Fetch URL',
|
||||
'git remote show -n origin'));
|
||||
}
|
||||
|
||||
$remote_uri = $matches[1];
|
||||
|
||||
@@ -60,16 +60,16 @@ final class PhabricatorRepositoryManagementImportingWorkflow
|
||||
$status = $row['importStatus'];
|
||||
$need = array();
|
||||
if (!($status & PhabricatorRepositoryCommit::IMPORTED_MESSAGE)) {
|
||||
$need[] = 'Message';
|
||||
$need[] = pht('Message');
|
||||
}
|
||||
if (!($status & PhabricatorRepositoryCommit::IMPORTED_CHANGE)) {
|
||||
$need[] = 'Change';
|
||||
$need[] = pht('Change');
|
||||
}
|
||||
if (!($status & PhabricatorRepositoryCommit::IMPORTED_OWNERS)) {
|
||||
$need[] = 'Owners';
|
||||
$need[] = pht('Owners');
|
||||
}
|
||||
if (!($status & PhabricatorRepositoryCommit::IMPORTED_HERALD)) {
|
||||
$need[] = 'Herald';
|
||||
$need[] = pht('Herald');
|
||||
}
|
||||
|
||||
$console->writeOut(' %s', implode(', ', $need));
|
||||
|
||||
@@ -27,7 +27,7 @@ final class PhabricatorRepositoryURITestCase
|
||||
|
||||
$repo = PhabricatorRepository::initializeNewRepository($user)
|
||||
->setVersionControlSystem($svn)
|
||||
->setName('Test Repo')
|
||||
->setName(pht('Test Repo'))
|
||||
->setCallsign('TESTREPO')
|
||||
->setCredentialPHID($http_credential->getPHID())
|
||||
->save();
|
||||
|
||||
@@ -15,7 +15,7 @@ final class PhabricatorApplicationTransactionNoEffectException
|
||||
$this->hasComment = $has_comment;
|
||||
|
||||
$message = array();
|
||||
$message[] = 'Transactions have no effect:';
|
||||
$message[] = pht('Transactions have no effect:');
|
||||
foreach ($this->transactions as $transaction) {
|
||||
$message[] = ' - '.$transaction->getNoEffectDescription();
|
||||
}
|
||||
|
||||
@@ -96,8 +96,8 @@ final class PHUITimelineExample extends PhabricatorUIExample {
|
||||
$events[] = id(new PHUITimelineEventView())
|
||||
->setUserHandle($handle)
|
||||
->setIcon('fa-tag')
|
||||
->setTitle(str_repeat('Long Text Title ', 64))
|
||||
->appendChild(str_repeat('Long Text Body ', 64))
|
||||
->setTitle(str_repeat(pht('Long Text Title').' ', 64))
|
||||
->appendChild(str_repeat(pht('Long Text Body').' ', 64))
|
||||
->setColor(PhabricatorTransactions::COLOR_ORANGE);
|
||||
|
||||
$events[] = id(new PHUITimelineEventView())
|
||||
|
||||
@@ -53,7 +53,7 @@ final class PhabricatorAphrontBarUIExample extends PhabricatorUIExample {
|
||||
}
|
||||
|
||||
return $this->wrap(
|
||||
'Glyph bars in weird order',
|
||||
pht('Glyph bars in weird order'),
|
||||
$views);
|
||||
}
|
||||
|
||||
@@ -61,12 +61,13 @@ final class PhabricatorAphrontBarUIExample extends PhabricatorUIExample {
|
||||
$bar = id(new AphrontGlyphBarView())
|
||||
->setValue(50)
|
||||
->setMax(100)
|
||||
->setCaption('Glyphs!')
|
||||
->setCaption(pht('Glyphs!'))
|
||||
->setNumGlyphs(10)
|
||||
->setGlyph(hsprintf('%s', '*'));
|
||||
|
||||
return $this->wrap(
|
||||
'Ascii star glyph bar', $bar);
|
||||
pht('ASCII star glyph bar'),
|
||||
$bar);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,28 +22,28 @@ final class PhabricatorPagedFormUIExample extends PhabricatorUIExample {
|
||||
->addControl(
|
||||
id(new AphrontFormTextControl())
|
||||
->setName('page1')
|
||||
->setLabel('Page 1'));
|
||||
->setLabel(pht('Page 1')));
|
||||
|
||||
$page2 = id(new PHUIFormPageView())
|
||||
->setPageName(pht('Page 2'))
|
||||
->addControl(
|
||||
id(new AphrontFormTextControl())
|
||||
->setName('page2')
|
||||
->setLabel('Page 2'));
|
||||
->setLabel(pht('Page 2')));
|
||||
|
||||
$page3 = id(new PHUIFormPageView())
|
||||
->setPageName(pht('Page 3'))
|
||||
->addControl(
|
||||
id(new AphrontFormTextControl())
|
||||
->setName('page3')
|
||||
->setLabel('Page 3'));
|
||||
->setLabel(pht('Page 3')));
|
||||
|
||||
$page4 = id(new PHUIFormPageView())
|
||||
->setPageName(pht('Page 4'))
|
||||
->addControl(
|
||||
id(new AphrontFormTextControl())
|
||||
->setName('page4')
|
||||
->setLabel('Page 4'));
|
||||
->setLabel(pht('Page 4')));
|
||||
|
||||
$form = new PHUIPagedFormView();
|
||||
$form->setUser($user);
|
||||
|
||||
@@ -23,7 +23,7 @@ final class PhabricatorPagerUIExample extends PhabricatorUIExample {
|
||||
$rows = array();
|
||||
for ($ii = $offset; $ii < min($item_count, $offset + $page_size); $ii++) {
|
||||
$rows[] = array(
|
||||
'Item #'.($ii + 1),
|
||||
pht('Item #%d', $ii + 1),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,28 +18,28 @@ final class PhabricatorSortTableUIExample extends PhabricatorUIExample {
|
||||
'model' => 'Civic',
|
||||
'year' => 2004,
|
||||
'price' => 3199,
|
||||
'color' => 'Blue',
|
||||
'color' => pht('Blue'),
|
||||
),
|
||||
array(
|
||||
'make' => 'Ford',
|
||||
'model' => 'Focus',
|
||||
'year' => 2001,
|
||||
'price' => 2549,
|
||||
'color' => 'Red',
|
||||
'color' => pht('Red'),
|
||||
),
|
||||
array(
|
||||
'make' => 'Toyota',
|
||||
'model' => 'Camry',
|
||||
'year' => 2009,
|
||||
'price' => 4299,
|
||||
'color' => 'Black',
|
||||
'color' => pht('Black'),
|
||||
),
|
||||
array(
|
||||
'make' => 'NASA',
|
||||
'model' => 'Shuttle',
|
||||
'year' => 1998,
|
||||
'price' => 1000000000,
|
||||
'color' => 'White',
|
||||
'color' => pht('White'),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ abstract class PhabricatorXHProfController extends PhabricatorController {
|
||||
public function buildStandardPageResponse($view, array $data) {
|
||||
$page = $this->buildStandardPageView();
|
||||
|
||||
$page->setApplicationName('XHProf');
|
||||
$page->setApplicationName(pht('XHProf'));
|
||||
$page->setBaseURI('/xhprof/');
|
||||
$page->setTitle(idx($data, 'title'));
|
||||
$page->setGlyph("\xE2\x98\x84");
|
||||
|
||||
Reference in New Issue
Block a user