diff --git a/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php b/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php index 9dbf1bd0be..15f6c47c66 100644 --- a/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php +++ b/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php @@ -43,10 +43,13 @@ final class PhabricatorXHProfProfileController $view->setIsFramed($is_framed); $view->setProfileData($data); + $crumbs = $this->buildApplicationCrumbs(); + $crumbs->addTextCrumb(pht('%s Profile', $symbol)); + return $this->buildStandardPageResponse( - $view, + array($crumbs, $view), array( - 'title' => 'Profile', + 'title' => pht('Profile'), 'frame' => $is_framed, )); } diff --git a/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php b/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php index 86f7221b8c..c96787cdf0 100644 --- a/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php +++ b/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php @@ -80,12 +80,15 @@ final class PhabricatorXHProfSampleListController } $list->setPager($pager); + $list->setNoDataString(pht('There are no profiling samples.')); - return $this->buildStandardPageResponse( - $list, + $crumbs = $this->buildApplicationCrumbs(); + $crumbs->addTextCrumb(pht('XHProf Samples')); + + return $this->buildApplicationPage( + array($crumbs, $list), array( 'title' => pht('XHProf Samples'), - 'device' => true, )); } diff --git a/src/applications/xhprof/view/PhabricatorXHProfProfileSymbolView.php b/src/applications/xhprof/view/PhabricatorXHProfProfileSymbolView.php index e4f8ec94e6..5c37b0a8f8 100644 --- a/src/applications/xhprof/view/PhabricatorXHProfProfileSymbolView.php +++ b/src/applications/xhprof/view/PhabricatorXHProfProfileSymbolView.php @@ -48,7 +48,7 @@ final class PhabricatorXHProfProfileSymbolView $rows = array(); $rows[] = array( - 'Metrics for this Call', + pht('Metrics for this Call'), '', '', '', @@ -62,7 +62,7 @@ final class PhabricatorXHProfProfileSymbolView )); $rows[] = array( - 'Parent Calls', + pht('Parent Calls'), '', '', '', @@ -79,7 +79,7 @@ final class PhabricatorXHProfProfileSymbolView $rows[] = array( - 'Child Calls', + pht('Child Calls'), '', '', '', @@ -102,9 +102,9 @@ final class PhabricatorXHProfProfileSymbolView $table = new AphrontTableView($rows); $table->setHeaders( array( - 'Symbol', - 'Count', - 'Wall Time', + pht('Symbol'), + pht('Count'), + pht('Wall Time'), '%', )); $table->setColumnClasses( @@ -115,8 +115,8 @@ final class PhabricatorXHProfProfileSymbolView 'n', )); - $panel = new AphrontPanelView(); - $panel->setHeader('XHProf Profile'); + $panel = new PHUIObjectBoxView(); + $panel->setHeader(pht('XHProf Profile')); $panel->appendChild($table); return $panel->render(); diff --git a/src/applications/xhprof/view/PhabricatorXHProfProfileTopLevelView.php b/src/applications/xhprof/view/PhabricatorXHProfProfileTopLevelView.php index 12326bb16d..4fab88ec23 100644 --- a/src/applications/xhprof/view/PhabricatorXHProfProfileTopLevelView.php +++ b/src/applications/xhprof/view/PhabricatorXHProfProfileTopLevelView.php @@ -54,7 +54,7 @@ final class PhabricatorXHProfProfileTopLevelView $rows = array(); $rows[] = array( - 'Total', + pht('Total'), number_format($totals['ct']), number_format($totals['wt']).' us', '100.0%', @@ -82,16 +82,16 @@ final class PhabricatorXHProfProfileTopLevelView $table = new AphrontTableView($rows); $table->setHeaders( array( - 'Symbol', - 'Count', + pht('Symbol'), + pht('Count'), javelin_tag( 'span', array( 'sigil' => 'has-tooltip', 'meta' => array( - 'tip' => 'Total wall time spent in this function and all of '. + 'tip' => pht('Total wall time spent in this function and all of '. 'its children (children are other functions it called '. - 'while executing).', + 'while executing).'), 'size' => 200, ), ), @@ -102,9 +102,9 @@ final class PhabricatorXHProfProfileTopLevelView array( 'sigil' => 'has-tooltip', 'meta' => array( - 'tip' => 'Wall time spent in this function, excluding time '. + 'tip' => pht('Wall time spent in this function, excluding time '. 'spent in children (children are other functions it '. - 'called while executing).', + 'called while executing).'), 'size' => 200, ), ), @@ -121,18 +121,19 @@ final class PhabricatorXHProfProfileTopLevelView 'n', )); - $panel = new AphrontPanelView(); - $panel->setHeader('XHProf Profile'); + $panel = new PHUIObjectBoxView(); + $header = id(new PHUIHeaderView()) + ->setHeaderText(pht('XHProf Profile')); if ($this->file) { - $panel->addButton( - phutil_tag( + $button = phutil_tag( 'a', array( 'href' => $this->file->getBestURI(), 'class' => 'green button', ), - 'Download .xhprof Profile')); + pht('Download .xhprof Profile')); + $header->addActionLink($button); } $panel->appendChild($table);