@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.

Create feed transaction stories for awarding/revoking badges

Summary: Ref T10677, Awarding/revoking badge should create a feed story on homepage with badge handle recipient handles

Test Plan: Award/revoke badge, open Feed, should see story with badge link and recipient links.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T10677

Differential Revision: https://secure.phabricator.com/D15534

+36
+22
src/applications/badges/storage/PhabricatorBadgesTransaction.php
··· 191 191 $this->renderHandleLink($object_phid)); 192 192 } 193 193 break; 194 + case self::TYPE_AWARD: 195 + if (!is_array($new)) { 196 + $new = array(); 197 + } 198 + $handles = $this->renderHandleList($new); 199 + return pht( 200 + '%s awarded %s to %s recipient(s): %s.', 201 + $this->renderHandleLink($author_phid), 202 + $this->renderHandleLink($object_phid), 203 + new PhutilNumber(count($new)), 204 + $handles); 205 + case self::TYPE_REVOKE: 206 + if (!is_array($new)) { 207 + $new = array(); 208 + } 209 + $handles = $this->renderHandleList($new); 210 + return pht( 211 + '%s revoked %s from %s recipient(s): %s.', 212 + $this->renderHandleLink($author_phid), 213 + $this->renderHandleLink($object_phid), 214 + new PhutilNumber(count($new)), 215 + $handles); 194 216 } 195 217 196 218 return parent::getTitleForFeed();
+14
src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
··· 1542 1542 '%s revoked this badge from recipients: %3$s.', 1543 1543 ), 1544 1544 ), 1545 + 1546 + '%s awarded %s to %s recipient(s): %s.' => array( 1547 + array( 1548 + '%s awarded %s to recipient: %4$s.', 1549 + '%s awarded %s to recipients: %4$s.', 1550 + ), 1551 + ), 1552 + 1553 + '%s revoked %s from %s recipient(s): %s.' => array( 1554 + array( 1555 + '%s revoked %s from recipient: %4$s.', 1556 + '%s revoked %s from recipients: %4$s.', 1557 + ), 1558 + ), 1545 1559 ); 1546 1560 } 1547 1561