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