diff --git a/src/applications/badges/xaction/PhabricatorBadgesBadgeQualityTransaction.php b/src/applications/badges/xaction/PhabricatorBadgesBadgeQualityTransaction.php index de060c17e7..fc1bf014c0 100644 --- a/src/applications/badges/xaction/PhabricatorBadgesBadgeQualityTransaction.php +++ b/src/applications/badges/xaction/PhabricatorBadgesBadgeQualityTransaction.php @@ -1,70 +1,70 @@ getQuality(); } public function applyInternalEffects($object, $value) { $object->setQuality($value); } public function shouldHide() { if ($this->isCreateTransaction()) { return true; } return false; } public function getTitle() { $old = $this->getQualityLabel($this->getOldValue()); $new = $this->getQualityLabel($this->getNewValue()); return pht( '%s updated the quality from %s to %s.', $this->renderAuthor(), $old, $new); } public function getTitleForFeed() { $old = $this->getQualityLabel($this->getOldValue()); $new = $this->getQualityLabel($this->getNewValue()); return pht( - '%s updated %s quality from %s to %s.', + '%s updated the quality of %s from %s to %s.', $this->renderAuthor(), $this->renderObject(), - $new, - $old); + $old, + $new); } public function validateTransactions($object, array $xactions) { $errors = array(); if ($this->isEmptyTextTransaction($object->getQuality(), $xactions)) { $errors[] = $this->newRequiredError( pht('Badge quality must be set.')); } $map = PhabricatorBadgesQuality::getQualityMap(); if (!$map[$object->getQuality()]) { $errors[] = $this->newRequiredError( pht('Badge quality is not valid.')); } return $errors; } private function getQualityLabel($quality) { $map = PhabricatorBadgesQuality::getQualityMap(); $name = $map[$quality]['name']; return $this->renderValue($name); } }