@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Modernize Diffusion

Summary: Converts to ObjectList for display, pht's most everything, some responsive design when possible. Tables still are tables, but scroll on touch.

Test Plan: Use iOS simulator on Diffusion, Chrome

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5847

+324 -303
+39 -39
src/__celerity_resource_map__.php
··· 831 831 ), 832 832 'aphront-panel-view-css' => 833 833 array( 834 - 'uri' => '/res/5600525c/rsrc/css/aphront/panel-view.css', 834 + 'uri' => '/res/4031ea99/rsrc/css/aphront/panel-view.css', 835 835 'type' => 'css', 836 836 'requires' => 837 837 array( ··· 4011 4011 ), array( 4012 4012 'packages' => 4013 4013 array( 4014 - 'd4935661' => 4014 + '850ba908' => 4015 4015 array( 4016 4016 'name' => 'core.pkg.css', 4017 4017 'symbols' => ··· 4053 4053 34 => 'phabricator-object-item-list-view-css', 4054 4054 35 => 'global-drag-and-drop-css', 4055 4055 ), 4056 - 'uri' => '/res/pkg/d4935661/core.pkg.css', 4056 + 'uri' => '/res/pkg/850ba908/core.pkg.css', 4057 4057 'type' => 'css', 4058 4058 ), 4059 4059 '26980a1c' => ··· 4244 4244 'reverse' => 4245 4245 array( 4246 4246 'aphront-attached-file-view-css' => '6b1fccc6', 4247 - 'aphront-dialog-view-css' => 'd4935661', 4248 - 'aphront-error-view-css' => 'd4935661', 4249 - 'aphront-form-view-css' => 'd4935661', 4250 - 'aphront-list-filter-view-css' => 'd4935661', 4251 - 'aphront-pager-view-css' => 'd4935661', 4252 - 'aphront-panel-view-css' => 'd4935661', 4253 - 'aphront-table-view-css' => 'd4935661', 4254 - 'aphront-tokenizer-control-css' => 'd4935661', 4255 - 'aphront-tooltip-css' => 'd4935661', 4256 - 'aphront-typeahead-control-css' => 'd4935661', 4247 + 'aphront-dialog-view-css' => '850ba908', 4248 + 'aphront-error-view-css' => '850ba908', 4249 + 'aphront-form-view-css' => '850ba908', 4250 + 'aphront-list-filter-view-css' => '850ba908', 4251 + 'aphront-pager-view-css' => '850ba908', 4252 + 'aphront-panel-view-css' => '850ba908', 4253 + 'aphront-table-view-css' => '850ba908', 4254 + 'aphront-tokenizer-control-css' => '850ba908', 4255 + 'aphront-tooltip-css' => '850ba908', 4256 + 'aphront-typeahead-control-css' => '850ba908', 4257 4257 'differential-changeset-view-css' => 'dd27a69b', 4258 4258 'differential-core-view-css' => 'dd27a69b', 4259 4259 'differential-inline-comment-editor' => '27c55b30', ··· 4267 4267 'differential-table-of-contents-css' => 'dd27a69b', 4268 4268 'diffusion-commit-view-css' => 'c8ce2d88', 4269 4269 'diffusion-icons-css' => 'c8ce2d88', 4270 - 'global-drag-and-drop-css' => 'd4935661', 4270 + 'global-drag-and-drop-css' => '850ba908', 4271 4271 'inline-comment-summary-css' => 'dd27a69b', 4272 4272 'javelin-aphlict' => '26980a1c', 4273 4273 'javelin-behavior' => '202a3dd0', ··· 4339 4339 'javelin-util' => '202a3dd0', 4340 4340 'javelin-vector' => '202a3dd0', 4341 4341 'javelin-workflow' => '202a3dd0', 4342 - 'lightbox-attachment-css' => 'd4935661', 4342 + 'lightbox-attachment-css' => '850ba908', 4343 4343 'maniphest-task-summary-css' => '6b1fccc6', 4344 4344 'maniphest-transaction-detail-css' => '6b1fccc6', 4345 4345 'phabricator-busy' => '26980a1c', 4346 4346 'phabricator-content-source-view-css' => 'dd27a69b', 4347 - 'phabricator-core-buttons-css' => 'd4935661', 4348 - 'phabricator-core-css' => 'd4935661', 4349 - 'phabricator-crumbs-view-css' => 'd4935661', 4350 - 'phabricator-directory-css' => 'd4935661', 4347 + 'phabricator-core-buttons-css' => '850ba908', 4348 + 'phabricator-core-css' => '850ba908', 4349 + 'phabricator-crumbs-view-css' => '850ba908', 4350 + 'phabricator-directory-css' => '850ba908', 4351 4351 'phabricator-drag-and-drop-file-upload' => '27c55b30', 4352 4352 'phabricator-dropdown-menu' => '26980a1c', 4353 4353 'phabricator-file-upload' => '26980a1c', 4354 - 'phabricator-filetree-view-css' => 'd4935661', 4355 - 'phabricator-flag-css' => 'd4935661', 4356 - 'phabricator-form-view-css' => 'd4935661', 4357 - 'phabricator-header-view-css' => 'd4935661', 4358 - 'phabricator-jump-nav' => 'd4935661', 4354 + 'phabricator-filetree-view-css' => '850ba908', 4355 + 'phabricator-flag-css' => '850ba908', 4356 + 'phabricator-form-view-css' => '850ba908', 4357 + 'phabricator-header-view-css' => '850ba908', 4358 + 'phabricator-jump-nav' => '850ba908', 4359 4359 'phabricator-keyboard-shortcut' => '26980a1c', 4360 4360 'phabricator-keyboard-shortcut-manager' => '26980a1c', 4361 - 'phabricator-main-menu-view' => 'd4935661', 4361 + 'phabricator-main-menu-view' => '850ba908', 4362 4362 'phabricator-menu-item' => '26980a1c', 4363 - 'phabricator-nav-view-css' => 'd4935661', 4363 + 'phabricator-nav-view-css' => '850ba908', 4364 4364 'phabricator-notification' => '26980a1c', 4365 - 'phabricator-notification-css' => 'd4935661', 4366 - 'phabricator-notification-menu-css' => 'd4935661', 4367 - 'phabricator-object-item-list-view-css' => 'd4935661', 4365 + 'phabricator-notification-css' => '850ba908', 4366 + 'phabricator-notification-menu-css' => '850ba908', 4367 + 'phabricator-object-item-list-view-css' => '850ba908', 4368 4368 'phabricator-object-selector-css' => 'dd27a69b', 4369 4369 'phabricator-phtize' => '26980a1c', 4370 4370 'phabricator-prefab' => '26980a1c', 4371 4371 'phabricator-project-tag-css' => '6b1fccc6', 4372 - 'phabricator-remarkup-css' => 'd4935661', 4372 + 'phabricator-remarkup-css' => '850ba908', 4373 4373 'phabricator-shaped-request' => '27c55b30', 4374 - 'phabricator-side-menu-view-css' => 'd4935661', 4375 - 'phabricator-standard-page-view' => 'd4935661', 4374 + 'phabricator-side-menu-view-css' => '850ba908', 4375 + 'phabricator-standard-page-view' => '850ba908', 4376 4376 'phabricator-textareautils' => '26980a1c', 4377 4377 'phabricator-tooltip' => '26980a1c', 4378 - 'phabricator-transaction-view-css' => 'd4935661', 4379 - 'phabricator-zindex-css' => 'd4935661', 4380 - 'sprite-apps-large-css' => 'd4935661', 4381 - 'sprite-gradient-css' => 'd4935661', 4382 - 'sprite-icons-css' => 'd4935661', 4383 - 'sprite-menu-css' => 'd4935661', 4384 - 'syntax-highlighting-css' => 'd4935661', 4378 + 'phabricator-transaction-view-css' => '850ba908', 4379 + 'phabricator-zindex-css' => '850ba908', 4380 + 'sprite-apps-large-css' => '850ba908', 4381 + 'sprite-gradient-css' => '850ba908', 4382 + 'sprite-icons-css' => '850ba908', 4383 + 'sprite-menu-css' => '850ba908', 4384 + 'syntax-highlighting-css' => '850ba908', 4385 4385 ), 4386 4386 ));
+1 -2
src/applications/diffusion/application/PhabricatorApplicationDiffusion.php
··· 3 3 final class PhabricatorApplicationDiffusion extends PhabricatorApplication { 4 4 5 5 public function getShortDescription() { 6 - return 'Repository Browser'; 6 + return pht('Repository Browser'); 7 7 } 8 8 9 9 public function getBaseURI() { ··· 90 90 } 91 91 92 92 } 93 -
+3 -3
src/applications/diffusion/controller/DiffusionBranchTableController.php
··· 26 26 $content = null; 27 27 if (!$branches) { 28 28 $content = new AphrontErrorView(); 29 - $content->setTitle('No Branches'); 30 - $content->appendChild('This repository has no branches.'); 29 + $content->setTitle(pht('No Branches')); 30 + $content->appendChild(pht('This repository has no branches.')); 31 31 $content->setSeverity(AphrontErrorView::SEVERITY_NODATA); 32 32 } else { 33 33 $commits = id(new PhabricatorAuditCommitQuery()) ··· 44 44 ->setDiffusionRequest($drequest); 45 45 46 46 $panel = id(new AphrontPanelView()) 47 - ->setHeader('Branches') 47 + ->setHeader(pht('Branches')) 48 48 ->appendChild($view) 49 49 ->appendChild($pager); 50 50
+22 -9
src/applications/diffusion/controller/DiffusionBrowseController.php
··· 31 31 $content = array(); 32 32 33 33 if ($drequest->getTagContent()) { 34 - $title = 'Tag: '.$drequest->getSymbolicCommit(); 34 + $title = pht('Tag: %s', $drequest->getSymbolicCommit()); 35 35 36 36 $tag_view = new AphrontPanelView(); 37 37 $tag_view->setHeader($title); ··· 84 84 85 85 $content[] = $this->buildOpenRevisions(); 86 86 87 - $readme_content = $results->getReadmeContent(); 88 - if ($readme_content) { 89 - $readme_panel = new AphrontPanelView(); 90 - $readme_panel->setHeader('README'); 91 - $readme_panel->appendChild($readme_content); 87 + $readme = $results->getReadmeContent(); 88 + if ($readme) { 89 + $box = new PHUIBoxView(); 90 + $box->setShadow(true); 91 + $box->appendChild($readme); 92 + $box->addPadding(PHUI::PADDING_LARGE); 93 + 94 + $panel = new AphrontPanelView(); 95 + $panel->setHeader(pht('README')); 96 + $panel->setNoBackground(); 97 + $panel->appendChild($box); 92 98 93 - $content[] = $readme_panel; 99 + $content[] = $panel; 94 100 } 101 + 95 102 } 96 103 97 104 $nav = $this->buildSideNav('browse', false); ··· 107 114 return $this->buildApplicationPage( 108 115 $nav, 109 116 array( 117 + 'device' => true, 118 + 'dust' => true, 110 119 'title' => array( 111 120 nonempty(basename($drequest->getPath()), '/'), 112 121 $drequest->getRepository()->getCallsign().' Repository', ··· 119 128 $drequest = $this->getDiffusionRequest(); 120 129 $form = id(new AphrontFormView()) 121 130 ->setUser($this->getRequest()->getUser()) 122 - ->setMethod('GET'); 131 + ->setMethod('GET') 132 + ->setNoShading(true); 123 133 124 134 switch ($drequest->getRepository()->getVersionControlSystem()) { 125 135 case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: ··· 140 150 break; 141 151 } 142 152 143 - return $form; 153 + $filter = new AphrontListFilterView(); 154 + $filter->appendChild($form); 155 + 156 + return $filter; 144 157 } 145 158 146 159 private function renderSearchResults() {
+10 -10
src/applications/diffusion/controller/DiffusionBrowseFileController.php
··· 84 84 if ($follow) { 85 85 $notice = new AphrontErrorView(); 86 86 $notice->setSeverity(AphrontErrorView::SEVERITY_WARNING); 87 - $notice->setTitle('Unable to Continue'); 87 + $notice->setTitle(pht('Unable to Continue')); 88 88 switch ($follow) { 89 89 case 'first': 90 90 $notice->appendChild( 91 - "Unable to continue tracing the history of this file because ". 92 - "this commit is the first commit in the repository."); 91 + pht("Unable to continue tracing the history of this file because ". 92 + "this commit is the first commit in the repository.")); 93 93 break; 94 94 case 'created': 95 95 $notice->appendChild( 96 - "Unable to continue tracing the history of this file because ". 97 - "this commit created the file."); 96 + pht("Unable to continue tracing the history of this file because ". 97 + "this commit created the file.")); 98 98 break; 99 99 } 100 100 $content[] = $notice; ··· 104 104 if ($renamed) { 105 105 $notice = new AphrontErrorView(); 106 106 $notice->setSeverity(AphrontErrorView::SEVERITY_NOTICE); 107 - $notice->setTitle('File Renamed'); 107 + $notice->setTitle(pht('File Renamed')); 108 108 $notice->appendChild( 109 - "File history passes through a rename from '".$drequest->getPath(). 110 - "' to '".$renamed."'."); 109 + pht("File history passes through a rename from '%s' to '%s'.", 110 + $drequest->getPath(), $renamed)); 111 111 $content[] = $notice; 112 112 } 113 113 ··· 647 647 if ($revision_id) { 648 648 $revision = idx($revisions, $revision_id); 649 649 if (!$revision) { 650 - $tooltip = '(Invalid revision)'; 650 + $tooltip = pht('(Invalid revision)'); 651 651 } else { 652 652 $tooltip = 653 653 phabricator_date($revision->getDateModified(), $user). ··· 675 675 'href' => $uri->setQueryParam('view', 'blame'), 676 676 'sigil' => 'has-tooltip', 677 677 'meta' => array( 678 - 'tip' => 'Skip Past This Commit', 678 + 'tip' => pht('Skip Past This Commit'), 679 679 'align' => 'E', 680 680 'size' => 300, 681 681 ),
+3 -1
src/applications/diffusion/controller/DiffusionChangeController.php
··· 66 66 return $this->buildApplicationPage( 67 67 $nav, 68 68 array( 69 - 'title' => 'Change', 69 + 'title' => pht('Change'), 70 + 'device' => true, 71 + 'dust' => true, 70 72 )); 71 73 } 72 74
+34 -33
src/applications/diffusion/controller/DiffusionCommitController.php
··· 38 38 } 39 39 return $this->buildStandardPageResponse( 40 40 id(new AphrontErrorView()) 41 - ->setTitle('Error displaying commit.') 42 - ->appendChild('Failed to load the commit because the commit has not '. 43 - 'been parsed yet.'), 44 - array('title' => 'Commit Still Parsing')); 41 + ->setTitle(pht('Error displaying commit.')) 42 + ->appendChild(pht('Failed to load the commit because the commit has '. 43 + 'not been parsed yet.')), 44 + array('title' => pht('Commit Still Parsing'))); 45 45 } 46 46 47 47 $commit_data = $drequest->loadCommitData(); ··· 57 57 $subpath = $commit_data->getCommitDetail('svn-subpath'); 58 58 59 59 $error_panel = new AphrontErrorView(); 60 - $error_panel->setTitle('Commit Not Tracked'); 60 + $error_panel->setTitle(pht('Commit Not Tracked')); 61 61 $error_panel->setSeverity(AphrontErrorView::SEVERITY_WARNING); 62 62 $error_panel->appendChild( 63 - "This Diffusion repository is configured to track only one ". 63 + pht("This Diffusion repository is configured to track only one ". 64 64 "subdirectory of the entire Subversion repository, and this commit ". 65 - "didn't affect the tracked subdirectory ('".$subpath."'), so no ". 66 - "information is available."); 65 + "didn't affect the tracked subdirectory ('%s'), so no ". 66 + "information is available.", $subpath)); 67 67 $content[] = $error_panel; 68 68 $content[] = $top_anchor; 69 69 } else { ··· 169 169 170 170 if ($bad_commit) { 171 171 $error_panel = new AphrontErrorView(); 172 - $error_panel->setTitle('Bad Commit'); 172 + $error_panel->setTitle(pht('Bad Commit')); 173 173 $error_panel->appendChild($bad_commit['description']); 174 174 175 175 $content[] = $error_panel; ··· 178 178 } else if (!count($changes)) { 179 179 $no_changes = new AphrontErrorView(); 180 180 $no_changes->setSeverity(AphrontErrorView::SEVERITY_WARNING); 181 - $no_changes->setTitle('Not Yet Parsed'); 181 + $no_changes->setTitle(pht('Not Yet Parsed')); 182 182 // TODO: This can also happen with weird SVN changes that don't do 183 183 // anything (or only alter properties?), although the real no-changes case 184 184 // is extremely rare and might be impossible to produce organically. We ··· 186 186 // DB once we parse these changes so we can distinguish between 187 187 // "not parsed yet" and "no changes". 188 188 $no_changes->appendChild( 189 - "This commit hasn't been fully parsed yet (or doesn't affect any ". 190 - "paths)."); 189 + pht("This commit hasn't been fully parsed yet (or doesn't affect any ". 190 + "paths).")); 191 191 $content[] = $no_changes; 192 192 } else if ($was_limited) { 193 193 $huge_commit = new AphrontErrorView(); ··· 210 210 'class' => 'button green', 211 211 'href' => '?show_all=true', 212 212 ), 213 - 'Show All Changes'); 213 + pht('Show All Changes')); 214 214 $warning_view = id(new AphrontErrorView()) 215 215 ->setSeverity(AphrontErrorView::SEVERITY_WARNING) 216 216 ->setTitle('Very Large Commit') 217 217 ->appendChild(phutil_tag( 218 218 'p', 219 219 array(), 220 - "This commit is very large. Load each file individually.")); 220 + pht("This commit is very large. Load each file individually."))); 221 221 222 222 $change_panel->appendChild($warning_view); 223 223 $change_panel->addButton($show_all_button); ··· 357 357 return $this->buildApplicationPage( 358 358 $content, 359 359 array( 360 - 'title' => $commit_id 360 + 'title' => $commit_id, 361 361 )); 362 362 } 363 363 ··· 463 463 array( 464 464 'id' => 'commit-branches', 465 465 ), 466 - 'Unknown'); 466 + pht('Unknown')); 467 467 $props['Tags'] = phutil_tag( 468 468 'span', 469 469 array( 470 470 'id' => 'commit-tags', 471 471 ), 472 - 'Unknown'); 472 + pht('Unknown')); 473 473 474 474 $callsign = $request->getRepository()->getCallsign(); 475 475 $root = '/diffusion/'.$callsign.'/commit/'.$commit->getCommitIdentifier(); ··· 525 525 $this->highlightedAudits = $view->getHighlightedAudits(); 526 526 527 527 $panel = new AphrontPanelView(); 528 - $panel->setHeader('Audits'); 529 - $panel->setCaption('Audits you are responsible for are highlighted.'); 528 + $panel->setHeader(pht('Audits')); 529 + $panel->setCaption(pht('Audits you are responsible for are highlighted.')); 530 530 $panel->appendChild($view); 531 531 $panel->setNoBackground(); 532 532 ··· 617 617 ->addHiddenInput('commit', $commit->getPHID()) 618 618 ->appendChild( 619 619 id(new AphrontFormSelectControl()) 620 - ->setLabel('Action') 620 + ->setLabel(pht('Action')) 621 621 ->setName('action') 622 622 ->setID('audit-action') 623 623 ->setOptions($actions)) 624 624 ->appendChild( 625 625 id(new AphrontFormTokenizerControl()) 626 - ->setLabel('Add Auditors') 626 + ->setLabel(pht('Add Auditors')) 627 627 ->setName('auditors') 628 628 ->setControlID('add-auditors') 629 629 ->setControlStyle('display: none') ··· 631 631 ->setDisableBehavior(true)) 632 632 ->appendChild( 633 633 id(new AphrontFormTokenizerControl()) 634 - ->setLabel('Add CCs') 634 + ->setLabel(pht('Add CCs')) 635 635 ->setName('ccs') 636 636 ->setControlID('add-ccs') 637 637 ->setControlStyle('display: none') ··· 639 639 ->setDisableBehavior(true)) 640 640 ->appendChild( 641 641 id(new PhabricatorRemarkupControl()) 642 - ->setLabel('Comments') 642 + ->setLabel(pht('Comments')) 643 643 ->setName('content') 644 644 ->setValue($draft) 645 645 ->setID('audit-content') 646 646 ->setUser($user)) 647 647 ->appendChild( 648 648 id(new AphrontFormSubmitControl()) 649 - ->setValue($is_serious ? 'Submit' : 'Cook the Books')); 649 + ->setValue($is_serious ? pht('Submit') : pht('Cook the Books'))); 650 650 651 651 $panel = new AphrontPanelView(); 652 - $panel->setHeader($is_serious ? 'Audit Commit' : 'Creative Accounting'); 652 + $panel->setHeader( 653 + $is_serious ? pht('Audit Commit') : pht('Creative Accounting')); 653 654 $panel->appendChild($form); 654 655 $panel->addClass('aphront-panel-accent'); 655 656 $panel->addClass('aphront-panel-flush'); ··· 665 666 'src' => '/typeahead/common/users/', 666 667 'row' => 'add-auditors', 667 668 'ondemand' => PhabricatorEnv::getEnvConfig('tokenizer.ondemand'), 668 - 'placeholder' => 'Type a user name...', 669 + 'placeholder' => pht('Type a user name...'), 669 670 ), 670 671 'add-ccs-tokenizer' => array( 671 672 'actions' => array('add_ccs' => 1), 672 673 'src' => '/typeahead/common/mailable/', 673 674 'row' => 'add-ccs', 674 675 'ondemand' => PhabricatorEnv::getEnvConfig('tokenizer.ondemand'), 675 - 'placeholder' => 'Type a user or mailing list...', 676 + 'placeholder' => pht('Type a user or mailing list...'), 676 677 ), 677 678 ), 678 679 'select' => 'audit-action', ··· 833 834 $history_table->setHandles($handles); 834 835 835 836 $panel = new AphrontPanelView(); 836 - $panel->setHeader('Merged Changes'); 837 + $panel->setHeader(pht('Merged Changes')); 837 838 $panel->setCaption($caption); 838 839 $panel->appendChild($history_table); 839 840 $panel->setNoBackground(); ··· 857 858 $commit->getCommitIdentifier().'/edit/'; 858 859 859 860 $action = id(new PhabricatorActionView()) 860 - ->setName('Edit Commit') 861 + ->setName(pht('Edit Commit')) 861 862 ->setHref($uri) 862 863 ->setIcon('edit'); 863 864 $actions->addAction($action); ··· 868 869 $maniphest = 'PhabricatorApplicationManiphest'; 869 870 if (PhabricatorApplication::isClassInstalled($maniphest)) { 870 871 $action = id(new PhabricatorActionView()) 871 - ->setName('Edit Maniphest Tasks') 872 + ->setName(pht('Edit Maniphest Tasks')) 872 873 ->setIcon('attach') 873 874 ->setHref('/search/attach/'.$commit->getPHID().'/TASK/edge/') 874 875 ->setWorkflow(true); ··· 877 878 878 879 if ($user->getIsAdmin()) { 879 880 $action = id(new PhabricatorActionView()) 880 - ->setName('MetaMTA Transcripts') 881 + ->setName(pht('MetaMTA Transcripts')) 881 882 ->setIcon('file') 882 883 ->setHref('/mail/?phid='.$commit->getPHID()); 883 884 $actions->addAction($action); 884 885 } 885 886 886 887 $action = id(new PhabricatorActionView()) 887 - ->setName('Herald Transcripts') 888 + ->setName(pht('Herald Transcripts')) 888 889 ->setIcon('file') 889 890 ->setHref('/herald/transcript/?phid='.$commit->getPHID()) 890 891 ->setWorkflow(true); 891 892 $actions->addAction($action); 892 893 893 894 $action = id(new PhabricatorActionView()) 894 - ->setName('Download Raw Diff') 895 + ->setName(pht('Download Raw Diff')) 895 896 ->setHref($request->getRequestURI()->alter('diff', true)) 896 897 ->setIcon('download'); 897 898 $actions->addAction($action);
+13 -9
src/applications/diffusion/controller/DiffusionCommitEditController.php
··· 14 14 $callsign = $drequest->getRepository()->getCallsign(); 15 15 $repository = $drequest->getRepository(); 16 16 $commit = $drequest->loadCommit(); 17 - $page_title = 'Edit Diffusion Commit'; 17 + $page_title = pht('Edit Diffusion Commit'); 18 18 19 19 if (!$commit) { 20 20 return new Aphront404Response(); ··· 54 54 $form = id(new AphrontFormView()) 55 55 ->setUser($user) 56 56 ->setAction($request->getRequestURI()->getPath()) 57 + ->setFlexible(true) 57 58 ->appendChild( 58 59 id(new AphrontFormTokenizerControl()) 59 - ->setLabel('Projects') 60 + ->setLabel(pht('Projects')) 60 61 ->setName('projects') 61 62 ->setValue($proj_t_values) 62 63 ->setID($tokenizer_id) ··· 76 77 )); 77 78 78 79 $submit = id(new AphrontFormSubmitControl()) 79 - ->setValue('Save') 80 + ->setValue(pht('Save')) 80 81 ->addCancelButton('/r'.$callsign.$commit->getCommitIdentifier()); 81 82 $form->appendChild($submit); 82 83 83 - $panel = id(new AphrontPanelView()) 84 - ->setHeader('Edit Diffusion Commit') 85 - ->appendChild($form) 86 - ->setWidth(AphrontPanelView::WIDTH_FORM); 84 + $header = new PhabricatorHeaderView(); 85 + $header->setHeader(pht('Edit Diffusion Commit')); 87 86 88 - return $this->buildStandardPageResponse( 89 - $panel, 87 + return $this->buildApplicationPage( 88 + array( 89 + $header, 90 + $form, 91 + ), 90 92 array( 91 93 'title' => $page_title, 94 + 'device' => true, 95 + 'dust' => true, 92 96 )); 93 97 } 94 98
+2 -2
src/applications/diffusion/controller/DiffusionCommitTagsController.php
··· 50 50 'action' => 'tags', 51 51 )), 52 52 ), 53 - "More tags\xE2\x80\xA6"); 53 + pht("More Tags\xE2\x80\xA6")); 54 54 } 55 55 56 56 return id(new AphrontAjaxResponse()) 57 - ->setContent($tag_links ? implode(', ', $tag_links) : 'None'); 57 + ->setContent($tag_links ? implode(', ', $tag_links) : pht('None')); 58 58 } 59 59 }
+14 -14
src/applications/diffusion/controller/DiffusionController.php
··· 29 29 30 30 $page = $this->buildStandardPageView(); 31 31 32 - $page->setApplicationName('Diffusion'); 32 + $page->setApplicationName(pht('Diffusion')); 33 33 $page->setBaseURI('/diffusion/'); 34 34 $page->setTitle(idx($data, 'title')); 35 35 $page->setGlyph("\xE2\x89\x88"); ··· 46 46 $nav->setBaseURI(new PhutilURI('')); 47 47 48 48 $navs = array( 49 - 'history' => 'History View', 50 - 'browse' => 'Browse View', 51 - 'change' => 'Change View', 49 + 'history' => pht('History View'), 50 + 'browse' => pht('Browse View'), 51 + 'change' => pht('Change View'), 52 52 ); 53 53 54 54 if (!$has_change_view) { ··· 59 59 $branch = $drequest->loadBranch(); 60 60 61 61 if ($branch && $branch->getLintCommit()) { 62 - $navs['lint'] = 'Lint View'; 62 + $navs['lint'] = pht('Lint View'); 63 63 } 64 64 65 65 $selected_href = null; ··· 80 80 81 81 $nav->addFilter( 82 82 '', 83 - "Search Owners \xE2\x86\x97", 83 + pht("Search Owners \xE2\x86\x97"), 84 84 '/owners/view/search/'. 85 85 '?repository='.phutil_escape_uri($drequest->getCallsign()). 86 86 '&path='.phutil_escape_uri('/'.$drequest->getPath())); ··· 190 190 $crumb = new PhabricatorCrumbView(); 191 191 if ($spec['commit']) { 192 192 $crumb->setName( 193 - "Tags for r{$callsign}{$raw_commit}"); 193 + pht("Tags for %s", 'r'.$callsign.$raw_commit)); 194 194 $crumb->setHref($drequest->generateURI( 195 195 array( 196 196 'action' => 'commit', 197 197 'commit' => $raw_commit, 198 198 ))); 199 199 } else { 200 - $crumb->setName('Tags'); 200 + $crumb->setName(pht('Tags')); 201 201 } 202 202 $crumb_list[] = $crumb; 203 203 return $crumb_list; ··· 205 205 206 206 if ($spec['branches']) { 207 207 $crumb = id(new PhabricatorCrumbView()) 208 - ->setName('Branches'); 208 + ->setName(pht('Branches')); 209 209 $crumb_list[] = $crumb; 210 210 return $crumb_list; 211 211 } ··· 236 236 237 237 switch ($view) { 238 238 case 'history': 239 - $view_name = 'History'; 239 + $view_name = pht('History'); 240 240 break; 241 241 case 'browse': 242 - $view_name = 'Browse'; 242 + $view_name = pht('Browse'); 243 243 break; 244 244 case 'lint': 245 - $view_name = 'Lint'; 245 + $view_name = pht('Lint'); 246 246 break; 247 247 case 'change': 248 - $view_name = 'Change'; 248 + $view_name = pht('Change'); 249 249 $crumb_list[] = $crumb->setName( 250 250 hsprintf('%s (%s)', $path, $commit_link)); 251 251 return $crumb_list; ··· 305 305 'commit' => '', 306 306 ) + $uri_params), 307 307 ), 308 - 'Jump to HEAD'); 308 + pht('Jump to HEAD')); 309 309 310 310 $name = $last_crumb->getName(); 311 311 $name = hsprintf('%s @ %s (%s)', $name, $commit_link, $jump_link);
+11 -9
src/applications/diffusion/controller/DiffusionExternalController.php
··· 65 65 $desc .= $id; 66 66 67 67 $content = id(new AphrontErrorView()) 68 - ->setTitle('Unknown External') 68 + ->setTitle(pht('Unknown External')) 69 69 ->setSeverity(AphrontErrorView::SEVERITY_WARNING) 70 70 ->appendChild(phutil_tag( 71 71 'p', 72 72 array(), 73 - "This external ({$desc}) does not appear in any tracked ". 73 + pht("This external (%s) does not appear in any tracked ". 74 74 "repository. It may exist in an untracked repository that ". 75 - "Diffusion does not know about.")); 75 + "Diffusion does not know about.", $desc))); 76 76 } else if (count($commits) == 1) { 77 77 $commit = head($commits); 78 78 $repo = $repositories[$commit->getRepositoryID()]; ··· 110 110 $table = new AphrontTableView($rows); 111 111 $table->setHeaders( 112 112 array( 113 - 'Commit', 114 - 'Description', 113 + pht('Commit'), 114 + pht('Description'), 115 115 )); 116 116 $table->setColumnClasses( 117 117 array( ··· 120 120 )); 121 121 122 122 $content = new AphrontPanelView(); 123 - $content->setHeader('Multiple Matching Commits'); 123 + $content->setHeader(pht('Multiple Matching Commits')); 124 124 $content->setCaption( 125 - 'This external reference matches multiple known commits.'); 125 + pht('This external reference matches multiple known commits.')); 126 126 $content->appendChild($table); 127 127 } 128 128 129 - return $this->buildStandardPageResponse( 129 + return $this->buildApplicationPage( 130 130 $content, 131 131 array( 132 - 'title' => 'Unresolvable External', 132 + 'title' => pht('Unresolvable External'), 133 + 'device' => true, 134 + 'dust' => true, 133 135 )); 134 136 } 135 137
+5 -3
src/applications/diffusion/controller/DiffusionHistoryController.php
··· 40 40 $content = array(); 41 41 42 42 if ($request->getBool('copies')) { 43 - $button_title = 'Hide Copies/Branches'; 43 + $button_title = pht('Hide Copies/Branches'); 44 44 $copies_new = null; 45 45 } else { 46 - $button_title = 'Show Copies/Branches'; 46 + $button_title = pht('Show Copies/Branches'); 47 47 $copies_new = true; 48 48 } 49 49 ··· 71 71 } 72 72 73 73 $history_panel = new AphrontPanelView(); 74 - $history_panel->setHeader('History'); 74 + $history_panel->setHeader(pht('History')); 75 75 $history_panel->addButton($button); 76 76 $history_panel->appendChild($history_table); 77 77 $history_panel->appendChild($pager); ··· 95 95 return $this->buildApplicationPage( 96 96 $nav, 97 97 array( 98 + 'device' => true, 99 + 'dust' => true, 98 100 'title' => array( 99 101 pht('History'), 100 102 pht('%s Repository', $drequest->getRepository()->getCallsign()),
+51 -72
src/applications/diffusion/controller/DiffusionHomeController.php
··· 13 13 $rows = array(); 14 14 foreach ($shortcuts as $shortcut) { 15 15 $rows[] = array( 16 - phutil_tag( 17 - 'a', 18 - array( 19 - 'href' => $shortcut->getHref(), 20 - ), 21 - $shortcut->getName()), 16 + $shortcut->getName(), 17 + $shortcut->getHref(), 22 18 $shortcut->getDescription(), 23 19 ); 24 20 } 25 21 26 - $shortcut_table = new AphrontTableView($rows); 27 - $shortcut_table->setHeaders( 28 - array( 29 - 'Link', 30 - '', 31 - )); 32 - $shortcut_table->setColumnClasses( 33 - array( 34 - 'pri', 35 - 'wide', 36 - )); 22 + $list = new PhabricatorObjectItemListView(); 23 + $list->setCards(true); 24 + $list->setFlush(true); 25 + foreach ($rows as $row) { 26 + $item = id(new PhabricatorObjectItemView()) 27 + ->setHeader($row[0]) 28 + ->setHref($row[1]) 29 + ->setSubhead(($row[2] ? $row[2] : pht('No Description'))); 30 + $list->addItem($item); 31 + } 37 32 38 - $shortcut_panel = new AphrontPanelView(); 39 - $shortcut_panel->setHeader('Shortcuts'); 40 - $shortcut_panel->appendChild($shortcut_table); 33 + $shortcut_panel = id(new AphrontPanelView()) 34 + ->setNoBackground(true) 35 + ->setHeader(pht('Shortcuts')) 36 + ->appendChild($list); 37 + 41 38 } else { 42 39 $shortcut_panel = null; 43 40 } ··· 97 94 'callsign' => $repository->getCallsign(), 98 95 'action' => 'history', 99 96 )), 100 - number_format($size)); 97 + pht('%d Commits', number_format($size))); 101 98 } 102 99 103 100 $lint_count = ''; ··· 113 110 'action' => 'lint', 114 111 )), 115 112 ), 116 - number_format($lint_branches[$branch])); 113 + pht('%d Lint Messages', number_format($lint_branches[$branch]))); 117 114 } 118 115 119 - $date = '-'; 120 - $time = '-'; 116 + $datetime = ''; 121 117 if ($commit) { 122 118 $date = phabricator_date($commit->getEpoch(), $user); 123 119 $time = phabricator_time($commit->getEpoch(), $user); 120 + $datetime = $date.' '.$time; 124 121 } 125 122 126 123 $rows[] = array( 127 - phutil_tag( 128 - 'a', 129 - array( 130 - 'href' => '/diffusion/'.$repository->getCallsign().'/', 131 - ), 132 - $repository->getName()), 124 + $repository->getName(), 125 + ('/diffusion/'.$repository->getCallsign().'/'), 133 126 PhabricatorRepositoryType::getNameForRepositoryType( 134 127 $repository->getVersionControlSystem()), 135 128 $size, ··· 139 132 $repository, 140 133 $commit->getCommitIdentifier(), 141 134 $commit->getSummary()) 142 - : '-', 143 - $date, 144 - $time, 135 + : pht('No Commits'), 136 + $datetime 145 137 ); 146 138 } 147 139 ··· 170 162 $repository_tool)); 171 163 } 172 164 173 - $table = new AphrontTableView($rows); 174 - $table->setNoDataString($no_repositories_txt); 175 - $table->setHeaders( 176 - array( 177 - 'Repository', 178 - 'VCS', 179 - 'Commits', 180 - 'Lint', 181 - 'Last', 182 - 'Date', 183 - 'Time', 184 - )); 185 - $table->setColumnClasses( 186 - array( 187 - 'pri', 188 - '', 189 - 'n', 190 - 'n', 191 - 'wide', 192 - '', 193 - 'right', 194 - )); 195 - $table->setColumnVisibility( 196 - array( 197 - true, 198 - true, 199 - true, 200 - $show_lint, 201 - true, 202 - true, 203 - true, 204 - )); 165 + $list = new PhabricatorObjectItemListView(); 166 + $list->setCards(true); 167 + $list->setFlush(true); 168 + foreach ($rows as $row) { 169 + $item = id(new PhabricatorObjectItemView()) 170 + ->setHeader($row[0]) 171 + ->setSubHead($row[5]) 172 + ->setHref($row[1]) 173 + ->addAttribute(($row[2] ? $row[2] : pht('No Information'))) 174 + ->addAttribute(($row[3] ? $row[3] : pht('0 Commits'))) 175 + ->addIcon('none', $row[6]); 176 + if ($show_lint) { 177 + $item->addAttribute($row[4]); 178 + } 179 + $list->addItem($item); 180 + } 181 + 182 + $list = id(new AphrontPanelView()) 183 + ->setNoBackground(true) 184 + ->setHeader(pht('Repositories')) 185 + ->appendChild($list); 205 186 206 - $panel = new AphrontPanelView(); 207 - $panel->setHeader('Browse Repositories'); 208 - $panel->appendChild($table); 209 - $panel->setNoBackground(); 210 187 211 188 $crumbs = $this->buildCrumbs(); 212 189 $crumbs->addCrumb( ··· 214 191 ->setName(pht('All Repositories')) 215 192 ->setHref($this->getApplicationURI())); 216 193 217 - return $this->buildStandardPageResponse( 194 + return $this->buildApplicationPage( 218 195 array( 219 196 $crumbs, 220 197 $shortcut_panel, 221 - $panel, 198 + $list, 222 199 ), 223 200 array( 224 - 'title' => 'Diffusion', 201 + 'title' => pht('Diffusion'), 202 + 'device' => true, 203 + 'dust' => true, 225 204 )); 226 205 } 227 206
+13 -9
src/applications/diffusion/controller/DiffusionLintController.php
··· 80 80 81 81 $table = id(new AphrontTableView($rows)) 82 82 ->setHeaders(array( 83 - 'Problems', 84 - 'Files', 85 - 'Repository', 86 - 'Severity', 87 - 'Code', 88 - 'Name', 89 - 'Example', 83 + pht('Problems'), 84 + pht('Files'), 85 + pht('Repository'), 86 + pht('Severity'), 87 + pht('Code'), 88 + pht('Name'), 89 + pht('Example'), 90 90 )) 91 91 ->setColumnVisibility(array(true, true, !$this->diffusionRequest)) 92 92 ->setColumnClasses(array('n', 'n', '', '', 'pri', '', '')); ··· 112 112 ->setDatasource('/typeahead/common/users/') 113 113 ->setLimit(1) 114 114 ->setName('owner') 115 - ->setLabel('Owner') 115 + ->setLabel(pht('Owner')) 116 116 ->setValue($owners)) 117 117 ->appendChild( 118 118 id(new AphrontFormSubmitControl()) ··· 143 143 144 144 return $this->buildApplicationPage( 145 145 $content, 146 - array('title' => $title)); 146 + array( 147 + 'title' => $title, 148 + 'device' => true, 149 + 'dust' => true, 150 + )); 147 151 } 148 152 149 153 private function loadLintCodes(array $owner_phids) {
+13 -9
src/applications/diffusion/controller/DiffusionLintDetailsController.php
··· 50 50 51 51 $table = id(new AphrontTableView($rows)) 52 52 ->setHeaders(array( 53 - 'Path', 54 - 'Line', 55 - 'Author', 56 - 'Severity', 57 - 'Name', 58 - 'Description', 53 + pht('Path'), 54 + pht('Line'), 55 + pht('Author'), 56 + pht('Severity'), 57 + pht('Name'), 58 + pht('Description'), 59 59 )) 60 60 ->setColumnClasses(array('', 'n')) 61 61 ->setColumnVisibility(array($is_dir)); ··· 97 97 98 98 return $this->buildApplicationPage( 99 99 $nav, 100 - array('title' => array( 101 - 'Lint', 102 - $drequest->getRepository()->getCallsign(), 100 + array( 101 + 'device' => true, 102 + 'dust' => true, 103 + 'title' => 104 + array( 105 + pht('Lint'), 106 + $drequest->getRepository()->getCallsign(), 103 107 ))); 104 108 } 105 109
+3 -3
src/applications/diffusion/controller/DiffusionPathValidateController.php
··· 55 55 if (!$valid) { 56 56 $branch = $drequest->getBranch(); 57 57 if ($branch) { 58 - $message = 'Not found in '.$branch; 58 + $message = pht('Not found in %s', $branch); 59 59 } else { 60 - $message = 'Not found at HEAD'; 60 + $message = pht('Not found at HEAD'); 61 61 } 62 62 } else { 63 - $message = 'OK'; 63 + $message = pht('OK'); 64 64 } 65 65 66 66 $output['message'] = $message;
+21 -13
src/applications/diffusion/controller/DiffusionRepositoryController.php
··· 75 75 'action' => 'history', 76 76 )), 77 77 ), 78 - 'View Full Commit History'); 78 + pht('View Full Commit History')); 79 79 80 80 $panel = new AphrontPanelView(); 81 - $panel->setHeader(hsprintf("Recent Commits · %s", $all)); 81 + $panel->setHeader(pht("Recent Commits · %s", $all)); 82 82 $panel->appendChild($history_table); 83 83 $panel->setNoBackground(); 84 84 ··· 95 95 $browse_panel->setHeader(phutil_tag( 96 96 'a', 97 97 array('href' => $drequest->generateURI(array('action' => 'browse'))), 98 - 'Browse Repository')); 98 + pht('Browse Repository'))); 99 99 $browse_panel->appendChild($browse_table); 100 100 $browse_panel->setNoBackground(); 101 101 ··· 107 107 108 108 $readme = $browse_results->getReadmeContent(); 109 109 if ($readme) { 110 + $box = new PHUIBoxView(); 111 + $box->setShadow(true); 112 + $box->appendChild($readme); 113 + $box->addPadding(PHUI::PADDING_LARGE); 114 + 110 115 $panel = new AphrontPanelView(); 111 - $panel->setHeader('README'); 112 - $panel->appendChild($readme); 116 + $panel->setHeader(pht('README')); 117 + $panel->setNoBackground(); 118 + $panel->appendChild($box); 113 119 $content[] = $panel; 114 120 } 115 121 116 - return $this->buildStandardPageResponse( 122 + return $this->buildApplicationPage( 117 123 $content, 118 124 array( 119 125 'title' => $drequest->getRepository()->getName(), 126 + 'dust' => true, 127 + 'device' => true, 120 128 )); 121 129 } 122 130 ··· 149 157 )); 150 158 151 159 $panel = new AphrontPanelView(); 152 - $panel->setHeader('Repository Properties'); 160 + $panel->setHeader(pht('Repository Properties')); 153 161 $panel->appendChild($table); 154 162 $panel->setNoBackground(); 155 163 ··· 187 195 $table->setUser($this->getRequest()->getUser()); 188 196 189 197 $panel = new AphrontPanelView(); 190 - $panel->setHeader('Branches'); 198 + $panel->setHeader(pht('Branches')); 191 199 $panel->setNoBackground(); 192 200 193 201 if ($more_branches) { 194 - $panel->setCaption('Showing ' . $limit . ' branches.'); 202 + $panel->setCaption(pht('Showing %d branches.', $limit)); 195 203 } 196 204 197 205 $panel->addButton( ··· 204 212 )), 205 213 'class' => 'grey button', 206 214 ), 207 - "Show All Branches \xC2\xBB")); 215 + pht("Show All Branches \xC2\xBB"))); 208 216 209 217 $panel->appendChild($table); 210 218 ··· 253 261 $view->setHandles($handles); 254 262 255 263 $panel = new AphrontPanelView(); 256 - $panel->setHeader('Tags'); 264 + $panel->setHeader(pht('Tags')); 257 265 258 266 if ($more_tags) { 259 - $panel->setCaption('Showing the '.$tag_limit.' most recent tags.'); 267 + $panel->setCaption(pht('Showing the %d most recent tags.', $tag_limit)); 260 268 } 261 269 262 270 $panel->addButton( ··· 269 277 )), 270 278 'class' => 'grey button', 271 279 ), 272 - "Show All Tags \xC2\xBB")); 280 + pht("Show All Tags \xC2\xBB"))); 273 281 $panel->appendChild($view); 274 282 275 283 return $panel;
+12 -10
src/applications/diffusion/controller/DiffusionSymbolController.php
··· 119 119 $table = new AphrontTableView($rows); 120 120 $table->setHeaders( 121 121 array( 122 - 'Type', 123 - 'Context', 124 - 'Name', 125 - 'Language', 126 - 'Project', 127 - 'File', 122 + pht('Type'), 123 + pht('Context'), 124 + pht('Name'), 125 + pht('Language'), 126 + pht('Project'), 127 + pht('File'), 128 128 )); 129 129 $table->setColumnClasses( 130 130 array( ··· 136 136 '', 137 137 )); 138 138 $table->setNoDataString( 139 - "No matching symbol could be found in any indexed project."); 139 + pht("No matching symbol could be found in any indexed project.")); 140 140 141 141 $panel = new AphrontPanelView(); 142 - $panel->setHeader('Similar Symbols'); 142 + $panel->setHeader(pht('Similar Symbols')); 143 143 $panel->appendChild($table); 144 144 145 - return $this->buildStandardPageResponse( 145 + return $this->buildApplicationPage( 146 146 array( 147 147 $panel, 148 148 ), 149 149 array( 150 - 'title' => 'Find Symbol', 150 + 'title' => pht('Find Symbol'), 151 + 'device' => true, 152 + 'dust' => true, 151 153 )); 152 154 } 153 155
+4 -4
src/applications/diffusion/controller/DiffusionTagListController.php
··· 39 39 $content = null; 40 40 if (!$tags) { 41 41 $content = new AphrontErrorView(); 42 - $content->setTitle('No Tags'); 42 + $content->setTitle(pht('No Tags')); 43 43 if ($is_commit) { 44 - $content->appendChild('This commit has no tags.'); 44 + $content->appendChild(pht('This commit has no tags.')); 45 45 } else { 46 - $content->appendChild('This repository has no tags.'); 46 + $content->appendChild(pht('This repository has no tags.')); 47 47 } 48 48 $content->setSeverity(AphrontErrorView::SEVERITY_NODATA); 49 49 } else { ··· 65 65 $view->setHandles($handles); 66 66 67 67 $panel = id(new AphrontPanelView()) 68 - ->setHeader('Tags') 68 + ->setHeader(pht('Tags')) 69 69 ->appendChild($view) 70 70 ->appendChild($pager); 71 71
+6 -6
src/applications/diffusion/view/DiffusionBranchTableView.php
··· 45 45 'branch' => $branch->getName(), 46 46 )) 47 47 ), 48 - 'History'), 48 + pht('History')), 49 49 phutil_tag( 50 50 'a', 51 51 array( ··· 73 73 $view = new AphrontTableView($rows); 74 74 $view->setHeaders( 75 75 array( 76 - 'History', 77 - 'Branch', 78 - 'Head', 79 - 'Modified', 80 - 'Details', 76 + pht('History'), 77 + pht('Branch'), 78 + pht('Head'), 79 + pht('Modified'), 80 + pht('Details'), 81 81 )); 82 82 $view->setColumnClasses( 83 83 array(
+10 -10
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 200 200 array( 201 201 'href' => $editor_link, 202 202 ), 203 - 'Edit'); 203 + pht('Edit')); 204 204 } 205 205 } 206 206 ··· 228 228 $view = new AphrontTableView($rows); 229 229 $view->setHeaders( 230 230 array( 231 - 'History', 232 - 'Edit', 233 - 'Path', 234 - ($lint ? $lint : 'Lint'), 235 - 'Modified', 236 - 'Date', 237 - 'Time', 238 - 'Author/Committer', 239 - 'Details', 231 + pht('History'), 232 + pht('Edit'), 233 + pht('Path'), 234 + ($lint ? $lint : pht('Lint')), 235 + pht('Modified'), 236 + pht('Date'), 237 + pht('Time'), 238 + pht('Author/Committer'), 239 + pht('Details'), 240 240 )); 241 241 $view->setColumnClasses( 242 242 array(
+2 -2
src/applications/diffusion/view/DiffusionCommentView.php
··· 114 114 $actions = array(); 115 115 if ($action == PhabricatorAuditActionConstants::ADD_CCS) { 116 116 $rendered_ccs = $this->renderHandleList($added_ccs); 117 - $actions[] = hsprintf("%s added CCs: %s.", $author_link, $rendered_ccs); 117 + $actions[] = pht("%s added CCs: %s.", $author_link, $rendered_ccs); 118 118 } else if ($action == PhabricatorAuditActionConstants::ADD_AUDITORS) { 119 119 $rendered_auditors = $this->renderHandleList($added_auditors); 120 - $actions[] = hsprintf( 120 + $actions[] = pht( 121 121 "%s added auditors: %s.", 122 122 $author_link, 123 123 $rendered_auditors);
+5 -5
src/applications/diffusion/view/DiffusionCommitChangeTableView.php
··· 82 82 $view = new AphrontTableView($rows); 83 83 $view->setHeaders( 84 84 array( 85 - 'History', 86 - 'Browse', 87 - 'Change', 88 - 'Path', 85 + pht('History'), 86 + pht('Browse'), 87 + pht('Change'), 88 + pht('Path'), 89 89 )); 90 90 $view->setColumnClasses( 91 91 array( ··· 95 95 'wide', 96 96 )); 97 97 $view->setRowClasses($rowc); 98 - $view->setNoDataString('This change has not been fully parsed yet.'); 98 + $view->setNoDataString(pht('This change has not been fully parsed yet.')); 99 99 100 100 return $view->render(); 101 101 }
+10 -10
src/applications/diffusion/view/DiffusionEmptyResultView.php
··· 29 29 $reason = $this->browseResultSet->getReasonForEmptyResultSet(); 30 30 switch ($reason) { 31 31 case DiffusionBrowseResultSet::REASON_IS_NONEXISTENT: 32 - $title = 'Path Does Not Exist'; 32 + $title = pht('Path Does Not Exist'); 33 33 // TODO: Under git, this error message should be more specific. It 34 34 // may exist on some other branch. 35 - $body = "This path does not exist anywhere."; 35 + $body = pht("This path does not exist anywhere."); 36 36 $severity = AphrontErrorView::SEVERITY_ERROR; 37 37 break; 38 38 case DiffusionBrowseResultSet::REASON_IS_EMPTY: 39 - $title = 'Empty Directory'; 40 - $body = "This path was an empty directory at {$commit}.\n"; 39 + $title = pht('Empty Directory'); 40 + $body = pht("This path was an empty directory at %s.\n", $commit); 41 41 $severity = AphrontErrorView::SEVERITY_NOTICE; 42 42 break; 43 43 case DiffusionBrowseResultSet::REASON_IS_DELETED: ··· 52 52 'params' => array('view' => $this->view), 53 53 )); 54 54 55 - $title = 'Path Was Deleted'; 56 - $body = hsprintf( 55 + $title = pht('Path Was Deleted'); 56 + $body = pht( 57 57 "This path does not exist at %s. It was deleted in %s and last %s ". 58 58 "at %s.", 59 59 $commit, ··· 64 64 break; 65 65 case DiffusionBrowseResultSet::REASON_IS_UNTRACKED_PARENT: 66 66 $subdir = $drequest->getRepository()->getDetail('svn-subpath'); 67 - $title = 'Directory Not Tracked'; 67 + $title = pht('Directory Not Tracked'); 68 68 $body = 69 - "This repository is configured to track only one subdirectory ". 70 - "of the entire repository ('{$subdir}'), ". 69 + pht("This repository is configured to track only one subdirectory ". 70 + "of the entire repository ('%s'), ". 71 71 "but you aren't looking at something in that subdirectory, so no ". 72 - "information is available."; 72 + "information is available.", $subdir); 73 73 $severity = AphrontErrorView::SEVERITY_WARNING; 74 74 break; 75 75 default:
+8 -8
src/applications/diffusion/view/DiffusionHistoryTableView.php
··· 146 146 $view = new AphrontTableView($rows); 147 147 $view->setHeaders( 148 148 array( 149 - 'Browse', 149 + pht('Browse'), 150 150 '', 151 - 'Commit', 152 - 'Revision', 153 - 'Change', 154 - 'Date', 155 - 'Time', 156 - 'Author/Committer', 157 - 'Details', 151 + pht('Commit'), 152 + pht('Revision'), 153 + pht('Change'), 154 + pht('Date'), 155 + pht('Time'), 156 + pht('Author/Committer'), 157 + pht('Details'), 158 158 )); 159 159 $view->setColumnClasses( 160 160 array(
+5 -5
src/applications/diffusion/view/DiffusionTagListView.php
··· 92 92 $table = new AphrontTableView($rows); 93 93 $table->setHeaders( 94 94 array( 95 - 'Tag', 96 - 'Commit', 97 - 'Description', 98 - 'Author', 99 - 'Created', 95 + pht('Tag'), 96 + pht('Commit'), 97 + pht('Description'), 98 + pht('Author'), 99 + pht('Created'), 100 100 )); 101 101 $table->setColumnClasses( 102 102 array(
+2 -2
src/applications/diffusion/view/DiffusionView.php
··· 52 52 array( 53 53 'href' => $href, 54 54 ), 55 - 'History'); 55 + pht('History')); 56 56 } 57 57 58 58 final public function linkBrowse($path, array $details = array()) { ··· 66 66 if (isset($details['text'])) { 67 67 $text = $details['text']; 68 68 } else { 69 - $text = 'Browse'; 69 + $text = pht('Browse'); 70 70 } 71 71 72 72 return phutil_tag(
+2 -1
webroot/rsrc/css/aphront/panel-view.css
··· 26 26 } 27 27 28 28 .aphront-panel-view .aphront-panel-header { 29 - margin: 0 0 1em 0; 29 + margin: 0 0 8px 0; 30 30 } 31 31 32 32 .aphront-panel-view h1 { 33 33 font-size: 16px; 34 34 font-weight: bold; 35 35 color: #555; 36 + text-shadow: 0 1px 1px #fff; 36 37 padding: 4px 0 0 0; 37 38 } 38 39