1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

pht for Daemons.

Summary: Scan Daemons app for pht and fix a form or two.

Test Plan: Used Daemons app as much as I could, check all caps language.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5133
This commit is contained in:
Chad Little 2013-02-26 19:51:36 -08:00
parent 82e41e7fa1
commit f01213b089
8 changed files with 46 additions and 43 deletions

View file

@ -3,11 +3,11 @@
final class PhabricatorApplicationDaemons extends PhabricatorApplication {
public function getName() {
return 'Daemons';
return pht('Daemons');
}
public function getShortDescription() {
return 'Manage Daemons';
return pht('Manage Daemons');
}
public function getBaseURI() {

View file

@ -37,7 +37,7 @@ final class PhabricatorDaemonCombinedLogController
return $this->buildApplicationPage(
$nav,
array(
'title' => 'Combined Daemon Log',
'title' => pht('Combined Daemon Log'),
));
}

View file

@ -66,7 +66,7 @@ final class PhabricatorDaemonConsoleController
$daemon_table->setDaemonLogs($logs);
$daemon_panel = new AphrontPanelView();
$daemon_panel->setHeader('Active Daemons');
$daemon_panel->setHeader(pht('Active Daemons'));
$daemon_panel->appendChild($daemon_table);
$daemon_panel->setNoBackground();
@ -87,18 +87,18 @@ final class PhabricatorDaemonConsoleController
'href' => '/daemon/task/'.$task->getID().'/',
'class' => 'button small grey',
),
'View Task'),
pht('View Task')),
);
}
$leased_table = new AphrontTableView($rows);
$leased_table->setHeaders(
array(
'ID',
'Class',
'Owner',
'Expires',
'Failures',
pht('ID'),
pht('Class'),
pht('Owner'),
pht('Expires'),
pht('Failures'),
'',
));
$leased_table->setColumnClasses(
@ -110,7 +110,7 @@ final class PhabricatorDaemonConsoleController
'n',
'action',
));
$leased_table->setNoDataString('No tasks are leased by workers.');
$leased_table->setNoDataString(pht('No tasks are leased by workers.'));
$leased_panel = new AphrontPanelView();
$leased_panel->setHeader('Leased Tasks');
@ -135,18 +135,18 @@ final class PhabricatorDaemonConsoleController
$queued_table = new AphrontTableView($rows);
$queued_table->setHeaders(
array(
'Class',
'Count',
pht('Class'),
pht('Count'),
));
$queued_table->setColumnClasses(
array(
'wide',
'n',
));
$queued_table->setNoDataString('Task queue is empty.');
$queued_table->setNoDataString(pht('Task queue is empty.'));
$queued_panel = new AphrontPanelView();
$queued_panel->setHeader('Queued Tasks');
$queued_panel->setHeader(pht('Queued Tasks'));
$queued_panel->appendChild($queued_table);
$queued_panel->setNoBackground();
@ -163,7 +163,7 @@ final class PhabricatorDaemonConsoleController
return $this->buildApplicationPage(
$nav,
array(
'title' => 'Console',
'title' => pht('Console'),
));
}

View file

@ -6,10 +6,10 @@ abstract class PhabricatorDaemonController extends PhabricatorController {
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
$nav->addLabel('Daemons');
$nav->addFilter('/', 'Console');
$nav->addFilter('log', 'All Daemons');
$nav->addFilter('log/combined', 'Combined Log');
$nav->addLabel(pht('Daemons'));
$nav->addFilter('/', pht('Console'));
$nav->addFilter('log', pht('All Daemons'));
$nav->addFilter('log/combined', pht('Combined Log'));
return $nav;
}

View file

@ -25,7 +25,7 @@ final class PhabricatorDaemonLogListController
$daemon_table->setDaemonLogs($logs);
$daemon_panel = new AphrontPanelView();
$daemon_panel->setHeader('All Daemons');
$daemon_panel->setHeader(pht('All Daemons'));
$daemon_panel->appendChild($daemon_table);
$daemon_panel->appendChild($pager);
$daemon_panel->setNoBackground();
@ -37,7 +37,7 @@ final class PhabricatorDaemonLogListController
return $this->buildApplicationPage(
$nav,
array(
'title' => 'All Daemons',
'title' => pht('All Daemons'),
));
}

View file

