From: Siebrand Mazeland Date: Sun, 10 Apr 2011 17:59:55 +0000 (+0200) Subject: Update/add translator documentation. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f0d762f1968fa0ac33b39d73cc9c0225c9e8a989;p=quix0rs-gnu-social.git Update/add translator documentation. L10n/i18n updates. Superfluous whitespace removed. Add FIXME for a few i18n issues I couldn't solve this quickly. Takes care of documentation for all core code added in merge of "people tags" feature (Commit:e75c9988ebe33822e493ac225859bc593ff9b855). --- diff --git a/actions/addpeopletag.php b/actions/addpeopletag.php index 3176a116c9..b5201cf2e4 100644 --- a/actions/addpeopletag.php +++ b/actions/addpeopletag.php @@ -34,9 +34,9 @@ if (!defined('STATUSNET')) { require_once INSTALLDIR . '/lib/togglepeopletag.php'; /** - * + * * Action to tag a profile with a single tag. - * + * * Takes parameters: * * - tagged: the ID of the profile being tagged @@ -52,7 +52,6 @@ require_once INSTALLDIR . '/lib/togglepeopletag.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3 * @link http://status.net/ */ - class AddpeopletagAction extends Action { var $user; @@ -66,7 +65,6 @@ class AddpeopletagAction extends Action * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -76,6 +74,7 @@ class AddpeopletagAction extends Action $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token.'. ' Try again, please.')); return false; @@ -86,6 +85,7 @@ class AddpeopletagAction extends Action $this->user = common_current_user(); if (empty($this->user)) { + // TRANS: Error message displayed when trying to perform an action that requires a logged in user. $this->clientError(_('Not logged in.')); return false; } @@ -97,6 +97,7 @@ class AddpeopletagAction extends Action $this->tagged = Profile::staticGet('id', $tagged_id); if (empty($this->tagged)) { + // TRANS: Client error displayed trying to perform an action related to a non-existing profile. $this->clientError(_('No such profile.')); return false; } @@ -105,7 +106,8 @@ class AddpeopletagAction extends Action $this->peopletag = Profile_list::staticGet('id', $id); if (empty($this->peopletag)) { - $this->clientError(_('No such peopletag.')); + // TRANS: Client error displayed trying to reference a non-existing people tag. + $this->clientError(_('No such people tag.')); return false; } @@ -115,6 +117,7 @@ class AddpeopletagAction extends Action $omb01 = Remote_profile::staticGet('id', $tagged_id); if (!empty($omb01)) { + // TRANS: Client error displayed trying to tag an OMB 0.1 remote profile. $this->clientError(_('You cannot tag an OMB 0.1'. ' remote profile with this action.')); return false; @@ -132,10 +135,8 @@ class AddpeopletagAction extends Action * * @return void */ - function handle($args) { - // Throws exception on error $ptag = Profile_tag::setTag($this->user->id, $this->tagged->id, $this->peopletag->tag); @@ -144,9 +145,13 @@ class AddpeopletagAction extends Action $user = User::staticGet('id', $id); if ($user) { $this->clientError( - sprintf(_('There was an unexpected error while tagging %s'), + // TRANS: Client error displayed when an unknown error occurs while tagging a user. + // TRANS: %s is a username. + sprintf(_('There was an unexpected error while tagging %s.'), $user->nickname)); } else { + // TRANS: Client error displayed when an unknown error occurs while tagging a user. + // TRANS: %s is a profile URL. $this->clientError(sprintf(_('There was a problem tagging %s.' . 'The remote server is probably not responding correctly, ' . 'please try retrying later.'), $this->profile->profileurl)); @@ -156,6 +161,7 @@ class AddpeopletagAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); + // TRANS: Title after subscribing to a people tag. $this->element('title', null, _('Subscribed')); $this->elementEnd('head'); $this->elementStart('body'); diff --git a/actions/apilist.php b/actions/apilist.php index 7a9ce70c5c..90cbfddb69 100644 --- a/actions/apilist.php +++ b/actions/apilist.php @@ -37,19 +37,16 @@ class ApiListAction extends ApiBareAuthAction /** * The list in question in the current request */ - var $list = null; /** * Is this an update request? */ - var $update = false; /** * Is this a delete request? */ - var $delete = false; /** @@ -64,7 +61,6 @@ class ApiListAction extends ApiBareAuthAction * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -81,7 +77,8 @@ class ApiListAction extends ApiBareAuthAction $this->list = $this->getTargetList($this->arg('user'), $this->arg('id')); if (empty($this->list)) { - $this->clientError(_('Not found'), 404, $this->format); + // TRANS: Client error displayed when referring to a non-existing list. + $this->clientError(_('List not found.'), 404, $this->format); return false; } @@ -93,7 +90,6 @@ class ApiListAction extends ApiBareAuthAction * * @return boolean success flag */ - function handle($args) { parent::handle($args); @@ -117,6 +113,7 @@ class ApiListAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format @@ -129,7 +126,6 @@ class ApiListAction extends ApiBareAuthAction * require authentication if it is a write action or user is ambiguous * */ - function requiresAuth() { return parent::requiresAuth() || @@ -141,12 +137,12 @@ class ApiListAction extends ApiBareAuthAction * * @return boolean success */ - function handlePut() { if($this->auth_user->id != $this->list->tagger) { $this->clientError( - _('You can not update lists that don\'t belong to you.'), + // TRANS: Client error displayed when trying to update another user's list. + _('You cannot update lists that do not belong to you.'), 401, $this->format ); @@ -161,6 +157,7 @@ class ApiListAction extends ApiBareAuthAction if(!$result) { $this->clientError( + // TRANS: Client error displayed when an unknown error occurs updating a list. _('An error occured.'), 503, $this->format @@ -176,6 +173,7 @@ class ApiListAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format @@ -189,12 +187,12 @@ class ApiListAction extends ApiBareAuthAction * * @return boolean success */ - function handleDelete() { if($this->auth_user->id != $this->list->tagger) { $this->clientError( - _('You can not delete lists that don\'t belong to you.'), + // TRANS: Client error displayed when trying to delete another user's list. + _('You cannot delete lists that do not belong to you.'), 401, $this->format ); @@ -212,6 +210,7 @@ class ApiListAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format @@ -225,7 +224,6 @@ class ApiListAction extends ApiBareAuthAction * * @return boolean is_read-only=false */ - function isReadOnly($args) { return false; @@ -236,7 +234,6 @@ class ApiListAction extends ApiBareAuthAction * * @return String time_last_modified */ - function lastModified() { if(!empty($this->list)) { @@ -253,7 +250,6 @@ class ApiListAction extends ApiBareAuthAction * * @return string etag */ - function etag() { if (!empty($this->list)) { @@ -271,5 +267,4 @@ class ApiListAction extends ApiBareAuthAction return null; } - } diff --git a/actions/apilistmember.php b/actions/apilistmember.php index 18d6ea370b..8e6a84c96d 100644 --- a/actions/apilistmember.php +++ b/actions/apilistmember.php @@ -42,7 +42,6 @@ require_once INSTALLDIR . '/lib/apibareauth.php'; * @link http://status.net/ * @see ApiBareAuthAction */ - class ApiListMemberAction extends ApiBareAuthAction { /** @@ -59,7 +58,6 @@ class ApiListMemberAction extends ApiBareAuthAction * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -68,12 +66,14 @@ class ApiListMemberAction extends ApiBareAuthAction $this->list = $this->getTargetList($this->arg('user'), $this->arg('list_id')); if (empty($this->list)) { - $this->clientError(_('Not found'), 404, $this->format); + // TRANS: Client error displayed when referring to a non-existing list. + $this->clientError(_('List not found.'), 404, $this->format); return false; } if (empty($this->user)) { - $this->clientError(_('No such user'), 404, $this->format); + // TRANS: Client error displayed when referring to a non-existing user. + $this->clientError(_('No such user.'), 404, $this->format); return false; } return true; @@ -84,7 +84,6 @@ class ApiListMemberAction extends ApiBareAuthAction * * @return boolean success flag */ - function handle($args) { parent::handle($args); @@ -96,7 +95,8 @@ class ApiListMemberAction extends ApiBareAuthAction if(empty($ptag)) { $this->clientError( - _('The specified user is not a member of this list'), + // TRANS: Client error displayed when referring to a non-list member. + _('The specified user is not a member of this list.'), 400, $this->format ); @@ -113,6 +113,7 @@ class ApiListMemberAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format diff --git a/actions/apilistmembers.php b/actions/apilistmembers.php index c6e92fa612..0c003fd6dc 100644 --- a/actions/apilistmembers.php +++ b/actions/apilistmembers.php @@ -39,12 +39,12 @@ class ApiListMembersAction extends ApiListUsersAction * * @return boolean success */ - function handlePost() { if($this->auth_user->id != $this->list->tagger) { $this->clientError( - _('You aren\'t allowed to add members to this list'), + // TRANS: Client error displayed when trying to add members to a list without having the right to do so. + _('You are not allowed to add members to this list.'), 401, $this->format ); @@ -53,7 +53,8 @@ class ApiListMembersAction extends ApiListUsersAction if($this->user === false) { $this->clientError( - _('You must specify a member'), + // TRANS: Client error displayed when trying to modify list members without specifying them. + _('You must specify a member.'), 400, $this->format ); @@ -65,6 +66,7 @@ class ApiListMembersAction extends ApiListUsersAction if(empty($result)) { $this->clientError( + // TRANS: Client error displayed when an unknown error occurs viewing list members. _('An error occured.'), 500, $this->format @@ -81,6 +83,7 @@ class ApiListMembersAction extends ApiListUsersAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format @@ -95,12 +98,12 @@ class ApiListMembersAction extends ApiListUsersAction * * @return boolean success */ - function handleDelete() { if($this->auth_user->id != $this->list->tagger) { $this->clientError( - _('You aren\'t allowed to remove members from this list'), + // TRANS: Client error displayed when trying to remove members from a list without having the right to do so. + _('You are not allowed to remove members from this list.'), 401, $this->format ); @@ -109,7 +112,8 @@ class ApiListMembersAction extends ApiListUsersAction if($this->user === false) { $this->clientError( - _('You must specify a member'), + // TRANS: Client error displayed when trying to modify list members without specifying them. + _('You must specify a member.'), 400, $this->format ); @@ -123,7 +127,8 @@ class ApiListMembersAction extends ApiListUsersAction if(empty($ptag)) { $this->clientError( - _('The user you are trying to remove from the list is not a member'), + // TRANS: Client error displayed when trying to remove a list member that is not part of a list. + _('The user you are trying to remove from the list is not a member.'), 400, $this->format ); @@ -134,6 +139,7 @@ class ApiListMembersAction extends ApiListUsersAction if(empty($result)) { $this->clientError( + // TRANS: Client error displayed when an unknown error occurs viewing list members. _('An error occured.'), 500, $this->format @@ -150,6 +156,7 @@ class ApiListMembersAction extends ApiListUsersAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format @@ -163,7 +170,6 @@ class ApiListMembersAction extends ApiListUsersAction /** * List the members of a list (people tagged) */ - function getUsers() { $fn = array($this->list, 'getTagged'); diff --git a/actions/apilistmemberships.php b/actions/apilistmemberships.php index 635f970e87..3d235c5d93 100644 --- a/actions/apilistmemberships.php +++ b/actions/apilistmemberships.php @@ -43,7 +43,6 @@ require_once INSTALLDIR . '/lib/apibareauth.php'; * @link http://status.net/ * @see ApiBareAuthAction */ - class ApiListMembershipsAction extends ApiBareAuthAction { var $lists = array(); @@ -60,7 +59,6 @@ class ApiListMembershipsAction extends ApiBareAuthAction * @return boolean success flag * */ - function prepare($args) { parent::prepare($args); @@ -69,6 +67,7 @@ class ApiListMembershipsAction extends ApiBareAuthAction $this->user = $this->getTargetUser($this->arg('user')); if (empty($this->user)) { + // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.'), 404, $this->format); return; } @@ -87,7 +86,6 @@ class ApiListMembershipsAction extends ApiBareAuthAction * * @return void */ - function handle($args) { parent::handle($args); @@ -101,6 +99,7 @@ class ApiListMembershipsAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 400, $this->format @@ -118,7 +117,6 @@ class ApiListMembershipsAction extends ApiBareAuthAction * * @return boolean is read only action? */ - function isReadOnly($args) { return true; diff --git a/actions/apilists.php b/actions/apilists.php index f520e32972..c5dbd7f290 100644 --- a/actions/apilists.php +++ b/actions/apilists.php @@ -42,7 +42,6 @@ require_once INSTALLDIR . '/lib/apibareauth.php'; * @link http://status.net/ * @see ApiBareAuthAction */ - class ApiListsAction extends ApiBareAuthAction { var $lists = null; @@ -64,7 +63,6 @@ class ApiListsAction extends ApiBareAuthAction * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -76,6 +74,7 @@ class ApiListsAction extends ApiBareAuthAction $this->user = $this->getTargetUser($this->arg('user')); if (empty($this->user)) { + // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.'), 404, $this->format); return false; } @@ -89,7 +88,6 @@ class ApiListsAction extends ApiBareAuthAction * require authentication if it is a write action or user is ambiguous * */ - function requiresAuth() { return parent::requiresAuth() || @@ -101,7 +99,6 @@ class ApiListsAction extends ApiBareAuthAction * Show the lists the user has created if the request method is GET * Create a new list by diferring to handlePost() if it is POST. */ - function handle($args) { parent::handle($args); @@ -119,6 +116,7 @@ class ApiListsAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format @@ -132,13 +130,13 @@ class ApiListsAction extends ApiBareAuthAction * * @return boolean success */ - function handlePost() { $name=$this->arg('name'); if(empty($name)) { // mimick twitter - print _("A list's name can't be blank."); + // TRANS: Client error displayed when trying to create a list without a name. + print _("A list must have a name."); exit(1); } @@ -170,6 +168,7 @@ class ApiListsAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format @@ -182,7 +181,6 @@ class ApiListsAction extends ApiBareAuthAction /** * Get lists */ - function getLists() { $cursor = (int) $this->arg('cursor', -1); @@ -220,7 +218,6 @@ class ApiListsAction extends ApiBareAuthAction * * @return string etag */ - function etag() { if (!$this->create && !empty($this->lists) && (count($this->lists) > 0)) { @@ -240,5 +237,4 @@ class ApiListsAction extends ApiBareAuthAction return null; } - } diff --git a/actions/apilistsubscriber.php b/actions/apilistsubscriber.php index d6816b9b91..cd10568e1b 100644 --- a/actions/apilistsubscriber.php +++ b/actions/apilistsubscriber.php @@ -43,12 +43,14 @@ class ApiListSubscriberAction extends ApiBareAuthAction $this->list = $this->getTargetList($this->arg('user'), $this->arg('list_id')); if (empty($this->list)) { - $this->clientError(_('Not found'), 404, $this->format); + // TRANS: Client error displayed trying to perform an action related to a non-existing list. + $this->clientError(_('List not found.'), 404, $this->format); return false; } if (empty($this->user)) { - $this->clientError(_('No such user'), 404, $this->format); + // TRANS: Client error displayed trying to perform an action related to a non-existing user. + $this->clientError(_('No such user.'), 404, $this->format); return false; } return true; @@ -64,7 +66,8 @@ class ApiListSubscriberAction extends ApiBareAuthAction if(empty($sub)) { $this->clientError( - _('The specified user is not a subscriber of this list'), + // TRANS: Client error displayed when a membership check for a user is nagative. + _('The specified user is not a subscriber of this list.'), 400, $this->format ); @@ -81,6 +84,7 @@ class ApiListSubscriberAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format diff --git a/actions/apilistsubscribers.php b/actions/apilistsubscribers.php index e8468a195d..480f9b4a5f 100644 --- a/actions/apilistsubscribers.php +++ b/actions/apilistsubscribers.php @@ -38,7 +38,6 @@ class ApiListSubscribersAction extends ApiListUsersAction * * @return boolean success */ - function handlePost() { $result = Profile_tag_subscription::add($this->list, @@ -46,6 +45,7 @@ class ApiListSubscribersAction extends ApiListUsersAction if(empty($result)) { $this->clientError( + // TRANS: Client error displayed when an unknown error occurs in the list subscribers action. _('An error occured.'), 500, $this->format @@ -62,6 +62,7 @@ class ApiListSubscribersAction extends ApiListUsersAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format @@ -79,7 +80,8 @@ class ApiListSubscribersAction extends ApiListUsersAction if(empty($ptag)) { $this->clientError( - _('You are not subscribed to this list'), + // TRANS: Client error displayed when trying to unsubscribe from a non-subscribed list. + _('You are not subscribed to this list.'), 400, $this->format ); @@ -90,6 +92,7 @@ class ApiListSubscribersAction extends ApiListUsersAction if(empty($result)) { $this->clientError( + // TRANS: Client error displayed when an unknown error occurs unsubscribing from a list. _('An error occured.'), 500, $this->format @@ -106,6 +109,7 @@ class ApiListSubscribersAction extends ApiListUsersAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format diff --git a/actions/apilistsubscriptions.php b/actions/apilistsubscriptions.php index 764360e149..480523033b 100644 --- a/actions/apilistsubscriptions.php +++ b/actions/apilistsubscriptions.php @@ -48,7 +48,6 @@ class ApiListSubscriptionsAction extends ApiBareAuthAction * @return boolean success flag * */ - function prepare($args) { parent::prepare($args); @@ -69,12 +68,12 @@ class ApiListSubscriptionsAction extends ApiBareAuthAction * * @return void */ - function handle($args) { parent::handle($args); if (empty($this->user)) { + // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.'), 404, $this->format); return; } @@ -88,6 +87,7 @@ class ApiListSubscriptionsAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 400, $this->format @@ -105,7 +105,6 @@ class ApiListSubscriptionsAction extends ApiBareAuthAction * * @return boolean is read only action? */ - function isReadOnly($args) { return true; diff --git a/actions/apitimelinelist.php b/actions/apitimelinelist.php index f28eb59d53..c2339f9c35 100644 --- a/actions/apitimelinelist.php +++ b/actions/apitimelinelist.php @@ -50,7 +50,6 @@ require_once INSTALLDIR . '/lib/atomlistnoticefeed.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 ApiTimelineListAction extends ApiPrivateAuthAction { @@ -68,7 +67,6 @@ class ApiTimelineListAction extends ApiPrivateAuthAction * @return boolean success flag * */ - function prepare($args) { parent::prepare($args); @@ -88,12 +86,12 @@ class ApiTimelineListAction extends ApiPrivateAuthAction * * @return void */ - function handle($args) { parent::handle($args); if (empty($this->list)) { + // TRANS: Client error displayed trying to perform an action related to a non-existing list. $this->clientError(_('List not found.'), 404, $this->format); return false; } @@ -107,7 +105,6 @@ class ApiTimelineListAction extends ApiPrivateAuthAction * * @return void */ - function showTimeline() { // We'll pull common formatting out of this for other formats @@ -145,7 +142,6 @@ class ApiTimelineListAction extends ApiPrivateAuthAction ); break; case 'atom': - header('Content-Type: application/atom+xml; charset=utf-8'); try { @@ -154,9 +150,9 @@ class ApiTimelineListAction extends ApiPrivateAuthAction $atom->addEntryFromNotices($this->notices); $this->raw($atom->getString()); } catch (Atom10FeedException $e) { - $this->serverError( - 'Could not generate feed for list - ' . $e->getMessage() - ); + // TRANS: Server error displayed whe trying to get a timeline fails. + // TRANS: %s is the error message. + $this->serverError( sprintf(_('Could not generate feed for list - %s'),$e->getMessage())); return; } @@ -182,6 +178,7 @@ class ApiTimelineListAction extends ApiPrivateAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format @@ -195,7 +192,6 @@ class ApiTimelineListAction extends ApiPrivateAuthAction * * @return array notices */ - function getNotices() { $fn = array($this->list, 'getNotices'); @@ -213,7 +209,6 @@ class ApiTimelineListAction extends ApiPrivateAuthAction * * @return boolean true */ - function isReadOnly($args) { return true; @@ -224,7 +219,6 @@ class ApiTimelineListAction extends ApiPrivateAuthAction * * @return string datestamp of the latest notice in the stream */ - function lastModified() { if (!empty($this->notices) && (count($this->notices) > 0)) { @@ -242,7 +236,6 @@ class ApiTimelineListAction extends ApiPrivateAuthAction * * @return string etag */ - function etag() { if (!empty($this->notices) && (count($this->notices) > 0)) { @@ -262,5 +255,4 @@ class ApiTimelineListAction extends ApiPrivateAuthAction return null; } - } diff --git a/actions/editpeopletag.php b/actions/editpeopletag.php index 2bb03470d9..9d0548cb94 100644 --- a/actions/editpeopletag.php +++ b/actions/editpeopletag.php @@ -42,14 +42,17 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { class EditpeopletagAction extends OwnerDesignAction { - var $msg, $confirm, $confirm_args=array(); function title() { if ($_SERVER['REQUEST_METHOD'] == 'POST' && $this->boolean('delete')) { + // TRANS: Title for edit people tag page after deleting a tag. + // TRANS: %s is a tag. return sprintf(_('Delete %s people tag'), $this->peopletag->tag); } + // TRANS: Title for edit people tag page. + // TRANS: %s is a tag. return sprintf(_('Edit people tag %s'), $this->peopletag->tag); } @@ -62,6 +65,7 @@ class EditpeopletagAction extends OwnerDesignAction parent::prepare($args); if (!common_logged_in()) { + // TRANS: Error message displayed when trying to perform an action that requires a logged in user. $this->clientError(_('Not logged in.')); return false; } @@ -91,6 +95,7 @@ class EditpeopletagAction extends OwnerDesignAction } } else { if (!$tagger) { + // TRANS: Error message displayed when trying to perform an action that requires a tagging user or ID. $this->clientError(_('No tagger or ID.'), 404); return false; } @@ -100,17 +105,20 @@ class EditpeopletagAction extends OwnerDesignAction } if (!$this->peopletag) { - $this->clientError(_('No such peopletag.'), 404); + // TRANS: Client error displayed when referring to a non-exsting people tag. + $this->clientError(_('No such people tag.'), 404); return false; } if (!$user) { // This should not be happening + // TRANS: Client error displayed when referring to non-local user. $this->clientError(_('Not a local user.'), 404); return false; } if ($current->id != $user->id) { + // TRANS: Client error displayed when reting to edit a tag that was not self-created. $this->clientError(_('You must be the creator of the tag to edit it.'), 404); return false; } @@ -129,7 +137,6 @@ class EditpeopletagAction extends OwnerDesignAction * * @return void */ - function handle($args) { parent::handle($args); @@ -208,6 +215,7 @@ class EditpeopletagAction extends OwnerDesignAction $this->element('p', 'instructions', $this->confirm); } else { $this->element('p', 'instructions', + // TRANS: Form instruction for edit people tag form. _('Use this form to edit the people tag.')); } } @@ -228,6 +236,7 @@ class EditpeopletagAction extends OwnerDesignAction $cancel = $this->arg('cancel'); if ($delete && $cancel) { + // TRANS: Form validation error displayed if the form data for deleting a tag was incorrect. $this->showForm(_('Delete aborted.')); return; } @@ -235,24 +244,35 @@ class EditpeopletagAction extends OwnerDesignAction $set_private = $private && $this->peopletag->private != $private; if ($delete && !$confirm) { + // TRANS: Text in confirmation dialog for deleting a tag. $this->showConfirm(_('Deleting this tag will permanantly remove ' . 'all its subscription and membership records. ' . 'Do you still want to continue?'), array('delete' => 1)); return; } else if (common_valid_tag($tag)) { + // TRANS: Form validation error displayed if a given tag is invalid. $this->showForm(_('Invalid tag.')); return; } else if ($tag != $this->peopletag->tag && $this->tagExists($tag)) { + // TRANS: Form validation error displayed if a given tag is already present. + // TRANS: %s is the already present tag. $this->showForm(sprintf(_('You already have a tag named %s.'), $tag)); return; } else if (Profile_list::descriptionTooLong($description)) { - $this->showForm(sprintf(_('description is too long (max %d chars).'), Profile_list::maxDescription())); + $this->showForm(sprintf( + // TRANS: Client error shown when providing too long a description when editing a people tag. + // TRANS: %d is the maximum number of allowed characters. + _m('Description is too long (maximum %d character).', + 'Description is too long (maximum %d characters).', + Profile_list::maxDescription()), + Profile_list::maxDescription())); return; } else if ($set_private && !$confirm && !$cancel) { $fwd = array('tag' => $tag, 'description' => $description, 'private' => (int) $private); + // TRANS: Text in confirmation dialog for setting a tag from public to private. $this->showConfirm(_('Setting a public tag as private will ' . 'permanently remove all the existing ' . 'subscriptions to it. Do you still want to continue?'), $fwd); @@ -273,7 +293,8 @@ class EditpeopletagAction extends OwnerDesignAction if (!$result) { common_log_db_error($this->group, 'UPDATE', __FILE__); - $this->serverError(_('Could not update peopletag.')); + // TRANS: TRANS: Server error displayed when updating a people tag fails. + $this->serverError(_('Could not update people tag.')); } $this->peopletag->query('COMMIT'); @@ -297,6 +318,7 @@ class EditpeopletagAction extends OwnerDesignAction 'tag' => $tag)), 303); } else { + // TRANS: Edit people tag form success message. $this->showForm(_('Options saved.')); } } diff --git a/actions/peopletag.php b/actions/peopletag.php index d549586f13..eb506f9777 100644 --- a/actions/peopletag.php +++ b/actions/peopletag.php @@ -52,9 +52,13 @@ class PeopletagAction extends Action function title() { if ($this->page == 1) { - return sprintf(_("Public people tag %s"), $this->tag); + // TRANS: Title for people tag page. + // TRANS: %s is a tag. + return sprintf(_('Public people tag %s'), $this->tag); } else { - return sprintf(_("Public people tag %s, page %d"), $this->tag, $this->page); + // TRANS: Title for people tag page. + // TRANS: %1$s is a tag, %2$d is a page number. + return sprintf(_('Public people tag %1$s, page %2$d'), $this->tag, $this->page); } } @@ -96,6 +100,8 @@ class PeopletagAction extends Action function showAnonymousMessage() { $notice = + // TRANS: Message for anonymous users on people tag page. + // TRANS: This message contains Markdown links in the form [description](link). _('People tags are how you sort similar ' . 'people on %%site.name%%, a [micro-blogging]' . '(http://en.wikipedia.org/wiki/Micro-blogging) service ' . @@ -140,7 +146,7 @@ class PeopletagAction extends Action } else { $ptags->whereAdd('(profile_list.private = false OR (' . ' profile_list.tagger =' . $user->id . - ' AND profile_list.private = true) )'); + ' AND profile_list.private = true) )'); $ptags->orderBy('profile_list.modified DESC'); $ptags->find(); diff --git a/actions/peopletagautocomplete.php b/actions/peopletagautocomplete.php index 04b9baefbe..d4ecb34e4f 100644 --- a/actions/peopletagautocomplete.php +++ b/actions/peopletagautocomplete.php @@ -44,7 +44,6 @@ class PeopletagautocompleteAction extends Action * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -54,6 +53,7 @@ class PeopletagautocompleteAction extends Action $this->user = common_current_user(); if (empty($this->user)) { + // TRANS: Error message displayed when trying to perform an action that requires a logged in user. $this->clientError(_('Not logged in.')); return false; } @@ -63,6 +63,7 @@ class PeopletagautocompleteAction extends Action $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token.'. ' Try again, please.')); return false; @@ -99,7 +100,6 @@ class PeopletagautocompleteAction extends Action * * @return String time */ - function lastModified() { return strtotime($this->last_mod); @@ -114,7 +114,6 @@ class PeopletagautocompleteAction extends Action * * @return void */ - function handle($args) { //common_log(LOG_DEBUG, 'Autocomplete data: ' . json_encode($this->tags)); diff --git a/actions/peopletagged.php b/actions/peopletagged.php index 5038d1e213..84356116cc 100644 --- a/actions/peopletagged.php +++ b/actions/peopletagged.php @@ -42,7 +42,6 @@ require_once(INSTALLDIR.'/lib/profilelist.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 PeopletaggedAction extends OwnerDesignAction { var $page = null; @@ -76,6 +75,7 @@ class PeopletaggedAction extends OwnerDesignAction } if (!$tagger) { + // TRANS: Client error displayed when a tagger is expected but not provided. $this->clientError(_('No tagger.'), 404); return false; } @@ -83,6 +83,7 @@ class PeopletaggedAction extends OwnerDesignAction $user = User::staticGet('nickname', $tagger); if (!$user) { + // TRANS: Client error displayed when referring to non-existing user. $this->clientError(_('No such user.'), 404); return false; } @@ -91,7 +92,8 @@ class PeopletaggedAction extends OwnerDesignAction $this->peopletag = Profile_list::pkeyGet(array('tagger' => $user->id, 'tag' => $tag)); if (!$this->peopletag) { - $this->clientError(_('No such peopletag.'), 404); + // TRANS: Client error displayed when referring to non-existing people tag. + $this->clientError(_('No such people tag.'), 404); return false; } @@ -101,10 +103,14 @@ class PeopletaggedAction extends OwnerDesignAction function title() { if ($this->page == 1) { - return sprintf(_('People tagged %s by %s'), + // TRANS: Title for list of people tagged by the user with a tag. + // TRANS: %1$s is a tag, %2$s is a username. + return sprintf(_('People tagged %1$s by %2$s'), $this->peopletag->tag, $this->tagger->nickname); } else { - return sprintf(_('People tagged %s by %s, page %d'), + // TRANS: Title for list of people tagged by the user with a tag. + // TRANS: %1$s is a tag, %2$s is a username, %2$s is a page number. + return sprintf(_('People tagged %1$s by %2$s, page %3$d'), $this->peopletag->tag, $this->user->nickname, $this->page); } @@ -182,6 +188,7 @@ class PeopletagMemberListItem extends ProfileListItem parent::showFullName(); if ($this->profile->id == $this->peopletag->tagger) { $this->out->text(' '); + // TRANS: Addition in tag membership list for creator of a tag. $this->out->element('span', 'role', _('Creator')); } } @@ -206,7 +213,7 @@ class PeopletagMemberListItem extends ProfileListItem /** * Fetch necessary return-to arguments for the profile forms * to return to this list when they're done. - * + * * @return array */ protected function returnToArgs() diff --git a/actions/peopletagsbyuser.php b/actions/peopletagsbyuser.php index e0e0ccc57d..42b728e1d8 100644 --- a/actions/peopletagsbyuser.php +++ b/actions/peopletagsbyuser.php @@ -49,15 +49,22 @@ class PeopletagsbyuserAction extends OwnerDesignAction if ($this->page == 1) { if ($this->isOwner()) { if ($this->arg('private')) { + // TRANS: Title for people tags by a user page for a private tag. return _('Private people tags by you'); } else if ($this->arg('public')) { + // TRANS: Title for people tags by a user page for a public tag. return _('Public people tags by you'); } + // TRANS: Title for people tags by a user page. return _('People tags by you'); } - return sprintf(_("People tags by %s"), $this->tagger->nickname); + // TRANS: Title for people tags by a user page. + // TRANS: %s is a user nickname. + return sprintf(_('People tags by %s'), $this->tagger->nickname); } else { - return sprintf(_("People tags by %s, page %d"), $this->tagger->nickname, $this->page); + // TRANS: Title for people tags by a user page. + // TRANS: %1$s is a user nickname, %2$d is a page number. + return sprintf(_('People tags by %1$s, page %2$d'), $this->tagger->nickname, $this->page); } } @@ -86,6 +93,7 @@ class PeopletagsbyuserAction extends OwnerDesignAction $this->user = User::staticGet('nickname', $nickname); if (!$this->user) { + // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.'), 404); return false; } @@ -93,6 +101,7 @@ class PeopletagsbyuserAction extends OwnerDesignAction $this->tagger = $this->user->getProfile(); if (!$this->tagger) { + // TRANS: Server error displayed when a user has no profile. $this->serverError(_('User has no profile.')); return false; } @@ -108,12 +117,14 @@ class PeopletagsbyuserAction extends OwnerDesignAction $this->tags = $this->tagger->getOwnedTags(false, $offset, $limit); } else if ($this->arg('private')) { if (empty($user)) { - $this->clientError(_('Not logged in'), 403); + // TRANS: Error message displayed when trying to perform an action that requires a logged in user. + $this->clientError(_('Not logged in.'), 403); } if ($this->isOwner()) { $this->tags = $this->tagger->getPrivateTags($offset, $limit); } else { + // TRANS: Client error displayed when trying view another user's private people tags. $this->clientError(_('You cannot view others\' private people tags'), 403); } } else { @@ -139,6 +150,7 @@ class PeopletagsbyuserAction extends OwnerDesignAction function showModeSelector() { $this->elementStart('dl', array('id'=>'filter_tags')); + // TRANS: Mode selector label. $this->element('dt', null, _('Mode')); $this->elementStart('dd'); $this->elementStart('ul'); @@ -148,6 +160,7 @@ class PeopletagsbyuserAction extends OwnerDesignAction array('href' => common_local_url('peopletagsforuser', array('nickname' => $this->user->nickname))), + // TRANS: Link text to show people tags for user %s. sprintf(_('People tags for %s'), $this->tagger->nickname)); $this->elementEnd('li'); @@ -159,6 +172,7 @@ class PeopletagsbyuserAction extends OwnerDesignAction array('nickname' => $this->tagger->nickname)), 'method' => 'post')); $this->elementStart('fieldset'); + // TRANS: Fieldset legend. $this->element('legend', null, _('Select tag to filter')); $priv = $this->arg('private'); @@ -167,12 +181,17 @@ class PeopletagsbyuserAction extends OwnerDesignAction if (!$priv && !$pub) { $priv = $pub = true; } - $this->checkbox('private', _m('Private'), $priv, - _m('Show private tags')); - $this->checkbox('public', _m('Public'), $pub, - _m('Show public tags')); + // TRANS: Checkbox label to show private tags. + $this->checkbox('private', _m('LABEL','Private'), $priv, + // TRANS: Checkbox title. + _('Show private tags.')); + // TRANS: Checkbox label to show public tags. + $this->checkbox('public', _m('LABEL','Public'), $pub, + // TRANS: Checkbox title. + _('Show public tags.')); $this->hidden('nickname', $this->user->nickname); - $this->submit('submit', _('Go')); + // TRANS: Submit button text for tag filter form. + $this->submit('submit', _m('BUTTON','Go')); $this->elementEnd('fieldset'); $this->elementEnd('form'); $this->elementEnd('li'); @@ -185,6 +204,9 @@ class PeopletagsbyuserAction extends OwnerDesignAction function showAnonymousMessage() { $notice = + // TRANS: Message displayed for anonymous users on page that displays people tags by a user. + // TRANS: This message contains Markdown links in the form [description](links). + // TRANS: %s is a tagger nickname. sprintf(_('These are people tags created by **%s**. ' . 'People tags are how you sort similar ' . 'people on %%%%site.name%%%%, a [micro-blogging]' . @@ -239,6 +261,9 @@ class PeopletagsbyuserAction extends OwnerDesignAction function showEmptyListMessage() { + // TRANS: Message displayed on page that displays people tags by a user when there are none. + // TRANS: This message contains Markdown links in the form [description](links). + // TRANS: %s is a tagger nickname. $message = sprintf(_('%s has not created any [people tags](%%%%doc.tags%%%%) yet.'), $this->tagger->nickname); $this->elementStart('div', 'guide'); $this->raw(common_markup_to_html($message)); diff --git a/actions/peopletagsforuser.php b/actions/peopletagsforuser.php index 73fb225612..789dcbe921 100644 --- a/actions/peopletagsforuser.php +++ b/actions/peopletagsforuser.php @@ -46,9 +46,11 @@ class PeopletagsforuserAction extends OwnerDesignAction function title() { if ($this->page == 1) { - return sprintf(_("People tags for %s"), $this->tagged->nickname); + // Page title. %s is a tagged user's nickname. + return sprintf(_('People tags for %s'), $this->tagged->nickname); } else { - return sprintf(_("People tags for %s, page %d"), $this->tagged->nickname, $this->page); + // Page title. %1$s is a tagged user's nickname, %2$s is a page number. + return sprintf(_('People tags for %1$s, page %2$d'), $this->tagged->nickname, $this->page); } } @@ -73,6 +75,7 @@ class PeopletagsforuserAction extends OwnerDesignAction $this->user = User::staticGet('nickname', $nickname); if (!$this->user) { + // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.'), 404); return false; } @@ -80,6 +83,7 @@ class PeopletagsforuserAction extends OwnerDesignAction $this->tagged = $this->user->getProfile(); if (!$this->tagged) { + // TRANS: Server error displayed when a user has no profile. $this->serverError(_('User has no profile.')); return false; } @@ -98,6 +102,9 @@ class PeopletagsforuserAction extends OwnerDesignAction function showAnonymousMessage() { $notice = + // TRANS: Message displayed for anonymous users on page that displays people tags for a user. + // TRANS: This message contains Markdown links in the form [description](links). + // TRANS: %s is a tagger nickname. sprintf(_('These are people tags for **%s**. ' . 'People tags are how you sort similar ' . 'people on %%%%site.name%%%%, a [micro-blogging]' . @@ -117,7 +124,9 @@ class PeopletagsforuserAction extends OwnerDesignAction 'class' => 'child_1')); $user = common_current_user(); + // TRANS: Page notice. $text = ($this->tagged->id == @$user->id) ? _('People tags by you') : + // TRANS: Page notice. %s is a tagger's nickname. sprintf(_('People tags by %s'), $this->tagged->nickname); $this->element('a', array('href' => @@ -150,6 +159,9 @@ class PeopletagsforuserAction extends OwnerDesignAction function showEmptyListMessage() { + // TRANS: Message displayed on page that displays people tags for a user when there are none. + // TRANS: This message contains Markdown links in the form [description](links). + // TRANS: %s is a tagger nickname. $message = sprintf(_('%s has not been [tagged](%%%%doc.tags%%%%) by anyone yet.'), $this->tagged->nickname); $this->elementStart('div', 'guide'); $this->raw(common_markup_to_html($message)); diff --git a/actions/peopletagsubscribers.php b/actions/peopletagsubscribers.php index 1f2feeca29..5cdccfa15b 100644 --- a/actions/peopletagsubscribers.php +++ b/actions/peopletagsubscribers.php @@ -42,7 +42,6 @@ require_once(INSTALLDIR.'/lib/profilelist.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 PeopletagsubscribersAction extends OwnerDesignAction { var $page = null; @@ -76,6 +75,7 @@ class PeopletagsubscribersAction extends OwnerDesignAction } if (!$tagger) { + // TRANS: Client error displayed when a tagger is expected but not provided. $this->clientError(_('No tagger.'), 404); return false; } @@ -83,6 +83,7 @@ class PeopletagsubscribersAction extends OwnerDesignAction $user = User::staticGet('nickname', $tagger); if (!$user) { + // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.'), 404); return false; } @@ -91,7 +92,8 @@ class PeopletagsubscribersAction extends OwnerDesignAction $this->peopletag = Profile_list::pkeyGet(array('tagger' => $user->id, 'tag' => $tag)); if (!$this->peopletag) { - $this->clientError(_('No such peopletag.'), 404); + // TRANS: Client error displayed trying to reference a non-existing people tag. + $this->clientError(_('No such people tag.'), 404); return false; } @@ -101,10 +103,14 @@ class PeopletagsubscribersAction extends OwnerDesignAction function title() { if ($this->page == 1) { - return sprintf(_('Subscribers of people tagged %s by %s'), + // TRANS: Page title for list of people tag subscribers. + // TRANS: %1$s is a tag, %2$s is a user nickname. + return sprintf(_('Subscribers of people tagged %1$s by %2$s'), $this->peopletag->tag, $this->tagger->nickname); } else { - return sprintf(_('Subscribers of people tagged %s by %s, page %d'), + // TRANS: Page title for list of people tag subscribers. + // TRANS: %1$s is a tag, %2$s is a user nickname, %3$d is a page number. + return sprintf(_('Subscribers of people tagged %1$s by %2$s, page %3$d'), $this->peopletag->tag, $this->tagger->nickname, $this->page); } @@ -182,6 +188,7 @@ class PeopletagSubscriberListItem extends ProfileListItem parent::showFullName(); if ($this->profile->id == $this->peopletag->tagger) { $this->out->text(' '); + // TRANS: Addition in tag subscribers list for creator of a tag. $this->out->element('span', 'role', _('Creator')); } } @@ -221,7 +228,7 @@ class PeopletagSubscriberListItem extends ProfileListItem /** * Fetch necessary return-to arguments for the profile forms * to return to this list when they're done. - * + * * @return array */ protected function returnToArgs() diff --git a/actions/peopletagsubscriptions.php b/actions/peopletagsubscriptions.php index 90f232e774..5eee82396d 100644 --- a/actions/peopletagsubscriptions.php +++ b/actions/peopletagsubscriptions.php @@ -46,9 +46,13 @@ class PeopletagsubscriptionsAction extends OwnerDesignAction function title() { if ($this->page == 1) { - return sprintf(_("People tags subscriptions by %s"), $this->profile->nickname); + // TRANS: Title for page that displays people tags subscribed to by a user. + // TRANS: %s is a profile nickname. + return sprintf(_('People tags subscriptions by %s'), $this->profile->nickname); } else { - return sprintf(_("People tags subscriptions by %s, page %d"), $this->profile->nickname, $this->page); + // TRANS: Title for page that displays people tags subscribed to by a user. + // TRANS: %1$s is a profile nickname, %2$d is a page number. + return sprintf(_('People tags subscriptions by %1$s, page %2$d'), $this->profile->nickname, $this->page); } } @@ -73,6 +77,7 @@ class PeopletagsubscriptionsAction extends OwnerDesignAction $user = User::staticGet('nickname', $nickname); if (!$user) { + // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.'), 404); return false; } @@ -80,6 +85,7 @@ class PeopletagsubscriptionsAction extends OwnerDesignAction $this->profile = $user->getProfile(); if (!$this->profile) { + // TRANS: Server error displayed when a user has no profile. $this->serverError(_('User has no profile.')); return false; } @@ -98,6 +104,9 @@ class PeopletagsubscriptionsAction extends OwnerDesignAction function showAnonymousMessage() { $notice = + // TRANS: Message displayed for anonymous users on page that displays people tags subscribed to by a user. + // TRANS: This message contains Markdown links in the form [description](links). + // TRANS: %s is a profile nickname. sprintf(_('These are people tags subscribed to by **%s**. ' . 'People tags are how you sort similar ' . 'people on %%%%site.name%%%%, a [micro-blogging]' . diff --git a/actions/profilecompletion.php b/actions/profilecompletion.php index 8208f3bd37..00831b2a22 100644 --- a/actions/profilecompletion.php +++ b/actions/profilecompletion.php @@ -68,7 +68,6 @@ class ProfilecompletionAction extends Action * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -78,6 +77,7 @@ class ProfilecompletionAction extends Action $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token.'. ' Try again, please.')); return false; @@ -88,6 +88,7 @@ class ProfilecompletionAction extends Action $this->user = common_current_user(); if (empty($this->user)) { + // TRANS: Error message displayed when trying to perform an action that requires a logged in user. $this->clientError(_('Not logged in.')); return false; } @@ -96,13 +97,16 @@ class ProfilecompletionAction extends Action $this->peopletag = Profile_list::staticGet('id', $id); if (empty($this->peopletag)) { - $this->clientError(_('No such peopletag.')); + // TRANS: Client error displayed trying to reference a non-existing people tag. + $this->clientError(_('No such people tag.')); return false; } $field = $this->arg('field'); if (!in_array($field, array('fulltext', 'nickname', 'fullname', 'description', 'location', 'uri'))) { - $this->clientError(sprintf(_('Unidentified field %s'), htmlspecialchars($field)), 404); + // TRANS: Client error displayed when trying to add an unindentified field to profile. + // TRANS: %s is a field name. + $this->clientError(sprintf(_('Unidentified field %s.'), htmlspecialchars($field)), 404); return false; } $this->field = $field; @@ -126,7 +130,8 @@ class ProfilecompletionAction extends Action $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, _('Search results')); + // TRANS: Page title. + $this->element('title', null, _m('TITLE','Search results')); $this->elementEnd('head'); $this->elementStart('body'); $profiles = $this->getResults(); @@ -141,6 +146,7 @@ class ProfilecompletionAction extends Action } $this->elementEnd('ul'); } else { + // TRANS: Output when there are no results for a search. $this->element('p', 'error', _('No results.')); } } @@ -154,7 +160,8 @@ class ProfilecompletionAction extends Action $q = $this->arg('q'); $q = strtolower($q); if (strlen($q) < 3) { - $this->msg = _('The search string must be atleast 3 characters long'); + // TRANS: Error message in case a search is shorter than three characters. + $this->msg = _('The search string must be at least 3 characters long.'); } $page = $this->arg('page'); $page = (int) (empty($page) ? 1 : $page); @@ -172,6 +179,7 @@ class ProfilecompletionAction extends Action else { $cnt = $profile->find(); } + // @todo FIXME: Call-time pass-by-reference has been deprecated. Event::handle('EndProfileCompletionSearch', $this, &$profile, $search_engine); } diff --git a/actions/profilesettings.php b/actions/profilesettings.php index f380fe4d6d..667fea2cf4 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -311,7 +311,7 @@ class ProfilesettingsAction extends SettingsAction if (!common_valid_profile_tag($tag)) { // TRANS: Validation error in form for profile settings. // TRANS: %s is an invalid tag. - $this->showForm(sprintf(_('Invalid tag: "%s"'), $tag)); + $this->showForm(sprintf(_('Invalid tag: "%s".'), $tag)); return; } diff --git a/actions/profiletagbyid.php b/actions/profiletagbyid.php index 7de5737e9a..3a70f54add 100644 --- a/actions/profiletagbyid.php +++ b/actions/profiletagbyid.php @@ -40,7 +40,6 @@ class ProfiletagbyidAction extends Action * * @return boolean true */ - function isReadOnly($args) { return true; @@ -54,6 +53,7 @@ class ProfiletagbyidAction extends Action $tagger_id = $this->arg('tagger_id'); if (!$id) { + // TRANS: Client error displayed trying to perform an action without providing an ID. $this->clientError(_('No ID.')); return false; } @@ -63,6 +63,7 @@ class ProfiletagbyidAction extends Action $this->peopletag = Profile_list::staticGet('id', $id); if (!$this->peopletag) { + // TRANS: Client error displayed trying to reference a non-existing people tag. $this->clientError(_('No such people tag.'), 404); return false; } @@ -84,7 +85,6 @@ class ProfiletagbyidAction extends Action * * @return void */ - function handle($args) { common_redirect($this->peopletag->homeUrl(), 303); diff --git a/actions/publicpeopletagcloud.php b/actions/publicpeopletagcloud.php index dc252fe4c8..e8023bc979 100644 --- a/actions/publicpeopletagcloud.php +++ b/actions/publicpeopletagcloud.php @@ -44,7 +44,6 @@ define('TAGS_PER_PAGE', 100); * @copyright 2008-2009 StatusNet, Inc. * @link http://status.net/ */ - class PublicpeopletagcloudAction extends Action { function isReadOnly($args) @@ -54,24 +53,32 @@ class PublicpeopletagcloudAction extends Action function title() { + // TRANS: Title for page with public people tag cloud. return _('Public people tag cloud'); } function showPageNotice() { $this->element('p', 'instructions', - sprintf(_('These are most used people tags on %s '), + // TRANS: Page notice for page with public people tag cloud. + // TRANS: %s is a StatusNet sitename. + sprintf(_('These are most used people tags on %s'), common_config('site', 'name'))); } function showEmptyList() { + // TRANS: Empty list message on page with public people tag cloud. + // TRANS: This message contains Markdown links in the form [description](link). $message = _('No one has [tagged](%%doc.tags%%) anyone yet.') . ' '; if (common_logged_in()) { + // TRANS: Additional empty list message on page with public people tag cloud for logged in users. $message .= _('Be the first to tag someone!'); } else { + // TRANS: Additional empty list message on page with public people tag cloud for anonymous users. + // TRANS: This message contains Markdown links in the form [description](link). $message .= _('Why not [register an account](%%action.register%%) and be the first to tag someone!'); } @@ -125,6 +132,7 @@ class PublicpeopletagcloudAction extends Action ksort($tw); $this->elementStart('dl'); + // TRANS: DT element on on page with public people tag cloud. $this->element('dt', null, _('People tag cloud')); $this->elementStart('dd'); $this->elementStart('ul', 'tags xoxo tag-cloud'); @@ -165,9 +173,10 @@ class PublicpeopletagcloudAction extends Action $this->elementStart('li', $rel); - $count = ($weight == 1) ? '1 person tagged' : '%d people tagged'; + // TRANS: Link title for number of people tagged. %d is the number of people tagged. + $title = sprintf(_m('1 person tagged','%d people tagged',$weight),$weight); $this->element('a', array('href' => common_local_url('peopletag', array('tag' => $tag)), - 'title' => sprintf(_($count), $weight)), $tag); + 'title' => $title), $tag); $this->elementEnd('li'); } } diff --git a/actions/removepeopletag.php b/actions/removepeopletag.php index aa8ae2b6ad..4f7d9b75f5 100644 --- a/actions/removepeopletag.php +++ b/actions/removepeopletag.php @@ -53,7 +53,6 @@ require_once INSTALLDIR . '/lib/togglepeopletag.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3 * @link http://status.net/ */ - class RemovepeopletagAction extends Action { var $user; @@ -67,7 +66,6 @@ class RemovepeopletagAction extends Action * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -77,6 +75,7 @@ class RemovepeopletagAction extends Action $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token.'. ' Try again, please.')); return false; @@ -87,6 +86,7 @@ class RemovepeopletagAction extends Action $this->user = common_current_user(); if (empty($this->user)) { + // TRANS: Error message displayed when trying to perform an action that requires a logged in user. $this->clientError(_('Not logged in.')); return false; } @@ -98,6 +98,7 @@ class RemovepeopletagAction extends Action $this->tagged = Profile::staticGet('id', $tagged_id); if (empty($this->tagged)) { + // TRANS: Client error displayed when referring to a non-existing profile. $this->clientError(_('No such profile.')); return false; } @@ -106,7 +107,8 @@ class RemovepeopletagAction extends Action $this->peopletag = Profile_list::staticGet('id', $id); if (empty($this->peopletag)) { - $this->clientError(_('No such peopletag.')); + // TRANS: Client error displayed trying to reference a non-existing people tag. + $this->clientError(_('No such people tag.')); return false; } @@ -116,6 +118,7 @@ class RemovepeopletagAction extends Action $omb01 = Remote_profile::staticGet('id', $tagged_id); if (!empty($omb01)) { + // TRANS: Client error displayed when trying to (un)tag an OMB 0.1 remote profile. $this->clientError(_('You cannot tag or untag an OMB 0.1'. ' remote profile with this action.')); return false; @@ -133,7 +136,6 @@ class RemovepeopletagAction extends Action * * @return void */ - function handle($args) { // Throws exception on error @@ -145,9 +147,13 @@ class RemovepeopletagAction extends Action $user = User::staticGet('id', $this->tagged->id); if ($user) { $this->clientError( - sprintf(_('There was an unexpected error while tagging %s'), + // TRANS: Client error displayed when an unknown error occurs while tagging a user. + // TRANS: %s is a username. + sprintf(_('There was an unexpected error while tagging %s.'), $user->nickname)); } else { + // TRANS: Client error displayed when an unknown error occurs while tagging a user. + // TRANS: %s is a profile URL. $this->clientError(sprintf(_('There was a problem tagging %s.' . 'The remote server is probably not responding correctly, ' . 'please try retrying later.'), $this->profile->profileurl)); @@ -157,6 +163,7 @@ class RemovepeopletagAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); + // TRANS: Title after untagging a people tag. $this->element('title', null, _('Untagged')); $this->elementEnd('head'); $this->elementStart('body'); diff --git a/actions/selftag.php b/actions/selftag.php index b0b4981f10..c9ac3a2010 100644 --- a/actions/selftag.php +++ b/actions/selftag.php @@ -46,7 +46,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { */ class SelftagAction extends Action { - var $tag = null; var $page = null; @@ -100,7 +99,6 @@ class SelftagAction extends Action */ function showContent() { - $profile = new Profile(); $offset = ($this->page - 1) * PROFILES_PER_PAGE; @@ -151,10 +149,11 @@ class SelftagAction extends Action */ function title() { - return sprintf(_('Users self-tagged with %1$s - page %2$d'), + // TRANS: Page title for page showing self tags. + // TRANS: %1$s is a tag, %2$d is a page number. + return sprintf(_('Users self-tagged with %1$s, page %2$d'), $this->tag, $this->page); } - } class SelfTagProfileList extends ProfileList diff --git a/actions/showprofiletag.php b/actions/showprofiletag.php index d9f9e9c12e..29ecf4788f 100644 --- a/actions/showprofiletag.php +++ b/actions/showprofiletag.php @@ -61,6 +61,7 @@ class ShowprofiletagAction extends Action } if (!$tagger) { + // TRANS: Client error displayed when a tagger is expected but not provided. $this->clientError(_('No tagger.'), 404); return false; } @@ -68,6 +69,7 @@ class ShowprofiletagAction extends Action $user = User::staticGet('nickname', $tagger); if (!$user) { + // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.'), 404); return false; } @@ -80,7 +82,8 @@ class ShowprofiletagAction extends Action ($this->peopletag->private && $this->peopletag->tagger === $current->id)); if (!$can_see) { - $this->clientError(_('No such peopletag.'), 404); + // TRANS: Client error displayed trying to reference a non-existing people tag. + $this->clientError(_('No such people tag.'), 404); return false; } @@ -88,7 +91,7 @@ class ShowprofiletagAction extends Action $this->notice = $this->peopletag->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); if ($this->page > 1 && $this->notice->N == 0) { - // TRANS: Server error when page not found (404) + // TRANS: Server error when page not found (404). $this->serverError(_('No such page.'), $code = 404); } @@ -100,6 +103,7 @@ class ShowprofiletagAction extends Action parent::handle($args); if (!$this->peopletag) { + // TRANS: Client error displayed trying to perform an action related to a non-existing user. $this->clientError(_('No such user.')); return; } @@ -110,42 +114,49 @@ class ShowprofiletagAction extends Action function title() { if ($this->page > 1) { - if($this->peopletag->private) { - return sprintf(_('Private timeline for people tagged %s by you, page %d'), + // TRANS: Title for private people tag timeline. + // TRANS: %1$s is a people tag, %2$s is a page number. + return sprintf(_('Private timeline for people tagged %1$s by you, page %2$d'), $this->peopletag->tag, $this->page); } $current = common_current_user(); if (!empty($current) && $current->id == $this->peopletag->tagger) { - return sprintf(_('Timeline for people tagged %s by you, page %d'), + // TRANS: Title for public people tag timeline where the viewer is the tagger. + // TRANS: %1$s is a people tag, %2$s is a page number. + return sprintf(_('Timeline for people tagged %1$s by you, page %2$d'), $this->peopletag->tag, $this->page); } - // TRANS: Page title. %1$s is user nickname, %2$d is page number + // TRANS: Title for private people tag timeline. + // TRANS: %1$s is a people tag, %2$s is the tagger's nickname, %3$d is a page number. return sprintf(_('Timeline for people tagged %1$s by %2$s, page %3$d'), $this->peopletag->tag, $this->tagger->nickname, $this->page ); } else { - if($this->peopletag->private) { + // TRANS: Title for private people tag timeline. + // TRANS: %s is a people tag. return sprintf(_('Private timeline of people tagged %s by you'), - $this->peopletag->tag, $this->page); + $this->peopletag->tag); } $current = common_current_user(); if (!empty($current) && $current->id == $this->peopletag->tagger) { + // TRANS: Title for public people tag timeline where the viewer is the tagger. + // TRANS: %s is a people tag. return sprintf(_('Timeline for people tagged %s by you'), - $this->peopletag->tag, $this->page); + $this->peopletag->tag); } - // TRANS: Page title. %1$s is user nickname, %2$d is page number + // TRANS: Title for private people tag timeline. + // TRANS: %1$s is a people tag, %2$s is the tagger's nickname. return sprintf(_('Timeline for people tagged %1$s by %2$s'), $this->peopletag->tag, - $this->tagger->nickname, - $this->page + $this->tagger->nickname ); } } @@ -161,7 +172,8 @@ class ShowprofiletagAction extends Action 'format' => 'rss' ) ), - // TRANS: %1$s is user nickname + // TRANS: Feed title. + // TRANS: %s is tagger's nickname. sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->tagger->nickname)), new Feed(Feed::ATOM, common_local_url( @@ -171,8 +183,9 @@ class ShowprofiletagAction extends Action 'format' => 'atom' ) ), - // TRANS: %1$s is user nickname - sprintf(_('Feed for people tagged %s by %s (Atom)'), + // TRANS: Feed title. + // TRANS: %1$s is a people tag, %2$s is tagger's nickname. + sprintf(_('Feed for people tagged %1$s by %2$s (Atom)'), $this->peopletag->tag, $this->tagger->nickname ) ) @@ -187,16 +200,22 @@ class ShowprofiletagAction extends Action function showEmptyListMessage() { - // TRANS: %1$s is user nickname - $message = sprintf(_('This is the timeline for people tagged %s by %s but no one has posted anything yet.'), $this->peopletag->tag, $this->tagger->nickname) . ' '; + // TRANS: Empty list message for people tag timeline. + // TRANS: %1$s is a people tag, %2$s is a tagger's nickname. + $message = sprintf(_('This is the timeline for people tagged %1$s by %2$s but no one has posted anything yet.'), + $this->peopletag->tag, + $this->tagger->nickname) . ' '; if (common_logged_in()) { $current_user = common_current_user(); if ($this->tagger->id == $current_user->id) { + // TRANS: Additional empty list message for people tag timeline for currently logged in user tagged tags. $message .= _('Try tagging more people.'); } } else { - $message .= _('Why not [register an account](%%%%action.register%%%%) and start following this timeline.'); + // TRANS: Additional empty list message for people tag timeline. + // TRANS: This message contains Markdown links in the form [description](link). + $message .= _('Why not [register an account](%%%%action.register%%%%) and start following this timeline!'); } $this->elementStart('div', 'guide'); @@ -259,13 +278,16 @@ class ShowprofiletagAction extends Action $this->elementStart('div', array('id' => 'entity_tagged', 'class' => 'section')); if (Event::handle('StartShowTaggedProfilesMiniList', array($this))) { - $title = ''; $current = common_current_user(); if(!empty($current) && $this->peopletag->tagger == $current->id) { + // TRANS: Header on show profile tag page. + // TRANS: %s is a people tag. $title = sprintf(_('People tagged %s by you'), $this->peopletag->tag); } else { + // TRANS: Header on show profile tag page. + // TRANS: %1$s is a people tag, %2$s is a tagger's nickname. $title = sprintf(_('People tagged %1$s by %2$s'), $this->peopletag->tag, $this->tagger->nickname); @@ -279,6 +301,7 @@ class ShowprofiletagAction extends Action $pml = new ProfileMiniList($profile, $this); $cnt = $pml->show(); if ($cnt == 0) { + // TRANS: Content of "People tagged x by a user" if there are no tagged users. $this->element('p', null, _('(None)')); } } @@ -289,6 +312,8 @@ class ShowprofiletagAction extends Action array('nickname' => $this->tagger->nickname, 'profiletag' => $this->peopletag->tag)), 'class' => 'more'), + // TRANS: Link for more "People tagged x by a user" + // TRANS: if there are more than the mini list's maximum. _('Show all')); $this->elementEnd('p'); } @@ -305,6 +330,7 @@ class ShowprofiletagAction extends Action $this->elementStart('div', array('id' => 'entity_subscribers', 'class' => 'section')); if (Event::handle('StartShowProfileTagSubscribersMiniList', array($this))) { + // TRANS: Header for tag subscribers. $this->element('h2', null, _('Subscribers')); $cnt = 0; @@ -313,6 +339,7 @@ class ShowprofiletagAction extends Action $pml = new ProfileMiniList($profile, $this); $cnt = $pml->show(); if ($cnt == 0) { + // TRANS: Content of "People following tag x" if there are no subscribed users. $this->element('p', null, _('(None)')); } } @@ -323,6 +350,8 @@ class ShowprofiletagAction extends Action array('nickname' => $this->tagger->nickname, 'profiletag' => $this->peopletag->tag)), 'class' => 'more'), + // TRANS: Link for more "People following tag x" + // TRANS: if there are more than the mini list's maximum. _('All subscribers')); $this->elementEnd('p'); } diff --git a/actions/subscribepeopletag.php b/actions/subscribepeopletag.php index e38ecb2d3e..b0484835b7 100644 --- a/actions/subscribepeopletag.php +++ b/actions/subscribepeopletag.php @@ -42,7 +42,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class SubscribepeopletagAction extends Action { var $peopletag = null; @@ -51,18 +50,19 @@ class SubscribepeopletagAction extends Action /** * Prepare to run */ - function prepare($args) { parent::prepare($args); if (!common_logged_in()) { - $this->clientError(_('You must be logged in to unsubscribe to a peopletag.')); + // TRANS: Client error displayed when trying to perform an action while not logged in. + $this->clientError(_('You must be logged in to unsubscribe to a people tag.')); return false; } // Only allow POST requests if ($_SERVER['REQUEST_METHOD'] != 'POST') { + // TRANS: Client error displayed when trying to use another method than POST. $this->clientError(_('This action only accepts POST requests.')); return false; } @@ -72,6 +72,7 @@ class SubscribepeopletagAction extends Action $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token.'. ' Try again, please.')); return false; @@ -84,12 +85,14 @@ class SubscribepeopletagAction extends Action if ($id) { $this->peopletag = Profile_list::staticGet('id', $id); } else { + // TRANS: Client error displayed when trying to perform an action without providing an ID. $this->clientError(_('No ID given.'), 404); return false; } if (!$this->peopletag || $this->peopletag->private) { - $this->clientError(_('No such peopletag.'), 404); + // TRANS: Client error displayed trying to reference a non-existing people tag. + $this->clientError(_('No such people tag.'), 404); return false; } @@ -117,14 +120,18 @@ class SubscribepeopletagAction extends Action try { Profile_tag_subscription::add($this->peopletag, $cur); } catch (Exception $e) { - $this->serverError(sprintf(_('Could not subscribe user %1$s to peopletag %2$s.'), + // TRANS: Server error displayed subscribing to a people tag fails. + // TRANS: %1$s is a user nickname, %2$s is a people tag. + $this->serverError(sprintf(_('Could not subscribe user %1$s to people tag %2$s.'), $cur->nickname, $this->peopletag->tag) . ' ' . $e->getMessage()); } if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, sprintf(_('%1$s subscribed to peopletag %2$s by %3$s'), + // TRANS: Title of form to subscribe to a people tag. + // TRANS: %1%s is a user nickname, %2$s is a people tag, %3$s is a tagger nickname. + $this->element('title', null, sprintf(_('%1$s subscribed to people tag %2$s by %3$s'), $cur->nickname, $this->peopletag->tag, $this->tagger->nickname)); diff --git a/actions/tagprofile.php b/actions/tagprofile.php index 8c0e039dd6..e79a80aca8 100644 --- a/actions/tagprofile.php +++ b/actions/tagprofile.php @@ -44,6 +44,7 @@ class TagprofileAction extends Action $this->profile = Profile::staticGet('id', $id); if (!$this->profile) { + // TRANS: Client error displayed when referring to non-existing profile ID. $this->clientError(_('No profile with that ID.')); return false; } @@ -51,6 +52,7 @@ class TagprofileAction extends Action $current = common_current_user()->getProfile(); if ($this->profile && !$current->canTag($this->profile)) { + // TRANS: Client error displayed when trying to tag a user that cannot be tagged. $this->clientError(_('You cannot tag this user.')); } return true; @@ -72,8 +74,11 @@ class TagprofileAction extends Action function title() { if (!$this->profile) { + // TRANS: Title for people tag form when not on a profile page. return _('Tag a profile'); } + // TRANS: Title for people tag form when on a profile page. + // TRANS: %s is a profile nickname. return sprintf(_('Tag %s'), $this->profile->nickname); } @@ -83,7 +88,8 @@ class TagprofileAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, _('Error')); + // TRANS: Title for people tag form when an error has occurred. + $this->element('title', null, _m('TITLE','Error')); $this->elementEnd('head'); $this->elementStart('body'); $this->element('p', 'error', $error); @@ -98,6 +104,7 @@ class TagprofileAction extends Action { if (Event::handle('StartShowTagProfileForm', array($this, $this->profile)) && $this->profile) { $this->elementStart('div', 'entity_profile vcard author'); + // TRANS: Header in people tag form. $this->element('h2', null, _('User profile')); $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE); @@ -140,6 +147,7 @@ class TagprofileAction extends Action 'action' => common_local_url('tagprofile', array('id' => $this->profile->id)))); $this->elementStart('fieldset'); + // TRANS: Fieldset legend for people tag form. $this->element('legend', null, _('Tag user')); $this->hidden('token', common_session_token()); $this->hidden('id', $this->profile->id); @@ -150,12 +158,15 @@ class TagprofileAction extends Action $this->elementStart('li'); $tags = Profile_tag::getTagsArray($user->id, $this->profile->id, $user->id); - $this->input('tags', _('Tags'), + // TRANS: Field label on people tag form. + $this->input('tags', _m('LABEL','Tags'), ($this->arg('tags')) ? $this->arg('tags') : implode(' ', $tags), - _('Tags for this user (letters, numbers, -, ., and _), comma- or space- separated')); + // TRANS: Field title on people tag form. + _('Tags for this user (letters, numbers, -, ., and _), comma- or space- separated.')); $this->elementEnd('li'); $this->elementEnd('ul'); - $this->submit('save', _('Save')); + // TRANS: Button text to save people tags. + $this->submit('save', _m('BUTTON','Save')); $this->elementEnd('fieldset'); $this->elementEnd('form'); @@ -171,6 +182,7 @@ class TagprofileAction extends Action if (Event::handle('StartSavePeopletags', array($this, $tagstring))) { if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->showForm(_('There was a problem with your session token. '. 'Try again, please.')); return; @@ -188,7 +200,9 @@ class TagprofileAction extends Action $tag = common_canonical_tag($tag); if (!common_valid_profile_tag($tag)) { - $this->showForm(sprintf(_('Invalid tag: "%s"'), $tag)); + // TRANS: Form validation error displayed if a given tag is invalid. + // TRANS: %s is the invalid tag. + $this->showForm(sprintf(_('Invalid tag: "%s".'), $tag)); return; } @@ -211,7 +225,7 @@ class TagprofileAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, _('Tags')); + $this->element('title', null, _m('TITLE','Tags')); $this->elementEnd('head'); $this->elementStart('body'); @@ -226,7 +240,8 @@ class TagprofileAction extends Action $this->elementEnd('body'); $this->elementEnd('html'); } else { - $this->error = 'Tags saved.'; + // TRANS: Success message if people tags are saved. + $this->error = _('Tags saved.'); $this->showForm(); } @@ -241,9 +256,9 @@ class TagprofileAction extends Action } else { $this->elementStart('div', 'instructions'); $this->element('p', null, + // TRANS: Page notice. _('Use this form to add tags to your subscribers or subscriptions.')); $this->elementEnd('div'); } } } - diff --git a/actions/unsubscribepeopletag.php b/actions/unsubscribepeopletag.php index a912cc10f9..9443410911 100644 --- a/actions/unsubscribepeopletag.php +++ b/actions/unsubscribepeopletag.php @@ -42,7 +42,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class UnsubscribepeopletagAction extends Action { var $peopletag = null; @@ -57,12 +56,14 @@ class UnsubscribepeopletagAction extends Action parent::prepare($args); if (!common_logged_in()) { - $this->clientError(_('You must be logged in to unsubscribe to a peopletag.')); + // TRANS: Client error displayed when trying to perform an action while not logged in. + $this->clientError(_('You must be logged in to unsubscribe to a people tag.')); return false; } // Only allow POST requests if ($_SERVER['REQUEST_METHOD'] != 'POST') { + // TRANS: Client error displayed when trying to use another method than POST. $this->clientError(_('This action only accepts POST requests.')); return false; } @@ -72,6 +73,7 @@ class UnsubscribepeopletagAction extends Action $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token.'. ' Try again, please.')); return false; @@ -84,12 +86,14 @@ class UnsubscribepeopletagAction extends Action if ($id) { $this->peopletag = Profile_list::staticGet('id', $id); } else { + // TRANS: Client error displayed when trying to perform an action without providing an ID. $this->clientError(_('No ID given.'), 404); return false; } if (!$this->peopletag || $this->peopletag->private) { - $this->clientError(_('No such peopletag.'), 404); + // TRANS: Client error displayed trying to reference a non-existing people tag. + $this->clientError(_('No such people tag.'), 404); return false; } @@ -107,7 +111,6 @@ class UnsubscribepeopletagAction extends Action * * @return void */ - function handle($args) { parent::handle($args); @@ -119,7 +122,9 @@ class UnsubscribepeopletagAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, sprintf(_('%1$s unsubscribed to peopletag %2$s by %3$s'), + // TRANS: Page title for form that allows unsubscribing from a people tag. + // TRANS: %1$s is a nickname, %2$s is a people tag, %3$s is a tagger nickname. + $this->element('title', null, sprintf(_('%1$s unsubscribed to people tag %2$s by %3$s'), $cur->nickname, $this->peopletag->tag, $this->tagger->nickname)); diff --git a/classes/Notice.php b/classes/Notice.php index 73d27c8154..d18ac2e536 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -208,7 +208,7 @@ class Notice extends Memcached_DataObject if (!$id) { // TRANS: Server exception. %s are the error details. - throw new ServerException(sprintf(_('Database error inserting hashtag: %s'), + throw new ServerException(sprintf(_('Database error inserting hashtag: %s.'), $last_error->message)); return; } @@ -1190,6 +1190,7 @@ class Notice extends Memcached_DataObject $result = $ptagi->insert(); if (!$result) { common_log_db_error($ptagi, 'INSERT', __FILE__); + // TRANS: Server exception thrown when saving profile_tag inbox fails. throw new ServerException(_('Problem saving profile_tag inbox.')); } @@ -2289,7 +2290,7 @@ class Notice extends Memcached_DataObject /** * Check that the given profile is allowed to read, respond to, or otherwise * act on this notice. - * + * * The $scope member is a bitmask of scopes, representing a logical AND of the * scope requirement. So, 0x03 (Notice::ADDRESSEE_SCOPE | Notice::SITE_SCOPE) means * "only visible to people who are mentioned in the notice AND are users on this site." diff --git a/classes/Profile.php b/classes/Profile.php index fb51658aab..ac008877c4 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -239,7 +239,7 @@ class Profile extends Memcached_DataObject function getGroups($offset=0, $limit=PROFILES_PER_PAGE) { $ids = array(); - + $keypart = sprintf('profile:groups:%d', $this->id); $idstring = self::cacheGet($keypart); diff --git a/classes/Profile_list.php b/classes/Profile_list.php index 0bdf12e0e3..4fd731c9b2 100644 --- a/classes/Profile_list.php +++ b/classes/Profile_list.php @@ -397,6 +397,7 @@ class Profile_list extends Memcached_DataObject if($orig->tag != $this->tag || $orig->tagger != $this->tagger) { $existing = Profile_list::getByTaggerAndTag($this->tagger, $this->tag); if(!empty($existing)) { + // TRANS: Server exception. throw new ServerException(_('The tag you are trying to rename ' . 'to already exists.')); } @@ -597,7 +598,6 @@ class Profile_list extends Memcached_DataObject * @return mixed Profile_list on success, false on fail */ static function saveNew($fields) { - extract($fields); $ptag = new Profile_list(); @@ -605,10 +605,12 @@ class Profile_list extends Memcached_DataObject $ptag->query('BEGIN'); if (empty($tagger)) { + // TRANS: Server exception saving new tag without having a tagger specified. throw new Exception(_('No tagger specified.')); } if (empty($tag)) { + // TRANS: Server exception saving new tag without having a tag specified. throw new Exception(_('No tag specified.')); } @@ -646,6 +648,7 @@ class Profile_list extends Memcached_DataObject if (!$result) { common_log_db_error($ptag, 'INSERT', __FILE__); + // TRANS: Server exception saving new tag. throw new ServerException(_('Could not create profile tag.')); } @@ -655,6 +658,7 @@ class Profile_list extends Memcached_DataObject $result = $ptag->update($orig); if (!$result) { common_log_db_error($ptag, 'UPDATE', __FILE__); + // TRANS: Server exception saving new tag. throw new ServerException(_('Could not set profile tag URI.')); } } @@ -671,6 +675,7 @@ class Profile_list extends Memcached_DataObject $result = $ptag->update($orig); if (!$result) { common_log_db_error($ptag, 'UPDATE', __FILE__); + // TRANS: Server exception saving new tag. throw new ServerException(_('Could not set profile tag mainpage.')); } } diff --git a/classes/Profile_tag.php b/classes/Profile_tag.php index eb583c98fe..17f5034ff9 100644 --- a/classes/Profile_tag.php +++ b/classes/Profile_tag.php @@ -143,6 +143,7 @@ class Profile_tag extends Memcached_DataObject if (Event::handle('StartTagProfile', array($tagger_profile, $tagged_profile, $tag))) { if (!$tagger_profile->canTag($tagged_profile)) { + // TRANS: Client exception thrown trying to set a tag for a user that cannot be tagged. throw new ClientException(_('You cannot tag this user.')); return false; } @@ -152,6 +153,7 @@ class Profile_tag extends Memcached_DataObject $count = (int) $tags->count('distinct tag'); if ($count >= common_config('peopletag', 'maxtags')) { + // TRANS: Client exception thrown trying to set more tags than allowed. throw new ClientException(sprintf(_('You already have created %d or more tags ' . 'which is the maximum allowed number of tags. ' . 'Try using or deleting some existing tags.'), @@ -165,7 +167,8 @@ class Profile_tag extends Memcached_DataObject $profile_list = Profile_list::ensureTag($tagger, $tag, $desc, $private); if ($profile_list->taggedCount() >= common_config('peopletag', 'maxpeople')) { - throw new ClientException(sprintf(_('You already have %d or more people tagged %s ' . + // TRANS: Client exception thrown trying to set one tag for more people than allowed. + throw new ClientException(sprintf(_('You already have %1$d or more people tagged %2$s, ' . 'which is the maximum allowed number.' . 'Try untagging others with the same tag first.'), common_config('peopletag', 'maxpeople'), $tag)); diff --git a/classes/Profile_tag_subscription.php b/classes/Profile_tag_subscription.php index 870640c40b..f666fe51a0 100644 --- a/classes/Profile_tag_subscription.php +++ b/classes/Profile_tag_subscription.php @@ -50,7 +50,8 @@ class Profile_tag_subscription extends Memcached_DataObject if (!$result) { common_log_db_error($sub, 'INSERT', __FILE__); - throw new Exception(_("Adding people tag subscription failed.")); + // TRANS: Exception thrown when inserting a people tag subscription in the database fails. + throw new Exception(_('Adding people tag subscription failed.')); } $ptag = Profile_list::staticGet('id', $peopletag->id); @@ -76,7 +77,8 @@ class Profile_tag_subscription extends Memcached_DataObject if (!$result) { common_log_db_error($sub, 'DELETE', __FILE__); - throw new Exception(_("Removing people tag subscription failed.")); + // TRANS: Exception thrown when deleting a people tag subscription from the database fails. + throw new Exception(_('Removing people tag subscription failed.')); } $peopletag->subscriberCount(true); diff --git a/classes/User.php b/classes/User.php index 7d556c18c2..d8f813c765 100644 --- a/classes/User.php +++ b/classes/User.php @@ -809,7 +809,8 @@ class User extends Memcached_DataObject function repeatedToMe($offset=0, $limit=20, $since_id=null, $max_id=null) { - throw new Exception("Not implemented since inbox change."); + // TRANS: Exception thrown when trying view "repeated to me". + throw new Exception(_('Not implemented since inbox change.')); } function shareLocation() diff --git a/lib/action.php b/lib/action.php index be26ce562e..f626c04480 100644 --- a/lib/action.php +++ b/lib/action.php @@ -328,7 +328,6 @@ class Action extends HTMLOutputter // lawsuit $this->script('util.js'); $this->script('xbImportNode.js'); $this->script('geometa.js'); - } $this->inlineScript('var _peopletagAC = "' . common_local_url('peopletagautocomplete') . '";'); @@ -349,7 +348,6 @@ class Action extends HTMLOutputter // lawsuit * events and appending to the array. Try to avoid adding strings that won't be used, as * they'll be added to HTML output. */ - function showScriptMessages() { $messages = array(); @@ -747,7 +745,6 @@ class Action extends HTMLOutputter // lawsuit * * @return nothing */ - function showProfileBlock() { if (common_logged_in()) { diff --git a/lib/apilistusers.php b/lib/apilistusers.php index e4451c7c41..04fc46730d 100644 --- a/lib/apilistusers.php +++ b/lib/apilistusers.php @@ -63,7 +63,8 @@ class ApiListUsersAction extends ApiBareAuthAction $this->list = $this->getTargetList($this->arg('user'), $this->arg('list_id')); if (empty($this->list)) { - $this->clientError(_('Not found'), 404, $this->format); + // TRANS: Client error displayed when referring to a non-existing list. + $this->clientError(_('List not found.'), 404, $this->format); return false; } @@ -144,6 +145,7 @@ class ApiListUsersAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format @@ -185,7 +187,6 @@ class ApiListUsersAction extends ApiBareAuthAction * * @return string etag */ - function etag() { if (!empty($this->list)) { @@ -203,5 +204,4 @@ class ApiListUsersAction extends ApiBareAuthAction return null; } - } diff --git a/lib/atomlistnoticefeed.php b/lib/atomlistnoticefeed.php index fec7e16846..55ad9d228c 100644 --- a/lib/atomlistnoticefeed.php +++ b/lib/atomlistnoticefeed.php @@ -61,14 +61,14 @@ class AtomListNoticeFeed extends AtomNoticeFeed $this->list = $list; $this->tagger = Profile::staticGet('id', $list->tagger); - // TRANS: Title in atom list notice feed. %s is a list name. - $title = sprintf(_("Timeline for people tagged #%s by %s"), $list->tag, $this->tagger->nickname); + // TRANS: Title in atom list notice feed. %1$s is a list name, %2$s is a tagger's nickname. + $title = sprintf(_('Timeline for people tagged #%1$s by %2$s'), $list->tag, $this->tagger->nickname); $this->setTitle($title); $sitename = common_config('site', 'name'); $subtitle = sprintf( // TRANS: Message is used as a subtitle in atom list notice feed. - // TRANS: %1$s is a list name, %2$s is a site name. + // TRANS: %1$s is a tagger's nickname, %2$s is a list name, %3$s is a site name. _('Updates from %1$s\'s %2$s people tag on %3$s!'), $this->tagger->nickname, $list->tag, @@ -101,5 +101,4 @@ class AtomListNoticeFeed extends AtomNoticeFeed { return $this->list; } - } diff --git a/lib/command.php b/lib/command.php index a922aa73ac..6254cf2e78 100644 --- a/lib/command.php +++ b/lib/command.php @@ -180,7 +180,7 @@ class UnimplementedCommand extends Command function handle($channel) { // TRANS: Error text shown when an unimplemented command is given. - $channel->error($this->user, _("Sorry, this command is not yet implemented.")); + $channel->error($this->user, _('Sorry, this command is not yet implemented.')); } } @@ -295,7 +295,7 @@ class FavCommand extends Command if ($fave->fetch()) { // TRANS: Error message text shown when a favorite could not be set because it has already been favorited. - $channel->error($this->user, _('Could not create favorite: already favorited.')); + $channel->error($this->user, _('Could not create favorite: Already favorited.')); return; } @@ -431,10 +431,12 @@ class TagCommand extends Command $cur = $this->user->getProfile(); if (!$profile) { + // TRANS: Client error displayed trying to perform an action related to a non-existing profile. $channel->error($cur, _('No such profile.')); return; } if (!$cur->canTag($profile)) { + // TRANS: Error displayed when trying to tag a user that cannot be tagged. $channel->error($cur, _('You cannot tag this user.')); return; } @@ -448,7 +450,9 @@ class TagCommand extends Command $tag = $clean_tags[] = common_canonical_tag($tag); if (!common_valid_profile_tag($tag)) { - $channel->error($cur, sprintf(_('Invalid tag: "%s"'), $tag)); + // TRANS: Error displayed if a given tag is invalid. + // TRANS: %s is the invalid tag. + $channel->error($cur, sprintf(_('Invalid tag: "%s".'), $tag)); return; } $privs[$tag] = $private; @@ -459,18 +463,22 @@ class TagCommand extends Command Profile_tag::setTag($cur->id, $profile->id, $tag, null, $privs[$tag]); } } catch (Exception $e) { - $channel->error($cur, sprintf(_('Error tagging %s: %s'), + // TRANS: Error displayed if tagging a user fails. + // TRANS: %1$s is the tagged user, %2$s is the error message (no punctuation). + $channel->error($cur, sprintf(_('Error tagging %1$s: %2$s'), $profile->nickname, $e->getMessage())); return; } + // TRANS: Succes message displayed if tagging a user succeeds. + // TRANS: %1$s is the tagged user's nickname, %2$s is a list of tags. $channel->output($cur, sprintf(_('%1$s was tagged %2$s'), $profile->nickname, - implode(', ', $clean_tags))); + // TRANS: Separator for list of tags. + implode(_(', '), $clean_tags))); } } - class UntagCommand extends TagCommand { function handle($channel) @@ -479,10 +487,12 @@ class UntagCommand extends TagCommand $cur = $this->user->getProfile(); if (!$profile) { + // TRANS: Client error displayed trying to perform an action related to a non-existing profile. $channel->error($cur, _('No such profile.')); return; } if (!$cur->canTag($profile)) { + // TRANS: Error displayed when trying to tag a user that cannot be tagged. $channel->error($cur, _('You cannot tag this user.')); return; } @@ -491,6 +501,8 @@ class UntagCommand extends TagCommand foreach ($tags as $tag) { if (!common_valid_profile_tag($tag)) { + // TRANS: Error displayed if a given tag is invalid. + // TRANS: %s is the invalid tag. $channel->error($cur, sprintf(_('Invalid tag: "%s"'), $tag)); return; } @@ -501,14 +513,19 @@ class UntagCommand extends TagCommand Profile_tag::unTag($cur->id, $profile->id, $tag); } } catch (Exception $e) { - $channel->error($cur, sprintf(_('Error untagging %s: %s'), + // TRANS: Error displayed if untagging a user fails. + // TRANS: %1$s is the untagged user, %2$s is the error message (no punctuation). + $channel->error($cur, sprintf(_('Error untagging %1$s: %2$s'), $profile->nickname, $e->getMessage())); return; } + // TRANS: Succes message displayed if untagging a user succeeds. + // TRANS: %1$s is the untagged user's nickname, %2$s is a list of tags. $channel->output($cur, sprintf(_('The following tag(s) were removed from user %1$s: %2$s.'), $profile->nickname, - implode(', ', $tags))); + // TRANS: Separator for list of tags. + implode(_(', '), $tags))); } } @@ -991,83 +1008,83 @@ class HelpCommand extends Command { // TRANS: Header line of help text for commands. $out = array(_m('COMMANDHELP', "Commands:")); - $commands = array(// TRANS: Help message for IM/SMS command "on" + $commands = array(// TRANS: Help message for IM/SMS command "on". "on" => _m('COMMANDHELP', "turn on notifications"), - // TRANS: Help message for IM/SMS command "off" + // TRANS: Help message for IM/SMS command "off". "off" => _m('COMMANDHELP', "turn off notifications"), - // TRANS: Help message for IM/SMS command "help" + // TRANS: Help message for IM/SMS command "help". "help" => _m('COMMANDHELP', "show this help"), - // TRANS: Help message for IM/SMS command "follow " + // TRANS: Help message for IM/SMS command "follow ". "follow " => _m('COMMANDHELP', "subscribe to user"), - // TRANS: Help message for IM/SMS command "groups" + // TRANS: Help message for IM/SMS command "groups". "groups" => _m('COMMANDHELP', "lists the groups you have joined"), - // TRANS: Help message for IM/SMS command "tag" + // TRANS: Help message for IM/SMS command "tag". "tag " => _m('COMMANDHELP',"tag a user"), - // TRANS: Help message for IM/SMS command "untag" + // TRANS: Help message for IM/SMS command "untag". "untag " => _m('COMMANDHELP',"untag a user"), - // TRANS: Help message for IM/SMS command "subscriptions" + // TRANS: Help message for IM/SMS command "subscriptions". "subscriptions" => _m('COMMANDHELP', "list the people you follow"), - // TRANS: Help message for IM/SMS command "subscribers" + // TRANS: Help message for IM/SMS command "subscribers". "subscribers" => _m('COMMANDHELP', "list the people that follow you"), - // TRANS: Help message for IM/SMS command "leave " + // TRANS: Help message for IM/SMS command "leave ". "leave " => _m('COMMANDHELP', "unsubscribe from user"), - // TRANS: Help message for IM/SMS command "d " + // TRANS: Help message for IM/SMS command "d ". "d " => _m('COMMANDHELP', "direct message to user"), - // TRANS: Help message for IM/SMS command "get " + // TRANS: Help message for IM/SMS command "get ". "get " => _m('COMMANDHELP', "get last notice from user"), - // TRANS: Help message for IM/SMS command "whois " + // TRANS: Help message for IM/SMS command "whois ". "whois " => _m('COMMANDHELP', "get profile info on user"), - // TRANS: Help message for IM/SMS command "lose " + // TRANS: Help message for IM/SMS command "lose ". "lose " => _m('COMMANDHELP', "force user to stop following you"), - // TRANS: Help message for IM/SMS command "fav " + // TRANS: Help message for IM/SMS command "fav ". "fav " => _m('COMMANDHELP', "add user's last notice as a 'fave'"), - // TRANS: Help message for IM/SMS command "fav #" + // TRANS: Help message for IM/SMS command "fav #". "fav #" => _m('COMMANDHELP', "add notice with the given id as a 'fave'"), - // TRANS: Help message for IM/SMS command "repeat #" + // TRANS: Help message for IM/SMS command "repeat #". "repeat #" => _m('COMMANDHELP', "repeat a notice with a given id"), - // TRANS: Help message for IM/SMS command "repeat " + // TRANS: Help message for IM/SMS command "repeat ". "repeat " => _m('COMMANDHELP', "repeat the last notice from user"), - // TRANS: Help message for IM/SMS command "reply #" + // TRANS: Help message for IM/SMS command "reply #". "reply #" => _m('COMMANDHELP', "reply to notice with a given id"), - // TRANS: Help message for IM/SMS command "reply " + // TRANS: Help message for IM/SMS command "reply ". "reply " => _m('COMMANDHELP', "reply to the last notice from user"), - // TRANS: Help message for IM/SMS command "join " + // TRANS: Help message for IM/SMS command "join ". "join " => _m('COMMANDHELP', "join group"), - // TRANS: Help message for IM/SMS command "login" + // TRANS: Help message for IM/SMS command "login". "login" => _m('COMMANDHELP', "Get a link to login to the web interface"), - // TRANS: Help message for IM/SMS command "drop " + // TRANS: Help message for IM/SMS command "drop ". "drop " => _m('COMMANDHELP', "leave group"), - // TRANS: Help message for IM/SMS command "stats" + // TRANS: Help message for IM/SMS command "stats". "stats" => _m('COMMANDHELP', "get your stats"), - // TRANS: Help message for IM/SMS command "stop" + // TRANS: Help message for IM/SMS command "stop". "stop" => _m('COMMANDHELP', "same as 'off'"), - // TRANS: Help message for IM/SMS command "quit" + // TRANS: Help message for IM/SMS command "quit". "quit" => _m('COMMANDHELP', "same as 'off'"), - // TRANS: Help message for IM/SMS command "sub " + // TRANS: Help message for IM/SMS command "sub ". "sub " => _m('COMMANDHELP', "same as 'follow'"), - // TRANS: Help message for IM/SMS command "unsub " + // TRANS: Help message for IM/SMS command "unsub ". "unsub " => _m('COMMANDHELP', "same as 'leave'"), - // TRANS: Help message for IM/SMS command "last " + // TRANS: Help message for IM/SMS command "last ". "last " => _m('COMMANDHELP', "same as 'get'"), - // TRANS: Help message for IM/SMS command "on " + // TRANS: Help message for IM/SMS command "on ". "on " => _m('COMMANDHELP', "not yet implemented."), - // TRANS: Help message for IM/SMS command "off " + // TRANS: Help message for IM/SMS command "off ". "off " => _m('COMMANDHELP', "not yet implemented."), - // TRANS: Help message for IM/SMS command "nudge " + // TRANS: Help message for IM/SMS command "nudge ". "nudge " => _m('COMMANDHELP', "remind a user to update."), - // TRANS: Help message for IM/SMS command "invite " + // TRANS: Help message for IM/SMS command "invite ". "invite " => _m('COMMANDHELP', "not yet implemented."), - // TRANS: Help message for IM/SMS command "track " + // TRANS: Help message for IM/SMS command "track ". "track " => _m('COMMANDHELP', "not yet implemented."), - // TRANS: Help message for IM/SMS command "untrack " + // TRANS: Help message for IM/SMS command "untrack ". "untrack " => _m('COMMANDHELP', "not yet implemented."), - // TRANS: Help message for IM/SMS command "track off" + // TRANS: Help message for IM/SMS command "track off". "track off" => _m('COMMANDHELP', "not yet implemented."), - // TRANS: Help message for IM/SMS command "untrack all" + // TRANS: Help message for IM/SMS command "untrack all". "untrack all" => _m('COMMANDHELP', "not yet implemented."), - // TRANS: Help message for IM/SMS command "tracks" + // TRANS: Help message for IM/SMS command "tracks". "tracks" => _m('COMMANDHELP', "not yet implemented."), - // TRANS: Help message for IM/SMS command "tracking" + // TRANS: Help message for IM/SMS command "tracking". "tracking" => _m('COMMANDHELP', "not yet implemented.")); // Give plugins a chance to add or override... diff --git a/lib/commandinterpreter.php b/lib/commandinterpreter.php index 1e8114701d..d1574c55fd 100644 --- a/lib/commandinterpreter.php +++ b/lib/commandinterpreter.php @@ -339,7 +339,7 @@ class CommandInterpreter default: $result = false; } - + Event::handle('EndInterpretCommand', array($cmd, $arg, $user, &$result)); } diff --git a/lib/default.php b/lib/default.php index 860957bf9e..c7c89faf5c 100644 --- a/lib/default.php +++ b/lib/default.php @@ -274,7 +274,7 @@ $default = 'maxpeople' => 500, // maximum no. of people with the same tag by the same user 'allow_tagging' => array('all' => true), // equivalent to array('local' => true, 'remote' => true) 'desclimit' => null), - 'oembed' => + 'oembed' => array('endpoint' => 'http://oohembed.com/oohembed/', 'order' => array('built-in', 'well-known', 'service', 'discovery'), ), diff --git a/lib/peopletageditform.php b/lib/peopletageditform.php index 118f2df8f7..27920008a8 100644 --- a/lib/peopletageditform.php +++ b/lib/peopletageditform.php @@ -44,7 +44,6 @@ require_once INSTALLDIR.'/lib/togglepeopletag.php'; * * @see GroupEditForm */ - class PeopletagEditForm extends Form { /** @@ -60,7 +59,6 @@ class PeopletagEditForm extends Form * @param Action $out output channel * @param User_group $group group to join */ - function __construct($out=null, Profile_list $peopletag=null) { parent::__construct($out); @@ -74,7 +72,6 @@ class PeopletagEditForm extends Form * * @return string ID of the form */ - function id() { return 'form_peopletag_edit-' . $this->peopletag->id; @@ -85,7 +82,6 @@ class PeopletagEditForm extends Form * * @return string of the form class */ - function formClass() { return 'form_settings'; @@ -96,7 +92,6 @@ class PeopletagEditForm extends Form * * @return string URL of the action */ - function action() { return common_local_url('editpeopletag', @@ -108,10 +103,11 @@ class PeopletagEditForm extends Form * * @return void */ - function formLegend() { - $this->out->element('legend', null, sprintf(_('Edit peopletag %s'), $this->peopletag->tag)); + // TRANS: Form legend for people tag edit form. + // TRANS: %s is a people tag. + $this->out->element('legend', null, sprintf(_('Edit people tag %s'), $this->peopletag->tag)); } /** @@ -119,7 +115,6 @@ class PeopletagEditForm extends Form * * @return void */ - function formData() { $id = $this->peopletag->id; @@ -131,21 +126,32 @@ class PeopletagEditForm extends Form $this->out->elementStart('li'); $this->out->hidden('id', $id); - $this->out->input('tag', _('Tag'), + + // TRANS: Field label for people tag. + $this->out->input('tag', _m('LABEL','Tag'), ($this->out->arg('tag')) ? $this->out->arg('tag') : $tag, - _('Change the tag (letters, numbers, -, ., and _ are allowed)')); + // TRANS: Field title for people tag. + _('Change the tag (letters, numbers, -, ., and _ are allowed).')); $this->out->elementEnd('li'); $this->out->elementStart('li'); $desclimit = Profile_list::maxDescription(); if ($desclimit == 0) { - $descinstr = _('Describe the people tag or topic'); + // TRANS: Field title for description of people tag. + $descinstr = _('Describe the people tag or topic.'); } else { - $descinstr = sprintf(_('Describe the people tag or topic in %d characters'), $desclimit); + // TRANS: Field title for description of people tag. + // TRANS: %d is the maximum number of characters for the description. + $descinstr = sprintf(_m('Describe the people tag or topic in %d character.', + 'Describe the people tag or topic in %d characters.', + $desclimit), + $desclimit); } + // TRANS: Field label for description of people tag. $this->out->textarea('description', _('Description'), ($this->out->arg('description')) ? $this->out->arg('description') : $description, $descinstr); + // TRANS: Checkbox label to mark a people tag private. $this->out->checkbox('private', _('Private'), $private); $this->out->elementEnd('li'); $this->out->elementEnd('ul'); @@ -156,24 +162,28 @@ class PeopletagEditForm extends Form * * @return void */ - function formActions() { + // TRANS: Button text to save a people tag. $this->out->submit('submit', _('Save')); $this->out->submit('form_action-yes', + // TRANS: Button text to delete a people tag. _m('BUTTON','Delete'), 'submit', 'delete', - _('Delete this people tag')); + // TRANS: Button title to delete a people tag. + _('Delete this people tag.')); } function showProfileList() { $tagged = $this->peopletag->getTagged(); - $this->out->element('h2', null, 'Add or remove people'); + // TRANS: Header in people tag edit form. + $this->out->element('h2', null, _('Add or remove people')); $this->out->elementStart('div', 'profile_search_wrap'); - $this->out->element('h3', null, _m('BUTTON', 'Search')); + // TRANS: Header in people tag edit form. + $this->out->element('h3', null, _m('HEADER','Search')); $search = new SearchProfileForm($this->out, $this->peopletag); $search->show(); $this->out->element('ul', array('id' => 'profile_search_results', 'class' => 'empty')); diff --git a/lib/peopletaggroupnav.php b/lib/peopletaggroupnav.php index 2c9a65fd44..5c95487247 100644 --- a/lib/peopletaggroupnav.php +++ b/lib/peopletaggroupnav.php @@ -52,7 +52,6 @@ require_once INSTALLDIR.'/lib/widget.php'; * * @see HTMLOutputter */ - class PeopletagGroupNav extends Widget { var $action = null; @@ -62,7 +61,6 @@ class PeopletagGroupNav extends Widget * * @param Action $action current action, used for output */ - function __construct($action=null) { parent::__construct($action); @@ -74,7 +72,6 @@ class PeopletagGroupNav extends Widget * * @return void */ - function show() { $user = null; @@ -106,24 +103,33 @@ class PeopletagGroupNav extends Widget // People tag timeline $this->out->menuItem(common_local_url('showprofiletag', array('tagger' => $user_profile->nickname, 'tag' => $tag->tag)), - _('People tag'), - sprintf(_('%s tag by %s'), $tag->tag, + // TRANS: Menu item in people tag navigation panel. + _m('MENU','People tag'), + // TRANS: Menu item title in people tag navigation panel. + // TRANS: %1$s is a tag, %2$s is a nickname. + sprintf(_('%1$s tag by %2$s.'), $tag->tag, (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)), $action == 'showprofiletag', 'nav_timeline_peopletag'); // Tagged $this->out->menuItem(common_local_url('peopletagged', array('tagger' => $user->nickname, 'tag' => $tag->tag)), - _('Tagged'), - sprintf(_('%s tag by %s'), $tag->tag, + // TRANS: Menu item in people tag navigation panel. + _m('MENU','Tagged'), + // TRANS: Menu item title in people tag navigation panel. + // TRANS: %1$s is a tag, %2$s is a nickname. + sprintf(_('%1$s tag by %2$s.'), $tag->tag, (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)), $action == 'peopletagged', 'nav_peopletag_tagged'); // Subscribers $this->out->menuItem(common_local_url('peopletagsubscribers', array('tagger' => $user->nickname, 'tag' => $tag->tag)), - _('Subscribers'), - sprintf(_('Subscribers to %s tag by %s'), $tag->tag, + // TRANS: Menu item in people tag navigation panel. + _m('MENU','Subscribers'), + // TRANS: Menu item title in people tag navigation panel. + // TRANS: %1$s is a tag, %2$s is a nickname. + sprintf(_('Subscribers to %1$s tag by %2$s.'), $tag->tag, (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)), $action == 'peopletagsubscribers', 'nav_peopletag_subscribers'); @@ -132,8 +138,11 @@ class PeopletagGroupNav extends Widget // Edit $this->out->menuItem(common_local_url('editpeopletag', array('tagger' => $user->nickname, 'tag' => $tag->tag)), - _('Edit'), - sprintf(_('Edit %s tag by you'), $tag->tag, + // TRANS: Menu item in people tag navigation panel. + _m('MENU','Edit'), + // TRANS: Menu item title in people tag navigation panel. + // TRANS: %s is a tag. + sprintf(_('Edit %s tag by you.'), $tag->tag, (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)), $action == 'editpeopletag', 'nav_peopletag_edit'); } diff --git a/lib/peopletaglist.php b/lib/peopletaglist.php index 8a4caf44fe..729ff8814e 100644 --- a/lib/peopletaglist.php +++ b/lib/peopletaglist.php @@ -1,5 +1,4 @@ peopletag->homeUrl(); @@ -173,6 +169,7 @@ class PeopletagListItem extends Widget array('href' => common_local_url('peopletagged', array('tagger' => $this->profile->nickname, 'tag' => $this->peopletag->tag))), + // TRANS: Link description for link to list of users tagged with a tag. _('Tagged')); $this->out->raw($this->peopletag->taggedCount()); $this->out->elementEnd('span'); @@ -182,6 +179,7 @@ class PeopletagListItem extends Widget array('href' => common_local_url('peopletagsubscribers', array('tagger' => $this->profile->nickname, 'tag' => $this->peopletag->tag))), + // TRANS: Link description for link to list of users subscribed to a tag. _('Subscribers')); $this->out->raw($this->peopletag->subscriberCount()); $this->out->elementEnd('span'); @@ -194,7 +192,9 @@ class PeopletagListItem extends Widget $this->out->element('a', array('href' => common_local_url('editpeopletag', array('tagger' => $this->profile->nickname, 'tag' => $this->peopletag->tag)), - 'title' => _('Edit peopletag settings')), + // TRANS: Title for link to edit people tag settings. + 'title' => _('Edit people tag settings.')), + // TRANS: Text for link to edit people tag settings. _('Edit')); $this->out->elementEnd('li'); } @@ -256,7 +256,8 @@ class PeopletagListItem extends Widget $this->out->elementStart('a', array('href' => common_local_url('peopletagsbyuser', array('nickname' => $this->profile->nickname, 'private' => 1)))); - $this->out->element('span', 'privacy_mode', _('Private')); + // TRANS: Privacy mode text in people tag list item for private tags. + $this->out->element('span', 'privacy_mode', _m('MODE','Private')); $this->out->elementEnd('a'); } } diff --git a/lib/peopletagnoticestream.php b/lib/peopletagnoticestream.php index b5367fe5bc..34e7443da5 100644 --- a/lib/peopletagnoticestream.php +++ b/lib/peopletagnoticestream.php @@ -4,7 +4,7 @@ * Copyright (C) 2011, StatusNet, Inc. * * Stream of notices for a people tag - * + * * PHP version 5 * * This program is free software: you can redistribute it and/or modify diff --git a/lib/peopletags.php b/lib/peopletags.php index 96b85afd4f..faf408c895 100644 --- a/lib/peopletags.php +++ b/lib/peopletags.php @@ -40,7 +40,6 @@ require_once INSTALLDIR.'/lib/widget.php'; * @author Shashi Gowda * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 */ - class PeopletagsWidget extends Widget { /* @@ -84,7 +83,8 @@ class PeopletagsWidget extends Widget function label() { - return _('Tags by you'); + // TRANS: Label in people tags widget. + return _m('LABEL','Tags by you'); } function showTags() @@ -131,7 +131,8 @@ class PeopletagsWidget extends Widget 'action' => common_local_url('tagprofile', array('id' => $this->tagged->id)))); $this->out->elementStart('fieldset'); - $this->out->element('legend', null, _('Edit tags')); + // TRANS: Fieldset legend in people tags widget. + $this->out->element('legend', null, _m('LEGEND','Edit tags')); $this->out->hidden('token', common_session_token()); $this->out->hidden('id', $this->tagged->id); @@ -141,7 +142,8 @@ class PeopletagsWidget extends Widget $this->out->input('tags', $this->label(), ($this->out->arg('tags')) ? $this->out->arg('tags') : implode(' ', $tags)); - $this->out->submit('save', _('Save')); + // TRANS: Button text to save tags for a profile. + $this->out->submit('save', _m('BUTTON','Save')); $this->out->elementEnd('fieldset'); $this->out->elementEnd('form'); @@ -160,6 +162,7 @@ class PeopletagsWidget extends Widget } $this->out->elementStart('ul', $class); + // TRANS: Empty list message for tags. $this->out->element('li', null, _('(None)')); $this->out->elementEnd('ul'); @@ -186,6 +189,7 @@ class SelftagsWidget extends PeopletagsWidget function label() { - return _('Tags'); + // TRANS: Label in self tags widget. + return _m('LABEL','Tags'); } } diff --git a/lib/peopletagsbysubssection.php b/lib/peopletagsbysubssection.php index 779e7d8ef9..d67b7fb88d 100644 --- a/lib/peopletagsbysubssection.php +++ b/lib/peopletagsbysubssection.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class PeopletagsBySubsSection extends PeopletagSection { function getPeopletags() @@ -66,6 +65,7 @@ class PeopletagsBySubsSection extends PeopletagSection function title() { + // TRANS: Title for section contaning people tags with the most subscribers. return _('People tags with most subscribers'); } diff --git a/lib/peopletagsection.php b/lib/peopletagsection.php index a96863c04b..20358cb85d 100644 --- a/lib/peopletagsection.php +++ b/lib/peopletagsection.php @@ -46,7 +46,6 @@ define('PEOPLETAGS_PER_SECTION', 6); * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class PeopletagSection extends Section { function showContent() @@ -120,8 +119,11 @@ class PeopletagSectionItem extends PeopletagListItem function showTag() { - $title = _('Tagged: ') . $this->peopletag->taggedCount() . - ' ' . _('Subscribers: ') . $this->peopletag->subscriberCount(); + // TRANS: Tag summary. %1$d is the number of users tagged with the tag, + // TRANS: %2$d is the number of subscribers to the tag. + $title = sprintf(_('Tagged: %1$d Subscribers: %2$d'), + $this->peopletag->taggedCount(), + $this->peopletag->subscriberCount()); $this->out->elementStart('span', 'entry-title tag'); $this->out->element('a', diff --git a/lib/peopletagsforusersection.php b/lib/peopletagsforusersection.php index f074248728..fef469eb8d 100644 --- a/lib/peopletagsforusersection.php +++ b/lib/peopletagsforusersection.php @@ -39,7 +39,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class PeopletagsForUserSection extends PeopletagSection { var $profile=null; @@ -67,10 +66,11 @@ class PeopletagsForUserSection extends PeopletagSection if ($this->profile->id == common_current_user()->id) { $name = 'you'; } + // TRANS: Title for page that displays which people tags a user has been tagged with. + // TRANS: %s is a profile name. return sprintf(_('People tags for %s'), $name); } - function link() { return common_local_url('peopletagsforuser', diff --git a/lib/peopletagsubscriptionssection.php b/lib/peopletagsubscriptionssection.php index 63a0d1363c..2182a3d834 100644 --- a/lib/peopletagsubscriptionssection.php +++ b/lib/peopletagsubscriptionssection.php @@ -39,7 +39,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class PeopletagSubscriptionsSection extends PeopletagSection { var $profile=null; @@ -62,6 +61,7 @@ class PeopletagSubscriptionsSection extends PeopletagSection function title() { + // TRANS: Title for page that displays people tags a user has subscribed to. return _('People tag subscriptions'); } diff --git a/lib/personalgroupnav.php b/lib/personalgroupnav.php index 812e7194ef..3b3a87ff0d 100644 --- a/lib/personalgroupnav.php +++ b/lib/personalgroupnav.php @@ -105,8 +105,14 @@ class PersonalGroupNav extends Menu $mine && $action =='showfavorites', 'nav_timeline_favorites'); $this->out->menuItem(common_local_url('peopletagsbyuser', array('nickname' => $nickname)), - _('People tags'), - sprintf(_('People tags by %s'), ($user_profile) ? $name : _('User')), + // TRANS: Menu item in personal group navigation menu. + _m('MENU','People tags'), + // @todo i18n FIXME: Need to make this two messages. + // TRANS: Menu item title in personal group navigation menu. + // TRANS: %s is a username. + sprintf(_('People tags by %s'), + // TRANS: Replaces %s in 'People tags by %s'. (Yes, we know we need to fix this.) + ($user_profile) ? $name : _('User')), in_array($action, array('peopletagsbyuser', 'peopletagsforuser')), 'nav_timeline_peopletags'); diff --git a/lib/profileblock.php b/lib/profileblock.php index 3cea0474a4..432df0da5a 100644 --- a/lib/profileblock.php +++ b/lib/profileblock.php @@ -4,7 +4,7 @@ * Copyright (C) 2011, StatusNet, Inc. * * Superclass for profile blocks - * + * * PHP version 5 * * This program is free software: you can redistribute it and/or modify diff --git a/lib/profilelist.php b/lib/profilelist.php index af38fa71d9..397ea19848 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -1,5 +1,4 @@ out->menuItem(common_local_url('publicpeopletagcloud'), _('People tags'), + // TRANS: Menu item in search group navigation panel. + $this->out->menuItem(common_local_url('publicpeopletagcloud'), _m('MENU','People tags'), + // TRANS: Menu item title in search group navigation panel. _('People tags'), in_array($action_name, array('publicpeopletagcloud', 'peopletag', 'selftag')), 'nav_people-tags'); diff --git a/lib/subgroupnav.php b/lib/subgroupnav.php index abadaee622..6ff3b4609c 100644 --- a/lib/subgroupnav.php +++ b/lib/subgroupnav.php @@ -131,8 +131,11 @@ class SubGroupNav extends Menu $this->out->menuItem(common_local_url('peopletagsbyuser', array('nickname' => $this->user->nickname)), - _('People tags'), - sprintf(_('People tags by %s'), + // TRANS: Menu item title in local navigation menu. + _m('MENU','People tags'), + // TRANS: Menu item title in local navigation menu. + // TRANS: %s is a user nickname. + sprintf(_('People tags by %s.'), $this->user->nickname), in_array($action, array('peopletagsbyuser', 'peopletagsforuser')), 'nav_timeline_peopletags'); diff --git a/lib/subscribepeopletagform.php b/lib/subscribepeopletagform.php index 9489b01a1c..6790747f26 100644 --- a/lib/subscribepeopletagform.php +++ b/lib/subscribepeopletagform.php @@ -44,13 +44,11 @@ require_once INSTALLDIR.'/lib/form.php'; * * @see UnsubscribeForm */ - class SubscribePeopletagForm extends Form { /** * peopletag for the user to join */ - var $peopletag = null; /** @@ -59,7 +57,6 @@ class SubscribePeopletagForm extends Form * @param HTMLOutputter $out output channel * @param peopletag $peopletag peopletag to subscribe to */ - function __construct($out=null, $peopletag=null) { parent::__construct($out); @@ -72,7 +69,6 @@ class SubscribePeopletagForm extends Form * * @return string ID of the form */ - function id() { return 'peopletag-subscribe-' . $this->peopletag->id; @@ -83,7 +79,6 @@ class SubscribePeopletagForm extends Form * * @return string of the form class */ - function formClass() { return 'form_peopletag_subscribe'; @@ -94,7 +89,6 @@ class SubscribePeopletagForm extends Form * * @return string URL of the action */ - function action() { return common_local_url('subscribepeopletag', @@ -106,9 +100,9 @@ class SubscribePeopletagForm extends Form * * @return void */ - function formActions() { - $this->out->submit('submit', _('Subscribe')); + // TRANS: Button text for subscribing to a people tag. + $this->out->submit('submit', m('BUTTON','Subscribe')); } } diff --git a/lib/subscriptionlist.php b/lib/subscriptionlist.php index e260c5f7c9..36dcbf65f8 100644 --- a/lib/subscriptionlist.php +++ b/lib/subscriptionlist.php @@ -43,7 +43,6 @@ require_once INSTALLDIR.'/lib/profilelist.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 SubscriptionList extends ProfileList { /** Owner of this list */ diff --git a/lib/togglepeopletag.php b/lib/togglepeopletag.php index a6e07177fb..bc9d136fe5 100644 --- a/lib/togglepeopletag.php +++ b/lib/togglepeopletag.php @@ -43,7 +43,6 @@ require_once INSTALLDIR.'/lib/form.php'; * * @see GroupEditForm */ - class SearchProfileForm extends Form { var $peopletag; @@ -59,7 +58,6 @@ class SearchProfileForm extends Form * * @return string ID of the form */ - function id() { return 'form_peopletag-add-' . $this->peopletag->id; @@ -70,7 +68,6 @@ class SearchProfileForm extends Form * * @return string of the form class */ - function formClass() { return 'form_peopletag_edit_user_search'; @@ -81,7 +78,6 @@ class SearchProfileForm extends Form * * @return string URL of the action */ - function action() { return common_local_url('profilecompletion'); @@ -92,9 +88,9 @@ class SearchProfileForm extends Form * * @return void */ - function formLegend() { + // TRANS: Form legend. $this->out->element('legend', null, sprintf(_('Search and list people'))); } @@ -103,21 +99,28 @@ class SearchProfileForm extends Form * * @return void */ - function formData() { - $fields = array('fulltext' => 'Everything', - 'nickname' => 'Nickname', - 'fullname' => 'Fullname', - 'description' => 'Description', - 'location' => 'Location', - 'uri' => 'Uri (Remote users)'); - + // TRANS: Dropdown option for searching in profiles. + $fields = array('fulltext' => _('Everything'), + // TRANS: Dropdown option for searching in profiles. + 'nickname' => _('Nickname'), + // TRANS: Dropdown option for searching in profiles. + 'fullname' => _('Fullname'), + // TRANS: Dropdown option for searching in profiles. + 'description' => _('Description'), + // TRANS: Dropdown option for searching in profiles. + 'location' => _('Location'), + // TRANS: Dropdown option for searching in profiles. + 'uri' => _('URI (Remote users)')); + $this->out->hidden('peopletag_id', $this->peopletag->id); $this->out->input('q', null); - $this->out->dropdown('field', _('Search in'), $fields, - _('Choose a field to search'), false, 'fulltext'); + // TRANS: Dropdown field label. + $this->out->dropdown('field', _m('LABEL','Search in'), $fields, + // TRANS: Dropdown field title. + _('Choose a field to search.'), false, 'fulltext'); } /** @@ -125,10 +128,10 @@ class SearchProfileForm extends Form * * @return void */ - function formActions() { - $this->out->submit('submit', _('Search')); + // TRANS: Button text to search profiles. + $this->out->submit('submit', _m('BUTTON','Search')); } } @@ -149,7 +152,6 @@ class UntagButton extends Form * * @return string ID of the form */ - function id() { return 'form_peopletag-' . $this->peopletag->id . '-remove-' . $this->profile->id; @@ -160,7 +162,6 @@ class UntagButton extends Form * * @return string of the form class */ - function formClass() { return 'form_user_remove_peopletag'; @@ -182,10 +183,11 @@ class UntagButton extends Form * * @return void */ - function formLegend() { - $this->out->element('legend', null, sprintf(_('Untag %s as %s'), + // TRANS: Form legend. + // TRANS: %1$s is a nickname, $2$s is a people tag. + $this->out->element('legend', null, sprintf(_('Untag %1$s as %2$s'), $this->profile->nickname, $this->peopletag->tag)); } @@ -194,7 +196,6 @@ class UntagButton extends Form * * @return void */ - function formData() { $this->out->hidden('peopletag_id', $this->peopletag->id); @@ -206,14 +207,13 @@ class UntagButton extends Form * * @return void */ - function formActions() { - $this->out->submit('submit', _('Remove')); + // TRANS: Button text to untag a profile. + $this->out->submit('submit', _m('BUTTON','Remove')); } } - class TagButton extends Form { var $profile; @@ -231,7 +231,6 @@ class TagButton extends Form * * @return string ID of the form */ - function id() { return 'form_peopletag-' . $this->peopletag->id . '-add-' . $this->profile->id; @@ -242,7 +241,6 @@ class TagButton extends Form * * @return string of the form class */ - function formClass() { return 'form_user_add_peopletag'; @@ -253,7 +251,6 @@ class TagButton extends Form * * @return string URL of the action */ - function action() { return common_local_url('addpeopletag'); @@ -264,10 +261,11 @@ class TagButton extends Form * * @return void */ - function formLegend() { - $this->out->element('legend', null, sprintf(_('Tag %s as %s'), + // TRANS: Legend on form to add a tag to a profile. + // TRANS: %1$s is a nickname, %2$s ia a people tag. + $this->out->element('legend', null, sprintf(_('Tag %1$s as %2$s'), $this->profile->nickname, $this->peopletag->tag)); } @@ -276,7 +274,6 @@ class TagButton extends Form * * @return void */ - function formData() { UntagButton::formData(); @@ -287,10 +284,10 @@ class TagButton extends Form * * @return void */ - function formActions() { - $this->out->submit('submit', _('Add')); + // TRANS: Button text to tag a profile. + $this->out->submit('submit', _m('BUTTON','Add')); } } diff --git a/lib/unsubscribepeopletagform.php b/lib/unsubscribepeopletagform.php index 777025c89d..62343567f4 100644 --- a/lib/unsubscribepeopletagform.php +++ b/lib/unsubscribepeopletagform.php @@ -44,13 +44,11 @@ require_once INSTALLDIR.'/lib/form.php'; * * @see UnunsubscribeForm */ - class UnsubscribePeopletagForm extends Form { /** * peopletag for the user to join */ - var $peopletag = null; /** @@ -59,7 +57,6 @@ class UnsubscribePeopletagForm extends Form * @param HTMLOutputter $out output channel * @param peopletag $peopletag peopletag to unsubscribe to */ - function __construct($out=null, $peopletag=null) { parent::__construct($out); @@ -72,7 +69,6 @@ class UnsubscribePeopletagForm extends Form * * @return string ID of the form */ - function id() { return 'peopletag-unsubscribe-' . $this->peopletag->id; @@ -83,7 +79,6 @@ class UnsubscribePeopletagForm extends Form * * @return string of the form class */ - function formClass() { return 'form_peopletag_unsubscribe'; @@ -94,7 +89,6 @@ class UnsubscribePeopletagForm extends Form * * @return string URL of the action */ - function action() { return common_local_url('unsubscribepeopletag', @@ -106,9 +100,9 @@ class UnsubscribePeopletagForm extends Form * * @return void */ - function formActions() { - $this->out->submit('submit', _('Unsubscribe')); + // TRANS: Button text for unsubscribing from a people tag. + $this->out->submit('submit', _m('BUTTON','Unsubscribe')); } }