Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15336138
D11984.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
7 KB
Referenced Files
None
Subscribers
None
D11984.diff
View Options
diff --git a/src/applications/repository/controller/PhabricatorRepositoryArcanistProjectDeleteController.php b/src/applications/repository/controller/PhabricatorRepositoryArcanistProjectDeleteController.php
--- a/src/applications/repository/controller/PhabricatorRepositoryArcanistProjectDeleteController.php
+++ b/src/applications/repository/controller/PhabricatorRepositoryArcanistProjectDeleteController.php
@@ -27,13 +27,13 @@
$dialog = new AphrontDialogView();
$dialog
->setUser($request->getUser())
- ->setTitle('Really delete this arcanist project?')
- ->appendChild(hsprintf(
- '<p>Really delete the "%s" arcanist project? '.
- 'This operation can not be undone.</p>',
+ ->setTitle(pht('Really delete this arcanist project?'))
+ ->appendChild(pht(
+ 'Really delete the "%s" arcanist project? '.
+ 'This operation can not be undone.',
$arc_project->getName()))
->setSubmitURI('/repository/project/delete/'.$this->id.'/')
- ->addSubmitButton('Delete Arcanist Project')
+ ->addSubmitButton(pht('Delete Arcanist Project'))
->addCancelButton('/repository/');
return id(new AphrontDialogResponse())->setDialog($dialog);
diff --git a/src/applications/repository/controller/PhabricatorRepositoryArcanistProjectEditController.php b/src/applications/repository/controller/PhabricatorRepositoryArcanistProjectEditController.php
--- a/src/applications/repository/controller/PhabricatorRepositoryArcanistProjectEditController.php
+++ b/src/applications/repository/controller/PhabricatorRepositoryArcanistProjectEditController.php
@@ -71,7 +71,7 @@
->setUser($user)
->appendChild(
id(new AphrontFormStaticControl())
- ->setLabel('Name')
+ ->setLabel(pht('Name'))
->setValue($project->getName()))
->appendChild(
id(new AphrontFormStaticControl())
@@ -79,13 +79,13 @@
->setValue($project->getPHID()))
->appendChild(
id(new AphrontFormSelectControl())
- ->setLabel('Repository')
+ ->setLabel(pht('Repository'))
->setOptions($repos)
->setName('repository')
->setValue($project->getRepositoryID()))
->appendChild(
id(new AphrontFormTextControl())
- ->setLabel('Indexed Languages')
+ ->setLabel(pht('Indexed Languages'))
->setName('symbolIndexLanguages')
->setCaption(pht(
'Separate with commas, for example: %s',
@@ -93,7 +93,7 @@
->setValue($langs))
->appendChild(
id(new AphrontFormTokenizerControl())
- ->setLabel('Uses Symbols From')
+ ->setLabel(pht('Uses Symbols From'))
->setName('symbolIndexProjects')
->setDatasource(new DiffusionArcanistProjectDatasource())
->setValue($uses))
@@ -102,15 +102,20 @@
->addCancelButton('/repository/')
->setValue('Save'));
- $panel = new AphrontPanelView();
- $panel->setWidth(AphrontPanelView::WIDTH_WIDE);
- $panel->setHeader('Edit Arcanist Project');
- $panel->appendChild($form);
+ $panel = new PHUIObjectBoxView();
+ $panel->setHeaderText(pht('Edit Arcanist Project'));
+ $panel->setForm($form);
- return $this->buildStandardPageResponse(
- $panel,
+ $crumbs = $this->buildApplicationCrumbs();
+ $crumbs->addTextCrumb(pht('Edit Project'));
+
+ return $this->buildApplicationPage(
+ array(
+ $crumbs,
+ $panel,
+ ),
array(
- 'title' => 'Edit Project',
+ 'title' => pht('Edit Project'),
));
}
diff --git a/src/applications/repository/controller/PhabricatorRepositoryController.php b/src/applications/repository/controller/PhabricatorRepositoryController.php
--- a/src/applications/repository/controller/PhabricatorRepositoryController.php
+++ b/src/applications/repository/controller/PhabricatorRepositoryController.php
@@ -7,18 +7,9 @@
return true;
}
- public function buildStandardPageResponse($view, array $data) {
- $page = $this->buildStandardPageView();
-
- $page->setApplicationName('Repositories');
- $page->setBaseURI('/repository/');
- $page->setTitle(idx($data, 'title'));
- $page->setGlyph('rX');
- $page->appendChild($view);
-
-
- $response = new AphrontWebpageResponse();
- return $response->setContent($page->render());
+ protected function buildApplicationCrumbs() {
+ $crumbs = parent::buildApplicationCrumbs();
+ return $crumbs;
}
}
diff --git a/src/applications/repository/controller/PhabricatorRepositoryListController.php b/src/applications/repository/controller/PhabricatorRepositoryListController.php
--- a/src/applications/repository/controller/PhabricatorRepositoryListController.php
+++ b/src/applications/repository/controller/PhabricatorRepositoryListController.php
@@ -23,7 +23,7 @@
array(
'href' => '/diffusion/'.$repo->getCallsign().'/',
),
- 'View in Diffusion');
+ pht('View in Diffusion'));
} else {
$diffusion_link = phutil_tag('em', array(), 'Not Tracked');
}
@@ -40,17 +40,18 @@
'class' => 'button small grey',
'href' => '/diffusion/'.$repo->getCallsign().'/edit/',
),
- 'Edit'),
+ pht('Edit')),
);
}
$table = new AphrontTableView($rows);
+ $table->setNoDataString(pht('No Repositories'));
$table->setHeaders(
array(
- 'Callsign',
- 'Repository',
- 'Type',
- 'Diffusion',
+ pht('Callsign'),
+ pht('Repository'),
+ pht('Type'),
+ pht('Diffusion'),
'',
));
$table->setColumnClasses(
@@ -71,13 +72,18 @@
$is_admin,
));
- $panel = new AphrontPanelView();
- $panel->setHeader('Repositories');
+ $panel = new PHUIObjectBoxView();
+ $header = new PHUIHeaderView();
+ $header->setHeader(pht('Repositories'));
if ($is_admin) {
- $panel->setCreateButton('Create New Repository', '/diffusion/new/');
+ $button = id(new PHUIButtonView())
+ ->setTag('a')
+ ->setText(pht('Create New Repository'))
+ ->setHref('/diffusion/new/');
+ $header->addActionLink($button);
}
+ $panel->setHeader($header);
$panel->appendChild($table);
- $panel->setNoBackground();
$projects = id(new PhabricatorRepositoryArcanistProject())->loadAll();
@@ -99,7 +105,7 @@
'href' => '/repository/project/edit/'.$project->getID().'/',
'class' => 'button grey small',
),
- 'Edit'),
+ pht('Edit')),
javelin_tag(
'a',
array(
@@ -107,16 +113,17 @@
'class' => 'button grey small',
'sigil' => 'workflow',
),
- 'Delete'),
+ pht('Delete')),
);
}
$project_table = new AphrontTableView($rows);
+ $project_table->setNoDataString(pht('No Arcanist Projects'));
$project_table->setHeaders(
array(
- 'Project ID',
- 'Repository',
+ pht('Project ID'),
+ pht('Repository'),
'',
'',
));
@@ -136,18 +143,21 @@
$is_admin,
));
- $project_panel = new AphrontPanelView();
- $project_panel->setHeader('Arcanist Projects');
+ $project_panel = new PHUIObjectBoxView();
+ $project_panel->setHeaderText(pht('Arcanist Projects'));
$project_panel->appendChild($project_table);
- $project_panel->setNoBackground();
- return $this->buildStandardPageResponse(
+ $crumbs = $this->buildApplicationCrumbs();
+ $crumbs->addTextCrumb(pht('Repository List'));
+
+ return $this->buildApplicationPage(
array(
+ $crumbs,
$panel,
$project_panel,
),
array(
- 'title' => 'Repository List',
+ 'title' => pht('Repository List'),
));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 9, 6:17 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7390502
Default Alt Text
D11984.diff (7 KB)
Attached To
Mode
D11984: Modernize Repositories a bit
Attached
Detach File
Event Timeline
Log In to Comment