X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FSample%2Fhello.php;h=da5682b332a0b4e6eadace042f393b725a049df5;hb=25198a8d4cee5b2182f1ecb99192a4108a01afa4;hp=dfbd0ad4f256ffa578a2a7cdde65a0e2cd4580de;hpb=8914b69d5055c1bc7d0604ee338ffdaf6b0a8606;p=quix0rs-gnu-social.git diff --git a/plugins/Sample/hello.php b/plugins/Sample/hello.php index dfbd0ad4f2..da5682b332 100644 --- a/plugins/Sample/hello.php +++ b/plugins/Sample/hello.php @@ -46,7 +46,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - class HelloAction extends Action { var $user = null; @@ -67,7 +66,6 @@ class HelloAction extends Action * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -93,7 +91,6 @@ class HelloAction extends Action * * @return void */ - function handle($args) { parent::handle($args); @@ -108,13 +105,14 @@ class HelloAction extends Action * * @return string Title of the page */ - function title() { if (empty($this->user)) { + // TRANS: Page title for sample plugin. return _m('Hello'); } else { - return sprintf(_m('Hello, %s'), $this->user->nickname); + // TRANS: Page title for sample plugin. %s is a user nickname. + return sprintf(_m('Hello, %s!'), $this->user->nickname); } } @@ -130,16 +128,19 @@ class HelloAction extends Action * * @return void */ - function showContent() { if (empty($this->user)) { $this->element('p', array('class' => 'greeting'), + // TRANS: Message in sample plugin. _m('Hello, stranger!')); } else { $this->element('p', array('class' => 'greeting'), + // TRANS: Message in sample plugin. %s is a user nickname. sprintf(_m('Hello, %s'), $this->user->nickname)); $this->element('p', array('class' => 'greeting_count'), + // TRANS: Message in sample plugin. + // TRANS: %d is the number of times a user is greeted. sprintf(_m('I have greeted you %d time.', 'I have greeted you %d times.', $this->gc->greeting_count), @@ -162,7 +163,6 @@ class HelloAction extends Action * * @return boolean is read only action? */ - function isReadOnly($args) { return false;