Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/action/HeraldAction.php
| Show First 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | final public function renderEffectDescription($type, $data) { | ||||
| switch ($type) { | switch ($type) { | ||||
| case self::DO_STANDARD_EMPTY: | case self::DO_STANDARD_EMPTY: | ||||
| return pht( | return pht( | ||||
| 'This action specifies no targets.'); | 'This action specifies no targets.'); | ||||
| case self::DO_STANDARD_NO_EFFECT: | case self::DO_STANDARD_NO_EFFECT: | ||||
| return pht( | return pht( | ||||
| 'This action has no effect on %s target(s): %s.', | 'This action has no effect on %s target(s): %s.', | ||||
| new PhutilNumber(count($data)), | phutil_count($data), | ||||
| $this->renderHandleList($data)); | $this->renderHandleList($data)); | ||||
| case self::DO_STANDARD_INVALID: | case self::DO_STANDARD_INVALID: | ||||
| return pht( | return pht( | ||||
| '%s target(s) are invalid or of the wrong type: %s.', | '%s target(s) are invalid or of the wrong type: %s.', | ||||
| new PhutilNumber(count($data)), | phutil_count($data), | ||||
| $this->renderHandleList($data)); | $this->renderHandleList($data)); | ||||
| case self::DO_STANDARD_UNLOADABLE: | case self::DO_STANDARD_UNLOADABLE: | ||||
| return pht( | return pht( | ||||
| '%s target(s) could not be loaded: %s.', | '%s target(s) could not be loaded: %s.', | ||||
| new PhutilNumber(count($data)), | phutil_count($data), | ||||
| $this->renderHandleList($data)); | $this->renderHandleList($data)); | ||||
| case self::DO_STANDARD_PERMISSION: | case self::DO_STANDARD_PERMISSION: | ||||
| return pht( | return pht( | ||||
| '%s target(s) do not have permission to see this object: %s.', | '%s target(s) do not have permission to see this object: %s.', | ||||
| new PhutilNumber(count($data)), | phutil_count($data), | ||||
| $this->renderHandleList($data)); | $this->renderHandleList($data)); | ||||
| case self::DO_STANDARD_INVALID_ACTION: | case self::DO_STANDARD_INVALID_ACTION: | ||||
| return pht( | return pht( | ||||
| 'No implementation is available for rule "%s".', | 'No implementation is available for rule "%s".', | ||||
| $data); | $data); | ||||
| case self::DO_STANDARD_WRONG_RULE_TYPE: | case self::DO_STANDARD_WRONG_RULE_TYPE: | ||||
| return pht( | return pht( | ||||
| 'This action does not support rules of type "%s".', | 'This action does not support rules of type "%s".', | ||||
| $data); | $data); | ||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||