@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.

Merge branch 'master' of git://github.com/facebook/phabricator

+420 -246
+49 -42
src/__celerity_resource_map__.php
··· 539 539 'disk' => '/rsrc/image/texture/table_header_hover.png', 540 540 'type' => 'png', 541 541 ), 542 + '/rsrc/image/texture/table_header_tall.png' => 543 + array( 544 + 'hash' => 'b05525601f78d759f1c5e47fd9c1a8aa', 545 + 'uri' => '/res/b0552560/rsrc/image/texture/table_header_tall.png', 546 + 'disk' => '/rsrc/image/texture/table_header_tall.png', 547 + 'type' => 'png', 548 + ), 542 549 '/rsrc/swf/aphlict.swf' => 543 550 array( 544 551 'hash' => '4b9a9d83bebaf254f3790e87b45c1f92', ··· 593 600 ), 594 601 'aphront-dialog-view-css' => 595 602 array( 596 - 'uri' => '/res/0ec64c77/rsrc/css/aphront/dialog-view.css', 603 + 'uri' => '/res/215b3ab1/rsrc/css/aphront/dialog-view.css', 597 604 'type' => 'css', 598 605 'requires' => 599 606 array( ··· 602 609 ), 603 610 'aphront-error-view-css' => 604 611 array( 605 - 'uri' => '/res/410dbe72/rsrc/css/aphront/error-view.css', 612 + 'uri' => '/res/048ed376/rsrc/css/aphront/error-view.css', 606 613 'type' => 'css', 607 614 'requires' => 608 615 array( ··· 3247 3254 ), array( 3248 3255 'packages' => 3249 3256 array( 3250 - '2b575971' => 3257 + '4dff6da8' => 3251 3258 array( 3252 3259 'name' => 'core.pkg.css', 3253 3260 'symbols' => ··· 3291 3298 36 => 'phabricator-object-item-list-view-css', 3292 3299 37 => 'global-drag-and-drop-css', 3293 3300 ), 3294 - 'uri' => '/res/pkg/2b575971/core.pkg.css', 3301 + 'uri' => '/res/pkg/4dff6da8/core.pkg.css', 3295 3302 'type' => 'css', 3296 3303 ), 3297 3304 'c90b892e' => ··· 3481 3488 'reverse' => 3482 3489 array( 3483 3490 'aphront-attached-file-view-css' => '83f07678', 3484 - 'aphront-crumbs-view-css' => '2b575971', 3485 - 'aphront-dialog-view-css' => '2b575971', 3486 - 'aphront-error-view-css' => '2b575971', 3487 - 'aphront-form-view-css' => '2b575971', 3491 + 'aphront-crumbs-view-css' => '4dff6da8', 3492 + 'aphront-dialog-view-css' => '4dff6da8', 3493 + 'aphront-error-view-css' => '4dff6da8', 3494 + 'aphront-form-view-css' => '4dff6da8', 3488 3495 'aphront-headsup-action-list-view-css' => 'ec01d039', 3489 - 'aphront-headsup-view-css' => '2b575971', 3490 - 'aphront-list-filter-view-css' => '2b575971', 3491 - 'aphront-pager-view-css' => '2b575971', 3492 - 'aphront-panel-view-css' => '2b575971', 3493 - 'aphront-table-view-css' => '2b575971', 3494 - 'aphront-tokenizer-control-css' => '2b575971', 3495 - 'aphront-tooltip-css' => '2b575971', 3496 - 'aphront-typeahead-control-css' => '2b575971', 3496 + 'aphront-headsup-view-css' => '4dff6da8', 3497 + 'aphront-list-filter-view-css' => '4dff6da8', 3498 + 'aphront-pager-view-css' => '4dff6da8', 3499 + 'aphront-panel-view-css' => '4dff6da8', 3500 + 'aphront-table-view-css' => '4dff6da8', 3501 + 'aphront-tokenizer-control-css' => '4dff6da8', 3502 + 'aphront-tooltip-css' => '4dff6da8', 3503 + 'aphront-typeahead-control-css' => '4dff6da8', 3497 3504 'differential-changeset-view-css' => 'ec01d039', 3498 3505 'differential-core-view-css' => 'ec01d039', 3499 3506 'differential-inline-comment-editor' => 'ac53d36a', ··· 3507 3514 'differential-table-of-contents-css' => 'ec01d039', 3508 3515 'diffusion-commit-view-css' => 'c8ce2d88', 3509 3516 'diffusion-icons-css' => 'c8ce2d88', 3510 - 'global-drag-and-drop-css' => '2b575971', 3517 + 'global-drag-and-drop-css' => '4dff6da8', 3511 3518 'inline-comment-summary-css' => 'ec01d039', 3512 3519 'javelin-aphlict' => 'c90b892e', 3513 3520 'javelin-behavior' => 'fbeded59', ··· 3577 3584 'javelin-util' => 'fbeded59', 3578 3585 'javelin-vector' => 'fbeded59', 3579 3586 'javelin-workflow' => 'fbeded59', 3580 - 'lightbox-attachment-css' => '2b575971', 3587 + 'lightbox-attachment-css' => '4dff6da8', 3581 3588 'maniphest-task-summary-css' => '83f07678', 3582 3589 'maniphest-transaction-detail-css' => '83f07678', 3583 3590 'phabricator-busy' => 'c90b892e', 3584 3591 'phabricator-content-source-view-css' => 'ec01d039', 3585 - 'phabricator-core-buttons-css' => '2b575971', 3586 - 'phabricator-core-css' => '2b575971', 3587 - 'phabricator-crumbs-view-css' => '2b575971', 3588 - 'phabricator-directory-css' => '2b575971', 3592 + 'phabricator-core-buttons-css' => '4dff6da8', 3593 + 'phabricator-core-css' => '4dff6da8', 3594 + 'phabricator-crumbs-view-css' => '4dff6da8', 3595 + 'phabricator-directory-css' => '4dff6da8', 3589 3596 'phabricator-drag-and-drop-file-upload' => 'ac53d36a', 3590 3597 'phabricator-dropdown-menu' => 'c90b892e', 3591 3598 'phabricator-file-upload' => 'c90b892e', 3592 - 'phabricator-filetree-view-css' => '2b575971', 3593 - 'phabricator-flag-css' => '2b575971', 3594 - 'phabricator-form-view-css' => '2b575971', 3595 - 'phabricator-header-view-css' => '2b575971', 3596 - 'phabricator-jump-nav' => '2b575971', 3599 + 'phabricator-filetree-view-css' => '4dff6da8', 3600 + 'phabricator-flag-css' => '4dff6da8', 3601 + 'phabricator-form-view-css' => '4dff6da8', 3602 + 'phabricator-header-view-css' => '4dff6da8', 3603 + 'phabricator-jump-nav' => '4dff6da8', 3597 3604 'phabricator-keyboard-shortcut' => 'c90b892e', 3598 3605 'phabricator-keyboard-shortcut-manager' => 'c90b892e', 3599 - 'phabricator-main-menu-view' => '2b575971', 3606 + 'phabricator-main-menu-view' => '4dff6da8', 3600 3607 'phabricator-menu-item' => 'c90b892e', 3601 - 'phabricator-nav-view-css' => '2b575971', 3608 + 'phabricator-nav-view-css' => '4dff6da8', 3602 3609 'phabricator-notification' => 'c90b892e', 3603 - 'phabricator-notification-css' => '2b575971', 3604 - 'phabricator-notification-menu-css' => '2b575971', 3605 - 'phabricator-object-item-list-view-css' => '2b575971', 3610 + 'phabricator-notification-css' => '4dff6da8', 3611 + 'phabricator-notification-menu-css' => '4dff6da8', 3612 + 'phabricator-object-item-list-view-css' => '4dff6da8', 3606 3613 'phabricator-object-selector-css' => 'ec01d039', 3607 3614 'phabricator-paste-file-upload' => 'c90b892e', 3608 3615 'phabricator-prefab' => 'c90b892e', 3609 3616 'phabricator-project-tag-css' => '83f07678', 3610 - 'phabricator-remarkup-css' => '2b575971', 3617 + 'phabricator-remarkup-css' => '4dff6da8', 3611 3618 'phabricator-shaped-request' => 'ac53d36a', 3612 - 'phabricator-side-menu-view-css' => '2b575971', 3613 - 'phabricator-standard-page-view' => '2b575971', 3619 + 'phabricator-side-menu-view-css' => '4dff6da8', 3620 + 'phabricator-standard-page-view' => '4dff6da8', 3614 3621 'phabricator-textareautils' => 'c90b892e', 3615 3622 'phabricator-tooltip' => 'c90b892e', 3616 - 'phabricator-transaction-view-css' => '2b575971', 3617 - 'phabricator-zindex-css' => '2b575971', 3618 - 'sprite-apps-large-css' => '2b575971', 3619 - 'sprite-gradient-css' => '2b575971', 3620 - 'sprite-icon-css' => '2b575971', 3621 - 'sprite-menu-css' => '2b575971', 3622 - 'syntax-highlighting-css' => '2b575971', 3623 + 'phabricator-transaction-view-css' => '4dff6da8', 3624 + 'phabricator-zindex-css' => '4dff6da8', 3625 + 'sprite-apps-large-css' => '4dff6da8', 3626 + 'sprite-gradient-css' => '4dff6da8', 3627 + 'sprite-icon-css' => '4dff6da8', 3628 + 'sprite-menu-css' => '4dff6da8', 3629 + 'syntax-highlighting-css' => '4dff6da8', 3623 3630 ), 3624 3631 ));
+4
src/__phutil_library_map__.php
··· 603 603 'PhabricatorApplicationConfigOptions' => 'applications/config/option/PhabricatorApplicationConfigOptions.php', 604 604 'PhabricatorApplicationCountdown' => 'applications/countdown/application/PhabricatorApplicationCountdown.php', 605 605 'PhabricatorApplicationDaemons' => 'applications/daemon/application/PhabricatorApplicationDaemons.php', 606 + 'PhabricatorApplicationDetailViewController' => 'applications/meta/controller/PhabricatorApplicationDetailViewController.php', 606 607 'PhabricatorApplicationDifferential' => 'applications/differential/application/PhabricatorApplicationDifferential.php', 607 608 'PhabricatorApplicationDiffusion' => 'applications/diffusion/application/PhabricatorApplicationDiffusion.php', 608 609 'PhabricatorApplicationDiviner' => 'applications/diviner/application/PhabricatorApplicationDiviner.php', ··· 1122 1123 'PhabricatorRemarkupRuleImageMacro' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleImageMacro.php', 1123 1124 'PhabricatorRemarkupRuleManiphest' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleManiphest.php', 1124 1125 'PhabricatorRemarkupRuleManiphestHandle' => 'infrastructure/markup/rule/handle/PhabricatorRemarkupRuleManiphestHandle.php', 1126 + 'PhabricatorRemarkupRuleMeme' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleMeme.php', 1125 1127 'PhabricatorRemarkupRuleMention' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleMention.php', 1126 1128 'PhabricatorRemarkupRuleObjectHandle' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleObjectHandle.php', 1127 1129 'PhabricatorRemarkupRuleObjectName' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleObjectName.php', ··· 1996 1998 'PhabricatorApplicationConfigOptions' => 'Phobject', 1997 1999 'PhabricatorApplicationCountdown' => 'PhabricatorApplication', 1998 2000 'PhabricatorApplicationDaemons' => 'PhabricatorApplication', 2001 + 'PhabricatorApplicationDetailViewController' => 'PhabricatorApplicationsController', 1999 2002 'PhabricatorApplicationDifferential' => 'PhabricatorApplication', 2000 2003 'PhabricatorApplicationDiffusion' => 'PhabricatorApplication', 2001 2004 'PhabricatorApplicationDiviner' => 'PhabricatorApplication', ··· 2499 2502 'PhabricatorRemarkupRuleImageMacro' => 'PhutilRemarkupRule', 2500 2503 'PhabricatorRemarkupRuleManiphest' => 'PhabricatorRemarkupRuleObjectName', 2501 2504 'PhabricatorRemarkupRuleManiphestHandle' => 'PhabricatorRemarkupRuleObjectHandle', 2505 + 'PhabricatorRemarkupRuleMeme' => 'PhutilRemarkupRule', 2502 2506 'PhabricatorRemarkupRuleMention' => 'PhutilRemarkupRule', 2503 2507 'PhabricatorRemarkupRuleObjectHandle' => 'PhutilRemarkupRule', 2504 2508 'PhabricatorRemarkupRuleObjectName' => 'PhutilRemarkupRule',
+1 -1
src/applications/audit/application/PhabricatorApplicationAudit.php
··· 3 3 final class PhabricatorApplicationAudit extends PhabricatorApplication { 4 4 5 5 public function getShortDescription() { 6 - return 'Audit Code'; 6 + return pht('Audit Code'); 7 7 } 8 8 9 9 public function getBaseURI() {
+1 -1
src/applications/audit/controller/PhabricatorAuditController.php
··· 6 6 7 7 $page = $this->buildStandardPageView(); 8 8 9 - $page->setApplicationName('Audit'); 9 + $page->setApplicationName(pht('Audit')); 10 10 $page->setBaseURI('/audit/'); 11 11 $page->setTitle(idx($data, 'title')); 12 12 $page->setGlyph("\xE2\x9C\x8D");
+41 -41
src/applications/audit/controller/PhabricatorAuditListController.php
··· 49 49 if (!$handle) { 50 50 switch ($this->filter) { 51 51 case 'project': 52 - $title = 'Choose A Project'; 53 - $message = 'Choose a project to view audits for.'; 52 + $title = pht('Choose A Project'); 53 + $message = pht('Choose a project to view audits for.'); 54 54 break; 55 55 case 'package': 56 56 case 'packagecommits': 57 - $title = 'Choose a Package'; 58 - $message = 'Choose a package to view audits for.'; 57 + $title = pht('Choose a Package'); 58 + $message = pht('Choose a package to view audits for.'); 59 59 break; 60 60 } 61 61 } ··· 73 73 return $this->buildStandardPageResponse( 74 74 $nav, 75 75 array( 76 - 'title' => 'Audits', 76 + 'title' => pht('Audits'), 77 77 )); 78 78 } 79 79 80 80 private function buildNavAndSelectFilter() { 81 81 $nav = new AphrontSideNavFilterView(); 82 82 $nav->setBaseURI(new PhutilURI('/audit/view/')); 83 - $nav->addLabel('Active'); 84 - $nav->addFilter('active', 'Need Attention'); 83 + $nav->addLabel(pht('Active')); 84 + $nav->addFilter('active', pht('Need Attention')); 85 85 86 - $nav->addLabel('Audits'); 87 - $nav->addFilter('audits', 'All'); 88 - $nav->addFilter('user', 'By User'); 89 - $nav->addFilter('project', 'By Project'); 90 - $nav->addFilter('package', 'By Package'); 86 + $nav->addLabel(pht('Audits')); 87 + $nav->addFilter('audits', pht('All')); 88 + $nav->addFilter('user', pht('By User')); 89 + $nav->addFilter('project', pht('By Project')); 90 + $nav->addFilter('package', pht('By Package')); 91 91 92 - $nav->addLabel('Commits'); 93 - $nav->addFilter('commits', 'All'); 94 - $nav->addFilter('author', 'By Author'); 95 - $nav->addFilter('packagecommits', 'By Package'); 92 + $nav->addLabel(pht('Commits')); 93 + $nav->addFilter('commits', pht('All')); 94 + $nav->addFilter('author', pht('By Author')); 95 + $nav->addFilter('packagecommits', pht('By Package')); 96 96 97 97 $this->filter = $nav->selectFilter($this->filter, 'active'); 98 98 ··· 138 138 if ($show_user || $show_project || $show_package) { 139 139 if ($show_user) { 140 140 $uri = '/typeahead/common/users/'; 141 - $label = 'User'; 141 + $label = pht('User'); 142 142 } else if ($show_project) { 143 143 $uri = '/typeahead/common/projects/'; 144 - $label = 'Project'; 144 + $label = pht('Project'); 145 145 } else if ($show_package) { 146 146 $uri = '/typeahead/common/packages/'; 147 - $label = 'Package'; 147 + $label = pht('Package'); 148 148 } 149 149 150 150 $tok_value = null; ··· 167 167 $form->appendChild( 168 168 id(new AphrontFormToggleButtonsControl()) 169 169 ->setName('status') 170 - ->setLabel('Status') 170 + ->setLabel(pht('Status')) 171 171 ->setBaseURI($request->getRequestURI(), 'status') 172 172 ->setValue($this->filterStatus) 173 173 ->setButtons( 174 174 array( 175 - 'all' => 'All', 176 - 'open' => 'Open', 175 + 'all' => pht('All'), 176 + 'open' => pht('Open'), 177 177 ))); 178 178 } 179 179 180 180 $form->appendChild( 181 181 id(new AphrontFormSubmitControl()) 182 - ->setValue('Filter Audits')); 182 + ->setValue(pht('Filter Audits'))); 183 183 184 184 $view = new AphrontListFilterView(); 185 185 $view->appendChild($form); ··· 342 342 343 343 switch ($this->filter) { 344 344 case 'active': 345 - $header = 'Required Audits'; 346 - $nodata = 'No commits require your audit.'; 345 + $header = pht('Required Audits'); 346 + $nodata = pht('No commits require your audit.'); 347 347 break; 348 348 case 'user': 349 - $header = "Audits for {$handle_name}"; 350 - $nodata = "No matching audits by {$handle_name}."; 349 + $header = pht("Audits for %s", $handle_name); 350 + $nodata = pht("No matching audits by %s.", $handle_name); 351 351 break; 352 352 case 'audits': 353 - $header = "Audits"; 354 - $nodata = "No matching audits."; 353 + $header = pht('Audits'); 354 + $nodata = pht('No matching audits.'); 355 355 break; 356 356 case 'project': 357 - $header = "Audits in Project '{$handle_name}'"; 358 - $nodata = "No matching audits in project '{$handle_name}'."; 357 + $header = pht("Audits in Project %s", $handle_name); 358 + $nodata = pht("No matching audits in project %s.", $handle_name); 359 359 break; 360 360 case 'package': 361 - $header = "Audits for Package '{$handle_name}'"; 362 - $nodata = "No matching audits in package '{$handle_name}'."; 361 + $header = pht("Audits for Package %s", $handle_name); 362 + $nodata = pht("No matching audits in package %s.", $handle_name); 363 363 break; 364 364 } 365 365 ··· 442 442 443 443 switch ($this->filter) { 444 444 case 'active': 445 - $header = 'Problem Commits'; 446 - $nodata = 'None of your commits have open concerns.'; 445 + $header = pht('Problem Commits'); 446 + $nodata = pht('None of your commits have open concerns.'); 447 447 break; 448 448 case 'author': 449 - $header = "Commits by {$handle_name}"; 450 - $nodata = "No matching commits by {$handle_name}."; 449 + $header = pht("Commits by %s", $handle_name); 450 + $nodata = pht("No matching commits by %s.", $handle_name); 451 451 break; 452 452 case 'commits': 453 - $header = "Commits"; 454 - $nodata = "No matching commits."; 453 + $header = pht("Commits"); 454 + $nodata = pht("No matching commits."); 455 455 break; 456 456 case 'packagecommits': 457 - $header = "Commits in Package '{$handle_name}'"; 458 - $nodata = "No matching commits in package '{$handle_name}'."; 457 + $header = pht("Commits in Package %s", $handle_name); 458 + $nodata = pht("No matching commits in package %s.", $handle_name); 459 459 break; 460 460 } 461 461
+1 -1
src/applications/config/option/PhabricatorGarbageCollectorConfigOptions.php
··· 18 18 30, 19 19 pht('Number of seconds to retain Herald transcripts for.')), 20 20 'gcdaemon.ttl.daemon-logs' => array( 21 - 14, 21 + 7, 22 22 pht('Number of seconds to retain Daemon logs for.')), 23 23 'gcdaemon.ttl.differential-parse-cache' => array( 24 24 14,
+2 -2
src/applications/config/option/PhabricatorNotificationConfigOptions.php
··· 29 29 $this->newOption( 30 30 'notification.client-uri', 31 31 'string', 32 - 'http://localhost:22280') 32 + 'http://localhost:22280/') 33 33 ->setDescription(pht('Location of the client server.')), 34 34 $this->newOption( 35 35 'notification.server-uri', 36 36 'string', 37 - 'http://localhost:22281') 37 + 'http://localhost:22281/') 38 38 ->setDescription(pht('Location of the notification receiver server.')), 39 39 $this->newOption('notification.user', 'string', null) 40 40 ->setSummary(pht('Drop permissions to a less-privileged user.'))
+7 -1
src/applications/config/option/PhabricatorSecurityConfigOptions.php
··· 108 108 "unique to your install. In particular, you will want to do ". 109 109 "this if you accidentally send a bunch of mail somewhere you ". 110 110 "shouldn't have, to invalidate all old reply-to addresses.")), 111 - $this->newOption('uri.allowed-protocols', 'set', null) 111 + $this->newOption( 112 + 'uri.allowed-protocols', 113 + 'set', 114 + array( 115 + 'http' => true, 116 + 'https' => true, 117 + )) 112 118 ->setSummary( 113 119 pht("Determines which URI protocols are auto-linked.")) 114 120 ->setDescription(
+1 -1
src/applications/differential/application/PhabricatorApplicationDifferential.php
··· 7 7 } 8 8 9 9 public function getShortDescription() { 10 - return 'Review Code'; 10 + return pht('Review Code'); 11 11 } 12 12 13 13 public function getIconName() {
+4 -1
src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
··· 41 41 $this->newOption( 42 42 'differential.whitespace-matters', 43 43 'list<string>', 44 - array()) 44 + array( 45 + '/\.py$/', 46 + '/\.l?hs$/', 47 + )) 45 48 ->setDescription( 46 49 pht( 47 50 "List of file regexps where whitespace is meaningful and should ".
+15 -15
src/applications/differential/constants/DifferentialAction.php
··· 27 27 self::ACTION_REJECT => 'requested changes to', 28 28 self::ACTION_RETHINK => 'planned changes to', 29 29 self::ACTION_ABANDON => 'abandoned', 30 - self::ACTION_CLOSE => pht('closed'), 30 + self::ACTION_CLOSE => 'closed', 31 31 self::ACTION_REQUEST => 'requested a review of', 32 32 self::ACTION_RECLAIM => 'reclaimed', 33 33 self::ACTION_UPDATE => 'updated', ··· 49 49 } 50 50 51 51 public static function getActionVerb($action) { 52 - static $verbs = array( 53 - self::ACTION_COMMENT => 'Comment', 54 - self::ACTION_ACCEPT => "Accept Revision \xE2\x9C\x94", 55 - self::ACTION_REJECT => "Request Changes \xE2\x9C\x98", 56 - self::ACTION_RETHINK => "Plan Changes \xE2\x9C\x98", 57 - self::ACTION_ABANDON => 'Abandon Revision', 58 - self::ACTION_REQUEST => 'Request Review', 59 - self::ACTION_RECLAIM => 'Reclaim Revision', 60 - self::ACTION_RESIGN => 'Resign as Reviewer', 61 - self::ACTION_ADDREVIEWERS => 'Add Reviewers', 62 - self::ACTION_ADDCCS => 'Add CCs', 63 - self::ACTION_CLOSE => 'Close Revision', 64 - self::ACTION_CLAIM => 'Commandeer Revision', 65 - self::ACTION_REOPEN => 'Reopen', 52 + $verbs = array( 53 + self::ACTION_COMMENT => pht('Comment'), 54 + self::ACTION_ACCEPT => pht("Accept Revision \xE2\x9C\x94"), 55 + self::ACTION_REJECT => pht("Request Changes \xE2\x9C\x98"), 56 + self::ACTION_RETHINK => pht("Plan Changes \xE2\x9C\x98"), 57 + self::ACTION_ABANDON => pht('Abandon Revision'), 58 + self::ACTION_REQUEST => pht('Request Review'), 59 + self::ACTION_RECLAIM => pht('Reclaim Revision'), 60 + self::ACTION_RESIGN => pht('Resign as Reviewer'), 61 + self::ACTION_ADDREVIEWERS => pht('Add Reviewers'), 62 + self::ACTION_ADDCCS => pht('Add CCs'), 63 + self::ACTION_CLOSE => pht('Close Revision'), 64 + self::ACTION_CLAIM => pht('Commandeer Revision'), 65 + self::ACTION_REOPEN => pht('Reopen'), 66 66 ); 67 67 68 68 if (!empty($verbs[$action])) {
+11 -11
src/applications/differential/constants/DifferentialChangeType.php
··· 93 93 } 94 94 95 95 public static function getFullNameForChangeType($type) { 96 - static $types = array( 97 - self::TYPE_ADD => 'Added', 98 - self::TYPE_CHANGE => 'Modified', 99 - self::TYPE_DELETE => 'Deleted', 100 - self::TYPE_MOVE_AWAY => 'Moved Away', 101 - self::TYPE_COPY_AWAY => 'Copied Away', 102 - self::TYPE_MOVE_HERE => 'Moved Here', 103 - self::TYPE_COPY_HERE => 'Copied Here', 104 - self::TYPE_MULTICOPY => 'Deleted After Multiple Copy', 105 - self::TYPE_MESSAGE => 'Commit Message', 106 - self::TYPE_CHILD => 'Contents Modified', 96 + $types = array( 97 + self::TYPE_ADD => pht('Added'), 98 + self::TYPE_CHANGE => pht('Modified'), 99 + self::TYPE_DELETE => pht('Deleted'), 100 + self::TYPE_MOVE_AWAY => pht('Moved Away'), 101 + self::TYPE_COPY_AWAY => pht('Copied Away'), 102 + self::TYPE_MOVE_HERE => pht('Moved Here'), 103 + self::TYPE_COPY_HERE => pht('Copied Here'), 104 + self::TYPE_MULTICOPY => pht('Deleted After Multiple Copy'), 105 + self::TYPE_MESSAGE => pht('Commit Message'), 106 + self::TYPE_CHILD => pht('Contents Modified'), 107 107 ); 108 108 return idx($types, coalesce($type, '?'), 'Unknown'); 109 109 }
+1 -1
src/applications/differential/controller/DifferentialChangesetViewController.php
··· 252 252 $panel 253 253 ), 254 254 array( 255 - 'title' => 'Changeset View', 255 + 'title' => pht('Changeset View'), 256 256 )); 257 257 } 258 258
+4 -4
src/applications/differential/controller/DifferentialCommentSaveController.php
··· 54 54 $dialog->addHiddenInput('ccs', $ccs); 55 55 $dialog->addHiddenInput('comment', $comment); 56 56 57 - $dialog->setTitle('Action Has No Effect'); 57 + $dialog->setTitle(pht('Action Has No Effect')); 58 58 $dialog->appendChild( 59 59 '<p>'.phutil_escape_html($no_effect->getMessage()).'</p>'); 60 60 61 61 if (strlen($comment) || $has_inlines) { 62 - $dialog->addSubmitButton('Post as Comment'); 62 + $dialog->addSubmitButton(pht('Post as Comment')); 63 63 $dialog->appendChild('<br />'); 64 64 $dialog->appendChild( 65 - '<p>Do you want to post your feedback anyway, as a normal '. 66 - 'comment?</p>'); 65 + '<p>'.pht('Do you want to post your feedback anyway, as a normal '. 66 + 'comment?').'</p>'); 67 67 } 68 68 69 69 return id(new AphrontDialogResponse())->setDialog($dialog);
+2 -2
src/applications/differential/controller/DifferentialController.php
··· 13 13 $viewer_is_anonymous = !$this->getRequest()->getUser()->isLoggedIn(); 14 14 15 15 $page = $this->buildStandardPageView(); 16 - $page->setApplicationName('Differential'); 16 + $page->setApplicationName(pht('Differential')); 17 17 $page->setBaseURI('/differential/'); 18 18 $page->setTitle(idx($data, 'title')); 19 19 $page->setGlyph("\xE2\x9A\x99"); ··· 31 31 $crumbs->addAction( 32 32 id(new PhabricatorMenuItemView()) 33 33 ->setHref($this->getApplicationURI('/diff/create/')) 34 - ->setName('Create Diff') 34 + ->setName(pht('Create Diff')) 35 35 ->setIcon('create')); 36 36 37 37 return $crumbs;
+8 -8
src/applications/differential/controller/DifferentialDiffCreateController.php
··· 42 42 ->setEncType('multipart/form-data') 43 43 ->setUser($request->getUser()) 44 44 ->appendChild( 45 - '<p class="aphront-form-instructions">The best way to create a '. 46 - "Differential diff is by using $arcanist_link, but you ". 45 + '<p class="aphront-form-instructions">'.pht('The best way to create '. 46 + 'a Differential diff is by using %s, but you '. 47 47 'can also just paste a diff (e.g., from <tt>svn diff</tt> or '. 48 48 '<tt>git diff</tt>) into this box or upload it as a file if you '. 49 - 'really want.</p>') 49 + 'really want.', $arcanist_link).'</p>') 50 50 ->appendChild( 51 51 id(new AphrontFormTextAreaControl()) 52 - ->setLabel('Raw Diff') 52 + ->setLabel(pht('Raw Diff')) 53 53 ->setName('diff') 54 54 ->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL)) 55 55 ->appendChild( 56 56 id(new AphrontFormFileControl()) 57 - ->setLabel('Raw Diff from file') 57 + ->setLabel(pht('Raw Diff from file')) 58 58 ->setName('diff-file')) 59 59 ->appendChild( 60 60 id(new AphrontFormSubmitControl()) 61 - ->setValue("Create Diff \xC2\xBB")); 61 + ->setValue(pht("Create Diff \xC2\xBB"))); 62 62 63 63 $panel = new AphrontPanelView(); 64 - $panel->setHeader('Create New Diff'); 64 + $panel->setHeader(pht('Create New Diff')); 65 65 $panel->appendChild($form); 66 66 $panel->setWidth(AphrontPanelView::WIDTH_FORM); 67 67 68 68 return $this->buildStandardPageResponse( 69 69 $panel, 70 70 array( 71 - 'title' => 'Create Diff', 71 + 'title' => pht('Create Diff'), 72 72 )); 73 73 } 74 74
+12 -9
src/applications/differential/controller/DifferentialDiffViewController.php
··· 25 25 'href' => PhabricatorEnv::getURI('/D'.$diff->getRevisionID()), 26 26 ), 27 27 phutil_escape_html('D'.$diff->getRevisionID())); 28 - $top_panel->appendChild("<h1>This diff belongs to revision {$link}</h1>"); 28 + $top_panel->appendChild( 29 + "<h1>".pht('This diff belongs to revision %s', $link)."</h1>"); 29 30 } else { 30 31 $action_panel = new AphrontPanelView(); 31 32 $action_panel->setHeader('Preview Diff'); 32 33 $action_panel->setWidth(AphrontPanelView::WIDTH_WIDE); 33 34 $action_panel->appendChild( 34 - '<p class="aphront-panel-instructions">Review the diff for '. 35 + '<p class="aphront-panel-instructions">'.pht('Review the diff for '. 35 36 'correctness. When you are satisfied, either <strong>create a new '. 36 - 'revision</strong> or <strong>update an existing revision</strong>.'); 37 + 'revision</strong> or <strong>update an existing revision</strong>.')); 37 38 38 39 // TODO: implmenent optgroup support in AphrontFormSelectControl? 39 40 $select = array(); 40 41 $select[] = '<optgroup label="Create New Revision">'; 41 - $select[] = '<option value="">Create a new Revision...</option>'; 42 + $select[] = '<option value="">'. 43 + pht('Create a new Revision...'). 44 + '</option>'; 42 45 $select[] = '</optgroup>'; 43 46 44 47 $revision_data = new DifferentialRevisionListData( ··· 47 50 $revisions = $revision_data->loadRevisions(); 48 51 49 52 if ($revisions) { 50 - $select[] = '<optgroup label="Update Existing Revision">'; 53 + $select[] = '<optgroup label="'.pht('Update Existing Revision').'">'; 51 54 foreach ($revisions as $revision) { 52 55 $select[] = phutil_render_tag( 53 56 'option', ··· 72 75 ->addHiddenInput('viaDiffView', 1) 73 76 ->appendChild( 74 77 id(new AphrontFormMarkupControl()) 75 - ->setLabel('Attach To') 78 + ->setLabel(pht('Attach To')) 76 79 ->setValue($select)) 77 80 ->appendChild( 78 81 id(new AphrontFormSubmitControl()) 79 - ->setValue('Continue')); 82 + ->setValue(pht('Continue'))); 80 83 81 84 $action_panel->appendChild($action_form); 82 85 ··· 133 136 ->setRenderingReferences($refs) 134 137 ->setStandaloneURI('/differential/changeset/') 135 138 ->setDiff($diff) 136 - ->setTitle('Diff '.$diff->getID()) 139 + ->setTitle(pht('Diff %d', $diff->getID())) 137 140 ->setUser($request->getUser()); 138 141 139 142 return $this->buildStandardPageResponse( ··· 146 149 $details->render(), 147 150 )), 148 151 array( 149 - 'title' => 'Diff View', 152 + 'title' => pht('Diff View'), 150 153 )); 151 154 } 152 155
+9 -8
src/applications/differential/controller/DifferentialRevisionEditController.php
··· 95 95 $error_view = null; 96 96 if ($errors) { 97 97 $error_view = id(new AphrontErrorView()) 98 - ->setTitle('Form Errors') 98 + ->setTitle(pht('Form Errors')) 99 99 ->setErrors($errors); 100 100 } 101 101 ··· 103 103 $form 104 104 ->appendChild( 105 105 id(new AphrontFormTextAreaControl()) 106 - ->setLabel('Comments') 106 + ->setLabel(pht('Comments')) 107 107 ->setName('comments') 108 - ->setCaption("Explain what's new in this diff.") 108 + ->setCaption(pht("Explain what's new in this diff.")) 109 109 ->setValue($request->getStr('comments'))) 110 110 ->appendChild( 111 111 id(new AphrontFormSubmitControl()) 112 - ->setValue('Save')) 112 + ->setValue(pht('Save'))) 113 113 ->appendChild( 114 114 id(new AphrontFormDividerControl())); 115 115 } ··· 134 134 $panel = new AphrontPanelView(); 135 135 if ($revision->getID()) { 136 136 if ($diff) { 137 - $panel->setHeader('Update Differential Revision'); 137 + $panel->setHeader(pht('Update Differential Revision')); 138 138 } else { 139 - $panel->setHeader('Edit Differential Revision'); 139 + $panel->setHeader(pht('Edit Differential Revision')); 140 140 } 141 141 } else { 142 - $panel->setHeader('Create New Differential Revision'); 142 + $panel->setHeader(pht('Create New Differential Revision')); 143 143 } 144 144 145 145 $panel->appendChild($form); 146 146 $panel->setWidth(AphrontPanelView::WIDTH_FORM); 147 + $panel->setNoBackground(); 147 148 148 149 return $this->buildStandardPageResponse( 149 150 array($error_view, $panel), 150 151 array( 151 - 'title' => 'Edit Differential Revision', 152 + 'title' => pht('Edit Differential Revision'), 152 153 )); 153 154 } 154 155
+32 -33
src/applications/differential/controller/DifferentialRevisionListController.php
··· 101 101 // the viewing user's). Show a warning instead. 102 102 $warning = new AphrontErrorView(); 103 103 $warning->setSeverity(AphrontErrorView::SEVERITY_WARNING); 104 - $warning->setTitle('User Required'); 104 + $warning->setTitle(pht('User Required')); 105 105 $warning->appendChild( 106 - 'This filter requires that a user be specified above.'); 106 + pht('This filter requires that a user be specified above.')); 107 107 $panels[] = $warning; 108 108 } else { 109 109 $query = $this->buildQuery($this->filter, $params); ··· 173 173 ->addHiddenInput('order', $params['order']) 174 174 ->appendChild( 175 175 id(new AphrontFormSubmitControl()) 176 - ->setValue('Filter Revisions')); 176 + ->setValue(pht('Filter Revisions'))); 177 177 178 178 $filter_view = new AphrontListFilterView(); 179 179 $filter_view->appendChild($filter_form); ··· 198 198 return $this->buildApplicationPage( 199 199 $side_nav, 200 200 array( 201 - 'title' => 'Differential Home', 201 + 'title' => pht('Differential Home'), 202 202 )); 203 203 } 204 204 205 205 private function getFilters() { 206 206 return array( 207 - array(null, 'User Revisions'), 208 - array('active', 'Active'), 209 - array('revisions', 'Revisions'), 210 - array('reviews', 'Reviews'), 211 - array('subscribed', 'Subscribed'), 212 - array('drafts', 'Draft Reviews'), 213 - array(null, 'All Revisions'), 214 - array('all', 'All'), 207 + array(null, pht('User Revisions')), 208 + array('active', pht('Active')), 209 + array('revisions', pht('Revisions')), 210 + array('reviews', pht('Reviews')), 211 + array('subscribed', pht('Subscribed')), 212 + array('drafts', pht('Draft Reviews')), 213 + array(null, pht('All Revisions')), 214 + array('all', pht('All')), 215 215 ); 216 216 } 217 217 ··· 328 328 329 329 if ($control == 'subscriber') { 330 330 $source = '/typeahead/common/allmailable/'; 331 - $label = 'View Subscribers'; 331 + $label = pht('View Subscribers'); 332 332 } else { 333 333 $source = '/typeahead/common/accounts/'; 334 334 switch ($this->filter) { 335 335 case 'revisions': 336 - $label = 'Authors'; 336 + $label = pht('Authors'); 337 337 break; 338 338 case 'reviews': 339 - $label = 'Reviewers'; 339 + $label = pht('Reviewers'); 340 340 break; 341 341 default: 342 - $label = 'View Users'; 342 + $label = pht('View Users'); 343 343 break; 344 344 } 345 345 } ··· 353 353 case 'participants': 354 354 switch ($this->filter) { 355 355 case 'revisions': 356 - $label = 'Reviewers'; 356 + $label = pht('Reviewers'); 357 357 break; 358 358 case 'reviews': 359 - $label = 'Authors'; 359 + $label = pht('Authors'); 360 360 break; 361 361 } 362 362 $value = mpull( ··· 370 370 371 371 case 'status': 372 372 return id(new AphrontFormToggleButtonsControl()) 373 - ->setLabel('Status') 373 + ->setLabel(pht('Status')) 374 374 ->setValue($params['status']) 375 375 ->setBaseURI($uri, 'status') 376 376 ->setButtons( 377 377 array( 378 - 'all' => 'All', 379 - 'open' => 'Open', 378 + 'all' => pht('All'), 379 + 'open' => pht('Open'), 380 380 'closed' => pht('Closed'), 381 - 'abandoned' => 'Abandoned', 381 + 'abandoned' => pht('Abandoned'), 382 382 )); 383 383 384 384 case 'order': 385 385 return id(new AphrontFormToggleButtonsControl()) 386 - ->setLabel('Order') 386 + ->setLabel(pht('Order')) 387 387 ->setValue($params['order']) 388 388 ->setBaseURI($uri, 'order') 389 389 ->setButtons( 390 390 array( 391 - 'modified' => 'Updated', 392 - 'created' => 'Created', 391 + 'modified' => pht('Updated'), 392 + 'created' => pht('Created'), 393 393 )); 394 394 395 395 default: ··· 444 444 ->setRevisions($active) 445 445 ->loadAssets(); 446 446 $views[] = array( 447 - 'title' => 'Action Required', 447 + 'title' => pht('Action Required'), 448 448 'view' => $view, 449 449 ); 450 450 ··· 463 463 ->setUser($user); 464 464 465 465 $views[] = array( 466 - 'title' => 'Flagged Revisions', 466 + 'title' => pht('Flagged Revisions'), 467 467 'view' => $view, 468 468 'special' => true, 469 469 ); ··· 474 474 ->setRevisions($waiting) 475 475 ->loadAssets(); 476 476 $views[] = array( 477 - 'title' => 'Waiting On Others', 477 + 'title' => pht('Waiting On Others'), 478 478 'view' => $view, 479 479 ); 480 480 break; ··· 484 484 case 'drafts': 485 485 case 'all': 486 486 $titles = array( 487 - 'revisions' => 'Revisions by Author', 488 - 'reviews' => 'Revisions by Reviewer', 489 - 'subscribed' => 'Revisions by Subscriber', 490 - 'all' => 'Revisions', 487 + 'revisions' => pht('Revisions by Author'), 488 + 'reviews' => pht('Revisions by Reviewer'), 489 + 'subscribed' => pht('Revisions by Subscriber'), 490 + 'all' => pht('Revisions'), 491 491 ); 492 492 $view = id(clone $template) 493 493 ->setRevisions($revisions) ··· 503 503 504 504 return $views; 505 505 } 506 - 507 506 508 507 }
+4 -4
src/applications/differential/controller/DifferentialRevisionStatsController.php
··· 118 118 $filter_form->appendChild( 119 119 $this->renderControl($params['phid'], $handles)); 120 120 $filter_form->appendChild(id(new AphrontFormSubmitControl()) 121 - ->setValue('Filter Revisions')); 121 + ->setValue(pht('Filter Revisions'))); 122 122 123 123 $side_nav->appendChild($filter_form); 124 124 ··· 127 127 $diffs = $this->loadDiffs($revisions); 128 128 129 129 $panel = new AphrontPanelView(); 130 - $panel->setHeader('Differential rate analysis'); 130 + $panel->setHeader(pht('Differential rate analysis')); 131 131 $panel->appendChild( 132 132 id(new DifferentialRevisionStatsView()) 133 133 ->setComments($comments) ··· 144 144 return $this->buildStandardPageResponse( 145 145 $side_nav, 146 146 array( 147 - 'title' => 'Differential statistics', 147 + 'title' => pht('Differential Statistics'), 148 148 )); 149 149 } 150 150 ··· 157 157 } 158 158 return id(new AphrontFormTokenizerControl()) 159 159 ->setDatasource('/typeahead/common/users/') 160 - ->setLabel('View User') 160 + ->setLabel(pht('View User')) 161 161 ->setName('view_user') 162 162 ->setValue($value) 163 163 ->setLimit(1);
+12 -12
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 150 150 if (!$has_live_reviewer) { 151 151 $reviewer_warning = new AphrontErrorView(); 152 152 $reviewer_warning->setSeverity(AphrontErrorView::SEVERITY_WARNING); 153 - $reviewer_warning->setTitle('No Active Reviewers'); 153 + $reviewer_warning->setTitle(pht('No Active Reviewers')); 154 154 if ($revision->getReviewers()) { 155 155 $reviewer_warning->appendChild( 156 156 phutil_render_tag( ··· 181 181 $warning->setTitle('Very Large Diff'); 182 182 $warning->setSeverity(AphrontErrorView::SEVERITY_WARNING); 183 183 $warning->appendChild( 184 - "<p>This diff is very large and affects {$count} files. Load ". 185 - "each file individually. ". 184 + '<p>'.pht('This diff is very large and affects %d files. Load '. 185 + 'each file individually. ', $count). 186 186 "<strong>". 187 187 phutil_render_tag( 188 188 'a', ··· 191 191 ->alter('large', 'true') 192 192 ->setFragment('toc'), 193 193 ), 194 - 'Show All Files Inline'). 194 + pht('Show All Files Inline')). 195 195 "</strong>"); 196 196 $warning = $warning->render(); 197 197 ··· 483 483 $links[] = array( 484 484 'icon' => 'edit', 485 485 'href' => "/differential/revision/edit/{$revision_id}/", 486 - 'name' => 'Edit Revision', 486 + 'name' => pht('Edit Revision'), 487 487 ); 488 488 } 489 489 ··· 494 494 $links[] = array( 495 495 'icon' => $viewer_is_cc ? 'subscribe-delete' : 'subscribe-add', 496 496 'href' => "/differential/subscribe/{$action}/{$revision_id}/", 497 - 'name' => $viewer_is_cc ? 'Unsubscribe' : 'Subscribe', 497 + 'name' => $viewer_is_cc ? pht('Unsubscribe') : pht('Subscribe'), 498 498 'instant' => true, 499 499 'sigil' => 'workflow', 500 500 ); 501 501 } else { 502 502 $links[] = array( 503 503 'icon' => 'subscribe-auto', 504 - 'name' => 'Automatically Subscribed', 504 + 'name' => pht('Automatically Subscribed'), 505 505 'disabled' => true, 506 506 ); 507 507 } ··· 511 511 512 512 $links[] = array( 513 513 'icon' => 'link', 514 - 'name' => 'Edit Dependencies', 514 + 'name' => pht('Edit Dependencies'), 515 515 'href' => "/search/attach/{$revision_phid}/DREV/dependencies/", 516 516 'sigil' => 'workflow', 517 517 ); ··· 519 519 if (PhabricatorEnv::getEnvConfig('maniphest.enabled')) { 520 520 $links[] = array( 521 521 'icon' => 'attach', 522 - 'name' => 'Edit Maniphest Tasks', 522 + 'name' => pht('Edit Maniphest Tasks'), 523 523 'href' => "/search/attach/{$revision_phid}/TASK/", 524 524 'sigil' => 'workflow', 525 525 ); ··· 528 528 if ($user->getIsAdmin()) { 529 529 $links[] = array( 530 530 'icon' => 'file', 531 - 'name' => 'MetaMTA Transcripts', 531 + 'name' => pht('MetaMTA Transcripts'), 532 532 'href' => "/mail/?phid={$revision_phid}", 533 533 ); 534 534 } 535 535 536 536 $links[] = array( 537 537 'icon' => 'file', 538 - 'name' => 'Herald Transcripts', 538 + 'name' => pht('Herald Transcripts'), 539 539 'href' => "/herald/transcript/?phid={$revision_phid}", 540 540 ); 541 541 } ··· 543 543 $request_uri = $this->getRequest()->getRequestURI(); 544 544 $links[] = array( 545 545 'icon' => 'download', 546 - 'name' => 'Download Raw Diff', 546 + 'name' => pht('Download Raw Diff'), 547 547 'href' => $request_uri->alter('download', 'true') 548 548 ); 549 549
+7 -7
src/applications/differential/controller/DifferentialSubscribeController.php
··· 25 25 26 26 switch ($this->action) { 27 27 case 'add': 28 - $button = 'Subscribe'; 29 - $title = 'Subscribe to Revision'; 30 - $prompt = 'Really subscribe to this revision?'; 28 + $button = pht('Subscribe'); 29 + $title = pht('Subscribe to Revision'); 30 + $prompt = pht('Really subscribe to this revision?'); 31 31 break; 32 32 case 'rem': 33 - $button = 'Unsubscribe'; 34 - $title = 'Unsubscribe from Revision'; 35 - $prompt = 'Really unsubscribe from this revision? Herald will '. 33 + $button = pht('Unsubscribe'); 34 + $title = pht('Unsubscribe from Revision'); 35 + $prompt = pht('Really unsubscribe from this revision? Herald will '. 36 36 'not resubscribe you to a revision you unsubscribe '. 37 - 'from.'; 37 + 'from.'); 38 38 break; 39 39 default: 40 40 return new Aphront400Response();
+3 -2
src/applications/diffusion/controller/DiffusionController.php
··· 79 79 // TODO: URI encoding might need to be sorted out for this link. 80 80 81 81 $nav->addFilter( 82 + '', 83 + "Search Owners \xE2\x86\x97", 82 84 '/owners/view/search/'. 83 85 '?repository='.phutil_escape_uri($drequest->getCallsign()). 84 - '&path='.phutil_escape_uri('/'.$drequest->getPath()), 85 - "Search Owners \xE2\x86\x97"); 86 + '&path='.phutil_escape_uri('/'.$drequest->getPath())); 86 87 87 88 return $nav; 88 89 }
+1 -1
src/applications/macro/application/PhabricatorApplicationMacro.php
··· 7 7 } 8 8 9 9 public function getShortDescription() { 10 - return 'Image Macros and Memes'; 10 + return pht('Image Macros and Memes'); 11 11 } 12 12 13 13 public function getIconName() {
+9 -5
src/applications/macro/controller/PhabricatorMacroController.php
··· 8 8 $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); 9 9 10 10 if ($for_app) { 11 - $nav->addLabel('Create'); 12 - $nav->addFilter('', 'Create Macro', $this->getApplicationURI('/create/')); 11 + $nav->addLabel(pht('Create')); 12 + $nav->addFilter('', 13 + pht('Create Macro'), 14 + $this->getApplicationURI('/create/')); 13 15 } 14 16 15 - $nav->addLabel('Macros'); 16 - $nav->addFilter('/', 'All Macros'); 17 + $nav->addLabel(pht('Macros')); 18 + $nav->addFilter('/', pht('All Macros')); 17 19 if ($has_search) { 18 - $nav->addFilter('search', 'Search', $this->getRequest()->getRequestURI()); 20 + $nav->addFilter('search', 21 + pht('Search'), 22 + $this->getRequest()->getRequestURI()); 19 23 } 20 24 21 25
+4 -4
src/applications/macro/controller/PhabricatorMacroDisableController.php
··· 42 42 $dialog = new AphrontDialogView(); 43 43 $dialog 44 44 ->setUser($request->getUser()) 45 - ->setTitle('Really disable macro?') 45 + ->setTitle(pht('Really disable macro?')) 46 46 ->appendChild( 47 - '<p>Really disable the much-beloved image macro "'. 48 - phutil_escape_html($macro->getName()).'"? It will be sorely missed.'. 47 + '<p>'.pht('Really disable the much-beloved image macro %s? '. 48 + 'It will be sorely missed.', phutil_escape_html($macro->getName())). 49 49 '</p>') 50 50 ->setSubmitURI($this->getApplicationURI('/disable/'.$this->id.'/')) 51 - ->addSubmitButton('Disable') 51 + ->addSubmitButton(pht('Disable')) 52 52 ->addCancelButton($view_uri); 53 53 54 54 return id(new AphrontDialogResponse())->setDialog($dialog);
+15 -14
src/applications/macro/controller/PhabricatorMacroEditController.php
··· 37 37 $macro->setName($new_name); 38 38 39 39 if (!strlen($macro->getName())) { 40 - $errors[] = 'Macro name is required.'; 41 - $e_name = 'Required'; 40 + $errors[] = pht('Macro name is required.'); 41 + $e_name = pht('Required'); 42 42 } else if (!preg_match('/^[a-z0-9_-]{3,}$/', $macro->getName())) { 43 - $errors[] = 'Macro must be at least three characters long and '. 43 + $errors[] = pht('Macro must be at least three characters long and '. 44 44 'contain only lowercase letters, digits, hyphen and '. 45 - 'underscore.'; 46 - $e_name = 'Invalid'; 45 + 'underscore.'); 46 + $e_name = pht('Invalid'); 47 47 } else { 48 48 $e_name = null; 49 49 } ··· 74 74 } 75 75 76 76 if (!$macro->getID() && !$file) { 77 - $errors[] = 'You must upload an image to create a macro.'; 77 + $errors[] = pht('You must upload an image to create a macro.'); 78 78 $e_file = pht('Required'); 79 79 } 80 80 ··· 110 110 return id(new AphrontRedirectResponse())->setURI($view_uri); 111 111 } catch (AphrontQueryDuplicateKeyException $ex) { 112 112 throw $ex; 113 - $errors[] = 'Macro name is not unique!'; 114 - $e_name = 'Duplicate'; 113 + $errors[] = pht('Macro name is not unique!'); 114 + $e_name = pht('Duplicate'); 115 115 } 116 116 } 117 117 } 118 118 119 119 if ($errors) { 120 120 $error_view = new AphrontErrorView(); 121 - $error_view->setTitle('Form Errors'); 121 + $error_view->setTitle(pht('Form Errors')); 122 122 $error_view->setErrors($errors); 123 123 } else { 124 124 $error_view = null; ··· 141 141 ->setEncType('multipart/form-data') 142 142 ->appendChild( 143 143 id(new AphrontFormTextControl()) 144 - ->setLabel('Name') 144 + ->setLabel(pht('Name')) 145 145 ->setName('name') 146 146 ->setValue($macro->getName()) 147 - ->setCaption('This word or phrase will be replaced with the image.') 147 + ->setCaption( 148 + pht('This word or phrase will be replaced with the image.')) 148 149 ->setError($e_name)); 149 150 150 151 if (!$macro->getID()) { ··· 158 159 $form->addHiddenInput('phid', $current_file->getPHID()); 159 160 $form->appendChild( 160 161 id(new AphrontFormMarkupControl()) 161 - ->setLabel('Selected File') 162 + ->setLabel(pht('Selected File')) 162 163 ->setValue($current_file_view)); 163 164 164 165 $other_label = pht('Change File'); ··· 223 224 ->setUser($request->getUser()) 224 225 ->appendChild( 225 226 id(new AphrontFormFileControl()) 226 - ->setLabel('File') 227 + ->setLabel(pht('File')) 227 228 ->setName('file')) 228 229 ->appendChild( 229 230 id(new AphrontFormSubmitControl()) 230 - ->setValue('Upload File')); 231 + ->setValue(pht('Upload File'))); 231 232 232 233 $upload = array($upload_header, $upload_form); 233 234 }
+9 -5
src/applications/macro/controller/PhabricatorMacroListController.php
··· 64 64 $nodata = pht('There are no image macros yet.'); 65 65 } 66 66 67 - $author_phids = array_combine($authors, $authors); 67 + if ($authors) { 68 + $author_phids = array_combine($authors, $authors); 69 + } else { 70 + $author_phids = array(); 71 + } 68 72 69 73 $file_phids = mpull($macros, 'getFilePHID'); 70 74 ··· 86 90 ->appendChild( 87 91 id(new AphrontFormTextControl()) 88 92 ->setName('name') 89 - ->setLabel('Name') 93 + ->setLabel(pht('Name')) 90 94 ->setValue($filter)) 91 95 ->appendChild( 92 96 id(new AphrontFormTokenizerControl()) ··· 96 100 ->setValue(mpull($author_handles, 'getFullName'))) 97 101 ->appendChild( 98 102 id(new AphrontFormSubmitControl()) 99 - ->setValue('Filter Image Macros')); 103 + ->setValue(pht('Filter Image Macros'))); 100 104 101 105 $filter_view = new AphrontListFilterView(); 102 106 $filter_view->appendChild($filter_form); ··· 128 132 phutil_render_tag( 129 133 'div', 130 134 array(), 131 - 'Created on '.$datetime)); 135 + pht('Created on %s', $datetime))); 132 136 } 133 137 $item->setURI($this->getApplicationURI('/view/'.$macro->getID().'/')); 134 138 $item->setHeader($macro->getName()); ··· 155 159 $nav, 156 160 array( 157 161 'device' => true, 158 - 'title' => 'Image Macros', 162 + 'title' => pht('Image Macros'), 159 163 )); 160 164 } 161 165 }
+3 -3
src/applications/macro/controller/PhabricatorMacroViewController.php
··· 112 112 $view->setObject($macro); 113 113 $view->addAction( 114 114 id(new PhabricatorActionView()) 115 - ->setName('Edit Macro') 115 + ->setName(pht('Edit Macro')) 116 116 ->setHref($this->getApplicationURI('/edit/'.$macro->getID().'/')) 117 117 ->setIcon('edit')); 118 118 119 119 if ($macro->getIsDisabled()) { 120 120 $view->addAction( 121 121 id(new PhabricatorActionView()) 122 - ->setName('Restore Macro') 122 + ->setName(pht('Restore Macro')) 123 123 ->setHref($this->getApplicationURI('/disable/'.$macro->getID().'/')) 124 124 ->setWorkflow(true) 125 125 ->setIcon('undo')); 126 126 } else { 127 127 $view->addAction( 128 128 id(new PhabricatorActionView()) 129 - ->setName('Disable Macro') 129 + ->setName(pht('Disable Macro')) 130 130 ->setHref($this->getApplicationURI('/disable/'.$macro->getID().'/')) 131 131 ->setWorkflow(true) 132 132 ->setIcon('delete'));
+2
src/applications/meta/application/PhabricatorApplicationApplications.php
··· 26 26 return array( 27 27 '/applications/' => array( 28 28 '' => 'PhabricatorApplicationsListController', 29 + 'view/(?P<application>\w+)/' => 30 + 'PhabricatorApplicationDetailViewController', 29 31 30 32 ), 31 33
+77
src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
··· 1 + <?php 2 + 3 + final class PhabricatorApplicationDetailViewController 4 + extends PhabricatorApplicationsController{ 5 + 6 + private $application; 7 + 8 + public function willProcessRequest(array $data) { 9 + $this->application = $data['application']; 10 + } 11 + 12 + public function processRequest() { 13 + $request = $this->getRequest(); 14 + $user = $request->getUser(); 15 + 16 + $selected = null; 17 + $applications = PhabricatorApplication::getAllInstalledApplications(); 18 + 19 + foreach ($applications as $application) { 20 + if (get_class($application) == $this->application) { 21 + $selected = $application; 22 + break; 23 + } 24 + } 25 + 26 + if (!$selected) { 27 + return new Aphront404Response(); 28 + } 29 + 30 + $title = $selected->getName(); 31 + 32 + $crumbs = $this->buildApplicationCrumbs(); 33 + $crumbs->addCrumb( 34 + id(new PhabricatorCrumbView()) 35 + ->setName(pht('Applications')) 36 + ->setHref($this->getApplicationURI())); 37 + 38 + $properties = $this->buildPropertyView($selected); 39 + $actions = $this->buildActionView($user); 40 + 41 + return $this->buildApplicationPage( 42 + array( 43 + $crumbs, 44 + id(new PhabricatorHeaderView())->setHeader($title), 45 + $actions, 46 + $properties, 47 + ), 48 + array( 49 + 'title' => $title, 50 + 'device' => true, 51 + )); 52 + } 53 + 54 + private function buildPropertyView(PhabricatorApplication $selected) { 55 + $properties = new PhabricatorPropertyListView(); 56 + 57 + $properties->addProperty( 58 + pht('Status'), pht('Installed')); 59 + 60 + $properties->addProperty( 61 + pht('Description'), $selected->getShortDescription()); 62 + 63 + return $properties; 64 + } 65 + 66 + private function buildActionView(PhabricatorUser $user) { 67 + 68 + return id(new PhabricatorActionListView()) 69 + ->setUser($user) 70 + ->addAction( 71 + id(new PhabricatorActionView()) 72 + ->setName(pht('Uninstall')) 73 + ->setIcon('delete') 74 + ); 75 + } 76 + 77 + }
+5 -5
src/applications/meta/controller/PhabricatorApplicationsListController.php
··· 45 45 46 46 47 47 private function buildInstalledApplicationsList(array $applications) { 48 + $list = new PhabricatorObjectItemListView(); 48 49 49 - $list = new PhabricatorObjectItemListView(); 50 - foreach ($applications as $applications) { 50 + foreach ($applications as $application) { 51 51 $item = id(new PhabricatorObjectItemView()) 52 - ->setHeader($applications->getName()) 52 + ->setHeader($application->getName()) 53 + ->setHref('/applications/view/'.get_class($application).'/') 53 54 ->addAttribute( 54 - phutil_escape_html($applications->getShortDescription())); 55 + phutil_escape_html($application->getShortDescription())); 55 56 $list->addItem($item); 56 57 } 57 - 58 58 return $list; 59 59 } 60 60
+4 -2
src/docs/developer/database.diviner
··· 45 45 The exception is tables which share the same schema over different databases 46 46 such as `edge`. 47 47 48 - We use lower-case table names with words separated by underscores. 48 + We use lower-case table names with words separated by underscores. The reason is 49 + that MySQL can be configured (with `lower_case_table_names`) to lower-case the 50 + table names anyway. 49 51 50 52 = Column Names = 51 53 ··· 152 154 # Run `bin/storage/upgrade`. 153 155 154 156 It is also possible to create more complex patches in PHP for data migration 155 - (due to schema changes or otherwise.) However, the schema changes themselves 157 + (due to schema changes or otherwise.) However, the schema changes themselves 156 158 should be done in separate `.sql` files. Order can be guaranteed by editing 157 159 `src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php` 158 160 appropriately.
+1
src/infrastructure/markup/PhabricatorMarkupEngine.php
··· 419 419 420 420 if ($options['macros']) { 421 421 $rules[] = new PhabricatorRemarkupRuleImageMacro(); 422 + $rules[] = new PhabricatorRemarkupRuleMeme(); 422 423 } 423 424 424 425 $rules[] = new PhabricatorRemarkupRuleMention();
+42
src/infrastructure/markup/rule/PhabricatorRemarkupRuleMeme.php
··· 1 + <?php 2 + 3 + /** 4 + * @group markup 5 + */ 6 + final class PhabricatorRemarkupRuleMeme 7 + extends PhutilRemarkupRule { 8 + 9 + private $images; 10 + 11 + public function apply($text) { 12 + return preg_replace_callback( 13 + '@{meme,([^}]+)}$@m', 14 + array($this, 'markupMeme'), 15 + $text); 16 + } 17 + 18 + public function markupMeme($matches) { 19 + $options = array( 20 + 'src' => null, 21 + 'above' => null, 22 + 'below' => null, 23 + ); 24 + 25 + $parser = new PhutilSimpleOptions(); 26 + $options = $parser->parse($matches[1]) + $options; 27 + 28 + $uri = id(new PhutilURI('/macro/meme/')) 29 + ->alter('macro', $options['src']) 30 + ->alter('uppertext', $options['above']) 31 + ->alter('lowertext', $options['below']); 32 + 33 + $img = phutil_render_tag( 34 + 'img', 35 + array( 36 + 'src' => (string)$uri, 37 + )); 38 + 39 + return $this->getEngine()->storeText($img); 40 + } 41 + 42 + }
+6
src/view/form/control/PhabricatorRemarkupControl.php
··· 49 49 'table' => array( 50 50 'tip' => pht('Table'), 51 51 ), 52 + array( 53 + 'spacer' => true, 54 + ), 55 + 'meme' => array( 56 + 'tip' => pht('Meme'), 57 + ), 52 58 'help' => array( 53 59 'tip' => pht('Help'), 54 60 'align' => 'right',
+11
webroot/rsrc/js/application/core/behavior-phabricator-remarkup-assist.js
··· 59 59 case 'table': 60 60 update(area, (r.start == 0 ? '' : '\n\n') + '| ', sel || 'data', ' |'); 61 61 break; 62 + case 'meme': 63 + new JX.Workflow('/macro/meme/create/') 64 + .setHandler(function(response) { 65 + update( 66 + area, 67 + '', 68 + sel, 69 + (r.start == 0 ? '' : '\n\n') + response.text + '\n\n'); 70 + }) 71 + .start(); 72 + break; 62 73 } 63 74 } 64 75