X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FBookmark%2Fnoticebyurl.php;h=0f40db8fccc78fa63c941041baf34c0b0f37a843;hb=524b98bfa3fd340ade6ce8b0e7f23ce773db5d92;hp=226c7a32bf0ff7d25cd038d174736f2a4bd6d189;hpb=d3b10959f4cbb9a195e93d0180fcc12ab7b7452e;p=quix0rs-gnu-social.git diff --git a/plugins/Bookmark/noticebyurl.php b/plugins/Bookmark/noticebyurl.php index 226c7a32bf..0f40db8fcc 100644 --- a/plugins/Bookmark/noticebyurl.php +++ b/plugins/Bookmark/noticebyurl.php @@ -4,7 +4,7 @@ * Copyright (C) 2010, StatusNet, Inc. * * Notice stream of notices with a given attachment - * + * * PHP version 5 * * This program is free software: you can redistribute it and/or modify @@ -44,7 +44,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ - class NoticebyurlAction extends Action { protected $url = null; @@ -59,15 +58,15 @@ class NoticebyurlAction extends Action * * @return boolean true */ - function prepare($argarray) { parent::prepare($argarray); - + $this->file = File::staticGet('id', $this->trimmed('id')); if (empty($this->file)) { - throw new ClientException(_('Unknown URL')); + // TRANS: Client exception thrown when an unknown URL is provided. + throw new ClientException(_m('Unknown URL.')); } $pageArg = $this->trimmed('page'); @@ -85,13 +84,16 @@ class NoticebyurlAction extends Action * * @return string page title */ - function title() { if ($this->page == 1) { - return sprintf(_("Notices linking to %s"), $this->file->url); + // TRANS: Title of notice stream of notices with a given attachment (first page). + // TRANS: %s is the URL. + return sprintf(_m('Notices linking to %s'), $this->file->url); } else { - return sprintf(_("Notices linking to %s, page %d"), + // TRANS: Title of notice stream of notices with a given attachment (all but first page). + // TRANS: %1$s is the URL, %2$s is the page number. + return sprintf(_m('Notices linking to %1$s, page %2$d'), $this->file->url, $this->page); } @@ -104,7 +106,6 @@ class NoticebyurlAction extends Action * * @return void */ - function handle($argarray=null) { $this->showPage(); @@ -117,7 +118,6 @@ class NoticebyurlAction extends Action * * @return void */ - function showContent() { $nl = new NoticeList($this->notices, $this); @@ -142,7 +142,6 @@ class NoticebyurlAction extends Action * * @return boolean is read only action? */ - function isReadOnly($args) { return true; @@ -169,7 +168,6 @@ class NoticebyurlAction extends Action * * @return string etag http header */ - function etag() { return null;