Upadte translator documentation.

Add FIXME for missing class documentation.
i18n/L10n tweaks.
Superfluous whitespace removed.
This commit is contained in:
Siebrand Mazeland 2011-04-03 14:24:55 +02:00
parent fec3edee45
commit b1d451f98b
16 changed files with 53 additions and 82 deletions

View File

@ -51,6 +51,7 @@ class NoticePlaceholderForm extends Widget
function show() function show()
{ {
// Similar to that for inline replies, but not quite! // Similar to that for inline replies, but not quite!
// TRANS: Field label for notice text.
$placeholder = _('Update your status...'); $placeholder = _('Update your status...');
$this->out->elementStart('div', 'form_notice_placeholder'); $this->out->elementStart('div', 'form_notice_placeholder');
$this->out->element('input', array('class' => 'placeholder', $this->out->element('input', array('class' => 'placeholder',

View File

@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php';
* *
* @see DisfavorForm * @see DisfavorForm
*/ */
class NudgeForm extends Form class NudgeForm extends Form
{ {
/** /**
* Profile of user to nudge * Profile of user to nudge
*/ */
var $profile = null; var $profile = null;
/** /**
@ -61,7 +59,6 @@ class NudgeForm extends Form
* @param HTMLOutputter $out output channel * @param HTMLOutputter $out output channel
* @param Profile $profile profile of user to nudge * @param Profile $profile profile of user to nudge
*/ */
function __construct($out=null, $profile=null) function __construct($out=null, $profile=null)
{ {
parent::__construct($out); parent::__construct($out);
@ -74,7 +71,6 @@ class NudgeForm extends Form
* *
* @return int ID of the form * @return int ID of the form
*/ */
function id() function id()
{ {
return 'form_user_nudge'; return 'form_user_nudge';
@ -86,7 +82,6 @@ class NudgeForm extends Form
* *
* @return string of the form class * @return string of the form class
*/ */
function formClass() function formClass()
{ {
return 'form_user_nudge ajax'; return 'form_user_nudge ajax';
@ -98,7 +93,6 @@ class NudgeForm extends Form
* *
* @return string URL of the action * @return string URL of the action
*/ */
function action() function action()
{ {
return common_local_url('nudge', return common_local_url('nudge',
@ -113,6 +107,7 @@ class NudgeForm extends Form
*/ */
function formLegend() function formLegend()
{ {
// TRANS: Form legend of form to nudge/ping another user.
$this->out->element('legend', null, _('Nudge this user')); $this->out->element('legend', null, _('Nudge this user'));
} }
@ -122,9 +117,14 @@ class NudgeForm extends Form
* *
* @return void * @return void
*/ */
function formActions() function formActions()
{ {
$this->out->submit('submit', _('Nudge'), 'submit', null, _('Send a nudge to this user')); $this->out->submit('submit',
// TRANS: Button text to nudge/ping another user.
_m('BUTTON','Nudge'),
'submit',
null,
// TRANS: Button title to nudge/ping another user.
_('Send a nudge to this user.'));
} }
} }

View File

@ -21,9 +21,9 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
require_once 'libomb/datastore.php'; require_once 'libomb/datastore.php';
// @todo FIXME: Class documentation missing.
class StatusNetOAuthDataStore extends OAuthDataStore class StatusNetOAuthDataStore extends OAuthDataStore
{ {
// We keep a record of who's contacted us // We keep a record of who's contacted us
function lookup_consumer($consumer_key) function lookup_consumer($consumer_key)
{ {
@ -69,9 +69,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore
// http://oauth.net/core/1.0/#nonce // http://oauth.net/core/1.0/#nonce
// "The Consumer SHALL then generate a Nonce value that is unique for // "The Consumer SHALL then generate a Nonce value that is unique for
// all requests with that timestamp." // all requests with that timestamp."
// XXX: It's not clear why the token is here // XXX: It's not clear why the token is here
function lookup_nonce($consumer, $token, $nonce, $timestamp) function lookup_nonce($consumer, $token, $nonce, $timestamp)
{ {
$n = new Nonce(); $n = new Nonce();
@ -104,7 +102,6 @@ class StatusNetOAuthDataStore extends OAuthDataStore
} }
// defined in OAuthDataStore, but not implemented anywhere // defined in OAuthDataStore, but not implemented anywhere
function fetch_request_token($consumer) function fetch_request_token($consumer)
{ {
return $this->new_request_token($consumer); return $this->new_request_token($consumer);
@ -161,7 +158,6 @@ class StatusNetOAuthDataStore extends OAuthDataStore
} }
// defined in OAuthDataStore, but not implemented anywhere // defined in OAuthDataStore, but not implemented anywhere
function fetch_access_token($consumer) function fetch_access_token($consumer)
{ {
return $this->new_access_token($consumer); return $this->new_access_token($consumer);
@ -232,7 +228,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore
**/ **/
public function getProfile($identifier_uri) { public function getProfile($identifier_uri) {
/* getProfile is only used for remote profiles by libomb. /* getProfile is only used for remote profiles by libomb.
TODO: Make it work with local ones anyway. */ @TODO: Make it work with local ones anyway. */
$remote = Remote_profile::staticGet('uri', $identifier_uri); $remote = Remote_profile::staticGet('uri', $identifier_uri);
if (!$remote) throw new Exception('No such remote profile'); if (!$remote) throw new Exception('No such remote profile');
$profile = Profile::staticGet('id', $remote->id); $profile = Profile::staticGet('id', $remote->id);
@ -291,6 +287,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore
$profile->created = DB_DataObject_Cast::dateTime(); # current time $profile->created = DB_DataObject_Cast::dateTime(); # current time
$id = $profile->insert(); $id = $profile->insert();
if (!$id) { if (!$id) {
// TRANS: Exception thrown when creating a new profile fails in OAuth store.
throw new Exception(_('Error inserting new profile.')); throw new Exception(_('Error inserting new profile.'));
} }
$remote->id = $id; $remote->id = $id;
@ -299,6 +296,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore
$avatar_url = $omb_profile->getAvatarURL(); $avatar_url = $omb_profile->getAvatarURL();
if ($avatar_url) { if ($avatar_url) {
if (!$this->add_avatar($profile, $avatar_url)) { if (!$this->add_avatar($profile, $avatar_url)) {
// TRANS: Exception thrown when creating a new avatar fails in OAuth store.
throw new Exception(_('Error inserting avatar.')); throw new Exception(_('Error inserting avatar.'));
} }
} else { } else {
@ -314,11 +312,13 @@ class StatusNetOAuthDataStore extends OAuthDataStore
if ($exists) { if ($exists) {
if (!$remote->update($orig_remote)) { if (!$remote->update($orig_remote)) {
// TRANS: Exception thrown when updating a remote profile fails in OAuth store.
throw new Exception(_('Error updating remote profile.')); throw new Exception(_('Error updating remote profile.'));
} }
} else { } else {
$remote->created = DB_DataObject_Cast::dateTime(); # current time $remote->created = DB_DataObject_Cast::dateTime(); # current time
if (!$remote->insert()) { if (!$remote->insert()) {
// TRANS: Exception thrown when creating a remote profile fails in OAuth store.
throw new Exception(_('Error inserting remote profile.')); throw new Exception(_('Error inserting remote profile.'));
} }
} }
@ -479,6 +479,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore
if (!$subscriber->hasRight(Right::SUBSCRIBE)) { if (!$subscriber->hasRight(Right::SUBSCRIBE)) {
common_log(LOG_INFO, __METHOD__ . ": remote subscriber banned ($subscriber_uri subbing to $subscribed_user_uri)"); common_log(LOG_INFO, __METHOD__ . ": remote subscriber banned ($subscriber_uri subbing to $subscribed_user_uri)");
// TRANS: Error message displayed to a banned user when they try to subscribe.
return _('You have been banned from subscribing.'); return _('You have been banned from subscribing.');
} }
@ -504,7 +505,8 @@ class StatusNetOAuthDataStore extends OAuthDataStore
if (!$result) { if (!$result) {
common_log_db_error($sub, ($sub_exists) ? 'UPDATE' : 'INSERT', __FILE__); common_log_db_error($sub, ($sub_exists) ? 'UPDATE' : 'INSERT', __FILE__);
throw new Exception(_('Couldn\'t insert new subscription.')); // TRANS: Exception thrown when creating a new subscription fails in OAuth store.
throw new Exception(_('Could not insert new subscription.'));
return; return;
} }
@ -516,4 +518,3 @@ class StatusNetOAuthDataStore extends OAuthDataStore
} }
} }
} }
?>

View File

@ -43,7 +43,6 @@ require INSTALLDIR . "/lib/plugindisableform.php";
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class PluginList extends Widget class PluginList extends Widget
{ {
var $plugins = array(); var $plugins = array();
@ -116,7 +115,7 @@ class PluginListItem extends Widget
$this->out->elementEnd('a'); $this->out->elementEnd('a');
} }
$this->out->elementEnd('div'); $this->out->elementEnd('div');
$form = $this->getControlForm(); $form = $this->getControlForm();
$form->show(); $form->show();
@ -192,6 +191,7 @@ class PluginListItem extends Widget
return $found; return $found;
} else { } else {
return array('name' => $this->plugin, return array('name' => $this->plugin,
// TRANS: Plugin description for a disabled plugin.
'rawdescription' => _m('plugin-description', 'rawdescription' => _m('plugin-description',
'(Plugin descriptions unavailable when disabled.)')); '(Plugin descriptions unavailable when disabled.)'));
} }

View File

@ -42,21 +42,18 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/ * @link http://status.net/
*/ */
class RedirectingAction extends Action class RedirectingAction extends Action
{ {
/** /**
* Redirect browser to the page our hidden parameters requested, * Redirect browser to the page our hidden parameters requested,
* or if none given, to the url given by $this->defaultReturnTo(). * or if none given, to the url given by $this->defaultReturnTo().
* *
* To be called only after successful processing. * To be called only after successful processing.
* *
* Note: this was named returnToArgs() up through 0.9.2, which * Note: this was named returnToArgs() up through 0.9.2, which
* caused problems because there's an Action::returnToArgs() * caused problems because there's an Action::returnToArgs()
* already which does something different. * already which does something different.
* *
* @return void * @return void
*/ */
function returnToPrevious() function returnToPrevious()
@ -87,11 +84,12 @@ class RedirectingAction extends Action
* If we reached this form without returnto arguments, where should * If we reached this form without returnto arguments, where should
* we go? May be overridden by subclasses to a reasonable destination * we go? May be overridden by subclasses to a reasonable destination
* for that action; default implementation throws an exception. * for that action; default implementation throws an exception.
* *
* @return string URL * @return string URL
*/ */
function defaultReturnTo() function defaultReturnTo()
{ {
$this->clientError(_("No return-to arguments.")); // TRANS: Client error displayed when return-to was defined without a target.
$this->clientError(_('No return-to arguments.'));
} }
} }

View File

@ -40,13 +40,11 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class RepeatForm extends Form class RepeatForm extends Form
{ {
/** /**
* Notice to repeat * Notice to repeat
*/ */
var $notice = null; var $notice = null;
/** /**
@ -55,7 +53,6 @@ class RepeatForm extends Form
* @param HTMLOutputter $out output channel * @param HTMLOutputter $out output channel
* @param Notice $notice notice to repeat * @param Notice $notice notice to repeat
*/ */
function __construct($out=null, $notice=null) function __construct($out=null, $notice=null)
{ {
parent::__construct($out); parent::__construct($out);
@ -68,7 +65,6 @@ class RepeatForm extends Form
* *
* @return int ID of the form * @return int ID of the form
*/ */
function id() function id()
{ {
return 'repeat-' . $this->notice->id; return 'repeat-' . $this->notice->id;
@ -79,7 +75,6 @@ class RepeatForm extends Form
* *
* @return string URL of the action * @return string URL of the action
*/ */
function action() function action()
{ {
return common_local_url('repeat'); return common_local_url('repeat');
@ -90,7 +85,6 @@ class RepeatForm extends Form
* *
* @return void * @return void
*/ */
function sessionToken() function sessionToken()
{ {
$this->out->hidden('token-' . $this->notice->id, $this->out->hidden('token-' . $this->notice->id,
@ -104,6 +98,7 @@ class RepeatForm extends Form
*/ */
function formLegend() function formLegend()
{ {
// TRANS: For legend for notice repeat form.
$this->out->element('legend', null, _('Repeat this notice?')); $this->out->element('legend', null, _('Repeat this notice?'));
} }
@ -112,7 +107,6 @@ class RepeatForm extends Form
* *
* @return void * @return void
*/ */
function formData() function formData()
{ {
$this->out->hidden('notice-n'.$this->notice->id, $this->out->hidden('notice-n'.$this->notice->id,
@ -125,11 +119,13 @@ class RepeatForm extends Form
* *
* @return void * @return void
*/ */
function formActions() function formActions()
{ {
$this->out->submit('repeat-submit-' . $this->notice->id, $this->out->submit('repeat-submit-' . $this->notice->id,
_('Yes'), 'submit', null, _('Repeat this notice')); // TRANS: Button text to repeat a notice on notice repeat form.
_m('BUTTON','Yes'), 'submit', null,
// TRANS: Button title to repeat a notice on notice repeat form.
_('Repeat this notice.'));
} }
/** /**
@ -137,7 +133,6 @@ class RepeatForm extends Form
* *
* @return string the form's class * @return string the form's class
*/ */
function formClass() function formClass()
{ {
return 'form_repeat'; return 'form_repeat';

View File

@ -42,7 +42,6 @@ if (!defined('STATUSNET')) {
* *
* @see UnSandboxForm * @see UnSandboxForm
*/ */
class RevokeRoleForm extends ProfileActionForm class RevokeRoleForm extends ProfileActionForm
{ {
function __construct($role, $label, $writer, $profile, $r2args) function __construct($role, $label, $writer, $profile, $r2args)
@ -57,7 +56,6 @@ class RevokeRoleForm extends ProfileActionForm
* *
* @return string Name of the action, lowercased. * @return string Name of the action, lowercased.
*/ */
function target() function target()
{ {
return 'revokerole'; return 'revokerole';
@ -68,7 +66,6 @@ class RevokeRoleForm extends ProfileActionForm
* *
* @return string Title of the form, internationalized * @return string Title of the form, internationalized
*/ */
function title() function title()
{ {
return $this->label; return $this->label;
@ -85,9 +82,9 @@ class RevokeRoleForm extends ProfileActionForm
* *
* @return string description of the form, internationalized * @return string description of the form, internationalized
*/ */
function description() function description()
{ {
// TRANS: Description of role revoke form. %s is the role to be revoked.
return sprintf(_('Revoke the "%s" role from this user'), $this->label); return sprintf(_('Revoke the "%s" role from this user'), $this->label);
} }
} }

View File

@ -42,7 +42,6 @@ if (!defined('STATUSNET')) {
* *
* @see UnSandboxForm * @see UnSandboxForm
*/ */
class SandboxForm extends ProfileActionForm class SandboxForm extends ProfileActionForm
{ {
/** /**
@ -50,7 +49,6 @@ class SandboxForm extends ProfileActionForm
* *
* @return string Name of the action, lowercased. * @return string Name of the action, lowercased.
*/ */
function target() function target()
{ {
return 'sandbox'; return 'sandbox';
@ -61,10 +59,10 @@ class SandboxForm extends ProfileActionForm
* *
* @return string Title of the form, internationalized * @return string Title of the form, internationalized
*/ */
function title() function title()
{ {
return _('Sandbox'); // TRANS: Title of form to sandbox a user.
return _m('TITLE','Sandbox');
} }
/** /**
@ -72,9 +70,9 @@ class SandboxForm extends ProfileActionForm
* *
* @return string description of the form, internationalized * @return string description of the form, internationalized
*/ */
function description() function description()
{ {
// TRANS: Description of form to sandbox a user.
return _('Sandbox this user'); return _('Sandbox this user');
} }
} }

View File

@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/widget.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class Section extends Widget class Section extends Widget
{ {
/** /**
@ -56,7 +55,6 @@ class Section extends Widget
* @return void * @return void
* @see Widget::show() * @see Widget::show()
*/ */
function show() function show()
{ {
$this->out->elementStart('div', $this->out->elementStart('div',
@ -86,12 +84,14 @@ class Section extends Widget
function title() function title()
{ {
// TRANS: Default title for section/sidebar widget.
return _('Untitled section'); return _('Untitled section');
} }
function showContent() function showContent()
{ {
$this->out->element('p', null, $this->out->element('p', null,
// TRANS: Default content for section/sidebar widget.
_('(None)')); _('(None)'));
return false; return false;
} }
@ -103,6 +103,7 @@ class Section extends Widget
function moreTitle() function moreTitle()
{ {
// TRANS: Default "More..." title for section/sidebar widget.
return _('More...'); return _('More...');
} }
} }

View File

@ -42,7 +42,6 @@ if (!defined('STATUSNET')) {
* *
* @see UnSilenceForm * @see UnSilenceForm
*/ */
class SilenceForm extends ProfileActionForm class SilenceForm extends ProfileActionForm
{ {
/** /**
@ -50,7 +49,6 @@ class SilenceForm extends ProfileActionForm
* *
* @return string Name of the action, lowercased. * @return string Name of the action, lowercased.
*/ */
function target() function target()
{ {
return 'silence'; return 'silence';
@ -61,10 +59,10 @@ class SilenceForm extends ProfileActionForm
* *
* @return string Title of the form, internationalized * @return string Title of the form, internationalized
*/ */
function title() function title()
{ {
return _('Silence'); // TRANS: Title of form to silence a user.
return _m('TITLE','Silence');
} }
/** /**
@ -72,9 +70,9 @@ class SilenceForm extends ProfileActionForm
* *
* @return string description of the form, internationalized * @return string description of the form, internationalized
*/ */
function description() function description()
{ {
// TRANS: Description of form to silence a user.
return _('Silence this user'); return _('Silence this user');
} }
} }

View File

@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php';
* *
* @see UnsubscribeForm * @see UnsubscribeForm
*/ */
class SubscribeForm extends Form class SubscribeForm extends Form
{ {
/** /**
* Profile of user to subscribe to * Profile of user to subscribe to
*/ */
var $profile = null; var $profile = null;
/** /**
@ -61,7 +59,6 @@ class SubscribeForm extends Form
* @param HTMLOutputter $out output channel * @param HTMLOutputter $out output channel
* @param Profile $profile profile of user to subscribe to * @param Profile $profile profile of user to subscribe to
*/ */
function __construct($out=null, $profile=null) function __construct($out=null, $profile=null)
{ {
parent::__construct($out); parent::__construct($out);
@ -74,37 +71,31 @@ class SubscribeForm extends Form
* *
* @return int ID of the form * @return int ID of the form
*/ */
function id() function id()
{ {
return 'subscribe-' . $this->profile->id; return 'subscribe-' . $this->profile->id;
} }
/** /**
* class of the form * class of the form
* *
* @return string of the form class * @return string of the form class
*/ */
function formClass() function formClass()
{ {
return 'form_user_subscribe ajax'; return 'form_user_subscribe ajax';
} }
/** /**
* Action of the form * Action of the form
* *
* @return string URL of the action * @return string URL of the action
*/ */
function action() function action()
{ {
return common_local_url('subscribe'); return common_local_url('subscribe');
} }
/** /**
* Legend of the Form * Legend of the Form
* *
@ -112,6 +103,7 @@ class SubscribeForm extends Form
*/ */
function formLegend() function formLegend()
{ {
// TRANS: Form of form to subscribe to a user.
$this->out->element('legend', null, _('Subscribe to this user')); $this->out->element('legend', null, _('Subscribe to this user'));
} }
@ -120,7 +112,6 @@ class SubscribeForm extends Form
* *
* @return void * @return void
*/ */
function formData() function formData()
{ {
$this->out->hidden('subscribeto-' . $this->profile->id, $this->out->hidden('subscribeto-' . $this->profile->id,
@ -133,9 +124,11 @@ class SubscribeForm extends Form
* *
* @return void * @return void
*/ */
function formActions() function formActions()
{ {
$this->out->submit('submit', _('Subscribe'), 'submit', null, _('Subscribe to this user')); // TRANS: Button text to subscribe to a user.
$this->out->submit('submit', _m('BUTTON','Subscribe'), 'submit', null,
// TRANS: Button title to subscribe to a user.
_('Subscribe to this user.'));
} }
} }

View File

@ -40,23 +40,17 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class SubscribersPeopleSelfTagCloudSection extends SubPeopleTagCloudSection class SubscribersPeopleSelfTagCloudSection extends SubPeopleTagCloudSection
{ {
function title() function title()
{ {
// TRANS: Title of personal tag cloud section.
return _('People Tagcloud as self-tagged'); return _('People Tagcloud as self-tagged');
} }
function query() { function query() {
// return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscribed != subscriber and tagger = tagged group by tag order by weight desc'; // return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscribed != subscriber and tagger = tagged group by tag order by weight desc';
return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc'; return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc';
// return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscribed where subscriber=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc'; // return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscribed where subscriber=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc';
} }
} }

View File

@ -40,11 +40,11 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class SubscribersPeopleTagCloudSection extends SubPeopleTagCloudSection class SubscribersPeopleTagCloudSection extends SubPeopleTagCloudSection
{ {
function title() function title()
{ {
// TRANS: Title of personal tag cloud section.
return _('People Tagcloud as tagged'); return _('People Tagcloud as tagged');
} }
@ -58,4 +58,3 @@ class SubscribersPeopleTagCloudSection extends SubPeopleTagCloudSection
return 'select tag, count(tag) as weight from subscription left join profile_tag on subscriber=tagged and subscribed=tagger where subscribed=%d and subscriber != subscribed and tag is not null group by tag order by weight desc'; return 'select tag, count(tag) as weight from subscription left join profile_tag on subscriber=tagged and subscribed=tagger where subscribed=%d and subscriber != subscribed and tag is not null group by tag order by weight desc';
} }
} }

View File

@ -1,5 +1,4 @@
<?php <?php
/** /**
* StatusNet, the distributed open-source microblogging tool * StatusNet, the distributed open-source microblogging tool
* *
@ -101,8 +100,10 @@ class SubscriptionListItem extends ProfileListItem
if ($this->isOwn()) { if ($this->isOwn()) {
$this->out->element('a', array('href' => common_local_url('tagother', $this->out->element('a', array('href' => common_local_url('tagother',
array('id' => $this->profile->id))), array('id' => $this->profile->id))),
// TRANS: Description for link to "tag other users" in widget to show a list of profiles.
_('Tags')); _('Tags'));
} else { } else {
// TRANS: Text widget to show a list of profiles with their tags.
$this->out->text(_('Tags')); $this->out->text(_('Tags'));
} }
if ($tags) { if ($tags) {
@ -120,6 +121,7 @@ class SubscriptionListItem extends ProfileListItem
} }
$this->out->elementEnd('ul'); $this->out->elementEnd('ul');
} else { } else {
// TRANS: Text if there are no tags in widget to show a list of profiles by tag.
$this->out->text(_('(None)')); $this->out->text(_('(None)'));
} }
} }

View File

@ -40,22 +40,17 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class SubscriptionsPeopleSelfTagCloudSection extends SubPeopleTagCloudSection class SubscriptionsPeopleSelfTagCloudSection extends SubPeopleTagCloudSection
{ {
function title() function title()
{ {
// TRANS: Title of personal tag cloud section.
return _('People Tagcloud as self-tagged'); return _('People Tagcloud as self-tagged');
} }
function query() { function query() {
// return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscriber != subscribed and tagger = tagged group by tag order by weight desc'; // return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscriber != subscribed and tagger = tagged group by tag order by weight desc';
return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscribed where subscriber=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc'; return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscribed where subscriber=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc';
// return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc'; // return 'select tag, count(tag) as weight from subscription left join profile_tag on tagger = subscriber where subscribed=%d and subscribed != subscriber and tagger = tagged and tag is not null group by tag order by weight desc';
} }
} }

View File

@ -40,11 +40,11 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class SubscriptionsPeopleTagCloudSection extends SubPeopleTagCloudSection class SubscriptionsPeopleTagCloudSection extends SubPeopleTagCloudSection
{ {
function title() function title()
{ {
// TRANS: Title of personal tag cloud section.
return _('People Tagcloud as tagged'); return _('People Tagcloud as tagged');
} }
@ -58,4 +58,3 @@ class SubscriptionsPeopleTagCloudSection extends SubPeopleTagCloudSection
return 'select tag, count(tag) as weight from subscription left join profile_tag on subscriber=tagger and subscribed=tagged where subscriber=%d and subscriber != subscribed and tag is not null group by tag order by weight desc'; return 'select tag, count(tag) as weight from subscription left join profile_tag on subscriber=tagger and subscribed=tagged where subscriber=%d and subscriber != subscribed and tag is not null group by tag order by weight desc';
} }
} }