mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
pht for Releeph
Summary: Went and pht'd most everything I could find, except exceptions. Fixes T3091 Test Plan: Bopped around the application, didn't seem to break anything but didn't test all flows. Should be safe. Reviewers: epriestley, edward Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T3091 Differential Revision: https://secure.phabricator.com/D5825
This commit is contained in:
parent
ff41013481
commit
8eb85683f0
13 changed files with 156 additions and 145 deletions
|
@ -3,11 +3,11 @@
|
||||||
final class PhabricatorApplicationReleeph extends PhabricatorApplication {
|
final class PhabricatorApplicationReleeph extends PhabricatorApplication {
|
||||||
|
|
||||||
public function getName() {
|
public function getName() {
|
||||||
return 'Releeph';
|
return pht('Releeph');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getShortDescription() {
|
public function getShortDescription() {
|
||||||
return 'Release Branches';
|
return pht('Release Branches');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBaseURI() {
|
public function getBaseURI() {
|
||||||
|
|
|
@ -109,7 +109,7 @@ abstract class ReleephController extends PhabricatorController {
|
||||||
public function buildStandardPageResponse($view, array $data) {
|
public function buildStandardPageResponse($view, array $data) {
|
||||||
$page = $this->buildStandardPageView();
|
$page = $this->buildStandardPageView();
|
||||||
|
|
||||||
$page->setApplicationName('Releeph');
|
$page->setApplicationName(pht('Releeph'));
|
||||||
$page->setBaseURI('/releeph/');
|
$page->setBaseURI('/releeph/');
|
||||||
$page->setTitle(idx($data, 'title'));
|
$page->setTitle(idx($data, 'title'));
|
||||||
$page->setGlyph("\xD3\x82");
|
$page->setGlyph("\xD3\x82");
|
||||||
|
|
|
@ -41,17 +41,17 @@ final class ReleephBranchAccessController extends ReleephController {
|
||||||
->setURI($origin_uri);
|
->setURI($origin_uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
$button_text = ucfirst($this->action).' Branch';
|
$button_text = pht('%s Branch', $this->action);
|
||||||
$message = hsprintf(
|
$text = pht('Really %s the branch: %s?',
|
||||||
'<p>Really %s the branch <i>%s</i>?</p>',
|
|
||||||
$this->action,
|
$this->action,
|
||||||
$rph_branch->getBasename());
|
$rph_branch->getBasename());
|
||||||
|
$message = phutil_tag('p', array(), $text);
|
||||||
|
|
||||||
|
|
||||||
$dialog = new AphrontDialogView();
|
$dialog = new AphrontDialogView();
|
||||||
$dialog
|
$dialog
|
||||||
->setUser($request->getUser())
|
->setUser($request->getUser())
|
||||||
->setTitle('Confirm')
|
->setTitle(pht('Confirm'))
|
||||||
->appendChild($message)
|
->appendChild($message)
|
||||||
->addSubmitButton($button_text)
|
->addSubmitButton($button_text)
|
||||||
->addCancelButton($origin_uri);
|
->addCancelButton($origin_uri);
|
||||||
|
|
|
@ -28,23 +28,23 @@ final class ReleephBranchCreateController extends ReleephController {
|
||||||
$branch_date_control = id(new AphrontFormDateControl())
|
$branch_date_control = id(new AphrontFormDateControl())
|
||||||
->setUser($request->getUser())
|
->setUser($request->getUser())
|
||||||
->setName('templateDate')
|
->setName('templateDate')
|
||||||
->setLabel('Date')
|
->setLabel(pht('Date'))
|
||||||
->setCaption('The date used for filling out the branch template.')
|
->setCaption(pht('The date used for filling out the branch template.'))
|
||||||
->setInitialTime(AphrontFormDateControl::TIME_START_OF_DAY);
|
->setInitialTime(AphrontFormDateControl::TIME_START_OF_DAY);
|
||||||
$branch_date = $branch_date_control->readValueFromRequest($request);
|
$branch_date = $branch_date_control->readValueFromRequest($request);
|
||||||
|
|
||||||
if ($request->isFormPost()) {
|
if ($request->isFormPost()) {
|
||||||
$cut_commit = null;
|
$cut_commit = null;
|
||||||
if (!$cut_point) {
|
if (!$cut_point) {
|
||||||
$e_cut = 'Required';
|
$e_cut = pht('Required');
|
||||||
$errors[] = 'You must give a branch cut point';
|
$errors[] = pht('You must give a branch cut point');
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
$finder = id(new ReleephCommitFinder())
|
$finder = id(new ReleephCommitFinder())
|
||||||
->setReleephProject($releeph_project);
|
->setReleephProject($releeph_project);
|
||||||
$cut_commit = $finder->fromPartial($cut_point);
|
$cut_commit = $finder->fromPartial($cut_point);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$e_cut = 'Invalid';
|
$e_cut = pht('Invalid');
|
||||||
$errors[] = $e->getMessage();
|
$errors[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,39 +67,40 @@ final class ReleephBranchCreateController extends ReleephController {
|
||||||
if ($errors) {
|
if ($errors) {
|
||||||
$error_view = new AphrontErrorView();
|
$error_view = new AphrontErrorView();
|
||||||
$error_view->setErrors($errors);
|
$error_view->setErrors($errors);
|
||||||
$error_view->setTitle('Form Errors');
|
$error_view->setTitle(pht('Form Errors'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$form = id(new AphrontFormView())
|
$form = id(new AphrontFormView())
|
||||||
->setUser($request->getUser())
|
->setUser($request->getUser())
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextControl())
|
id(new AphrontFormTextControl())
|
||||||
->setLabel('Symbolic name')
|
->setLabel(pht('Symbolic Name'))
|
||||||
->setName('symbolicName')
|
->setName('symbolicName')
|
||||||
->setValue($symbolic_name)
|
->setValue($symbolic_name)
|
||||||
->setCaption('Mutable alternate name, for easy reference, '.
|
->setCaption(pht('Mutable alternate name, for easy reference, '.
|
||||||
'(e.g. "LATEST")'))
|
'(e.g. "LATEST")')))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextControl())
|
id(new AphrontFormTextControl())
|
||||||
->setLabel('Cut point')
|
->setLabel(pht('Cut point'))
|
||||||
->setName('cutPoint')
|
->setName('cutPoint')
|
||||||
->setValue($cut_point)
|
->setValue($cut_point)
|
||||||
->setError($e_cut)
|
->setError($e_cut)
|
||||||
->setCaption(
|
->setCaption(
|
||||||
'A commit ID for your repo type, or a Diffusion ID like "rE123"'))
|
pht('A commit ID for your repo type, or a '.
|
||||||
|
'Diffusion ID like "rE123"')))
|
||||||
->appendChild($branch_date_control)
|
->appendChild($branch_date_control)
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->setValue('Cut Branch')
|
->setValue(pht('Cut Branch'))
|
||||||
->addCancelButton($releeph_project->getURI()));
|
->addCancelButton($releeph_project->getURI()));
|
||||||
|
|
||||||
$panel = id(new AphrontPanelView())
|
$panel = id(new AphrontPanelView())
|
||||||
->appendChild($form)
|
->appendChild($form)
|
||||||
->setHeader('Cut Branch')
|
->setHeader(pht('Cut Branch'))
|
||||||
->setWidth(AphrontPanelView::WIDTH_FORM);
|
->setWidth(AphrontPanelView::WIDTH_FORM);
|
||||||
|
|
||||||
return $this->buildStandardPageResponse(
|
return $this->buildStandardPageResponse(
|
||||||
array($error_view, $panel),
|
array($error_view, $panel),
|
||||||
array('title' => 'Cut new branch'));
|
array('title' => pht('Cut new branch')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,10 @@ final class ReleephBranchEditController extends ReleephController {
|
||||||
$branch_name);
|
$branch_name);
|
||||||
|
|
||||||
if ($existing_with_same_branch_name) {
|
if ($existing_with_same_branch_name) {
|
||||||
$errors[] = sprintf(
|
$errors[] = pht(
|
||||||
"The branch name %s is currently taken. Please use another name. ",
|
"The branch name %s is currently taken. Please use another name. ",
|
||||||
$branch_name);
|
$branch_name);
|
||||||
$e_existing_with_same_branch_name = 'Error';
|
$e_existing_with_same_branch_name = pht('Error');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$errors) {
|
if (!$errors) {
|
||||||
|
@ -73,52 +73,53 @@ final class ReleephBranchEditController extends ReleephController {
|
||||||
->setUser($request->getUser())
|
->setUser($request->getUser())
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormStaticControl())
|
id(new AphrontFormStaticControl())
|
||||||
->setLabel('Branch name')
|
->setLabel(pht('Branch Name'))
|
||||||
->setValue($branch_name))
|
->setValue($branch_name))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormMarkupControl())
|
id(new AphrontFormMarkupControl())
|
||||||
->setLabel('Cut point')
|
->setLabel(pht('Cut Point'))
|
||||||
->setValue($handles[$cut_commit_phid]->renderLink()))
|
->setValue($handles[$cut_commit_phid]->renderLink()))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormMarkupControl())
|
id(new AphrontFormMarkupControl())
|
||||||
->setLabel('Created by')
|
->setLabel(pht('Created By'))
|
||||||
->setValue($handles[$creator_phid]->renderLink()))
|
->setValue($handles[$creator_phid]->renderLink()))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextControl)
|
id(new AphrontFormTextControl)
|
||||||
->setLabel('Symbolic Name')
|
->setLabel(pht('Symbolic Name'))
|
||||||
->setName('symbolicName')
|
->setName('symbolicName')
|
||||||
->setValue($symbolic_name)
|
->setValue($symbolic_name)
|
||||||
->setCaption('Mutable alternate name, for easy reference, '.
|
->setCaption(pht('Mutable alternate name, for easy reference, '.
|
||||||
'(e.g. "LATEST")'))
|
'(e.g. "LATEST")')))
|
||||||
->appendChild(hsprintf(
|
->appendChild(phutil_tag(
|
||||||
'<br>' .
|
'p',
|
||||||
'In dire situations where the branch name is wrong, ' .
|
array(),
|
||||||
'you can edit it in the database by changing the field below. ' .
|
pht('In dire situations where the branch name is wrong, ' .
|
||||||
'If you do this, it is very important that you change your ' .
|
'you can edit it in the database by changing the field below. ' .
|
||||||
'branch\'s name in the VCS to reflect the new name in Releeph, ' .
|
'If you do this, it is very important that you change your ' .
|
||||||
'otherwise a catastrophe of previously unheard-of magnitude ' .
|
'branch\'s name in the VCS to reflect the new name in Releeph, ' .
|
||||||
'will befall your project.'))
|
'otherwise a catastrophe of previously unheard-of magnitude ' .
|
||||||
|
'will befall your project.')))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextControl)
|
id(new AphrontFormTextControl)
|
||||||
->setLabel('New branch name')
|
->setLabel(pht('New Branch Name'))
|
||||||
->setName('branchName')
|
->setName('branchName')
|
||||||
->setValue($branch_name)
|
->setValue($branch_name)
|
||||||
->setError($e_existing_with_same_branch_name))
|
->setError($e_existing_with_same_branch_name))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->addCancelButton($releeph_branch->getURI())
|
->addCancelButton($releeph_branch->getURI())
|
||||||
->setValue('Save'));
|
->setValue(pht('Save')));
|
||||||
|
|
||||||
$error_view = null;
|
$error_view = null;
|
||||||
if ($errors) {
|
if ($errors) {
|
||||||
$error_view = id(new AphrontErrorView())
|
$error_view = id(new AphrontErrorView())
|
||||||
->setSeverity(AphrontErrorView::SEVERITY_ERROR)
|
->setSeverity(AphrontErrorView::SEVERITY_ERROR)
|
||||||
->setErrors($errors)
|
->setErrors($errors)
|
||||||
->setTitle('Errors');
|
->setTitle(pht('Errors'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = hsprintf(
|
$title = pht(
|
||||||
'Edit branch %s',
|
'Edit Branch %s',
|
||||||
$releeph_branch->getDisplayNameWithDetail());
|
$releeph_branch->getDisplayNameWithDetail());
|
||||||
|
|
||||||
$panel = id(new AphrontPanelView())
|
$panel = id(new AphrontPanelView())
|
||||||
|
|
|
@ -43,7 +43,7 @@ final class ReleephBranchViewController extends ReleephController {
|
||||||
|
|
||||||
$form->appendChild(
|
$form->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->setValue('Filter'));
|
->setValue(pht('Filter')));
|
||||||
|
|
||||||
$list = id(new ReleephRequestHeaderListView())
|
$list = id(new ReleephRequestHeaderListView())
|
||||||
->setOriginType('branch')
|
->setOriginType('branch')
|
||||||
|
@ -72,7 +72,7 @@ final class ReleephBranchViewController extends ReleephController {
|
||||||
$crumbs->addAction(
|
$crumbs->addAction(
|
||||||
id(new PhabricatorMenuItemView())
|
id(new PhabricatorMenuItemView())
|
||||||
->setHref($create_uri)
|
->setHref($create_uri)
|
||||||
->setName('Request Pick')
|
->setName(pht('Request Pick'))
|
||||||
->setIcon('create'));
|
->setIcon('create'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,14 +24,18 @@ final class ReleephProjectActionController extends ReleephController {
|
||||||
|
|
||||||
$dialog = id(new AphrontDialogView())
|
$dialog = id(new AphrontDialogView())
|
||||||
->setUser($request->getUser())
|
->setUser($request->getUser())
|
||||||
->setTitle('Really deactivate Releeph Project?')
|
->setTitle(pht('Really deactivate Releeph Project?'))
|
||||||
->appendChild(hsprintf(
|
->appendChild(phutil_tag(
|
||||||
'<p>Really deactivate the Releeph project <i>%s</i>?',
|
'p',
|
||||||
$rph_project->getName()))
|
array(),
|
||||||
->appendChild(hsprintf(
|
pht('Really deactivate the Releeph project: %s?',
|
||||||
'<p style="margin-top:1em">It will still exist, but '.
|
$rph_project->getName())))
|
||||||
'will be hidden from the list of active projects.</p>'))
|
->appendChild(phutil_tag(
|
||||||
->addSubmitButton('Deactivate Releeph Project')
|
'p',
|
||||||
|
array(),
|
||||||
|
pht('It will still exist, but '.
|
||||||
|
'will be hidden from the list of active projects.')))
|
||||||
|
->addSubmitButton(pht('Deactivate Releeph Project'))
|
||||||
->addCancelButton($request->getRequestURI());
|
->addCancelButton($request->getRequestURI());
|
||||||
|
|
||||||
return id(new AphrontDialogResponse())->setDialog($dialog);
|
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||||
|
@ -49,12 +53,15 @@ final class ReleephProjectActionController extends ReleephController {
|
||||||
|
|
||||||
$dialog = id(new AphrontDialogView())
|
$dialog = id(new AphrontDialogView())
|
||||||
->setUser($request->getUser())
|
->setUser($request->getUser())
|
||||||
->setTitle('Really delete Releeph Project?')
|
->setTitle(pht('Really delete Releeph Project?'))
|
||||||
->appendChild(hsprintf(
|
->appendChild(phutil_tag(
|
||||||
'<p>Really delete the "%s" Releeph project? '.
|
'p',
|
||||||
'This cannot be undone!</p>',
|
array(),
|
||||||
$rph_project->getName()))
|
pht('Really delete the Releeph project: %s? '.
|
||||||
->addSubmitButton('Delete Releeph Project')
|
'This cannot be undone!'),
|
||||||
|
$rph_project->getName()))
|
||||||
|
->setHeaderColor(PhabricatorActionHeaderView::HEADER_RED)
|
||||||
|
->addSubmitButton(pht('Delete'))
|
||||||
->addCancelButton($request->getRequestURI());
|
->addCancelButton($request->getRequestURI());
|
||||||
return id(new AphrontDialogResponse())->setDialog($dialog);
|
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||||
|
|
||||||
|
|
|
@ -24,21 +24,21 @@ final class ReleephProjectCreateController extends ReleephController {
|
||||||
|
|
||||||
if ($request->isFormPost()) {
|
if ($request->isFormPost()) {
|
||||||
if (!$name) {
|
if (!$name) {
|
||||||
$e_name = 'Required';
|
$e_name = pht('Required');
|
||||||
$errors[] =
|
$errors[] =
|
||||||
'Your releeph project should have a simple descriptive name.';
|
pht('Your Releeph project should have a simple descriptive name.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$trunk_branch) {
|
if (!$trunk_branch) {
|
||||||
$e_trunk_branch = 'Required';
|
$e_trunk_branch = pht('Required');
|
||||||
$errors[] =
|
$errors[] =
|
||||||
'You must specify which branch you will be picking from.';
|
pht('You must specify which branch you will be picking from.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$all_names = mpull(id(new ReleephProject())->loadAll(), 'getName');
|
$all_names = mpull(id(new ReleephProject())->loadAll(), 'getName');
|
||||||
|
|
||||||
if (in_array($name, $all_names)) {
|
if (in_array($name, $all_names)) {
|
||||||
$errors[] = "Releeph project name {$name} is already taken";
|
$errors[] = pht('Releeph project name %s is already taken', $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
$arc_project = $arc_projects[$arc_pr_id];
|
$arc_project = $arc_projects[$arc_pr_id];
|
||||||
|
@ -63,7 +63,7 @@ final class ReleephProjectCreateController extends ReleephController {
|
||||||
if ($errors) {
|
if ($errors) {
|
||||||
$error_view = new AphrontErrorView();
|
$error_view = new AphrontErrorView();
|
||||||
$error_view->setErrors($errors);
|
$error_view->setErrors($errors);
|
||||||
$error_view->setTitle('Form Errors');
|
$error_view->setTitle(pht('Form Errors'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make our own optgroup select control
|
// Make our own optgroup select control
|
||||||
|
@ -88,19 +88,19 @@ final class ReleephProjectCreateController extends ReleephController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$project_name_input = id(new AphrontFormTextControl())
|
$project_name_input = id(new AphrontFormTextControl())
|
||||||
->setLabel('Name')
|
->setLabel(pht('Name'))
|
||||||
->setDisableAutocomplete(true)
|
->setDisableAutocomplete(true)
|
||||||
->setName('name')
|
->setName('name')
|
||||||
->setValue($name)
|
->setValue($name)
|
||||||
->setError($e_name)
|
->setError($e_name)
|
||||||
->setCaption('A name like "Thrift" but not "Thrift releases".');
|
->setCaption(pht('A name like "Thrift" but not "Thrift releases".'));
|
||||||
|
|
||||||
$arc_project_input = id(new AphrontFormSelectControl())
|
$arc_project_input = id(new AphrontFormSelectControl())
|
||||||
->setLabel('Arc Project')
|
->setLabel(pht('Arc Project'))
|
||||||
->setName('arcPrID')
|
->setName('arcPrID')
|
||||||
->setValue($arc_pr_id)
|
->setValue($arc_pr_id)
|
||||||
->setCaption(hsprintf(
|
->setCaption(pht(
|
||||||
"If your Arc project isn't listed, associate it with a repository %s",
|
'If your Arc project isn\'t listed, associate it with a repository %s',
|
||||||
phutil_tag(
|
phutil_tag(
|
||||||
'a',
|
'a',
|
||||||
array(
|
array(
|
||||||
|
@ -111,7 +111,7 @@ final class ReleephProjectCreateController extends ReleephController {
|
||||||
->setOptions($arc_project_choices);
|
->setOptions($arc_project_choices);
|
||||||
|
|
||||||
$branch_name_preview = id(new ReleephBranchPreviewView())
|
$branch_name_preview = id(new ReleephBranchPreviewView())
|
||||||
->setLabel('Example Branch')
|
->setLabel(pht('Example Branch'))
|
||||||
->addControl('projectName', $project_name_input)
|
->addControl('projectName', $project_name_input)
|
||||||
->addControl('arcProjectID', $arc_project_input)
|
->addControl('arcProjectID', $arc_project_input)
|
||||||
->addStatic('template', '')
|
->addStatic('template', '')
|
||||||
|
@ -123,27 +123,27 @@ final class ReleephProjectCreateController extends ReleephController {
|
||||||
->appendChild($arc_project_input)
|
->appendChild($arc_project_input)
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextControl())
|
id(new AphrontFormTextControl())
|
||||||
->setLabel('Trunk')
|
->setLabel(pht('Trunk'))
|
||||||
->setName('trunkBranch')
|
->setName('trunkBranch')
|
||||||
->setValue($trunk_branch)
|
->setValue($trunk_branch)
|
||||||
->setError($e_trunk_branch)
|
->setError($e_trunk_branch)
|
||||||
->setCaption('The development branch, '.
|
->setCaption(pht('The development branch, '.
|
||||||
'from which requests will be picked.'))
|
'from which requests will be picked.')))
|
||||||
->appendChild($branch_name_preview)
|
->appendChild($branch_name_preview)
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->addCancelButton('/releeph/project/')
|
->addCancelButton('/releeph/project/')
|
||||||
->setValue('Create'));
|
->setValue(pht('Create')));
|
||||||
|
|
||||||
$panel = id(new AphrontPanelView())
|
$panel = id(new AphrontPanelView())
|
||||||
->setHeader('Create Releeph Project')
|
->setHeader(pht('Create Releeph Project'))
|
||||||
->appendChild($form)
|
->appendChild($form)
|
||||||
->setWidth(AphrontPanelView::WIDTH_FORM);
|
->setWidth(AphrontPanelView::WIDTH_FORM);
|
||||||
|
|
||||||
return $this->buildStandardPageResponse(
|
return $this->buildStandardPageResponse(
|
||||||
array($error_view, $panel),
|
array($error_view, $panel),
|
||||||
array(
|
array(
|
||||||
'title' => 'Create new Releeph Project'
|
'title' => pht('Create New Releeph Project')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,19 +46,19 @@ final class ReleephProjectEditController extends ReleephController {
|
||||||
$pusher_phids = $request->getArr('pushers');
|
$pusher_phids = $request->getArr('pushers');
|
||||||
|
|
||||||
if (!$project_name) {
|
if (!$project_name) {
|
||||||
$e_name = 'Required';
|
$e_name = pht('Required');
|
||||||
$errors[] =
|
$errors[] =
|
||||||
'Your releeph project should have a simple descriptive name';
|
pht('Your releeph project should have a simple descriptive name');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$trunk_branch) {
|
if (!$trunk_branch) {
|
||||||
$e_trunk_branch = 'Required';
|
$e_trunk_branch = pht('Required');
|
||||||
$errors[] =
|
$errors[] =
|
||||||
'You must specify which branch you will be picking from.';
|
pht('You must specify which branch you will be picking from.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($release_counter && !is_int($release_counter)) {
|
if ($release_counter && !is_int($release_counter)) {
|
||||||
$errors[] = "Release counter must be a positive integer!";
|
$errors[] = pht("Release counter must be a positive integer!");
|
||||||
}
|
}
|
||||||
|
|
||||||
$other_releeph_projects = id(new ReleephProject())
|
$other_releeph_projects = id(new ReleephProject())
|
||||||
|
@ -67,15 +67,16 @@ final class ReleephProjectEditController extends ReleephController {
|
||||||
'getName', 'getID');
|
'getName', 'getID');
|
||||||
|
|
||||||
if (in_array($project_name, $other_releeph_project_names)) {
|
if (in_array($project_name, $other_releeph_project_names)) {
|
||||||
$errors[] = "Releeph project name {$project_name} is already taken";
|
$errors[] = pht("Releeph project name %s is already taken",
|
||||||
|
$project_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($test_paths as $test_path) {
|
foreach ($test_paths as $test_path) {
|
||||||
$result = @preg_match($test_path, '');
|
$result = @preg_match($test_path, '');
|
||||||
$is_a_valid_regexp = $result !== false;
|
$is_a_valid_regexp = $result !== false;
|
||||||
if (!$is_a_valid_regexp) {
|
if (!$is_a_valid_regexp) {
|
||||||
$errors[] = 'Please provide a valid regular expression: '.
|
$errors[] = pht('Please provide a valid regular expression: '.
|
||||||
"{$test_path} is not valid";
|
'%s is not valid', $test_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +104,7 @@ final class ReleephProjectEditController extends ReleephController {
|
||||||
->interpolate($branch_template);
|
->interpolate($branch_template);
|
||||||
|
|
||||||
if ($template_errors) {
|
if ($template_errors) {
|
||||||
$e_branch_template = 'Invalid!';
|
$e_branch_template = pht('Whoopsies!');
|
||||||
foreach ($template_errors as $template_error) {
|
foreach ($template_errors as $template_error) {
|
||||||
$errors[] = "Template error: {$template_error}";
|
$errors[] = "Template error: {$template_error}";
|
||||||
}
|
}
|
||||||
|
@ -122,7 +123,7 @@ final class ReleephProjectEditController extends ReleephController {
|
||||||
if ($errors) {
|
if ($errors) {
|
||||||
$error_view = new AphrontErrorView();
|
$error_view = new AphrontErrorView();
|
||||||
$error_view->setErrors($errors);
|
$error_view->setErrors($errors);
|
||||||
$error_view->setTitle('Form Errors');
|
$error_view->setTitle(pht('Form Errors'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$projects = mpull(
|
$projects = mpull(
|
||||||
|
@ -146,17 +147,17 @@ final class ReleephProjectEditController extends ReleephController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$basic_inset = id(new AphrontFormInsetView())
|
$basic_inset = id(new AphrontFormInsetView())
|
||||||
->setTitle('Basics')
|
->setTitle(pht('Basics'))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextControl())
|
id(new AphrontFormTextControl())
|
||||||
->setLabel('Name')
|
->setLabel(pht('Name'))
|
||||||
->setName('name')
|
->setName('name')
|
||||||
->setValue($project_name)
|
->setValue($project_name)
|
||||||
->setError($e_name)
|
->setError($e_name)
|
||||||
->setCaption('A name like "Thrift" but not "Thrift releases".'))
|
->setCaption(pht('A name like "Thrift" but not "Thrift releases".')))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormStaticControl())
|
id(new AphrontFormStaticControl())
|
||||||
->setLabel('Repository')
|
->setLabel(pht('Repository'))
|
||||||
->setValue(
|
->setValue(
|
||||||
$this
|
$this
|
||||||
->getReleephProject()
|
->getReleephProject()
|
||||||
|
@ -164,60 +165,60 @@ final class ReleephProjectEditController extends ReleephController {
|
||||||
->getName()))
|
->getName()))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormStaticControl())
|
id(new AphrontFormStaticControl())
|
||||||
->setLabel('Arc Project')
|
->setLabel(pht('Arc Project'))
|
||||||
->setValue(
|
->setValue(
|
||||||
$this->getReleephProject()->loadArcanistProject()->getName()))
|
$this->getReleephProject()->loadArcanistProject()->getName()))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormStaticControl())
|
id(new AphrontFormStaticControl())
|
||||||
->setLabel('Releeph Project PHID')
|
->setLabel(pht('Releeph Project PHID'))
|
||||||
->setValue(
|
->setValue(
|
||||||
$this->getReleephProject()->getPHID()))
|
$this->getReleephProject()->getPHID()))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormSelectControl())
|
id(new AphrontFormSelectControl())
|
||||||
->setLabel('Phabricator Project')
|
->setLabel(pht('Phabricator Project'))
|
||||||
->setValue($phabricator_project_id)
|
->setValue($phabricator_project_id)
|
||||||
->setName('projectID')
|
->setName('projectID')
|
||||||
->setOptions($projects))
|
->setOptions($projects))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextControl())
|
id(new AphrontFormTextControl())
|
||||||
->setLabel('Trunk')
|
->setLabel(pht('Trunk'))
|
||||||
->setValue($trunk_branch)
|
->setValue($trunk_branch)
|
||||||
->setName('trunkBranch')
|
->setName('trunkBranch')
|
||||||
->setError($e_trunk_branch))
|
->setError($e_trunk_branch))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextControl())
|
id(new AphrontFormTextControl())
|
||||||
->setLabel('Release counter')
|
->setLabel(pht('Release counter'))
|
||||||
->setValue($release_counter)
|
->setValue($release_counter)
|
||||||
->setName('releaseCounter')
|
->setName('releaseCounter')
|
||||||
->setCaption(
|
->setCaption(
|
||||||
"Used by the command line branch cutter's %N field"))
|
pht("Used by the command line branch cutter's %N field")))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextAreaControl())
|
id(new AphrontFormTextAreaControl())
|
||||||
->setLabel('Pick Instructions')
|
->setLabel(pht('Pick Instructions'))
|
||||||
->setValue($pick_failure_instructions)
|
->setValue($pick_failure_instructions)
|
||||||
->setName('pickFailureInstructions')
|
->setName('pickFailureInstructions')
|
||||||
->setCaption(
|
->setCaption(
|
||||||
"Instructions for pick failures, which will be used " .
|
pht("Instructions for pick failures, which will be used " .
|
||||||
"in emails generated by failed picks"))
|
"in emails generated by failed picks")))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextAreaControl())
|
id(new AphrontFormTextAreaControl())
|
||||||
->setLabel('Tests paths')
|
->setLabel(pht('Tests paths'))
|
||||||
->setValue(implode("\n", $test_paths))
|
->setValue(implode("\n", $test_paths))
|
||||||
->setName('testPaths')
|
->setName('testPaths')
|
||||||
->setCaption(
|
->setCaption(
|
||||||
'List of strings that all test files contain in their path '.
|
pht('List of strings that all test files contain in their path '.
|
||||||
'in this project. One string per line. '.
|
'in this project. One string per line. '.
|
||||||
'Examples: \'__tests__\', \'/javatests/\'...'));
|
'Examples: \'__tests__\', \'/javatests/\'...')));
|
||||||
|
|
||||||
$pushers_inset = id(new AphrontFormInsetView())
|
$pushers_inset = id(new AphrontFormInsetView())
|
||||||
->setTitle('Pushers')
|
->setTitle(pht('Pushers'))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
'Pushers are allowed to approve Releeph requests to be committed. '.
|
pht('Pushers are allowed to approve Releeph requests to be committed. '.
|
||||||
'to this project\'s branches. If you leave this blank then anyone '.
|
'to this project\'s branches. If you leave this blank then anyone '.
|
||||||
'is allowed to approve requests.')
|
'is allowed to approve requests.'))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTokenizerControl())
|
id(new AphrontFormTokenizerControl())
|
||||||
->setLabel('Pushers')
|
->setLabel(pht('Pushers'))
|
||||||
->setName('pushers')
|
->setName('pushers')
|
||||||
->setDatasource('/typeahead/common/users/')
|
->setDatasource('/typeahead/common/users/')
|
||||||
->setValue($pusher_tokens));
|
->setValue($pusher_tokens));
|
||||||
|
@ -233,17 +234,17 @@ final class ReleephProjectEditController extends ReleephController {
|
||||||
$field_selector_options[$selector_name] = $selector_name;
|
$field_selector_options[$selector_name] = $selector_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$field_selector_blurb = hsprintf(
|
$field_selector_blurb = pht(
|
||||||
"If you you have additional information to render about Releeph ".
|
"If you you have additional information to render about Releeph ".
|
||||||
"requests, or want to re-arrange the UI, implement a ".
|
"requests, or want to re-arrange the UI, implement a ".
|
||||||
"<tt>ReleephFieldSelector</tt> and select it here.");
|
"<tt>ReleephFieldSelector</tt> and select it here.");
|
||||||
|
|
||||||
$fields_inset = id(new AphrontFormInsetView())
|
$fields_inset = id(new AphrontFormInsetView())
|
||||||
->setTitle('Fields')
|
->setTitle(pht('Fields'))
|
||||||
->appendChild($field_selector_blurb)
|
->appendChild($field_selector_blurb)
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormSelectControl())
|
id(new AphrontFormSelectControl())
|
||||||
->setLabel('Selector')
|
->setLabel(pht('Selector'))
|
||||||
->setName('fieldSelector')
|
->setName('fieldSelector')
|
||||||
->setValue($field_selector)
|
->setValue($field_selector)
|
||||||
->setOptions($field_selector_options));
|
->setOptions($field_selector_options));
|
||||||
|
@ -270,19 +271,19 @@ final class ReleephProjectEditController extends ReleephController {
|
||||||
->setLabel('Template')
|
->setLabel('Template')
|
||||||
->setError($e_branch_template)
|
->setError($e_branch_template)
|
||||||
->setCaption(
|
->setCaption(
|
||||||
"Leave this blank to use your installation's default.");
|
pht("Leave this blank to use your installation's default."));
|
||||||
|
|
||||||
$branch_template_preview = id(new ReleephBranchPreviewView())
|
$branch_template_preview = id(new ReleephBranchPreviewView())
|
||||||
->setLabel('Preview')
|
->setLabel(pht('Preview'))
|
||||||
->addControl('template', $branch_template_input)
|
->addControl('template', $branch_template_input)
|
||||||
->addStatic('arcProjectID', $arc_project_id)
|
->addStatic('arcProjectID', $arc_project_id)
|
||||||
->addStatic('isSymbolic', false)
|
->addStatic('isSymbolic', false)
|
||||||
->addStatic('projectName', $this->getReleephProject()->getName());
|
->addStatic('projectName', $this->getReleephProject()->getName());
|
||||||
|
|
||||||
$template_inset = id(new AphrontFormInsetView())
|
$template_inset = id(new AphrontFormInsetView())
|
||||||
->setTitle('Branch Cutting')
|
->setTitle(pht('Branch Cutting'))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
'Provide a pattern for creating new branches.')
|
pht('Provide a pattern for creating new branches.'))
|
||||||
->appendChild($branch_template_input)
|
->appendChild($branch_template_input)
|
||||||
->appendChild($branch_template_preview)
|
->appendChild($branch_template_preview)
|
||||||
->appendChild($help_markup);
|
->appendChild($help_markup);
|
||||||
|
@ -300,16 +301,16 @@ final class ReleephProjectEditController extends ReleephController {
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->addCancelButton('/releeph/project/')
|
->addCancelButton('/releeph/project/')
|
||||||
->setValue('Save'));
|
->setValue(pht('Save')));
|
||||||
|
|
||||||
$panel = id(new AphrontPanelView())
|
$panel = id(new AphrontPanelView())
|
||||||
->setHeader('Edit Releeph Project')
|
->setHeader(pht('Edit Releeph Project'))
|
||||||
->appendChild($form)
|
->appendChild($form)
|
||||||
->setWidth(AphrontPanelView::WIDTH_FORM);
|
->setWidth(AphrontPanelView::WIDTH_FORM);
|
||||||
|
|
||||||
return $this->buildStandardPageResponse(
|
return $this->buildStandardPageResponse(
|
||||||
array($error_view, $panel),
|
array($error_view, $panel),
|
||||||
array('title' => 'Edit Releeph Project'));
|
array('title' => pht('Edit Releeph Project')));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildCommitAuthorInset($current) {
|
private function buildCommitAuthorInset($current) {
|
||||||
|
@ -329,6 +330,7 @@ final class ReleephProjectEditController extends ReleephController {
|
||||||
|
|
||||||
$vcs_name = PhabricatorRepositoryType::getNameForRepositoryType($vcs_type);
|
$vcs_name = PhabricatorRepositoryType::getNameForRepositoryType($vcs_type);
|
||||||
|
|
||||||
|
// pht?
|
||||||
$help_markup = hsprintf(<<<EOTEXT
|
$help_markup = hsprintf(<<<EOTEXT
|
||||||
When your project's release engineers run <tt>arc releeph</tt>, they will be
|
When your project's release engineers run <tt>arc releeph</tt>, they will be
|
||||||
listed as the <strong>committer</strong> of the code committed to release
|
listed as the <strong>committer</strong> of the code committed to release
|
||||||
|
@ -348,21 +350,21 @@ EOTEXT
|
||||||
$options = array(
|
$options = array(
|
||||||
array(
|
array(
|
||||||
'value' => ReleephProject::COMMIT_AUTHOR_FROM_DIFF,
|
'value' => ReleephProject::COMMIT_AUTHOR_FROM_DIFF,
|
||||||
'label' => 'Original Author',
|
'label' => pht('Original Author'),
|
||||||
'caption' =>
|
'caption' =>
|
||||||
"The author of the original commit in {$trunk}.",
|
pht('The author of the original commit in: %s.', $trunk),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'value' => ReleephProject::COMMIT_AUTHOR_REQUESTOR,
|
'value' => ReleephProject::COMMIT_AUTHOR_REQUESTOR,
|
||||||
'label' => 'Requestor',
|
'label' => pht('Requestor'),
|
||||||
'caption' =>
|
'caption' =>
|
||||||
"The person who requested that this code go into the release.",
|
pht('The person who requested that this code go into the release.'),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'value' => ReleephProject::COMMIT_AUTHOR_NONE,
|
'value' => ReleephProject::COMMIT_AUTHOR_NONE,
|
||||||
'label' => "None",
|
'label' => pht('None'),
|
||||||
'caption' =>
|
'caption' =>
|
||||||
"Only record the default committer information.",
|
pht('Only record the default committer information.'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -371,7 +373,7 @@ EOTEXT
|
||||||
}
|
}
|
||||||
|
|
||||||
$control = id(new AphrontFormRadioButtonControl())
|
$control = id(new AphrontFormRadioButtonControl())
|
||||||
->setLabel('Author')
|
->setLabel(pht('Author'))
|
||||||
->setName('commitWithAuthor')
|
->setName('commitWithAuthor')
|
||||||
->setValue($current);
|
->setValue($current);
|
||||||
|
|
||||||
|
@ -380,7 +382,7 @@ EOTEXT
|
||||||
}
|
}
|
||||||
|
|
||||||
return id(new AphrontFormInsetView())
|
return id(new AphrontFormInsetView())
|
||||||
->setTitle('Authors')
|
->setTitle(pht('Authors'))
|
||||||
->appendChild($help_markup)
|
->appendChild($help_markup)
|
||||||
->appendChild($control);
|
->appendChild($control);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ final class ReleephProjectListController extends PhabricatorController {
|
||||||
array(
|
array(
|
||||||
'href' => '/releeph/project/inactive/',
|
'href' => '/releeph/project/inactive/',
|
||||||
),
|
),
|
||||||
'View inactive projects');
|
pht('View inactive projects'));
|
||||||
$panel
|
$panel
|
||||||
->setHeader(hsprintf(
|
->setHeader(hsprintf(
|
||||||
'Active Releeph Projects · %s', $view_inactive_link))
|
'Active Releeph Projects · %s', $view_inactive_link))
|
||||||
|
@ -61,7 +61,7 @@ final class ReleephProjectListController extends PhabricatorController {
|
||||||
array(
|
array(
|
||||||
'href' => '/releeph/project/'
|
'href' => '/releeph/project/'
|
||||||
),
|
),
|
||||||
'View active projects');
|
pht('View active projects'));
|
||||||
$panel
|
$panel
|
||||||
->setHeader(hsprintf(
|
->setHeader(hsprintf(
|
||||||
'Inactive Releeph Projects · %s', $view_active_link))
|
'Inactive Releeph Projects · %s', $view_active_link))
|
||||||
|
@ -78,7 +78,7 @@ final class ReleephProjectListController extends PhabricatorController {
|
||||||
'href' => '/releeph/project/create/',
|
'href' => '/releeph/project/create/',
|
||||||
'class' => 'green button',
|
'class' => 'green button',
|
||||||
),
|
),
|
||||||
'Create New Project');
|
pht('Create New Project'));
|
||||||
$panel->addButton($create_new_project_button);
|
$panel->addButton($create_new_project_button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ final class ReleephProjectListController extends PhabricatorController {
|
||||||
$pager,
|
$pager,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => 'List Releeph Projects',
|
'title' => pht('All Releeph Projects'),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ final class ReleephProjectViewController extends ReleephController {
|
||||||
$crumbs->addAction(
|
$crumbs->addAction(
|
||||||
id(new PhabricatorMenuItemView())
|
id(new PhabricatorMenuItemView())
|
||||||
->setHref($releeph_project->getURI('cutbranch'))
|
->setHref($releeph_project->getURI('cutbranch'))
|
||||||
->setName('Cut New Branch')
|
->setName(pht('Cut New Branch'))
|
||||||
->setIcon('create'));
|
->setIcon('create'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ final class ReleephProjectViewController extends ReleephController {
|
||||||
$view,
|
$view,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => $releeph_project->getName().' Releeph Project'
|
'title' => $releeph_project->getName()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ final class ReleephRequestCreateController extends ReleephController {
|
||||||
try {
|
try {
|
||||||
$pr_commit = $finder->fromPartial($request_identifier);
|
$pr_commit = $finder->fromPartial($request_identifier);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$e_request_identifier = 'Invalid';
|
$e_request_identifier = pht('Invalid');
|
||||||
$errors[] =
|
$errors[] =
|
||||||
"Request {$request_identifier} is probably not a valid commit";
|
pht('Request %s is probably not a valid commit', $request_identifier);
|
||||||
$errors[] = $e->getMessage();
|
$errors[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,8 +64,8 @@ final class ReleephRequestCreateController extends ReleephController {
|
||||||
if (!$errors) {
|
if (!$errors) {
|
||||||
$pr_commit_data = $pr_commit->loadCommitData();
|
$pr_commit_data = $pr_commit->loadCommitData();
|
||||||
if (!$pr_commit_data) {
|
if (!$pr_commit_data) {
|
||||||
$e_request_identifier = 'Not parsed yet';
|
$e_request_identifier = pht('Not parsed yet');
|
||||||
$errors[] = "The requested commit hasn't been parsed yet.";
|
$errors[] = pht('The requested commit hasn\'t been parsed yet.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ final class ReleephRequestCreateController extends ReleephController {
|
||||||
if ($errors) {
|
if ($errors) {
|
||||||
$error_view = new AphrontErrorView();
|
$error_view = new AphrontErrorView();
|
||||||
$error_view->setErrors($errors);
|
$error_view->setErrors($errors);
|
||||||
$error_view->setTitle('Form Errors');
|
$error_view->setTitle(pht('Form Errors'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// For the typeahead
|
// For the typeahead
|
||||||
|
@ -119,7 +119,7 @@ final class ReleephRequestCreateController extends ReleephController {
|
||||||
->addHiddenInput('requestIdentifierRaw', 'D'.$diff_rev_id)
|
->addHiddenInput('requestIdentifierRaw', 'D'.$diff_rev_id)
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormStaticControl())
|
id(new AphrontFormStaticControl())
|
||||||
->setLabel('Diff')
|
->setLabel(pht('Diff'))
|
||||||
->setValue($title));
|
->setValue($title));
|
||||||
} else {
|
} else {
|
||||||
$origin = $releeph_branch->getURI();
|
$origin = $releeph_branch->getURI();
|
||||||
|
@ -132,8 +132,8 @@ final class ReleephRequestCreateController extends ReleephController {
|
||||||
->setError($e_request_identifier)
|
->setError($e_request_identifier)
|
||||||
->setStartTime($branch_cut_point->getEpoch())
|
->setStartTime($branch_cut_point->getEpoch())
|
||||||
->setCaption(
|
->setCaption(
|
||||||
'Start typing to autocomplete on commit title, '.
|
pht('Start typing to autocomplete on commit title, '.
|
||||||
'or give a Phabricator commit identifier like rFOO1234'));
|
'or give a Phabricator commit identifier like rFOO1234')));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
|
@ -148,18 +148,18 @@ final class ReleephRequestCreateController extends ReleephController {
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->addCancelButton($origin)
|
->addCancelButton($origin)
|
||||||
->setValue('Request'));
|
->setValue(pht('Request')));
|
||||||
|
|
||||||
$panel = id(new AphrontPanelView())
|
$panel = id(new AphrontPanelView())
|
||||||
->setHeader(
|
->setHeader(
|
||||||
'Request for '.
|
pht('Request for %s',
|
||||||
$releeph_branch->getDisplayNameWithDetail())
|
$releeph_branch->getDisplayNameWithDetail()))
|
||||||
->setWidth(AphrontPanelView::WIDTH_FORM)
|
->setWidth(AphrontPanelView::WIDTH_FORM)
|
||||||
->appendChild($form);
|
->appendChild($form);
|
||||||
|
|
||||||
return $this->buildStandardPageResponse(
|
return $this->buildStandardPageResponse(
|
||||||
array($error_view, $panel),
|
array($error_view, $panel),
|
||||||
array('title' => 'Request pick'));
|
array('title' => pht('Request Pick')));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,14 +57,14 @@ final class ReleephRequestDifferentialCreateController
|
||||||
require_celerity_resource('releeph-request-differential-create-dialog');
|
require_celerity_resource('releeph-request-differential-create-dialog');
|
||||||
$dialog = id(new AphrontDialogView())
|
$dialog = id(new AphrontDialogView())
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
->setTitle('Choose Releeph Branch')
|
->setTitle(pht('Choose Releeph Branch'))
|
||||||
->setClass('releeph-request-differential-create-dialog')
|
->setClass('releeph-request-differential-create-dialog')
|
||||||
->addCancelButton('/D'.$request->getStr('D'));
|
->addCancelButton('/D'.$request->getStr('D'));
|
||||||
|
|
||||||
$dialog->appendChild(
|
$dialog->appendChild(
|
||||||
"This differential revision changes code that is associated ".
|
pht("This differential revision changes code that is associated ".
|
||||||
"with multiple Releeph branches. ".
|
"with multiple Releeph branches. ".
|
||||||
"Please select the branch where you would like this code to be picked.");
|
"Please select the branch where you would like this code to be picked."));
|
||||||
|
|
||||||
foreach ($branch_groups as $project_id => $branches) {
|
foreach ($branch_groups as $project_id => $branches) {
|
||||||
$project = idx($projects, $project_id);
|
$project = idx($projects, $project_id);
|
||||||
|
|
Loading…
Reference in a new issue