@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+22 -20
+7 -7
src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
··· 214 214 215 215 $fetch_value = $object->getFetchRules(); 216 216 $track_value = $object->getTrackOnlyRules(); 217 - $autoclose_value = $object->getAutocloseOnlyRules(); 217 + $permanent_value = $object->getAutocloseOnlyRules(); 218 218 219 219 $automation_instructions = pht( 220 220 "Configure **Repository Automation** to allow Phabricator to ". ··· 389 389 ->setValue($track_value), 390 390 id(new PhabricatorTextAreaEditField()) 391 391 ->setIsStringList(true) 392 - ->setKey('autocloseOnly') 393 - ->setLabel(pht('Autoclose Only')) 392 + ->setKey('permanentRefs') 393 + ->setLabel(pht('Permanent Refs')) 394 394 ->setTransactionType( 395 395 PhabricatorRepositoryAutocloseOnlyTransaction::TRANSACTIONTYPE) 396 396 ->setIsCopyable(true) 397 - ->setDescription(pht('Autoclose commits on only these branches.')) 398 - ->setConduitDescription(pht('Set the autoclose branches.')) 399 - ->setConduitTypeDescription(pht('New default tracked branches.')) 400 - ->setValue($autoclose_value), 397 + ->setDescription(pht('Only these refs are considered permanent.')) 398 + ->setConduitDescription(pht('Set the permanent refs.')) 399 + ->setConduitTypeDescription(pht('New permanent ref rules.')) 400 + ->setValue($permanent_value), 401 401 id(new PhabricatorTextEditField()) 402 402 ->setKey('importOnly') 403 403 ->setLabel(pht('Import Only'))
+1 -1
src/applications/diffusion/herald/DiffusionCommitAutocloseHeraldField.php
··· 6 6 const FIELDCONST = 'diffusion.commit.autoclose'; 7 7 8 8 public function getHeraldFieldName() { 9 - return pht('Commit is on autoclose branch'); 9 + return pht('Commit is on permanent branch'); 10 10 } 11 11 12 12 public function getHeraldFieldValue($object) {
+11 -9
src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
··· 38 38 'defaultBranch', 39 39 'fetchRefs', 40 40 'trackOnly', 41 - 'autocloseOnly', 41 + 'permanentRefs', 42 42 ); 43 43 } 44 44 ··· 100 100 $autoclose_rules = implode(', ', $autoclose_rules); 101 101 $autoclose_only = nonempty( 102 102 $autoclose_rules, 103 - phutil_tag('em', array(), pht('Autoclose On All Branches'))); 103 + phutil_tag('em', array(), pht('All Branches'))); 104 104 105 105 $autoclose_disabled = false; 106 106 if ($repository->getDetail('disable-autoclose')) { ··· 109 109 phutil_tag('em', array(), pht('Autoclose has been disabled')); 110 110 } 111 111 112 - $view->addProperty(pht('Autoclose Only'), $autoclose_only); 112 + $view->addProperty(pht('Permanent Refs'), $autoclose_only); 113 113 114 114 $content[] = $this->newBox(pht('Branches'), $view); 115 115 ··· 136 136 foreach ($branches as $branch) { 137 137 $branch_name = $branch->getShortName(); 138 138 $tracking = $repository->shouldTrackBranch($branch_name); 139 - $autoclosing = $repository->shouldAutocloseBranch($branch_name); 139 + $permanent = $repository->shouldAutocloseBranch($branch_name); 140 140 141 141 $default = $repository->getDefaultBranch(); 142 142 $icon = null; ··· 156 156 if ($autoclose_disabled) { 157 157 $autoclose_status = pht('Disabled (Repository)'); 158 158 } else { 159 - $autoclose_status = pht('Off'); 159 + $autoclose_status = pht('Not Permanent'); 160 160 } 161 161 162 162 $rows[] = array( ··· 164 164 $branch_name, 165 165 $status, 166 166 $tracking ? pht('Tracking') : pht('Off'), 167 - $autoclosing ? pht('Autoclose On') : $autoclose_status, 167 + $permanent ? pht('Permanent') : $autoclose_status, 168 168 ); 169 169 } 170 170 $branch_table = new AphrontTableView($rows); ··· 174 174 pht('Branch'), 175 175 pht('Status'), 176 176 pht('Track'), 177 - pht('Autoclose'), 177 + pht('Permanent'), 178 178 )); 179 179 $branch_table->setColumnClasses( 180 180 array( ··· 199 199 } else { 200 200 $content[] = id(new PHUIInfoView()) 201 201 ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) 202 - ->appendChild(pht('Branch status in unavailable while the repository '. 203 - 'is still importing.')); 202 + ->appendChild( 203 + pht( 204 + 'Branch status is unavailable while the repository is still '. 205 + 'importing.')); 204 206 } 205 207 206 208 return $content;
+3 -3
src/applications/repository/xaction/PhabricatorRepositoryAutocloseOnlyTransaction.php
··· 19 19 20 20 if (!$new) { 21 21 return pht( 22 - '%s set this repository to autoclose on all branches.', 22 + '%s marked all branches in this repository as permanent.', 23 23 $this->renderAuthor()); 24 24 } else if (!$old) { 25 25 return pht( 26 - '%s set this repository to autoclose on branches: %s.', 26 + '%s set the permanent refs for this repository to: %s.', 27 27 $this->renderAuthor(), 28 28 $this->renderValue(implode(', ', $new))); 29 29 } else { 30 30 return pht( 31 - '%s changed autoclose branches from %s to %s.', 31 + '%s changed permanent refs for this repository from %s to %s.', 32 32 $this->renderAuthor(), 33 33 $this->renderValue(implode(', ', $old)), 34 34 $this->renderValue(implode(', ', $new)));