1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-11 07:11:04 +01:00

Rename most user-facing "Autoclose" strings to "Permanent Refs"

Summary:
Depends on D20422. Ref T13277. Currently, "track only", "publish", and "autoclose" are three separate ideas. I'd like to generally merge them into a more natural idea called "permanent refs".

Since "Autoclose" effectively now controls both "autoclose" and "publish", rename it.

This doesn't rename all the methods or internals, and the documentation needs an update, but it renames most of the UI-facing stuff.

(You also can only specify branches as "Permanent Refs" today, but we may let you specify tags and other arbitrary refs in the future.)

Test Plan: Grepped, poked around the UI, saw UI show "Permanent" / "Permanent Refs" more often and "Autoclose" less.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13277

Differential Revision: https://secure.phabricator.com/D20423
This commit is contained in:
epriestley 2019-04-14 13:20:23 -07:00
parent e910c76e65
commit c7b2553ca0
4 changed files with 22 additions and 20 deletions

View file

@ -214,7 +214,7 @@ final class DiffusionRepositoryEditEngine
$fetch_value = $object->getFetchRules();
$track_value = $object->getTrackOnlyRules();
$autoclose_value = $object->getAutocloseOnlyRules();
$permanent_value = $object->getAutocloseOnlyRules();
$automation_instructions = pht(
"Configure **Repository Automation** to allow Phabricator to ".
@ -389,15 +389,15 @@ final class DiffusionRepositoryEditEngine
->setValue($track_value),
id(new PhabricatorTextAreaEditField())
->setIsStringList(true)
->setKey('autocloseOnly')
->setLabel(pht('Autoclose Only'))
->setKey('permanentRefs')
->setLabel(pht('Permanent Refs'))
->setTransactionType(
PhabricatorRepositoryAutocloseOnlyTransaction::TRANSACTIONTYPE)
->setIsCopyable(true)
->setDescription(pht('Autoclose commits on only these branches.'))
->setConduitDescription(pht('Set the autoclose branches.'))
->setConduitTypeDescription(pht('New default tracked branches.'))
->setValue($autoclose_value),
->setDescription(pht('Only these refs are considered permanent.'))
->setConduitDescription(pht('Set the permanent refs.'))
->setConduitTypeDescription(pht('New permanent ref rules.'))
->setValue($permanent_value),
id(new PhabricatorTextEditField())
->setKey('importOnly')
->setLabel(pht('Import Only'))

View file

@ -6,7 +6,7 @@ final class DiffusionCommitAutocloseHeraldField
const FIELDCONST = 'diffusion.commit.autoclose';
public function getHeraldFieldName() {
return pht('Commit is on autoclose branch');
return pht('Commit is on permanent branch');
}
public function getHeraldFieldValue($object) {

View file

@ -38,7 +38,7 @@ final class DiffusionRepositoryBranchesManagementPanel
'defaultBranch',
'fetchRefs',
'trackOnly',
'autocloseOnly',
'permanentRefs',
);
}
@ -100,7 +100,7 @@ final class DiffusionRepositoryBranchesManagementPanel
$autoclose_rules = implode(', ', $autoclose_rules);
$autoclose_only = nonempty(
$autoclose_rules,
phutil_tag('em', array(), pht('Autoclose On All Branches')));
phutil_tag('em', array(), pht('All Branches')));
$autoclose_disabled = false;
if ($repository->getDetail('disable-autoclose')) {
@ -109,7 +109,7 @@ final class DiffusionRepositoryBranchesManagementPanel
phutil_tag('em', array(), pht('Autoclose has been disabled'));
}
$view->addProperty(pht('Autoclose Only'), $autoclose_only);
$view->addProperty(pht('Permanent Refs'), $autoclose_only);
$content[] = $this->newBox(pht('Branches'), $view);
@ -136,7 +136,7 @@ final class DiffusionRepositoryBranchesManagementPanel
foreach ($branches as $branch) {
$branch_name = $branch->getShortName();
$tracking = $repository->shouldTrackBranch($branch_name);
$autoclosing = $repository->shouldAutocloseBranch($branch_name);
$permanent = $repository->shouldAutocloseBranch($branch_name);
$default = $repository->getDefaultBranch();
$icon = null;
@ -156,7 +156,7 @@ final class DiffusionRepositoryBranchesManagementPanel
if ($autoclose_disabled) {
$autoclose_status = pht('Disabled (Repository)');
} else {
$autoclose_status = pht('Off');
$autoclose_status = pht('Not Permanent');
}
$rows[] = array(
@ -164,7 +164,7 @@ final class DiffusionRepositoryBranchesManagementPanel
$branch_name,
$status,
$tracking ? pht('Tracking') : pht('Off'),
$autoclosing ? pht('Autoclose On') : $autoclose_status,
$permanent ? pht('Permanent') : $autoclose_status,
);
}
$branch_table = new AphrontTableView($rows);
@ -174,7 +174,7 @@ final class DiffusionRepositoryBranchesManagementPanel
pht('Branch'),
pht('Status'),
pht('Track'),
pht('Autoclose'),
pht('Permanent'),
));
$branch_table->setColumnClasses(
array(
@ -199,8 +199,10 @@ final class DiffusionRepositoryBranchesManagementPanel
} else {
$content[] = id(new PHUIInfoView())
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
->appendChild(pht('Branch status in unavailable while the repository '.
'is still importing.'));
->appendChild(
pht(
'Branch status is unavailable while the repository is still '.
'importing.'));
}
return $content;

View file

@ -19,16 +19,16 @@ final class PhabricatorRepositoryAutocloseOnlyTransaction
if (!$new) {
return pht(
'%s set this repository to autoclose on all branches.',
'%s marked all branches in this repository as permanent.',
$this->renderAuthor());
} else if (!$old) {
return pht(
'%s set this repository to autoclose on branches: %s.',
'%s set the permanent refs for this repository to: %s.',
$this->renderAuthor(),
$this->renderValue(implode(', ', $new)));
} else {
return pht(
'%s changed autoclose branches from %s to %s.',
'%s changed permanent refs for this repository from %s to %s.',
$this->renderAuthor(),
$this->renderValue(implode(', ', $old)),
$this->renderValue(implode(', ', $new)));