From 7bebfa289aa18e3ff043ea3a5b00d178ec6756e1 Mon Sep 17 00:00:00 2001 From: Valerio Bozzolan Date: Thu, 6 Jul 2023 13:31:42 +0200 Subject: [PATCH] Diffusion commits: add some edge phrases about Revisions Summary: This change implements some messages that were only present from this class: DifferentialRevisionHasCommitEdgeType.php But not in its inverse class: DiffusionCommitHasRevisionEdgeType.php In short: | Before | After | |-----------|-----------| | {F313282} | {F313281} | Closes T15314 Test Plan: Visit a Diffusion commit and use the sidebar menu "Edit Related Objects" to: - add 1 revision - add 2 revisions - remove 1 revision - remove 2 revisions - add 1 revision, remove 1 revision - add 2 revisions, remove 2 revisions Check that you don't see phrases like "added an edge" anymore. Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: speck, tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T15314 Differential Revision: https://we.phorge.it/D25306 --- .../DiffusionCommitHasRevisionEdgeType.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/applications/diffusion/edge/DiffusionCommitHasRevisionEdgeType.php b/src/applications/diffusion/edge/DiffusionCommitHasRevisionEdgeType.php index ce7a899bda..f59cb8e564 100644 --- a/src/applications/diffusion/edge/DiffusionCommitHasRevisionEdgeType.php +++ b/src/applications/diffusion/edge/DiffusionCommitHasRevisionEdgeType.php @@ -25,4 +25,45 @@ final class DiffusionCommitHasRevisionEdgeType extends PhabricatorEdgeType { 'The source commit is associated with the destination revision.'); } + public function getTransactionAddString( + $actor, + $add_count, + $add_edges) { + + return pht( + '%s added %s revision(s): %s.', + $actor, + $add_count, + $add_edges); + } + + public function getTransactionRemoveString( + $actor, + $rem_count, + $rem_edges) { + + return pht( + '%s removed %s revision(s): %s.', + $actor, + $rem_count, + $rem_edges); + } + + public function getTransactionEditString( + $actor, + $total_count, + $add_count, + $add_edges, + $rem_count, + $rem_edges) { + + return pht( + '%s edited revision(s), added %s: %s; removed %s: %s.', + $actor, + $add_count, + $add_edges, + $rem_count, + $rem_edges); + } + }