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