1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

Updating xaction titles for Phurl updates

Summary: Ref T8992, Cleaning up and clarifying xaction titles for Phurl creation/updating.

Test Plan: Create a Phurl, update information, make sure xaction in the timeline makes sense.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14414
This commit is contained in:
lkassianik 2015-11-05 10:47:21 -08:00
parent e2c0df4fb4
commit 9132b565d5

View file

@ -81,17 +81,35 @@ final class PhabricatorPhurlURLTransaction
$new); $new);
} }
case self::TYPE_URL: case self::TYPE_URL:
return pht( if ($old === null) {
'%s changed the destination of the URL from %s to %s.', return pht(
$this->renderHandleLink($author_phid), '%s set the destination of the URL to %s.',
$old, $this->renderHandleLink($author_phid),
$new); $new);
} else {
return pht(
'%s changed the destination of the URL from %s to %s.',
$this->renderHandleLink($author_phid),
$old,
$new);
}
case self::TYPE_ALIAS: case self::TYPE_ALIAS:
return pht( if ($old === null) {
'%s changed the alias of the URL from %s to %s.', return pht(
$this->renderHandleLink($author_phid), '%s set the alias of the URL to %s.',
$old, $this->renderHandleLink($author_phid),
$new); $new);
} else if ($new === null) {
return pht(
'%s removed the alias of the URL.',
$this->renderHandleLink($author_phid));
} else {
return pht(
'%s changed the alias of the URL from %s to %s.',
$this->renderHandleLink($author_phid),
$old,
$new);
}
case self::TYPE_DESCRIPTION: case self::TYPE_DESCRIPTION:
return pht( return pht(
"%s updated the URL's description.", "%s updated the URL's description.",
@ -128,12 +146,13 @@ final class PhabricatorPhurlURLTransaction
case self::TYPE_URL: case self::TYPE_URL:
if ($old === null) { if ($old === null) {
return pht( return pht(
'%s created %s.', '%s set the destination of %s to %s.',
$this->renderHandleLink($author_phid), $this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid)); $this->renderHandleLink($object_phid),
$new);
} else { } else {
return pht( return pht(
'%s changed the destination of %s from %s to %s', '%s changed the destination of %s from %s to %s.',
$this->renderHandleLink($author_phid), $this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid), $this->renderHandleLink($object_phid),
$old, $old,
@ -142,12 +161,18 @@ final class PhabricatorPhurlURLTransaction
case self::TYPE_ALIAS: case self::TYPE_ALIAS:
if ($old === null) { if ($old === null) {
return pht( return pht(
'%s created %s.', '%s set the alias of %s to %s.',
$this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid),
$new);
} else if ($new === null) {
return pht(
'%s removed the alias of %s.',
$this->renderHandleLink($author_phid), $this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid)); $this->renderHandleLink($object_phid));
} else { } else {
return pht( return pht(
'%s changed the alias of %s from %s to %s', '%s changed the alias of %s from %s to %s.',
$this->renderHandleLink($author_phid), $this->renderHandleLink($author_phid),
$this->renderHandleLink($object_phid), $this->renderHandleLink($object_phid),
$old, $old,