@ -33,29 +33,29 @@ final class PhabricatorDaemonLogViewController
->setUser($user)
->appendChild(
id(new AphrontFormStaticControl())
->setLabel('Daemon')
->setLabel(pht('Daemon'))
->setValue($log->getDaemon()))
->appendChild(
id(new AphrontFormStaticControl())
->setLabel('Host')
->setLabel(pht('Host'))
->setValue($log->getHost()))
->appendChild(
id(new AphrontFormStaticControl())
->setLabel('PID')
->setLabel(pht('PID'))
->setValue($log->getPID()))
->appendChild(
id(new AphrontFormStaticControl())
->setLabel('Started')
->setLabel(pht('Started'))
->setValue(
phabricator_datetime($log->getDateCreated(), $user)))
->appendChild(
id(new AphrontFormTextAreaControl())
->setLabel('Argv')
->setLabel(pht('Argv'))
->setValue($argv));
$panel = new AphrontPanelView();
$panel->setHeader('Daemon Details');
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
$panel->setHeader(pht('Daemon Details'));
$panel->setNoBackground();
$panel->appendChild($form);
$content[] = $panel;
@ -65,7 +65,8 @@ final class PhabricatorDaemonLogViewController
$event_view->setEvents($events);
$log_panel = new AphrontPanelView();
$log_panel->setHeader('Daemon Logs');
$log_panel->setHeader(pht('Daemon Logs'));
$log_panel->setNoBackground();
$log_panel->appendChild($event_view);
$content[] = $log_panel;
@ -77,7 +78,7 @@ final class PhabricatorDaemonLogViewController
return $this->buildApplicationPage(
$nav,
array(
'title' => 'Daemon Log',
'title' => pht('Daemon Log'),
));
}

View file

@ -22,19 +22,21 @@ final class PhabricatorWorkerTaskDetailController
$title = pht('Task Does Not Exist');
$error_view = new AphrontErrorView();
$error_view->setTitle('No Such Task');
$error_view->setTitle(pht('No Such Task'));
$error_view->appendChild(phutil_tag(
'p',
array(),
'This task may have recently been garbage collected.'));
pht('This task may have recently been garbage collected.')));
$error_view->setSeverity(AphrontErrorView::SEVERITY_NODATA);
$content = $error_view;
} else {
$title = 'Task '.$task->getID();
$title = pht('Task %d', $task->getID());
$header = id(new PhabricatorHeaderView())
->setHeader('Task '.$task->getID().' ('.$task->getTaskClass().')');
->setHeader(pht('Task %d (%s)',
$task->getID(),
$task->getTaskClass()));
$actions = $this->buildActionListView($task);
$properties = $this->buildPropertyListView($task);

View file

@ -71,39 +71,39 @@ final class PhabricatorWorkerTaskUpdateController
switch ($this->action) {
case 'retry':
if ($can_retry) {
$dialog->setTitle('Really retry task?');
$dialog->setTitle(pht('Really retry task?'));
$dialog->appendChild(phutil_tag('p', array(), pht(
'The task will be put back in the queue and executed again.')));
$dialog->addSubmitButton('Retry Task');
} else {
$dialog->setTitle('Can Not Retry');
$dialog->setTitle(pht('Can Not Retry'));
$dialog->appendChild(phutil_tag('p', array(), pht(
'Only archived, unsuccessful tasks can be retried.')));
}
break;
case 'cancel':
if ($can_cancel) {
$dialog->setTitle('Really cancel task?');
$dialog->setTitle(pht('Really cancel task?'));
$dialog->appendChild(phutil_tag('p', array(), pht(
'The work this task represents will never be performed if you '.
'cancel it. Are you sure you want to cancel it?')));
$dialog->addSubmitButton('Cancel Task');
$dialog->addSubmitButton(pht('Cancel Task'));
} else {
$dialog->setTitle('Can Not Cancel');
$dialog->setTitle(pht('Cannot Cancel'));
$dialog->appendChild(phutil_tag('p', array(), pht(
'Only active tasks can be cancelled.')));
}
break;
case 'release':
if ($can_release) {
$dialog->setTitle('Really free task lease?');
$dialog->setTitle(pht('Really free task lease?'));
$dialog->appendChild(phutil_tag('p', array(), pht(
'If the process which owns the task lease is still doing work '.
'on it, the work may be performed twice. Are you sure you '.
'want to free the lease?')));
$dialog->addSubmitButton('Free Lease');
$dialog->addSubmitButton(pht('Free Lease'));
} else {
$dialog->setTitle('Can Not Free Lease');
$dialog->setTitle(pht('Cannot Free Lease'));
$dialog->appendChild(phutil_tag('p', array(), pht(
'Only active, leased tasks may have their leases freed.')));
}