Path: blob/master/src/applications/differential/constants/DifferentialAction.php
12256 views
<?php12final class DifferentialAction extends Phobject {34const ACTION_CLOSE = 'commit';5const ACTION_COMMENT = 'none';6const ACTION_ACCEPT = 'accept';7const ACTION_REJECT = 'reject';8const ACTION_RETHINK = 'rethink';9const ACTION_ABANDON = 'abandon';10const ACTION_REQUEST = 'request_review';11const ACTION_RECLAIM = 'reclaim';12const ACTION_UPDATE = 'update';13const ACTION_RESIGN = 'resign';14const ACTION_SUMMARIZE = 'summarize';15const ACTION_TESTPLAN = 'testplan';16const ACTION_CREATE = 'create';17const ACTION_ADDREVIEWERS = 'add_reviewers';18const ACTION_ADDCCS = 'add_ccs';19const ACTION_CLAIM = 'claim';20const ACTION_REOPEN = 'reopen';2122public static function getBasicStoryText($action, $author_name) {23switch ($action) {24case self::ACTION_COMMENT:25$title = pht(26'%s commented on this revision.',27$author_name);28break;29case self::ACTION_ACCEPT:30$title = pht(31'%s accepted this revision.',32$author_name);33break;34case self::ACTION_REJECT:35$title = pht(36'%s requested changes to this revision.',37$author_name);38break;39case self::ACTION_RETHINK:40$title = pht(41'%s planned changes to this revision.',42$author_name);43break;44case self::ACTION_ABANDON:45$title = pht(46'%s abandoned this revision.',47$author_name);48break;49case self::ACTION_CLOSE:50$title = pht(51'%s closed this revision.',52$author_name);53break;54case self::ACTION_REQUEST:55$title = pht(56'%s requested a review of this revision.',57$author_name);58break;59case self::ACTION_RECLAIM:60$title = pht(61'%s reclaimed this revision.',62$author_name);63break;64case self::ACTION_UPDATE:65$title = pht(66'%s updated this revision.',67$author_name);68break;69case self::ACTION_RESIGN:70$title = pht(71'%s resigned from this revision.',72$author_name);73break;74case self::ACTION_SUMMARIZE:75$title = pht(76'%s summarized this revision.',77$author_name);78break;79case self::ACTION_TESTPLAN:80$title = pht(81'%s explained the test plan for this revision.',82$author_name);83break;84case self::ACTION_CREATE:85$title = pht(86'%s created this revision.',87$author_name);88break;89case self::ACTION_ADDREVIEWERS:90$title = pht(91'%s added reviewers to this revision.',92$author_name);93break;94case self::ACTION_ADDCCS:95$title = pht(96'%s added CCs to this revision.',97$author_name);98break;99case self::ACTION_CLAIM:100$title = pht(101'%s commandeered this revision.',102$author_name);103break;104case self::ACTION_REOPEN:105$title = pht(106'%s reopened this revision.',107$author_name);108break;109case DifferentialTransaction::TYPE_INLINE:110$title = pht(111'%s added an inline comment.',112$author_name);113break;114default:115$title = pht('Ghosts happened to this revision.');116break;117}118return $title;119}120121}122123124