Page MenuHomePhabricator

D14721.diff
No OneTemporary

D14721.diff

diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php
@@ -145,6 +145,46 @@
}
}
+ public function getApplicationTransactionTitleForFeed(
+ PhabricatorApplicationTransaction $xaction) {
+ $author_phid = $xaction->getAuthorPHID();
+ $object_phid = $xaction->getObjectPHID();
+
+ $old = $this->decodeValue($xaction->getOldValue());
+ $new = $this->decodeValue($xaction->getNewValue());
+
+ $add = array_diff($new, $old);
+ $rem = array_diff($old, $new);
+
+ if ($add && !$rem) {
+ return pht(
+ '%s updated %s for %s, added %d: %s.',
+ $xaction->renderHandleLink($author_phid),
+ $this->getFieldName(),
+ $xaction->renderHandleLink($object_phid),
+ phutil_count($add),
+ $xaction->renderHandleList($add));
+ } else if ($rem && !$add) {
+ return pht(
+ '%s updated %s for %s, removed %s: %s.',
+ $xaction->renderHandleLink($author_phid),
+ $this->getFieldName(),
+ $xaction->renderHandleLink($object_phid),
+ phutil_count($rem),
+ $xaction->renderHandleList($rem));
+ } else {
+ return pht(
+ '%s updated %s for %s, added %s: %s; removed %s: %s.',
+ $xaction->renderHandleLink($author_phid),
+ $this->getFieldName(),
+ $xaction->renderHandleLink($object_phid),
+ phutil_count($add),
+ $xaction->renderHandleList($add),
+ phutil_count($rem),
+ $xaction->renderHandleList($rem));
+ }
+ }
+
public function validateApplicationTransactions(
PhabricatorApplicationTransactionEditor $editor,
$type,
diff --git a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
--- a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
+++ b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
@@ -1483,6 +1483,24 @@
'repositories for updates yet.',
),
+
+ '%s updated %s, added %d: %s.' =>
+ '%s updated %s, added: %4$s.',
+
+ '%s updated %s, removed %s: %s.' =>
+ '%s updated %s, removed: %4$s.',
+
+ '%s updated %s, added %s: %s; removed %s: %s.' =>
+ '%s updated %s, added: %4$s; removed: %6$s.',
+
+ '%s updated %s for %s, added %d: %s.' =>
+ '%s updated %s for %s, added: %5$s.',
+
+ '%s updated %s for %s, removed %s: %s.' =>
+ '%s updated %s for %s, removed: %5$s.',
+
+ '%s updated %s for %s, added %s: %s; removed %s: %s.' =>
+ '%s updated %s for %s, added: %5$s; removed; %7$s.',
);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 28, 8:34 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6745651
Default Alt Text
D14721.diff (2 KB)

Event Timeline