mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 14:51:06 +01:00
Merge branch 'master' of git://github.com/facebook/phabricator
This commit is contained in:
commit
036e1aed9e
37 changed files with 420 additions and 246 deletions
|
@ -539,6 +539,13 @@ celerity_register_resource_map(array(
|
|||
'disk' => '/rsrc/image/texture/table_header_hover.png',
|
||||
'type' => 'png',
|
||||
),
|
||||
'/rsrc/image/texture/table_header_tall.png' =>
|
||||
array(
|
||||
'hash' => 'b05525601f78d759f1c5e47fd9c1a8aa',
|
||||
'uri' => '/res/b0552560/rsrc/image/texture/table_header_tall.png',
|
||||
'disk' => '/rsrc/image/texture/table_header_tall.png',
|
||||
'type' => 'png',
|
||||
),
|
||||
'/rsrc/swf/aphlict.swf' =>
|
||||
array(
|
||||
'hash' => '4b9a9d83bebaf254f3790e87b45c1f92',
|
||||
|
@ -593,7 +600,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'aphront-dialog-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/0ec64c77/rsrc/css/aphront/dialog-view.css',
|
||||
'uri' => '/res/215b3ab1/rsrc/css/aphront/dialog-view.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -602,7 +609,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'aphront-error-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/410dbe72/rsrc/css/aphront/error-view.css',
|
||||
'uri' => '/res/048ed376/rsrc/css/aphront/error-view.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -3247,7 +3254,7 @@ celerity_register_resource_map(array(
|
|||
), array(
|
||||
'packages' =>
|
||||
array(
|
||||
'2b575971' =>
|
||||
'4dff6da8' =>
|
||||
array(
|
||||
'name' => 'core.pkg.css',
|
||||
'symbols' =>
|
||||
|
@ -3291,7 +3298,7 @@ celerity_register_resource_map(array(
|
|||
36 => 'phabricator-object-item-list-view-css',
|
||||
37 => 'global-drag-and-drop-css',
|
||||
),
|
||||
'uri' => '/res/pkg/2b575971/core.pkg.css',
|
||||
'uri' => '/res/pkg/4dff6da8/core.pkg.css',
|
||||
'type' => 'css',
|
||||
),
|
||||
'c90b892e' =>
|
||||
|
@ -3481,19 +3488,19 @@ celerity_register_resource_map(array(
|
|||
'reverse' =>
|
||||
array(
|
||||
'aphront-attached-file-view-css' => '83f07678',
|
||||
'aphront-crumbs-view-css' => '2b575971',
|
||||
'aphront-dialog-view-css' => '2b575971',
|
||||
'aphront-error-view-css' => '2b575971',
|
||||
'aphront-form-view-css' => '2b575971',
|
||||
'aphront-crumbs-view-css' => '4dff6da8',
|
||||
'aphront-dialog-view-css' => '4dff6da8',
|
||||
'aphront-error-view-css' => '4dff6da8',
|
||||
'aphront-form-view-css' => '4dff6da8',
|
||||
'aphront-headsup-action-list-view-css' => 'ec01d039',
|
||||
'aphront-headsup-view-css' => '2b575971',
|
||||
'aphront-list-filter-view-css' => '2b575971',
|
||||
'aphront-pager-view-css' => '2b575971',
|
||||
'aphront-panel-view-css' => '2b575971',
|
||||
'aphront-table-view-css' => '2b575971',
|
||||
'aphront-tokenizer-control-css' => '2b575971',
|
||||
'aphront-tooltip-css' => '2b575971',
|
||||
'aphront-typeahead-control-css' => '2b575971',
|
||||
'aphront-headsup-view-css' => '4dff6da8',
|
||||
'aphront-list-filter-view-css' => '4dff6da8',
|
||||
'aphront-pager-view-css' => '4dff6da8',
|
||||
'aphront-panel-view-css' => '4dff6da8',
|
||||
'aphront-table-view-css' => '4dff6da8',
|
||||
'aphront-tokenizer-control-css' => '4dff6da8',
|
||||
'aphront-tooltip-css' => '4dff6da8',
|
||||
'aphront-typeahead-control-css' => '4dff6da8',
|
||||
'differential-changeset-view-css' => 'ec01d039',
|
||||
'differential-core-view-css' => 'ec01d039',
|
||||
'differential-inline-comment-editor' => 'ac53d36a',
|
||||
|
@ -3507,7 +3514,7 @@ celerity_register_resource_map(array(
|
|||
'differential-table-of-contents-css' => 'ec01d039',
|
||||
'diffusion-commit-view-css' => 'c8ce2d88',
|
||||
'diffusion-icons-css' => 'c8ce2d88',
|
||||
'global-drag-and-drop-css' => '2b575971',
|
||||
'global-drag-and-drop-css' => '4dff6da8',
|
||||
'inline-comment-summary-css' => 'ec01d039',
|
||||
'javelin-aphlict' => 'c90b892e',
|
||||
'javelin-behavior' => 'fbeded59',
|
||||
|
@ -3577,48 +3584,48 @@ celerity_register_resource_map(array(
|
|||
'javelin-util' => 'fbeded59',
|
||||
'javelin-vector' => 'fbeded59',
|
||||
'javelin-workflow' => 'fbeded59',
|
||||
'lightbox-attachment-css' => '2b575971',
|
||||
'lightbox-attachment-css' => '4dff6da8',
|
||||
'maniphest-task-summary-css' => '83f07678',
|
||||
'maniphest-transaction-detail-css' => '83f07678',
|
||||
'phabricator-busy' => 'c90b892e',
|
||||
'phabricator-content-source-view-css' => 'ec01d039',
|
||||
'phabricator-core-buttons-css' => '2b575971',
|
||||
'phabricator-core-css' => '2b575971',
|
||||
'phabricator-crumbs-view-css' => '2b575971',
|
||||
'phabricator-directory-css' => '2b575971',
|
||||
'phabricator-core-buttons-css' => '4dff6da8',
|
||||
'phabricator-core-css' => '4dff6da8',
|
||||
'phabricator-crumbs-view-css' => '4dff6da8',
|
||||
'phabricator-directory-css' => '4dff6da8',
|
||||
'phabricator-drag-and-drop-file-upload' => 'ac53d36a',
|
||||
'phabricator-dropdown-menu' => 'c90b892e',
|
||||
'phabricator-file-upload' => 'c90b892e',
|
||||
'phabricator-filetree-view-css' => '2b575971',
|
||||
'phabricator-flag-css' => '2b575971',
|
||||
'phabricator-form-view-css' => '2b575971',
|
||||
'phabricator-header-view-css' => '2b575971',
|
||||
'phabricator-jump-nav' => '2b575971',
|
||||
'phabricator-filetree-view-css' => '4dff6da8',
|
||||
'phabricator-flag-css' => '4dff6da8',
|
||||
'phabricator-form-view-css' => '4dff6da8',
|
||||
'phabricator-header-view-css' => '4dff6da8',
|
||||
'phabricator-jump-nav' => '4dff6da8',
|
||||
'phabricator-keyboard-shortcut' => 'c90b892e',
|
||||
'phabricator-keyboard-shortcut-manager' => 'c90b892e',
|
||||
'phabricator-main-menu-view' => '2b575971',
|
||||
'phabricator-main-menu-view' => '4dff6da8',
|
||||
'phabricator-menu-item' => 'c90b892e',
|
||||
'phabricator-nav-view-css' => '2b575971',
|
||||
'phabricator-nav-view-css' => '4dff6da8',
|
||||
'phabricator-notification' => 'c90b892e',
|
||||
'phabricator-notification-css' => '2b575971',
|
||||
'phabricator-notification-menu-css' => '2b575971',
|
||||
'phabricator-object-item-list-view-css' => '2b575971',
|
||||
'phabricator-notification-css' => '4dff6da8',
|
||||
'phabricator-notification-menu-css' => '4dff6da8',
|
||||
'phabricator-object-item-list-view-css' => '4dff6da8',
|
||||
'phabricator-object-selector-css' => 'ec01d039',
|
||||
'phabricator-paste-file-upload' => 'c90b892e',
|
||||
'phabricator-prefab' => 'c90b892e',
|
||||
'phabricator-project-tag-css' => '83f07678',
|
||||
'phabricator-remarkup-css' => '2b575971',
|
||||
'phabricator-remarkup-css' => '4dff6da8',
|
||||
'phabricator-shaped-request' => 'ac53d36a',
|
||||
'phabricator-side-menu-view-css' => '2b575971',
|
||||
'phabricator-standard-page-view' => '2b575971',
|
||||
'phabricator-side-menu-view-css' => '4dff6da8',
|
||||
'phabricator-standard-page-view' => '4dff6da8',
|
||||
'phabricator-textareautils' => 'c90b892e',
|
||||
'phabricator-tooltip' => 'c90b892e',
|
||||
'phabricator-transaction-view-css' => '2b575971',
|
||||
'phabricator-zindex-css' => '2b575971',
|
||||
'sprite-apps-large-css' => '2b575971',
|
||||
'sprite-gradient-css' => '2b575971',
|
||||
'sprite-icon-css' => '2b575971',
|
||||
'sprite-menu-css' => '2b575971',
|
||||
'syntax-highlighting-css' => '2b575971',
|
||||
'phabricator-transaction-view-css' => '4dff6da8',
|
||||
'phabricator-zindex-css' => '4dff6da8',
|
||||
'sprite-apps-large-css' => '4dff6da8',
|
||||
'sprite-gradient-css' => '4dff6da8',
|
||||
'sprite-icon-css' => '4dff6da8',
|
||||
'sprite-menu-css' => '4dff6da8',
|
||||
'syntax-highlighting-css' => '4dff6da8',
|
||||
),
|
||||
));
|
||||
|
|
|
@ -603,6 +603,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorApplicationConfigOptions' => 'applications/config/option/PhabricatorApplicationConfigOptions.php',
|
||||
'PhabricatorApplicationCountdown' => 'applications/countdown/application/PhabricatorApplicationCountdown.php',
|
||||
'PhabricatorApplicationDaemons' => 'applications/daemon/application/PhabricatorApplicationDaemons.php',
|
||||
'PhabricatorApplicationDetailViewController' => 'applications/meta/controller/PhabricatorApplicationDetailViewController.php',
|
||||
'PhabricatorApplicationDifferential' => 'applications/differential/application/PhabricatorApplicationDifferential.php',
|
||||
'PhabricatorApplicationDiffusion' => 'applications/diffusion/application/PhabricatorApplicationDiffusion.php',
|
||||
'PhabricatorApplicationDiviner' => 'applications/diviner/application/PhabricatorApplicationDiviner.php',
|
||||
|
@ -1122,6 +1123,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorRemarkupRuleImageMacro' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleImageMacro.php',
|
||||
'PhabricatorRemarkupRuleManiphest' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleManiphest.php',
|
||||
'PhabricatorRemarkupRuleManiphestHandle' => 'infrastructure/markup/rule/handle/PhabricatorRemarkupRuleManiphestHandle.php',
|
||||
'PhabricatorRemarkupRuleMeme' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleMeme.php',
|
||||
'PhabricatorRemarkupRuleMention' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleMention.php',
|
||||
'PhabricatorRemarkupRuleObjectHandle' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleObjectHandle.php',
|
||||
'PhabricatorRemarkupRuleObjectName' => 'infrastructure/markup/rule/PhabricatorRemarkupRuleObjectName.php',
|
||||
|
@ -1996,6 +1998,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorApplicationConfigOptions' => 'Phobject',
|
||||
'PhabricatorApplicationCountdown' => 'PhabricatorApplication',
|
||||
'PhabricatorApplicationDaemons' => 'PhabricatorApplication',
|
||||
'PhabricatorApplicationDetailViewController' => 'PhabricatorApplicationsController',
|
||||
'PhabricatorApplicationDifferential' => 'PhabricatorApplication',
|
||||
'PhabricatorApplicationDiffusion' => 'PhabricatorApplication',
|
||||
'PhabricatorApplicationDiviner' => 'PhabricatorApplication',
|
||||
|
@ -2499,6 +2502,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorRemarkupRuleImageMacro' => 'PhutilRemarkupRule',
|
||||
'PhabricatorRemarkupRuleManiphest' => 'PhabricatorRemarkupRuleObjectName',
|
||||
'PhabricatorRemarkupRuleManiphestHandle' => 'PhabricatorRemarkupRuleObjectHandle',
|
||||
'PhabricatorRemarkupRuleMeme' => 'PhutilRemarkupRule',
|
||||
'PhabricatorRemarkupRuleMention' => 'PhutilRemarkupRule',
|
||||
'PhabricatorRemarkupRuleObjectHandle' => 'PhutilRemarkupRule',
|
||||
'PhabricatorRemarkupRuleObjectName' => 'PhutilRemarkupRule',
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
final class PhabricatorApplicationAudit extends PhabricatorApplication {
|
||||
|
||||
public function getShortDescription() {
|
||||
return 'Audit Code';
|
||||
return pht('Audit Code');
|
||||
}
|
||||
|
||||
public function getBaseURI() {
|
||||
|
|
|
@ -6,7 +6,7 @@ abstract class PhabricatorAuditController extends PhabricatorController {
|
|||
|
||||
$page = $this->buildStandardPageView();
|
||||
|
||||
$page->setApplicationName('Audit');
|
||||
$page->setApplicationName(pht('Audit'));
|
||||
$page->setBaseURI('/audit/');
|
||||
$page->setTitle(idx($data, 'title'));
|
||||
$page->setGlyph("\xE2\x9C\x8D");
|
||||
|
|
|
@ -49,13 +49,13 @@ final class PhabricatorAuditListController extends PhabricatorAuditController {
|
|||
if (!$handle) {
|
||||
switch ($this->filter) {
|
||||
case 'project':
|
||||
$title = 'Choose A Project';
|
||||
$message = 'Choose a project to view audits for.';
|
||||
$title = pht('Choose A Project');
|
||||
$message = pht('Choose a project to view audits for.');
|
||||
break;
|
||||
case 'package':
|
||||
case 'packagecommits':
|
||||
$title = 'Choose a Package';
|
||||
$message = 'Choose a package to view audits for.';
|
||||
$title = pht('Choose a Package');
|
||||
$message = pht('Choose a package to view audits for.');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -73,26 +73,26 @@ final class PhabricatorAuditListController extends PhabricatorAuditController {
|
|||
return $this->buildStandardPageResponse(
|
||||
$nav,
|
||||
array(
|
||||
'title' => 'Audits',
|
||||
'title' => pht('Audits'),
|
||||
));
|
||||
}
|
||||
|
||||
private function buildNavAndSelectFilter() {
|
||||
$nav = new AphrontSideNavFilterView();
|
||||
$nav->setBaseURI(new PhutilURI('/audit/view/'));
|
||||
$nav->addLabel('Active');
|
||||
$nav->addFilter('active', 'Need Attention');
|
||||
$nav->addLabel(pht('Active'));
|
||||
$nav->addFilter('active', pht('Need Attention'));
|
||||
|
||||
$nav->addLabel('Audits');
|
||||
$nav->addFilter('audits', 'All');
|
||||
$nav->addFilter('user', 'By User');
|
||||
$nav->addFilter('project', 'By Project');
|
||||
$nav->addFilter('package', 'By Package');
|
||||
$nav->addLabel(pht('Audits'));
|
||||
$nav->addFilter('audits', pht('All'));
|
||||
$nav->addFilter('user', pht('By User'));
|
||||
$nav->addFilter('project', pht('By Project'));
|
||||
$nav->addFilter('package', pht('By Package'));
|
||||
|
||||
$nav->addLabel('Commits');
|
||||
$nav->addFilter('commits', 'All');
|
||||
$nav->addFilter('author', 'By Author');
|
||||
$nav->addFilter('packagecommits', 'By Package');
|
||||
$nav->addLabel(pht('Commits'));
|
||||
$nav->addFilter('commits', pht('All'));
|
||||
$nav->addFilter('author', pht('By Author'));
|
||||
$nav->addFilter('packagecommits', pht('By Package'));
|
||||
|
||||
$this->filter = $nav->selectFilter($this->filter, 'active');
|
||||
|
||||
|
@ -138,13 +138,13 @@ final class PhabricatorAuditListController extends PhabricatorAuditController {
|
|||
if ($show_user || $show_project || $show_package) {
|
||||
if ($show_user) {
|
||||
$uri = '/typeahead/common/users/';
|
||||
$label = 'User';
|
||||
$label = pht('User');
|
||||
} else if ($show_project) {
|
||||
$uri = '/typeahead/common/projects/';
|
||||
$label = 'Project';
|
||||
$label = pht('Project');
|
||||
} else if ($show_package) {
|
||||
$uri = '/typeahead/common/packages/';
|
||||
$label = 'Package';
|
||||
$label = pht('Package');
|
||||
}
|
||||
|
||||
$tok_value = null;
|
||||
|
@ -167,19 +167,19 @@ final class PhabricatorAuditListController extends PhabricatorAuditController {
|
|||
$form->appendChild(
|
||||
id(new AphrontFormToggleButtonsControl())
|
||||
->setName('status')
|
||||
->setLabel('Status')
|
||||
->setLabel(pht('Status'))
|
||||
->setBaseURI($request->getRequestURI(), 'status')
|
||||
->setValue($this->filterStatus)
|
||||
->setButtons(
|
||||
array(
|
||||
'all' => 'All',
|
||||
'open' => 'Open',
|
||||
'all' => pht('All'),
|
||||
'open' => pht('Open'),
|
||||
)));
|
||||
}
|
||||
|
||||
$form->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Filter Audits'));
|
||||
->setValue(pht('Filter Audits')));
|
||||
|
||||
$view = new AphrontListFilterView();
|
||||
$view->appendChild($form);
|
||||
|
@ -342,24 +342,24 @@ final class PhabricatorAuditListController extends PhabricatorAuditController {
|
|||
|
||||
switch ($this->filter) {
|
||||
case 'active':
|
||||
$header = 'Required Audits';
|
||||
$nodata = 'No commits require your audit.';
|
||||
$header = pht('Required Audits');
|
||||
$nodata = pht('No commits require your audit.');
|
||||
break;
|
||||
case 'user':
|
||||
$header = "Audits for {$handle_name}";
|
||||
$nodata = "No matching audits by {$handle_name}.";
|
||||
$header = pht("Audits for %s", $handle_name);
|
||||
$nodata = pht("No matching audits by %s.", $handle_name);
|
||||
break;
|
||||
case 'audits':
|
||||
$header = "Audits";
|
||||
$nodata = "No matching audits.";
|
||||
$header = pht('Audits');
|
||||
$nodata = pht('No matching audits.');
|
||||
break;
|
||||
case 'project':
|
||||
$header = "Audits in Project '{$handle_name}'";
|
||||
$nodata = "No matching audits in project '{$handle_name}'.";
|
||||
$header = pht("Audits in Project %s", $handle_name);
|
||||
$nodata = pht("No matching audits in project %s.", $handle_name);
|
||||
break;
|
||||
case 'package':
|
||||
$header = "Audits for Package '{$handle_name}'";
|
||||
$nodata = "No matching audits in package '{$handle_name}'.";
|
||||
$header = pht("Audits for Package %s", $handle_name);
|
||||
$nodata = pht("No matching audits in package %s.", $handle_name);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -442,20 +442,20 @@ final class PhabricatorAuditListController extends PhabricatorAuditController {
|
|||
|
||||
switch ($this->filter) {
|
||||
case 'active':
|
||||
$header = 'Problem Commits';
|
||||
$nodata = 'None of your commits have open concerns.';
|
||||
$header = pht('Problem Commits');
|
||||
$nodata = pht('None of your commits have open concerns.');
|
||||
break;
|
||||
case 'author':
|
||||
$header = "Commits by {$handle_name}";
|
||||
$nodata = "No matching commits by {$handle_name}.";
|
||||
$header = pht("Commits by %s", $handle_name);
|
||||
$nodata = pht("No matching commits by %s.", $handle_name);
|
||||
break;
|
||||
case 'commits':
|
||||
$header = "Commits";
|
||||
$nodata = "No matching commits.";
|
||||
$header = pht("Commits");
|
||||
$nodata = pht("No matching commits.");
|
||||
break;
|
||||
case 'packagecommits':
|
||||
$header = "Commits in Package '{$handle_name}'";
|
||||
$nodata = "No matching commits in package '{$handle_name}'.";
|
||||
$header = pht("Commits in Package %s", $handle_name);
|
||||
$nodata = pht("No matching commits in package %s.", $handle_name);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ final class PhabricatorGarbageCollectorConfigOptions
|
|||
30,
|
||||
pht('Number of seconds to retain Herald transcripts for.')),
|
||||
'gcdaemon.ttl.daemon-logs' => array(
|
||||
14,
|
||||
7,
|
||||
pht('Number of seconds to retain Daemon logs for.')),
|
||||
'gcdaemon.ttl.differential-parse-cache' => array(
|
||||
14,
|
||||
|
|
|
@ -29,12 +29,12 @@ final class PhabricatorNotificationConfigOptions
|
|||
$this->newOption(
|
||||
'notification.client-uri',
|
||||
'string',
|
||||
'http://localhost:22280')
|
||||
'http://localhost:22280/')
|
||||
->setDescription(pht('Location of the client server.')),
|
||||
$this->newOption(
|
||||
'notification.server-uri',
|
||||
'string',
|
||||
'http://localhost:22281')
|
||||
'http://localhost:22281/')
|
||||
->setDescription(pht('Location of the notification receiver server.')),
|
||||
$this->newOption('notification.user', 'string', null)
|
||||
->setSummary(pht('Drop permissions to a less-privileged user.'))
|
||||
|
|
|
@ -108,7 +108,13 @@ final class PhabricatorSecurityConfigOptions
|
|||
"unique to your install. In particular, you will want to do ".
|
||||
"this if you accidentally send a bunch of mail somewhere you ".
|
||||
"shouldn't have, to invalidate all old reply-to addresses.")),
|
||||
$this->newOption('uri.allowed-protocols', 'set', null)
|
||||
$this->newOption(
|
||||
'uri.allowed-protocols',
|
||||
'set',
|
||||
array(
|
||||
'http' => true,
|
||||
'https' => true,
|
||||
))
|
||||
->setSummary(
|
||||
pht("Determines which URI protocols are auto-linked."))
|
||||
->setDescription(
|
||||
|
|
|
@ -7,7 +7,7 @@ final class PhabricatorApplicationDifferential extends PhabricatorApplication {
|
|||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return 'Review Code';
|
||||
return pht('Review Code');
|
||||
}
|
||||
|
||||
public function getIconName() {
|
||||
|
|
|
@ -41,7 +41,10 @@ final class PhabricatorDifferentialConfigOptions
|
|||
$this->newOption(
|
||||
'differential.whitespace-matters',
|
||||
'list<string>',
|
||||
array())
|
||||
array(
|
||||
'/\.py$/',
|
||||
'/\.l?hs$/',
|
||||
))
|
||||
->setDescription(
|
||||
pht(
|
||||
"List of file regexps where whitespace is meaningful and should ".
|
||||
|
|
|
@ -27,7 +27,7 @@ final class DifferentialAction {
|
|||
self::ACTION_REJECT => 'requested changes to',
|
||||
self::ACTION_RETHINK => 'planned changes to',
|
||||
self::ACTION_ABANDON => 'abandoned',
|
||||
self::ACTION_CLOSE => pht('closed'),
|
||||
self::ACTION_CLOSE => 'closed',
|
||||
self::ACTION_REQUEST => 'requested a review of',
|
||||
self::ACTION_RECLAIM => 'reclaimed',
|
||||
self::ACTION_UPDATE => 'updated',
|
||||
|
@ -49,20 +49,20 @@ final class DifferentialAction {
|
|||
}
|
||||
|
||||
public static function getActionVerb($action) {
|
||||
static $verbs = array(
|
||||
self::ACTION_COMMENT => 'Comment',
|
||||
self::ACTION_ACCEPT => "Accept Revision \xE2\x9C\x94",
|
||||
self::ACTION_REJECT => "Request Changes \xE2\x9C\x98",
|
||||
self::ACTION_RETHINK => "Plan Changes \xE2\x9C\x98",
|
||||
self::ACTION_ABANDON => 'Abandon Revision',
|
||||
self::ACTION_REQUEST => 'Request Review',
|
||||
self::ACTION_RECLAIM => 'Reclaim Revision',
|
||||
self::ACTION_RESIGN => 'Resign as Reviewer',
|
||||
self::ACTION_ADDREVIEWERS => 'Add Reviewers',
|
||||
self::ACTION_ADDCCS => 'Add CCs',
|
||||
self::ACTION_CLOSE => 'Close Revision',
|
||||
self::ACTION_CLAIM => 'Commandeer Revision',
|
||||
self::ACTION_REOPEN => 'Reopen',
|
||||
$verbs = array(
|
||||
self::ACTION_COMMENT => pht('Comment'),
|
||||
self::ACTION_ACCEPT => pht("Accept Revision \xE2\x9C\x94"),
|
||||
self::ACTION_REJECT => pht("Request Changes \xE2\x9C\x98"),
|
||||
self::ACTION_RETHINK => pht("Plan Changes \xE2\x9C\x98"),
|
||||
self::ACTION_ABANDON => pht('Abandon Revision'),
|
||||
self::ACTION_REQUEST => pht('Request Review'),
|
||||
self::ACTION_RECLAIM => pht('Reclaim Revision'),
|
||||
self::ACTION_RESIGN => pht('Resign as Reviewer'),
|
||||
self::ACTION_ADDREVIEWERS => pht('Add Reviewers'),
|
||||
self::ACTION_ADDCCS => pht('Add CCs'),
|
||||
self::ACTION_CLOSE => pht('Close Revision'),
|
||||
self::ACTION_CLAIM => pht('Commandeer Revision'),
|
||||
self::ACTION_REOPEN => pht('Reopen'),
|
||||
);
|
||||
|
||||
if (!empty($verbs[$action])) {
|
||||
|
|
|
@ -93,17 +93,17 @@ final class DifferentialChangeType {
|
|||
}
|
||||
|
||||
public static function getFullNameForChangeType($type) {
|
||||
static $types = array(
|
||||
self::TYPE_ADD => 'Added',
|
||||
self::TYPE_CHANGE => 'Modified',
|
||||
self::TYPE_DELETE => 'Deleted',
|
||||
self::TYPE_MOVE_AWAY => 'Moved Away',
|
||||
self::TYPE_COPY_AWAY => 'Copied Away',
|
||||
self::TYPE_MOVE_HERE => 'Moved Here',
|
||||
self::TYPE_COPY_HERE => 'Copied Here',
|
||||
self::TYPE_MULTICOPY => 'Deleted After Multiple Copy',
|
||||
self::TYPE_MESSAGE => 'Commit Message',
|
||||
self::TYPE_CHILD => 'Contents Modified',
|
||||
$types = array(
|
||||
self::TYPE_ADD => pht('Added'),
|
||||
self::TYPE_CHANGE => pht('Modified'),
|
||||
self::TYPE_DELETE => pht('Deleted'),
|
||||
self::TYPE_MOVE_AWAY => pht('Moved Away'),
|
||||
self::TYPE_COPY_AWAY => pht('Copied Away'),
|
||||
self::TYPE_MOVE_HERE => pht('Moved Here'),
|
||||
self::TYPE_COPY_HERE => pht('Copied Here'),
|
||||
self::TYPE_MULTICOPY => pht('Deleted After Multiple Copy'),
|
||||
self::TYPE_MESSAGE => pht('Commit Message'),
|
||||
self::TYPE_CHILD => pht('Contents Modified'),
|
||||
);
|
||||
return idx($types, coalesce($type, '?'), 'Unknown');
|
||||
}
|
||||
|
|
|
@ -252,7 +252,7 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
|||
$panel
|
||||
),
|
||||
array(
|
||||
'title' => 'Changeset View',
|
||||
'title' => pht('Changeset View'),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -54,16 +54,16 @@ final class DifferentialCommentSaveController extends DifferentialController {
|
|||
$dialog->addHiddenInput('ccs', $ccs);
|
||||
$dialog->addHiddenInput('comment', $comment);
|
||||
|
||||
$dialog->setTitle('Action Has No Effect');
|
||||
$dialog->setTitle(pht('Action Has No Effect'));
|
||||
$dialog->appendChild(
|
||||
'<p>'.phutil_escape_html($no_effect->getMessage()).'</p>');
|
||||
|
||||
if (strlen($comment) || $has_inlines) {
|
||||
$dialog->addSubmitButton('Post as Comment');
|
||||
$dialog->addSubmitButton(pht('Post as Comment'));
|
||||
$dialog->appendChild('<br />');
|
||||
$dialog->appendChild(
|
||||
'<p>Do you want to post your feedback anyway, as a normal '.
|
||||
'comment?</p>');
|
||||
'<p>'.pht('Do you want to post your feedback anyway, as a normal '.
|
||||
'comment?').'</p>');
|
||||
}
|
||||
|
||||
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||
|
|
|
@ -13,7 +13,7 @@ abstract class DifferentialController extends PhabricatorController {
|
|||
$viewer_is_anonymous = !$this->getRequest()->getUser()->isLoggedIn();
|
||||
|
||||
$page = $this->buildStandardPageView();
|
||||
$page->setApplicationName('Differential');
|
||||
$page->setApplicationName(pht('Differential'));
|
||||
$page->setBaseURI('/differential/');
|
||||
$page->setTitle(idx($data, 'title'));
|
||||
$page->setGlyph("\xE2\x9A\x99");
|
||||
|
@ -31,7 +31,7 @@ abstract class DifferentialController extends PhabricatorController {
|
|||
$crumbs->addAction(
|
||||
id(new PhabricatorMenuItemView())
|
||||
->setHref($this->getApplicationURI('/diff/create/'))
|
||||
->setName('Create Diff')
|
||||
->setName(pht('Create Diff'))
|
||||
->setIcon('create'));
|
||||
|
||||
return $crumbs;
|
||||
|
|
|
@ -42,33 +42,33 @@ final class DifferentialDiffCreateController extends DifferentialController {
|
|||
->setEncType('multipart/form-data')
|
||||
->setUser($request->getUser())
|
||||
->appendChild(
|
||||
'<p class="aphront-form-instructions">The best way to create a '.
|
||||
"Differential diff is by using $arcanist_link, but you ".
|
||||
'<p class="aphront-form-instructions">'.pht('The best way to create '.
|
||||
'a Differential diff is by using %s, but you '.
|
||||
'can also just paste a diff (e.g., from <tt>svn diff</tt> or '.
|
||||
'<tt>git diff</tt>) into this box or upload it as a file if you '.
|
||||
'really want.</p>')
|
||||
'really want.', $arcanist_link).'</p>')
|
||||
->appendChild(
|
||||
id(new AphrontFormTextAreaControl())
|
||||
->setLabel('Raw Diff')
|
||||
->setLabel(pht('Raw Diff'))
|
||||
->setName('diff')
|
||||
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL))
|
||||
->appendChild(
|
||||
id(new AphrontFormFileControl())
|
||||
->setLabel('Raw Diff from file')
|
||||
->setLabel(pht('Raw Diff from file'))
|
||||
->setName('diff-file'))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue("Create Diff \xC2\xBB"));
|
||||
->setValue(pht("Create Diff \xC2\xBB")));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader('Create New Diff');
|
||||
$panel->setHeader(pht('Create New Diff'));
|
||||
$panel->appendChild($form);
|
||||
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
|
||||
|
||||
return $this->buildStandardPageResponse(
|
||||
$panel,
|
||||
array(
|
||||
'title' => 'Create Diff',
|
||||
'title' => pht('Create Diff'),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -25,20 +25,23 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
'href' => PhabricatorEnv::getURI('/D'.$diff->getRevisionID()),
|
||||
),
|
||||
phutil_escape_html('D'.$diff->getRevisionID()));
|
||||
$top_panel->appendChild("<h1>This diff belongs to revision {$link}</h1>");
|
||||
$top_panel->appendChild(
|
||||
"<h1>".pht('This diff belongs to revision %s', $link)."</h1>");
|
||||
} else {
|
||||
$action_panel = new AphrontPanelView();
|
||||
$action_panel->setHeader('Preview Diff');
|
||||
$action_panel->setWidth(AphrontPanelView::WIDTH_WIDE);
|
||||
$action_panel->appendChild(
|
||||
'<p class="aphront-panel-instructions">Review the diff for '.
|
||||
'<p class="aphront-panel-instructions">'.pht('Review the diff for '.
|
||||
'correctness. When you are satisfied, either <strong>create a new '.
|
||||
'revision</strong> or <strong>update an existing revision</strong>.');
|
||||
'revision</strong> or <strong>update an existing revision</strong>.'));
|
||||
|
||||
// TODO: implmenent optgroup support in AphrontFormSelectControl?
|
||||
$select = array();
|
||||
$select[] = '<optgroup label="Create New Revision">';
|
||||
$select[] = '<option value="">Create a new Revision...</option>';
|
||||
$select[] = '<option value="">'.
|
||||
pht('Create a new Revision...').
|
||||
'</option>';
|
||||
$select[] = '</optgroup>';
|
||||
|
||||
$revision_data = new DifferentialRevisionListData(
|
||||
|
@ -47,7 +50,7 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
$revisions = $revision_data->loadRevisions();
|
||||
|
||||
if ($revisions) {
|
||||
$select[] = '<optgroup label="Update Existing Revision">';
|
||||
$select[] = '<optgroup label="'.pht('Update Existing Revision').'">';
|
||||
foreach ($revisions as $revision) {
|
||||
$select[] = phutil_render_tag(
|
||||
'option',
|
||||
|
@ -72,11 +75,11 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
->addHiddenInput('viaDiffView', 1)
|
||||
->appendChild(
|
||||
id(new AphrontFormMarkupControl())
|
||||
->setLabel('Attach To')
|
||||
->setLabel(pht('Attach To'))
|
||||
->setValue($select))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Continue'));
|
||||
->setValue(pht('Continue')));
|
||||
|
||||
$action_panel->appendChild($action_form);
|
||||
|
||||
|
@ -133,7 +136,7 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
->setRenderingReferences($refs)
|
||||
->setStandaloneURI('/differential/changeset/')
|
||||
->setDiff($diff)
|
||||
->setTitle('Diff '.$diff->getID())
|
||||
->setTitle(pht('Diff %d', $diff->getID()))
|
||||
->setUser($request->getUser());
|
||||
|
||||
return $this->buildStandardPageResponse(
|
||||
|
@ -146,7 +149,7 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
$details->render(),
|
||||
)),
|
||||
array(
|
||||
'title' => 'Diff View',
|
||||
'title' => pht('Diff View'),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ final class DifferentialRevisionEditController extends DifferentialController {
|
|||
$error_view = null;
|
||||
if ($errors) {
|
||||
$error_view = id(new AphrontErrorView())
|
||||
->setTitle('Form Errors')
|
||||
->setTitle(pht('Form Errors'))
|
||||
->setErrors($errors);
|
||||
}
|
||||
|
||||
|
@ -103,13 +103,13 @@ final class DifferentialRevisionEditController extends DifferentialController {
|
|||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormTextAreaControl())
|
||||
->setLabel('Comments')
|
||||
->setLabel(pht('Comments'))
|
||||
->setName('comments')
|
||||
->setCaption("Explain what's new in this diff.")
|
||||
->setCaption(pht("Explain what's new in this diff."))
|
||||
->setValue($request->getStr('comments')))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Save'))
|
||||
->setValue(pht('Save')))
|
||||
->appendChild(
|
||||
id(new AphrontFormDividerControl()));
|
||||
}
|
||||
|
@ -134,21 +134,22 @@ final class DifferentialRevisionEditController extends DifferentialController {
|
|||
$panel = new AphrontPanelView();
|
||||
if ($revision->getID()) {
|
||||
if ($diff) {
|
||||
$panel->setHeader('Update Differential Revision');
|
||||
$panel->setHeader(pht('Update Differential Revision'));
|
||||
} else {
|
||||
$panel->setHeader('Edit Differential Revision');
|
||||
$panel->setHeader(pht('Edit Differential Revision'));
|
||||
}
|
||||
} else {
|
||||
$panel->setHeader('Create New Differential Revision');
|
||||
$panel->setHeader(pht('Create New Differential Revision'));
|
||||
}
|
||||
|
||||
$panel->appendChild($form);
|
||||
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
|
||||
$panel->setNoBackground();
|
||||
|
||||
return $this->buildStandardPageResponse(
|
||||
array($error_view, $panel),
|
||||
array(
|
||||
'title' => 'Edit Differential Revision',
|
||||
'title' => pht('Edit Differential Revision'),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -101,9 +101,9 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
// the viewing user's). Show a warning instead.
|
||||
$warning = new AphrontErrorView();
|
||||
$warning->setSeverity(AphrontErrorView::SEVERITY_WARNING);
|
||||
$warning->setTitle('User Required');
|
||||
$warning->setTitle(pht('User Required'));
|
||||
$warning->appendChild(
|
||||
'This filter requires that a user be specified above.');
|
||||
pht('This filter requires that a user be specified above.'));
|
||||
$panels[] = $warning;
|
||||
} else {
|
||||
$query = $this->buildQuery($this->filter, $params);
|
||||
|
@ -173,7 +173,7 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
->addHiddenInput('order', $params['order'])
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Filter Revisions'));
|
||||
->setValue(pht('Filter Revisions')));
|
||||
|
||||
$filter_view = new AphrontListFilterView();
|
||||
$filter_view->appendChild($filter_form);
|
||||
|
@ -198,20 +198,20 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
return $this->buildApplicationPage(
|
||||
$side_nav,
|
||||
array(
|
||||
'title' => 'Differential Home',
|
||||
'title' => pht('Differential Home'),
|
||||
));
|
||||
}
|
||||
|
||||
private function getFilters() {
|
||||
return array(
|
||||
array(null, 'User Revisions'),
|
||||
array('active', 'Active'),
|
||||
array('revisions', 'Revisions'),
|
||||
array('reviews', 'Reviews'),
|
||||
array('subscribed', 'Subscribed'),
|
||||
array('drafts', 'Draft Reviews'),
|
||||
array(null, 'All Revisions'),
|
||||
array('all', 'All'),
|
||||
array(null, pht('User Revisions')),
|
||||
array('active', pht('Active')),
|
||||
array('revisions', pht('Revisions')),
|
||||
array('reviews', pht('Reviews')),
|
||||
array('subscribed', pht('Subscribed')),
|
||||
array('drafts', pht('Draft Reviews')),
|
||||
array(null, pht('All Revisions')),
|
||||
array('all', pht('All')),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -328,18 +328,18 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
|
||||
if ($control == 'subscriber') {
|
||||
$source = '/typeahead/common/allmailable/';
|
||||
$label = 'View Subscribers';
|
||||
$label = pht('View Subscribers');
|
||||
} else {
|
||||
$source = '/typeahead/common/accounts/';
|
||||
switch ($this->filter) {
|
||||
case 'revisions':
|
||||
$label = 'Authors';
|
||||
$label = pht('Authors');
|
||||
break;
|
||||
case 'reviews':
|
||||
$label = 'Reviewers';
|
||||
$label = pht('Reviewers');
|
||||
break;
|
||||
default:
|
||||
$label = 'View Users';
|
||||
$label = pht('View Users');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -353,10 +353,10 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
case 'participants':
|
||||
switch ($this->filter) {
|
||||
case 'revisions':
|
||||
$label = 'Reviewers';
|
||||
$label = pht('Reviewers');
|
||||
break;
|
||||
case 'reviews':
|
||||
$label = 'Authors';
|
||||
$label = pht('Authors');
|
||||
break;
|
||||
}
|
||||
$value = mpull(
|
||||
|
@ -370,26 +370,26 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
|
||||
case 'status':
|
||||
return id(new AphrontFormToggleButtonsControl())
|
||||
->setLabel('Status')
|
||||
->setLabel(pht('Status'))
|
||||
->setValue($params['status'])
|
||||
->setBaseURI($uri, 'status')
|
||||
->setButtons(
|
||||
array(
|
||||
'all' => 'All',
|
||||
'open' => 'Open',
|
||||
'all' => pht('All'),
|
||||
'open' => pht('Open'),
|
||||
'closed' => pht('Closed'),
|
||||
'abandoned' => 'Abandoned',
|
||||
'abandoned' => pht('Abandoned'),
|
||||
));
|
||||
|
||||
case 'order':
|
||||
return id(new AphrontFormToggleButtonsControl())
|
||||
->setLabel('Order')
|
||||
->setLabel(pht('Order'))
|
||||
->setValue($params['order'])
|
||||
->setBaseURI($uri, 'order')
|
||||
->setButtons(
|
||||
array(
|
||||
'modified' => 'Updated',
|
||||
'created' => 'Created',
|
||||
'modified' => pht('Updated'),
|
||||
'created' => pht('Created'),
|
||||
));
|
||||
|
||||
default:
|
||||
|
@ -444,7 +444,7 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
->setRevisions($active)
|
||||
->loadAssets();
|
||||
$views[] = array(
|
||||
'title' => 'Action Required',
|
||||
'title' => pht('Action Required'),
|
||||
'view' => $view,
|
||||
);
|
||||
|
||||
|
@ -463,7 +463,7 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
->setUser($user);
|
||||
|
||||
$views[] = array(
|
||||
'title' => 'Flagged Revisions',
|
||||
'title' => pht('Flagged Revisions'),
|
||||
'view' => $view,
|
||||
'special' => true,
|
||||
);
|
||||
|
@ -474,7 +474,7 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
->setRevisions($waiting)
|
||||
->loadAssets();
|
||||
$views[] = array(
|
||||
'title' => 'Waiting On Others',
|
||||
'title' => pht('Waiting On Others'),
|
||||
'view' => $view,
|
||||
);
|
||||
break;
|
||||
|
@ -484,10 +484,10 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
case 'drafts':
|
||||
case 'all':
|
||||
$titles = array(
|
||||
'revisions' => 'Revisions by Author',
|
||||
'reviews' => 'Revisions by Reviewer',
|
||||
'subscribed' => 'Revisions by Subscriber',
|
||||
'all' => 'Revisions',
|
||||
'revisions' => pht('Revisions by Author'),
|
||||
'reviews' => pht('Revisions by Reviewer'),
|
||||
'subscribed' => pht('Revisions by Subscriber'),
|
||||
'all' => pht('Revisions'),
|
||||
);
|
||||
$view = id(clone $template)
|
||||
->setRevisions($revisions)
|
||||
|
@ -504,5 +504,4 @@ final class DifferentialRevisionListController extends DifferentialController {
|
|||
return $views;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ final class DifferentialRevisionStatsController extends DifferentialController {
|
|||
$filter_form->appendChild(
|
||||
$this->renderControl($params['phid'], $handles));
|
||||
$filter_form->appendChild(id(new AphrontFormSubmitControl())
|
||||
->setValue('Filter Revisions'));
|
||||
->setValue(pht('Filter Revisions')));
|
||||
|
||||
$side_nav->appendChild($filter_form);
|
||||
|
||||
|
@ -127,7 +127,7 @@ final class DifferentialRevisionStatsController extends DifferentialController {
|
|||
$diffs = $this->loadDiffs($revisions);
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader('Differential rate analysis');
|
||||
$panel->setHeader(pht('Differential rate analysis'));
|
||||
$panel->appendChild(
|
||||
id(new DifferentialRevisionStatsView())
|
||||
->setComments($comments)
|
||||
|
@ -144,7 +144,7 @@ final class DifferentialRevisionStatsController extends DifferentialController {
|
|||
return $this->buildStandardPageResponse(
|
||||
$side_nav,
|
||||
array(
|
||||
'title' => 'Differential statistics',
|
||||
'title' => pht('Differential Statistics'),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ final class DifferentialRevisionStatsController extends DifferentialController {
|
|||
}
|
||||
return id(new AphrontFormTokenizerControl())
|
||||
->setDatasource('/typeahead/common/users/')
|
||||
->setLabel('View User')
|
||||
->setLabel(pht('View User'))
|
||||
->setName('view_user')
|
||||
->setValue($value)
|
||||
->setLimit(1);
|
||||
|
|
|
@ -150,7 +150,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
if (!$has_live_reviewer) {
|
||||
$reviewer_warning = new AphrontErrorView();
|
||||
$reviewer_warning->setSeverity(AphrontErrorView::SEVERITY_WARNING);
|
||||
$reviewer_warning->setTitle('No Active Reviewers');
|
||||
$reviewer_warning->setTitle(pht('No Active Reviewers'));
|
||||
if ($revision->getReviewers()) {
|
||||
$reviewer_warning->appendChild(
|
||||
phutil_render_tag(
|
||||
|
@ -181,8 +181,8 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$warning->setTitle('Very Large Diff');
|
||||
$warning->setSeverity(AphrontErrorView::SEVERITY_WARNING);
|
||||
$warning->appendChild(
|
||||
"<p>This diff is very large and affects {$count} files. Load ".
|
||||
"each file individually. ".
|
||||
'<p>'.pht('This diff is very large and affects %d files. Load '.
|
||||
'each file individually. ', $count).
|
||||
"<strong>".
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
|
@ -191,7 +191,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
->alter('large', 'true')
|
||||
->setFragment('toc'),
|
||||
),
|
||||
'Show All Files Inline').
|
||||
pht('Show All Files Inline')).
|
||||
"</strong>");
|
||||
$warning = $warning->render();
|
||||
|
||||
|
@ -483,7 +483,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$links[] = array(
|
||||
'icon' => 'edit',
|
||||
'href' => "/differential/revision/edit/{$revision_id}/",
|
||||
'name' => 'Edit Revision',
|
||||
'name' => pht('Edit Revision'),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -494,14 +494,14 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$links[] = array(
|
||||
'icon' => $viewer_is_cc ? 'subscribe-delete' : 'subscribe-add',
|
||||
'href' => "/differential/subscribe/{$action}/{$revision_id}/",
|
||||
'name' => $viewer_is_cc ? 'Unsubscribe' : 'Subscribe',
|
||||
'name' => $viewer_is_cc ? pht('Unsubscribe') : pht('Subscribe'),
|
||||
'instant' => true,
|
||||
'sigil' => 'workflow',
|
||||
);
|
||||
} else {
|
||||
$links[] = array(
|
||||
'icon' => 'subscribe-auto',
|
||||
'name' => 'Automatically Subscribed',
|
||||
'name' => pht('Automatically Subscribed'),
|
||||
'disabled' => true,
|
||||
);
|
||||
}
|
||||
|
@ -511,7 +511,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
|
||||
$links[] = array(
|
||||
'icon' => 'link',
|
||||
'name' => 'Edit Dependencies',
|
||||
'name' => pht('Edit Dependencies'),
|
||||
'href' => "/search/attach/{$revision_phid}/DREV/dependencies/",
|
||||
'sigil' => 'workflow',
|
||||
);
|
||||
|
@ -519,7 +519,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
if (PhabricatorEnv::getEnvConfig('maniphest.enabled')) {
|
||||
$links[] = array(
|
||||
'icon' => 'attach',
|
||||
'name' => 'Edit Maniphest Tasks',
|
||||
'name' => pht('Edit Maniphest Tasks'),
|
||||
'href' => "/search/attach/{$revision_phid}/TASK/",
|
||||
'sigil' => 'workflow',
|
||||
);
|
||||
|
@ -528,14 +528,14 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
if ($user->getIsAdmin()) {
|
||||
$links[] = array(
|
||||
'icon' => 'file',
|
||||
'name' => 'MetaMTA Transcripts',
|
||||
'name' => pht('MetaMTA Transcripts'),
|
||||
'href' => "/mail/?phid={$revision_phid}",
|
||||
);
|
||||
}
|
||||
|
||||
$links[] = array(
|
||||
'icon' => 'file',
|
||||
'name' => 'Herald Transcripts',
|
||||
'name' => pht('Herald Transcripts'),
|
||||
'href' => "/herald/transcript/?phid={$revision_phid}",
|
||||
);
|
||||
}
|
||||
|
@ -543,7 +543,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$request_uri = $this->getRequest()->getRequestURI();
|
||||
$links[] = array(
|
||||
'icon' => 'download',
|
||||
'name' => 'Download Raw Diff',
|
||||
'name' => pht('Download Raw Diff'),
|
||||
'href' => $request_uri->alter('download', 'true')
|
||||
);
|
||||
|
||||
|
|
|
@ -25,16 +25,16 @@ final class DifferentialSubscribeController extends DifferentialController {
|
|||
|
||||
switch ($this->action) {
|
||||
case 'add':
|
||||
$button = 'Subscribe';
|
||||
$title = 'Subscribe to Revision';
|
||||
$prompt = 'Really subscribe to this revision?';
|
||||
$button = pht('Subscribe');
|
||||
$title = pht('Subscribe to Revision');
|
||||
$prompt = pht('Really subscribe to this revision?');
|
||||
break;
|
||||
case 'rem':
|
||||
$button = 'Unsubscribe';
|
||||
$title = 'Unsubscribe from Revision';
|
||||
$prompt = 'Really unsubscribe from this revision? Herald will '.
|
||||
$button = pht('Unsubscribe');
|
||||
$title = pht('Unsubscribe from Revision');
|
||||
$prompt = pht('Really unsubscribe from this revision? Herald will '.
|
||||
'not resubscribe you to a revision you unsubscribe '.
|
||||
'from.';
|
||||
'from.');
|
||||
break;
|
||||
default:
|
||||
return new Aphront400Response();
|
||||
|
|
|
@ -79,10 +79,11 @@ abstract class DiffusionController extends PhabricatorController {
|
|||
// TODO: URI encoding might need to be sorted out for this link.
|
||||
|
||||
$nav->addFilter(
|
||||
'',
|
||||
"Search Owners \xE2\x86\x97",
|
||||
'/owners/view/search/'.
|
||||
'?repository='.phutil_escape_uri($drequest->getCallsign()).
|
||||
'&path='.phutil_escape_uri('/'.$drequest->getPath()),
|
||||
"Search Owners \xE2\x86\x97");
|
||||
'&path='.phutil_escape_uri('/'.$drequest->getPath()));
|
||||
|
||||
return $nav;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ final class PhabricatorApplicationMacro extends PhabricatorApplication {
|
|||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return 'Image Macros and Memes';
|
||||
return pht('Image Macros and Memes');
|
||||
}
|
||||
|
||||
public function getIconName() {
|
||||
|
|
|
@ -8,14 +8,18 @@ abstract class PhabricatorMacroController
|
|||
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
||||
|
||||
if ($for_app) {
|
||||
$nav->addLabel('Create');
|
||||
$nav->addFilter('', 'Create Macro', $this->getApplicationURI('/create/'));
|
||||
$nav->addLabel(pht('Create'));
|
||||
$nav->addFilter('',
|
||||
pht('Create Macro'),
|
||||
$this->getApplicationURI('/create/'));
|
||||
}
|
||||
|
||||
$nav->addLabel('Macros');
|
||||
$nav->addFilter('/', 'All Macros');
|
||||
$nav->addLabel(pht('Macros'));
|
||||
$nav->addFilter('/', pht('All Macros'));
|
||||
if ($has_search) {
|
||||
$nav->addFilter('search', 'Search', $this->getRequest()->getRequestURI());
|
||||
$nav->addFilter('search',
|
||||
pht('Search'),
|
||||
$this->getRequest()->getRequestURI());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,13 +42,13 @@ final class PhabricatorMacroDisableController
|
|||
$dialog = new AphrontDialogView();
|
||||
$dialog
|
||||
->setUser($request->getUser())
|
||||
->setTitle('Really disable macro?')
|
||||
->setTitle(pht('Really disable macro?'))
|
||||
->appendChild(
|
||||
'<p>Really disable the much-beloved image macro "'.
|
||||
phutil_escape_html($macro->getName()).'"? It will be sorely missed.'.
|
||||
'<p>'.pht('Really disable the much-beloved image macro %s? '.
|
||||
'It will be sorely missed.', phutil_escape_html($macro->getName())).
|
||||
'</p>')
|
||||
->setSubmitURI($this->getApplicationURI('/disable/'.$this->id.'/'))
|
||||
->addSubmitButton('Disable')
|
||||
->addSubmitButton(pht('Disable'))
|
||||
->addCancelButton($view_uri);
|
||||
|
||||
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||
|
|
|
@ -37,13 +37,13 @@ final class PhabricatorMacroEditController
|
|||
$macro->setName($new_name);
|
||||
|
||||
if (!strlen($macro->getName())) {
|
||||
$errors[] = 'Macro name is required.';
|
||||
$e_name = 'Required';
|
||||
$errors[] = pht('Macro name is required.');
|
||||
$e_name = pht('Required');
|
||||
} else if (!preg_match('/^[a-z0-9_-]{3,}$/', $macro->getName())) {
|
||||
$errors[] = 'Macro must be at least three characters long and '.
|
||||
$errors[] = pht('Macro must be at least three characters long and '.
|
||||
'contain only lowercase letters, digits, hyphen and '.
|
||||
'underscore.';
|
||||
$e_name = 'Invalid';
|
||||
'underscore.');
|
||||
$e_name = pht('Invalid');
|
||||
} else {
|
||||
$e_name = null;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ final class PhabricatorMacroEditController
|
|||
}
|
||||
|
||||
if (!$macro->getID() && !$file) {
|
||||
$errors[] = 'You must upload an image to create a macro.';
|
||||
$errors[] = pht('You must upload an image to create a macro.');
|
||||
$e_file = pht('Required');
|
||||
}
|
||||
|
||||
|
@ -110,15 +110,15 @@ final class PhabricatorMacroEditController
|
|||
return id(new AphrontRedirectResponse())->setURI($view_uri);
|
||||
} catch (AphrontQueryDuplicateKeyException $ex) {
|
||||
throw $ex;
|
||||
$errors[] = 'Macro name is not unique!';
|
||||
$e_name = 'Duplicate';
|
||||
$errors[] = pht('Macro name is not unique!');
|
||||
$e_name = pht('Duplicate');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($errors) {
|
||||
$error_view = new AphrontErrorView();
|
||||
$error_view->setTitle('Form Errors');
|
||||
$error_view->setTitle(pht('Form Errors'));
|
||||
$error_view->setErrors($errors);
|
||||
} else {
|
||||
$error_view = null;
|
||||
|
@ -141,10 +141,11 @@ final class PhabricatorMacroEditController
|
|||
->setEncType('multipart/form-data')
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel('Name')
|
||||
->setLabel(pht('Name'))
|
||||
->setName('name')
|
||||
->setValue($macro->getName())
|
||||
->setCaption('This word or phrase will be replaced with the image.')
|
||||
->setCaption(
|
||||
pht('This word or phrase will be replaced with the image.'))
|
||||
->setError($e_name));
|
||||
|
||||
if (!$macro->getID()) {
|
||||
|
@ -158,7 +159,7 @@ final class PhabricatorMacroEditController
|
|||
$form->addHiddenInput('phid', $current_file->getPHID());
|
||||
$form->appendChild(
|
||||
id(new AphrontFormMarkupControl())
|
||||
->setLabel('Selected File')
|
||||
->setLabel(pht('Selected File'))
|
||||
->setValue($current_file_view));
|
||||
|
||||
$other_label = pht('Change File');
|
||||
|
@ -223,11 +224,11 @@ final class PhabricatorMacroEditController
|
|||
->setUser($request->getUser())
|
||||
->appendChild(
|
||||
id(new AphrontFormFileControl())
|
||||
->setLabel('File')
|
||||
->setLabel(pht('File'))
|
||||
->setName('file'))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Upload File'));
|
||||
->setValue(pht('Upload File')));
|
||||
|
||||
$upload = array($upload_header, $upload_form);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,11 @@ final class PhabricatorMacroListController
|
|||
$nodata = pht('There are no image macros yet.');
|
||||
}
|
||||
|
||||
$author_phids = array_combine($authors, $authors);
|
||||
if ($authors) {
|
||||
$author_phids = array_combine($authors, $authors);
|
||||
} else {
|
||||
$author_phids = array();
|
||||
}
|
||||
|
||||
$file_phids = mpull($macros, 'getFilePHID');
|
||||
|
||||
|
@ -86,7 +90,7 @@ final class PhabricatorMacroListController
|
|||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setName('name')
|
||||
->setLabel('Name')
|
||||
->setLabel(pht('Name'))
|
||||
->setValue($filter))
|
||||
->appendChild(
|
||||
id(new AphrontFormTokenizerControl())
|
||||
|
@ -96,7 +100,7 @@ final class PhabricatorMacroListController
|
|||
->setValue(mpull($author_handles, 'getFullName')))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Filter Image Macros'));
|
||||
->setValue(pht('Filter Image Macros')));
|
||||
|
||||
$filter_view = new AphrontListFilterView();
|
||||
$filter_view->appendChild($filter_form);
|
||||
|
@ -128,7 +132,7 @@ final class PhabricatorMacroListController
|
|||
phutil_render_tag(
|
||||
'div',
|
||||
array(),
|
||||
'Created on '.$datetime));
|
||||
pht('Created on %s', $datetime)));
|
||||
}
|
||||
$item->setURI($this->getApplicationURI('/view/'.$macro->getID().'/'));
|
||||
$item->setHeader($macro->getName());
|
||||
|
@ -155,7 +159,7 @@ final class PhabricatorMacroListController
|
|||
$nav,
|
||||
array(
|
||||
'device' => true,
|
||||
'title' => 'Image Macros',
|
||||
'title' => pht('Image Macros'),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,21 +112,21 @@ final class PhabricatorMacroViewController
|
|||
$view->setObject($macro);
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName('Edit Macro')
|
||||
->setName(pht('Edit Macro'))
|
||||
->setHref($this->getApplicationURI('/edit/'.$macro->getID().'/'))
|
||||
->setIcon('edit'));
|
||||
|
||||
if ($macro->getIsDisabled()) {
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName('Restore Macro')
|
||||
->setName(pht('Restore Macro'))
|
||||
->setHref($this->getApplicationURI('/disable/'.$macro->getID().'/'))
|
||||
->setWorkflow(true)
|
||||
->setIcon('undo'));
|
||||
} else {
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName('Disable Macro')
|
||||
->setName(pht('Disable Macro'))
|
||||
->setHref($this->getApplicationURI('/disable/'.$macro->getID().'/'))
|
||||
->setWorkflow(true)
|
||||
->setIcon('delete'));
|
||||
|
|
|
@ -26,6 +26,8 @@ final class PhabricatorApplicationApplications extends PhabricatorApplication {
|
|||
return array(
|
||||
'/applications/' => array(
|
||||
'' => 'PhabricatorApplicationsListController',
|
||||
'view/(?P<application>\w+)/' =>
|
||||
'PhabricatorApplicationDetailViewController',
|
||||
|
||||
),
|
||||
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorApplicationDetailViewController
|
||||
extends PhabricatorApplicationsController{
|
||||
|
||||
private $application;
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->application = $data['application'];
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
||||
$selected = null;
|
||||
$applications = PhabricatorApplication::getAllInstalledApplications();
|
||||
|
||||
foreach ($applications as $application) {
|
||||
if (get_class($application) == $this->application) {
|
||||
$selected = $application;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$selected) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$title = $selected->getName();
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName(pht('Applications'))
|
||||
->setHref($this->getApplicationURI()));
|
||||
|
||||
$properties = $this->buildPropertyView($selected);
|
||||
$actions = $this->buildActionView($user);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
id(new PhabricatorHeaderView())->setHeader($title),
|
||||
$actions,
|
||||
$properties,
|
||||
),
|
||||
array(
|
||||
'title' => $title,
|
||||
'device' => true,
|
||||
));
|
||||
}
|
||||
|
||||
private function buildPropertyView(PhabricatorApplication $selected) {
|
||||
$properties = new PhabricatorPropertyListView();
|
||||
|
||||
$properties->addProperty(
|
||||
pht('Status'), pht('Installed'));
|
||||
|
||||
$properties->addProperty(
|
||||
pht('Description'), $selected->getShortDescription());
|
||||
|
||||
return $properties;
|
||||
}
|
||||
|
||||
private function buildActionView(PhabricatorUser $user) {
|
||||
|
||||
return id(new PhabricatorActionListView())
|
||||
->setUser($user)
|
||||
->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Uninstall'))
|
||||
->setIcon('delete')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -45,16 +45,16 @@ final class PhabricatorApplicationsListController
|
|||
|
||||
|
||||
private function buildInstalledApplicationsList(array $applications) {
|
||||
$list = new PhabricatorObjectItemListView();
|
||||
|
||||
$list = new PhabricatorObjectItemListView();
|
||||
foreach ($applications as $applications) {
|
||||
foreach ($applications as $application) {
|
||||
$item = id(new PhabricatorObjectItemView())
|
||||
->setHeader($applications->getName())
|
||||
->setHeader($application->getName())
|
||||
->setHref('/applications/view/'.get_class($application).'/')
|
||||
->addAttribute(
|
||||
phutil_escape_html($applications->getShortDescription()));
|
||||
phutil_escape_html($application->getShortDescription()));
|
||||
$list->addItem($item);
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,9 @@ DarkConsole (see @{article:Using DarkConsole}) and other places.
|
|||
The exception is tables which share the same schema over different databases
|
||||
such as `edge`.
|
||||
|
||||
We use lower-case table names with words separated by underscores.
|
||||
We use lower-case table names with words separated by underscores. The reason is
|
||||
that MySQL can be configured (with `lower_case_table_names`) to lower-case the
|
||||
table names anyway.
|
||||
|
||||
= Column Names =
|
||||
|
||||
|
@ -152,7 +154,7 @@ add your patch to @{method@phabricator:PhabricatorBuiltinPatchList::getPatches}.
|
|||
# Run `bin/storage/upgrade`.
|
||||
|
||||
It is also possible to create more complex patches in PHP for data migration
|
||||
(due to schema changes or otherwise.) However, the schema changes themselves
|
||||
(due to schema changes or otherwise.) However, the schema changes themselves
|
||||
should be done in separate `.sql` files. Order can be guaranteed by editing
|
||||
`src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php`
|
||||
appropriately.
|
||||
|
|
|
@ -419,6 +419,7 @@ final class PhabricatorMarkupEngine {
|
|||
|
||||
if ($options['macros']) {
|
||||
$rules[] = new PhabricatorRemarkupRuleImageMacro();
|
||||
$rules[] = new PhabricatorRemarkupRuleMeme();
|
||||
}
|
||||
|
||||
$rules[] = new PhabricatorRemarkupRuleMention();
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @group markup
|
||||
*/
|
||||
final class PhabricatorRemarkupRuleMeme
|
||||
extends PhutilRemarkupRule {
|
||||
|
||||
private $images;
|
||||
|
||||
public function apply($text) {
|
||||
return preg_replace_callback(
|
||||
'@{meme,([^}]+)}$@m',
|
||||
array($this, 'markupMeme'),
|
||||
$text);
|
||||
}
|
||||
|
||||
public function markupMeme($matches) {
|
||||
$options = array(
|
||||
'src' => null,
|
||||
'above' => null,
|
||||
'below' => null,
|
||||
);
|
||||
|
||||
$parser = new PhutilSimpleOptions();
|
||||
$options = $parser->parse($matches[1]) + $options;
|
||||
|
||||
$uri = id(new PhutilURI('/macro/meme/'))
|
||||
->alter('macro', $options['src'])
|
||||
->alter('uppertext', $options['above'])
|
||||
->alter('lowertext', $options['below']);
|
||||
|
||||
$img = phutil_render_tag(
|
||||
'img',
|
||||
array(
|
||||
'src' => (string)$uri,
|
||||
));
|
||||
|
||||
return $this->getEngine()->storeText($img);
|
||||
}
|
||||
|
||||
}
|
|
@ -49,6 +49,12 @@ final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl {
|
|||
'table' => array(
|
||||
'tip' => pht('Table'),
|
||||
),
|
||||
array(
|
||||
'spacer' => true,
|
||||
),
|
||||
'meme' => array(
|
||||
'tip' => pht('Meme'),
|
||||
),
|
||||
'help' => array(
|
||||
'tip' => pht('Help'),
|
||||
'align' => 'right',
|
||||
|
|
|
@ -59,6 +59,17 @@ JX.behavior('phabricator-remarkup-assist', function(config) {
|
|||
case 'table':
|
||||
update(area, (r.start == 0 ? '' : '\n\n') + '| ', sel || 'data', ' |');
|
||||
break;
|
||||
case 'meme':
|
||||
new JX.Workflow('/macro/meme/create/')
|
||||
.setHandler(function(response) {
|
||||
update(
|
||||
area,
|
||||
'',
|
||||
sel,
|
||||
(r.start == 0 ? '' : '\n\n') + response.text + '\n\n');
|
||||
})
|
||||
.start();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue