Commit e0cccfc4 authored by Siebrand Mazeland's avatar Siebrand Mazeland

Translator documentation updated.

i18n/L10n updates.
Superfluous whitespace removed.
Add FIXME for missing class documentation.
parent 78edb4bf
......@@ -44,25 +44,21 @@ require_once INSTALLDIR.'/lib/feedlist.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
class ShownoticeAction extends OwnerDesignAction
{
/**
* Notice object to show
*/
var $notice = null;
/**
* Profile of the notice object
*/
var $profile = null;
/**
* Avatar of the profile of the notice object
*/
var $avatar = null;
/**
......@@ -74,7 +70,6 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return success flag
*/
function prepare($args)
{
parent::prepare($args);
......@@ -90,8 +85,10 @@ class ShownoticeAction extends OwnerDesignAction
// Did we used to have it, and it got deleted?
$deleted = Deleted_notice::staticGet($id);
if (!empty($deleted)) {
// TRANS: Client error displayed trying to show a deleted notice.
$this->clientError(_('Notice deleted.'), 410);
} else {
// TRANS: Client error displayed trying to show a non-existing notice.
$this->clientError(_('No such notice.'), 404);
}
return false;
......@@ -100,6 +97,7 @@ class ShownoticeAction extends OwnerDesignAction
$this->profile = $this->notice->getProfile();
if (empty($this->profile)) {
// TRANS: Server error displayed trying to show a notice without a connected profile.
$this->serverError(_('Notice has no profile.'), 500);
return false;
}
......@@ -116,7 +114,6 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return boolean true
*/
function isReadOnly($args)
{
return true;
......@@ -130,7 +127,6 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return int last-modified date as unix timestamp
*/
function lastModified()
{
return max(strtotime($this->notice->modified),
......@@ -147,7 +143,6 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return string etag
*/
function etag()
{
$avtime = ($this->avatar) ?
......@@ -167,11 +162,12 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return string title of the page
*/
function title()
{
$base = $this->profile->getFancyName();
// TRANS: Title of the page that shows a notice.
// TRANS: %1$s is a user name, %2$s is the notice creation date/time.
return sprintf(_('%1$s\'s status on %2$s'),
$base,
common_exact_date($this->notice->created));
......@@ -186,7 +182,6 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return void
*/
function handle($args)
{
parent::handle($args);
......@@ -218,7 +213,6 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return void
*/
function showLocalNavBlock()
{
}
......@@ -230,7 +224,6 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return void
*/
function showContent()
{
$this->elementStart('ol', array('class' => 'notices xoxo'));
......@@ -245,7 +238,8 @@ class ShownoticeAction extends OwnerDesignAction
$this->xw->startDocument('1.0', 'UTF-8');
$this->elementStart('html');
$this->elementStart('head');
$this->element('title', null, _('Notice'));
// TRANS: Title for page that shows a notice.
$this->element('title', null, _m('TITLE','Notice'));
$this->elementEnd('head');
$this->elementStart('body');
$nli = new NoticeListItem($this->notice, $this);
......@@ -259,7 +253,6 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return void
*/
function showPageNoticeBlock()
{
}
......@@ -269,7 +262,6 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return void
*/
function showAside() {
}
......@@ -280,7 +272,6 @@ class ShownoticeAction extends OwnerDesignAction
*
* @return void
*/
function extraHead()
{
$user = User::staticGet($this->profile->id);
......@@ -323,16 +314,16 @@ class ShownoticeAction extends OwnerDesignAction
}
}
// @todo FIXME: Class documentation missing.
class SingleNoticeItem extends DoFollowListItem
{
/**
* recipe function for displaying a single notice.
* Recipe function for displaying a single notice.
*
* We overload to show attachments.
*
* @return void
*/
function show()
{
$this->showStart();
......@@ -363,7 +354,6 @@ class SingleNoticeItem extends DoFollowListItem
*
* @return void
*/
function showAvatar()
{
$avatar_size = AVATAR_PROFILE_SIZE;
......
......@@ -65,7 +65,8 @@ class ShowstreamAction extends ProfileAction
$base = $this->profile->getFancyName();
if (!empty($this->tag)) {
if ($this->page == 1) {
// TRANS: Page title showing tagged notices in one user's stream. %1$s is the username, %2$s is the hash tag.
// TRANS: Page title showing tagged notices in one user's stream.
// TRANS: %1$s is the username, %2$s is the hash tag.
return sprintf(_('%1$s tagged %2$s'), $base, $this->tag);
} else {
// TRANS: Page title showing tagged notices in one user's stream.
......@@ -153,6 +154,8 @@ class ShowstreamAction extends ProfileAction
array(
'id' => $this->user->id,
'format' => 'atom')),
// TRANS: Title for link to notice feed.
// TRANS: %s is a user nickname.
sprintf(_('Notice feed for %s (Atom)'),
$this->user->nickname)),
new Feed(Feed::FOAF,
......
......@@ -40,7 +40,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/
*/
class SilenceAction extends ProfileFormAction
{
/**
......@@ -50,7 +49,6 @@ class SilenceAction extends ProfileFormAction
*
* @return boolean success flag
*/
function prepare($args)
{
if (!parent::prepare($args)) {
......@@ -62,6 +60,7 @@ class SilenceAction extends ProfileFormAction
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::SILENCEUSER)) {
// TRANS: Client error displayed trying to silence a user on a site where the feature is not enabled.
$this->clientError(_('You cannot silence users on this site.'));
return false;
}
......@@ -69,6 +68,7 @@ class SilenceAction extends ProfileFormAction
assert(!empty($this->profile)); // checked by parent
if ($this->profile->isSilenced()) {
// TRANS: Client error displayed trying to silence an already silenced user.
$this->clientError(_('User is already silenced.'));
return false;
}
......@@ -81,7 +81,6 @@ class SilenceAction extends ProfileFormAction
*
* @return void
*/
function handlePost()
{
$this->profile->silence();
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment