summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/allrss.php2
-rw-r--r--actions/apigrouplist.php9
-rw-r--r--actions/apigrouplistall.php1
-rw-r--r--actions/apistatusesupdate.php91
-rw-r--r--actions/apitimelinefriends.php98
-rw-r--r--actions/apitimelinehome.php1
-rw-r--r--actions/apitimelinepublic.php89
-rw-r--r--actions/block.php16
-rw-r--r--actions/confirmaddress.php2
-rw-r--r--actions/deleteapplication.php10
-rw-r--r--actions/deletenotice.php16
-rw-r--r--actions/deleteuser.php16
-rw-r--r--actions/designadminpanel.php3
-rw-r--r--actions/emailsettings.php75
-rw-r--r--actions/groupblock.php16
-rw-r--r--actions/grouprss.php2
-rw-r--r--actions/imsettings.php59
-rw-r--r--actions/invite.php2
-rw-r--r--actions/register.php2
-rw-r--r--actions/shownotice.php2
-rw-r--r--actions/smssettings.php74
-rw-r--r--actions/snapshotadminpanel.php2
-rw-r--r--actions/tag.php13
-rw-r--r--actions/usergroups.php2
-rw-r--r--actions/userrss.php4
25 files changed, 550 insertions, 57 deletions
diff --git a/actions/allrss.php b/actions/allrss.php
index 01e737ad7..7df0b1ef7 100644
--- a/actions/allrss.php
+++ b/actions/allrss.php
@@ -112,10 +112,12 @@ class AllrssAction extends Rss10Action
$c = array('url' => common_local_url('allrss',
array('nickname' =>
$user->nickname)),
+ // TRANS: Message is used as link title. %s is a user nickname.
'title' => sprintf(_('%s and friends'), $user->nickname),
'link' => common_local_url('all',
array('nickname' =>
$user->nickname)),
+ // TRANS: Message is used as link description. %1$s is a username, %2$s is a site name.
'description' => sprintf(_('Updates from %1$s and friends on %2$s!'),
$user->nickname, common_config('site', 'name')));
return $c;
diff --git a/actions/apigrouplist.php b/actions/apigrouplist.php
index dd2a68c66..3ea2c30cb 100644
--- a/actions/apigrouplist.php
+++ b/actions/apigrouplist.php
@@ -93,6 +93,7 @@ class ApiGroupListAction extends ApiBareAuthAction
parent::handle($args);
$sitename = common_config('site', 'name');
+ // TRANS: %s is a user name
$title = sprintf(_("%s's groups"), $this->user->nickname);
$taguribase = TagURI::base();
$id = "tag:$taguribase:Groups";
@@ -100,10 +101,12 @@ class ApiGroupListAction extends ApiBareAuthAction
'usergroups',
array('nickname' => $this->user->nickname)
);
+
$subtitle = sprintf(
- _("Groups %1\$s is a member of on %2\$s."),
- $this->user->nickname,
- $sitename
+ // TRANS: Meant to convey the user %2$s is a member of each of the groups listed on site %1$s
+ _("%1\$s groups %2\$s is a member of."),
+ $sitename,
+ $this->user->nickname
);
switch($this->format) {
diff --git a/actions/apigrouplistall.php b/actions/apigrouplistall.php
index f7677970f..bd05fa3ea 100644
--- a/actions/apigrouplistall.php
+++ b/actions/apigrouplistall.php
@@ -87,6 +87,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
parent::handle($args);
$sitename = common_config('site', 'name');
+ // TRANS: Message is used as a title. %s is a site name.
$title = sprintf(_("%s groups"), $sitename);
$taguribase = TagURI::base();
$id = "tag:$taguribase:Groups";
diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php
index d4ef6b550..5f3a447c2 100644
--- a/actions/apistatusesupdate.php
+++ b/actions/apistatusesupdate.php
@@ -33,6 +33,97 @@
* @link http://status.net/
*/
+/* External API usage documentation. Please update when you change how this method works. */
+
+/*! @page statusesupdate statuses/update
+
+ @section Description
+ Updates the authenticating user's status. Requires the status parameter specified below.
+ Request must be a POST.
+
+ @par URL pattern
+ /api/statuses/update.:format
+
+ @par Formats (:format)
+ xml, json
+
+ @par HTTP Method(s)
+ POST
+
+ @par Requires Authentication
+ Yes
+
+ @param status (Required) The URL-encoded text of the status update.
+ @param source (Optional) The source of the status.
+ @param in_reply_to_status_id (Optional) The ID of an existing status that the update is in reply to.
+ @param lat (Optional) The latitude the status refers to.
+ @param long (Optional) The longitude the status refers to.
+ @param media (Optional) a media upload, such as an image or movie file.
+
+ @sa @ref authentication
+ @sa @ref apiroot
+
+ @subsection usagenotes Usage notes
+
+ @li The URL pattern is relative to the @ref apiroot.
+ @li If the @e source parameter is not supplied the source of the status will default to 'api'.
+ @li The XML response uses <a href="http://georss.org/Main_Page">GeoRSS</a>
+ to encode the latitude and longitude (see example response below <georss:point>).
+ @li Data uploaded via the @e media parameter should be multipart/form-data encoded.
+
+ @subsection exampleusage Example usage
+
+ @verbatim
+ curl -u username:password http://example.com/api/statuses/update.xml -d status='Howdy!' -d lat='30.468' -d long='-94.743'
+ @endverbatim
+
+ @subsection exampleresponse Example response
+
+ @verbatim
+ <?xml version="1.0" encoding="UTF-8"?>
+ <status>
+ <text>Howdy!</text>
+ <truncated>false</truncated>
+ <created_at>Tue Mar 30 23:28:05 +0000 2010</created_at>
+ <in_reply_to_status_id/>
+ <source>api</source>
+ <id>26668724</id>
+ <in_reply_to_user_id/>
+ <in_reply_to_screen_name/>
+ <geo xmlns:georss="http://www.georss.org/georss">
+ <georss:point>30.468 -94.743</georss:point>
+ </geo>
+ <favorited>false</favorited>
+ <user>
+ <id>25803</id>
+ <name>Jed Sanders</name>
+ <screen_name>jedsanders</screen_name>
+ <location>Hoop and Holler, Texas</location>
+ <description>I like to think of myself as America's Favorite.</description>
+ <profile_image_url>http://avatar.example.com/25803-48-20080924200604.png</profile_image_url>
+ <url>http://jedsanders.net</url>
+ <protected>false</protected>
+ <followers_count>5</followers_count>
+ <profile_background_color/>
+ <profile_text_color/>
+ <profile_link_color/>
+ <profile_sidebar_fill_color/>
+ <profile_sidebar_border_color/>
+ <friends_count>2</friends_count>
+ <created_at>Wed Sep 24 20:04:00 +0000 2008</created_at>
+ <favourites_count>0</favourites_count>
+ <utc_offset>0</utc_offset>
+ <time_zone>UTC</time_zone>
+ <profile_background_image_url/>
+ <profile_background_tile>false</profile_background_tile>
+ <statuses_count>70</statuses_count>
+ <following>true</following>
+ <notifications>true</notifications>
+ </user>
+ </status>
+ @endverbatim
+*/
+
if (!defined('STATUSNET')) {
exit(1);
}
diff --git a/actions/apitimelinefriends.php b/actions/apitimelinefriends.php
index ac350ab1b..3c25c049e 100644
--- a/actions/apitimelinefriends.php
+++ b/actions/apitimelinefriends.php
@@ -28,11 +28,106 @@
* @author Mike Cochrane <mikec@mikenz.geek.nz>
* @author Robin Millette <robin@millette.info>
* @author Zach Copley <zach@status.net>
- * @copyright 2009 StatusNet, Inc.
+ * @copyright 2009-2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
+/* External API usage documentation. Please update when you change how this method works. */
+
+/*! @page friendstimeline statuses/friends_timeline
+
+ @section Description
+ Returns the 20 most recent statuses posted by the authenticating
+ user and that user's friends. This is the equivalent of "You and
+ friends" page in the web interface.
+
+ @par URL patterns
+ @li /api/statuses/friends_timeline.:format
+ @li /api/statuses/friends_timeline/:id.:format
+
+ @par Formats (:format)
+ xml, json, rss, atom
+
+ @par ID (:id)
+ username, user id
+
+ @par HTTP Method(s)
+ GET
+
+ @par Requires Authentication
+ Sometimes (see: @ref authentication)
+
+ @param user_id (Optional) Specifies a user by ID
+ @param screen_name (Optional) Specifies a user by screename (nickname)
+ @param since_id (Optional) Returns only statuses with an ID greater
+ than (that is, more recent than) the specified ID.
+ @param max_id (Optional) Returns only statuses with an ID less than
+ (that is, older than) or equal to the specified ID.
+ @param count (Optional) Specifies the number of statuses to retrieve.
+ @param page (Optional) Specifies the page of results to retrieve.
+
+ @sa @ref authentication
+ @sa @ref apiroot
+
+ @subsection usagenotes Usage notes
+ @li The URL pattern is relative to the @ref apiroot.
+ @li The XML response uses <a href="http://georss.org/Main_Page">GeoRSS</a>
+ to encode the latitude and longitude (see example response below <georss:point>).
+
+ @subsection exampleusage Example usage
+
+ @verbatim
+ curl http://identi.ca/api/statuses/friends_timeline/evan.xml?count=1&page=2
+ @endverbatim
+
+ @subsection exampleresponse Example response
+
+ @verbatim
+ <?xml version="1.0"?>
+ <statuses type="array">
+ <status>
+ <text>back from the !yul !drupal meet with Evolving Web folk, @anarcat, @webchick and others, and an interesting refresher on SQL indexing</text>
+ <truncated>false</truncated>
+ <created_at>Wed Mar 31 01:33:02 +0000 2010</created_at>
+ <in_reply_to_status_id/>
+ <source>&lt;a href="http://code.google.com/p/microblog-purple/"&gt;mbpidgin&lt;/a&gt;</source>
+ <id>26674201</id>
+ <in_reply_to_user_id/>
+ <in_reply_to_screen_name/>
+ <geo/>
+ <favorited>false</favorited>
+ <user>
+ <id>246</id>
+ <name>Mark</name>
+ <screen_name>lambic</screen_name>
+ <location>Montreal, Canada</location>
+ <description>Geek</description>
+ <profile_image_url>http://avatar.identi.ca/246-48-20080702141545.png</profile_image_url>
+ <url>http://lambic.co.uk</url>
+ <protected>false</protected>
+ <followers_count>73</followers_count>
+ <profile_background_color>#F0F2F5</profile_background_color>
+ <profile_text_color/>
+ <profile_link_color>#002E6E</profile_link_color>
+ <profile_sidebar_fill_color>#CEE1E9</profile_sidebar_fill_color>
+ <profile_sidebar_border_color/>
+ <friends_count>58</friends_count>
+ <created_at>Wed Jul 02 14:12:15 +0000 2008</created_at>
+ <favourites_count>2</favourites_count>
+ <utc_offset>-14400</utc_offset>
+ <time_zone>US/Eastern</time_zone>
+ <profile_background_image_url/>
+ <profile_background_tile>false</profile_background_tile>
+ <statuses_count>933</statuses_count>
+ <following>false</following>
+ <notifications>false</notifications>
+ </user>
+ </status>
+ </statuses>
+ @endverbatim
+*/
+
if (!defined('STATUSNET')) {
exit(1);
}
@@ -116,6 +211,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
$id = "tag:$taguribase:FriendsTimeline:" . $this->user->id;
$subtitle = sprintf(
+ // TRANS: Message is used as a subtitle. %1$s is a user nickname, %2$s is a site name.
_('Updates from %1$s and friends on %2$s!'),
$this->user->nickname,
$sitename
diff --git a/actions/apitimelinehome.php b/actions/apitimelinehome.php
index 1618c9923..43a13dcda 100644
--- a/actions/apitimelinehome.php
+++ b/actions/apitimelinehome.php
@@ -117,6 +117,7 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
$id = "tag:$taguribase:HomeTimeline:" . $this->user->id;
$subtitle = sprintf(
+ // TRANS: Message is used as a subtitle. %1$s is a user nickname, %2$s is a site name.
_('Updates from %1$s and friends on %2$s!'),
$this->user->nickname, $sitename
);
diff --git a/actions/apitimelinepublic.php b/actions/apitimelinepublic.php
index 903461425..30f9f4cda 100644
--- a/actions/apitimelinepublic.php
+++ b/actions/apitimelinepublic.php
@@ -55,6 +55,95 @@ require_once INSTALLDIR . '/lib/apiprivateauth.php';
* @link http://status.net/
*/
+/* External API usage documentation. Please update when you change how this method works. */
+
+/*! @page publictimeline statuses/public_timeline
+
+ @section Description
+ Returns the 20 most recent notices from users throughout the system who have
+ uploaded their own avatars. Depending on configuration, it may or may not
+ not include notices from automatic posting services.
+
+ @par URL patterns
+ @li /api/statuses/public_timeline.:format
+
+ @par Formats (:format)
+ xml, json, rss, atom
+
+ @par HTTP Method(s)
+ GET
+
+ @par Requires Authentication
+ No
+
+ @param since_id (Optional) Returns only statuses with an ID greater
+ than (that is, more recent than) the specified ID.
+ @param max_id (Optional) Returns only statuses with an ID less than
+ (that is, older than) or equal to the specified ID.
+ @param count (Optional) Specifies the number of statuses to retrieve.
+ @param page (Optional) Specifies the page of results to retrieve.
+
+ @sa @ref apiroot
+
+ @subsection usagenotes Usage notes
+ @li The URL pattern is relative to the @ref apiroot.
+ @li The XML response uses <a href="http://georss.org/Main_Page">GeoRSS</a>
+ to encode the latitude and longitude (see example response below <georss:point>).
+
+ @subsection exampleusage Example usage
+
+ @verbatim
+ curl http://identi.ca/api/statuses/friends_timeline/evan.xml?count=1&page=2
+ @endverbatim
+
+ @subsection exampleresponse Example response
+
+ @verbatim
+ <?xml version="1.0" encoding="UTF-8"?>
+ <statuses type="array">
+ <status>
+ <text>@skwashd oh, commbank reenabled me super quick both times. but disconcerting when you don't expect it though</text>
+ <truncated>false</truncated>
+ <created_at>Sat Apr 17 00:49:12 +0000 2010</created_at>
+ <in_reply_to_status_id>28838393</in_reply_to_status_id>
+ <source>xmpp</source>
+ <id>28838456</id>
+ <in_reply_to_user_id>39303</in_reply_to_user_id>
+ <in_reply_to_screen_name>skwashd</in_reply_to_screen_name>
+ <geo></geo>
+ <favorited>false</favorited>
+ <user>
+ <id>44517</id>
+ <name>joshua may</name>
+ <screen_name>notjosh</screen_name>
+ <location></location>
+ <description></description>
+ <profile_image_url>http://avatar.identi.ca/44517-48-20090321004106.jpeg</profile_image_url>
+ <url></url>
+ <protected>false</protected>
+ <followers_count>17</followers_count>
+ <profile_background_color></profile_background_color>
+ <profile_text_color></profile_text_color>
+ <profile_link_color></profile_link_color>
+ <profile_sidebar_fill_color></profile_sidebar_fill_color>
+ <profile_sidebar_border_color></profile_sidebar_border_color>
+ <friends_count>20</friends_count>
+ <created_at>Sat Mar 21 00:40:25 +0000 2009</created_at>
+ <favourites_count>0</favourites_count>
+ <utc_offset>0</utc_offset>
+ <time_zone>UTC</time_zone>
+ <profile_background_image_url></profile_background_image_url>
+ <profile_background_tile>false</profile_background_tile>
+ <statuses_count>100</statuses_count>
+ <following>false</following>
+ <notifications>false</notifications>
+ </user>
+ </status>
+ [....]
+ </statuses>
+@endverbatim
+*/
+
class ApiTimelinePublicAction extends ApiPrivateAuthAction
{
diff --git a/actions/block.php b/actions/block.php
index 7f609c253..11565e20c 100644
--- a/actions/block.php
+++ b/actions/block.php
@@ -140,8 +140,20 @@ class BlockAction extends ProfileFormAction
$this->hidden($k, $v);
}
}
- $this->submit('form_action-no', _('No'), 'submit form_action-primary', 'no', _("Do not block this user"));
- $this->submit('form_action-yes', _('Yes'), 'submit form_action-secondary', 'yes', _('Block this user'));
+ $this->submit('form_action-no',
+ // TRANS: Button label on the user block form.
+ _m('BUTTON','No'),
+ 'submit form_action-primary',
+ 'no',
+ // TRANS: Submit button title for 'No' when blocking a user.
+ _('Do not block this user'));
+ $this->submit('form_action-yes',
+ // TRANS: Button label on the user block form.
+ _m('BUTTON','Yes'),
+ 'submit form_action-secondary',
+ 'yes',
+ // TRANS: Submit button title for 'Yes' when blocking a user.
+ _('Block this user'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
diff --git a/actions/confirmaddress.php b/actions/confirmaddress.php
index dc17499f5..8bf8c8c4d 100644
--- a/actions/confirmaddress.php
+++ b/actions/confirmaddress.php
@@ -87,10 +87,12 @@ class ConfirmaddressAction extends Action
}
$type = $confirm->address_type;
if (!in_array($type, array('email', 'jabber', 'sms'))) {
+ // TRANS: Server error for an unknow address type, which can be 'email', 'jabber', or 'sms'.
$this->serverError(sprintf(_('Unrecognized address type %s.'), $type));
return;
}
if ($cur->$type == $confirm->address) {
+ // TRANS: Client error for an already confirmed email/jabbel/sms address.
$this->clientError(_('That address has already been confirmed.'));
return;
}
diff --git a/actions/deleteapplication.php b/actions/deleteapplication.php
index 17526e111..806de0be6 100644
--- a/actions/deleteapplication.php
+++ b/actions/deleteapplication.php
@@ -150,13 +150,17 @@ class DeleteapplicationAction extends Action
'This will clear all data about the application from the '.
'database, including all existing user connections.'));
$this->submit('form_action-no',
- _('No'),
+ // TRANS: Button label on the delete application form.
+ _m('BUTTON','No'),
'submit form_action-primary',
'no',
- _("Do not delete this application"));
+ // TRANS: Submit button title for 'No' when deleting an application.
+ _('Do not delete this application'));
$this->submit('form_action-yes',
- _('Yes'),
+ // TRANS: Button label on the delete application form.
+ _m('BUTTON','Yes'),
'submit form_action-secondary',
+ // TRANS: Submit button title for 'Yes' when deleting an application.
'yes', _('Delete this application'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
diff --git a/actions/deletenotice.php b/actions/deletenotice.php
index 69cb1ebe8..f8010a814 100644
--- a/actions/deletenotice.php
+++ b/actions/deletenotice.php
@@ -142,8 +142,20 @@ class DeletenoticeAction extends Action
$this->hidden('token', common_session_token());
$this->hidden('notice', $this->trimmed('notice'));
$this->element('p', null, _('Are you sure you want to delete this notice?'));
- $this->submit('form_action-no', _('No'), 'submit form_action-primary', 'no', _("Do not delete this notice"));
- $this->submit('form_action-yes', _('Yes'), 'submit form_action-secondary', 'yes', _('Delete this notice'));
+ $this->submit('form_action-no',
+ // TRANS: Button label on the delete notice form.
+ _m('BUTTON','No'),
+ 'submit form_action-primary',
+ 'no',
+ // TRANS: Submit button title for 'No' when deleting a notice.
+ _("Do not delete this notice"));
+ $this->submit('form_action-yes',
+ // TRANS: Button label on the delete notice form.
+ _m('BUTTON','Yes'),
+ 'submit form_action-secondary',
+ 'yes',
+ // TRANS: Submit button title for 'Yes' when deleting a notice.
+ _('Delete this notice'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
diff --git a/actions/deleteuser.php b/actions/deleteuser.php
index 42ef4b9f5..1c1f19b0e 100644
--- a/actions/deleteuser.php
+++ b/actions/deleteuser.php
@@ -147,8 +147,20 @@ class DeleteuserAction extends ProfileFormAction
}
Event::handle('EndDeleteUserForm', array($this, $this->user));
}
- $this->submit('form_action-no', _('No'), 'submit form_action-primary', 'no', _("Do not block this user"));
- $this->submit('form_action-yes', _('Yes'), 'submit form_action-secondary', 'yes', _('Delete this user'));
+ $this->submit('form_action-no',
+ // TRANS: Button label on the delete user form.
+ _m('BUTTON','No'),
+ 'submit form_action-primary',
+ 'no',
+ // TRANS: Submit button title for 'No' when deleting a user.
+ _('Do not block this user'));
+ $this->submit('form_action-yes',
+ // TRANS: Button label on the delete user form.
+ _m('BUTTON','Yes'),
+ 'submit form_action-secondary',
+ 'yes',
+ // TRANS: Submit button title for 'Yes' when deleting a user.
+ _('Delete this user'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
diff --git a/actions/designadminpanel.php b/actions/designadminpanel.php
index 41d917e3c..8c08581b5 100644
--- a/actions/designadminpanel.php
+++ b/actions/designadminpanel.php
@@ -59,6 +59,7 @@ class DesignadminpanelAction extends AdminPanelAction
function title()
{
+ // TRANS: Message used as title for design settings for the site.
return _('Design');
}
@@ -454,6 +455,7 @@ class DesignAdminPanelForm extends AdminForm
$this->out->element('label', array('for' => 'design_background-image_on',
'class' => 'radio'),
+ // TRANS: Used as radio button label to add a background image.
_('On'));
$attrs = array('name' => 'design_background-image_onoff',
@@ -470,6 +472,7 @@ class DesignAdminPanelForm extends AdminForm
$this->out->element('label', array('for' => 'design_background-image_off',
'class' => 'radio'),
+ // TRANS: Used as radio button label to not add a background image.
_('Off'));
$this->out->element('p', 'form_guide', _('Turn background image on or off.'));
$this->unli();
diff --git a/actions/emailsettings.php b/actions/emailsettings.php
index 08608348c..6138a88f9 100644
--- a/actions/emailsettings.php
+++ b/actions/emailsettings.php
@@ -57,6 +57,7 @@ class EmailsettingsAction extends AccountSettingsAction
function title()
{
+ // TRANS: Title for e-mail settings.
return _('Email settings');
}
@@ -68,6 +69,10 @@ class EmailsettingsAction extends AccountSettingsAction
function getInstructions()
{
+ // XXX: For consistency of parameters in messages, this should be a
+ // regular parameters, replaced with sprintf().
+ // TRANS: E-mail settings page instructions.
+ // TRANS: %%site.name%% is the name of the site.
return _('Manage how you get email from %%site.name%%.');
}
@@ -97,102 +102,126 @@ class EmailsettingsAction extends AccountSettingsAction
common_local_url('emailsettings')));
$this->elementStart('fieldset');
$this->elementStart('fieldset', array('id' => 'settings_email_address'));
- $this->element('legend', null, _('Address'));
+ // TRANS: Form legend for e-mail settings form.
+ $this->element('legend', null, _('Email address'));
$this->hidden('token', common_session_token());
if ($user->email) {
$this->element('p', array('id' => 'form_confirmed'), $user->email);
+ // TRANS: Form note in e-mail settings form.
$this->element('p', array('class' => 'form_note'), _('Current confirmed email address.'));
$this->hidden('email', $user->email);
- $this->submit('remove', _('Remove'));
+ // TRANS: Button label to remove a confirmed e-mail address.
+ $this->submit('remove', _m('BUTTON','Remove'));
} else {
$confirm = $this->getConfirmation();
if ($confirm) {
$this->element('p', array('id' => 'form_unconfirmed'), $confirm->address);
+ // TRANS: Form note in e-mail settings form.
$this->element('p', array('class' => 'form_note'),
_('Awaiting confirmation on this address. '.
'Check your inbox (and spam box!) for a message '.
'with further instructions.'));
$this->hidden('email', $confirm->address);
- $this->submit('cancel', _('Cancel'));
+ // TRANS: Button label to cancel an e-mail address confirmation procedure.
+ $this->submit('cancel', _m('BUTTON','Cancel'));
} else {
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
+ // TRANS: Field label for e-mail address input in e-mail settings form.
$this->input('email', _('Email address'),
($this->arg('email')) ? $this->arg('email') : null,
+ // TRANS: Instructions for e-mail address input form.
_('Email address, like "UserName@example.org"'));
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('add', _('Add'));
+ // TRANS: Button label for adding an e-mail address in e-mail settings form.
+ $this->submit('add', _m('BUTTON','Add'));
}
}
$this->elementEnd('fieldset');
if (common_config('emailpost', 'enabled') && $user->email) {
$this->elementStart('fieldset', array('id' => 'settings_email_incoming'));
+ // TRANS: Form legend for incoming e-mail settings form.
$this->element('legend', null, _('Incoming email'));
if ($user->incomingemail) {
$this->elementStart('p');
$this->element('span', 'address', $user->incomingemail);
+ // XXX: Looks a little awkward in the UI.
+ // Something like "xxxx@identi.ca Send email ..". Needs improvement.
$this->element('span', 'input_instructions',
+ // TRANS: Form instructions for incoming e-mail form in e-mail settings.
_('Send email to this address to post new notices.'));
$this->elementEnd('p');
- $this->submit('removeincoming', _('Remove'));
+ // TRANS: Button label for removing a set sender e-mail address to post notices from.
+ $this->submit('removeincoming', _m('BUTTON','Remove'));
}
$this->elementStart('p');
$this->element('span', 'input_instructions',
+ // TRANS: Instructions for incoming e-mail address input form.
_('Make a new email address for posting to; '.
'cancels the old one.'));
$this->elementEnd('p');
- $this->submit('newincoming', _('New'));
+ // TRANS: Button label for adding an e-mail address to send notices from.
+ $this->submit('newincoming', _m('BUTTON','New'));
$this->elementEnd('fieldset');
}
$this->elementStart('fieldset', array('id' => 'settings_email_preferences'));
- $this->element('legend', null, _('Preferences'));
+ // TRANS: Form legend for e-mail preferences form.
+ $this->element('legend', null, _('Email preferences'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
$this->checkbox('emailnotifysub',
+ // TRANS: Checkbox label in e-mail preferences form.
_('Send me notices of new subscriptions through email.'),
$user->emailnotifysub);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('emailnotifyfav',
+ // TRANS: Checkbox label in e-mail preferences form.
_('Send me email when someone '.
'adds my notice as a favorite.'),
$user->emailnotifyfav);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('emailnotifymsg',
+ // TRANS: Checkbox label in e-mail preferences form.
_('Send me email when someone sends me a private message.'),
$user->emailnotifymsg);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('emailnotifyattn',
+ // TRANS: Checkbox label in e-mail preferences form.
_('Send me email when someone sends me an "@-reply".'),
$user->emailnotifyattn);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('emailnotifynudge',
+ // TRANS: Checkbox label in e-mail preferences form.
_('Allow friends to nudge me and send me an email.'),
$user->emailnotifynudge);
$this->elementEnd('li');
if (common_config('emailpost', 'enabled')) {
$this->elementStart('li');
$this->checkbox('emailpost',
+ // TRANS: Checkbox label in e-mail preferences form.
_('I want to post notices by email.'),
$user->emailpost);
$this->elementEnd('li');
}
$this->elementStart('li');
$this->checkbox('emailmicroid',
+ // TRANS: Checkbox label in e-mail preferences form.
_('Publish a MicroID for my email address.'),
$user->emailmicroid);
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('save', _('Save'));
+ // TRANS: Button label to save e-mail preferences.
+ $this->submit('save', _m('BUTTON','Save'));
$this->elementEnd('fieldset');
$this->elementEnd('fieldset');
$this->elementEnd('form');
@@ -253,6 +282,7 @@ class EmailsettingsAction extends AccountSettingsAction
} else if ($this->arg('newincoming')) {
$this->newIncoming();
} else {
+ // TRANS: Message given submitting a form with an unknown action in e-mail settings.
$this->showForm(_('Unexpected form submission.'));
}
}
@@ -293,13 +323,15 @@ class EmailsettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
+ // TRANS: Server error thrown on database error updating e-mail preferences.
$this->serverError(_('Couldn\'t update user.'));
return;
}
$user->query('COMMIT');
- $this->showForm(_('Preferences saved.'), true);
+ // TRANS: Confirmation message for successful e-mail preferences save.
+ $this->showForm(_('Email preferences saved.'), true);
}
/**
@@ -317,6 +349,7 @@ class EmailsettingsAction extends AccountSettingsAction
// Some validation
if (!$email) {
+ // TRANS: Message given saving e-mail address without having provided one.
$this->showForm(_('No email address.'));
return;
}
@@ -324,16 +357,20 @@ class EmailsettingsAction extends AccountSettingsAction
$email = common_canonical_email($email);
if (!$email) {
+ // TRANS: Message given saving e-mail address that cannot be normalised.
$this->showForm(_('Cannot normalize that email address'));
return;
}
if (!Validate::email($email, common_config('email', 'check_domain'))) {
+ // TRANS: Message given saving e-mail address that not valid.
$this->showForm(_('Not a valid email address.'));
return;
} else if ($user->email == $email) {
+ // TRANS: Message given saving e-mail address that is already set.
$this->showForm(_('That is already your email address.'));
return;
} else if ($this->emailExists($email)) {
+ // TRANS: Message given saving e-mail address that is already set for another user.
$this->showForm(_('That email address already belongs '.
'to another user.'));
return;
@@ -350,12 +387,14 @@ class EmailsettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($confirm, 'INSERT', __FILE__);
+ // TRANS: Server error thrown on database error adding e-mail confirmation code.
$this->serverError(_('Couldn\'t insert confirmation code.'));
return;
}
mail_confirm_address($user, $confirm->code, $user->nickname, $email);
+ // TRANS: Message given saving valid e-mail address that is to be confirmed.
$msg = _('A confirmation code was sent to the email address you added. '.
'Check your inbox (and spam box!) for the code and instructions '.
'on how to use it.');
@@ -376,11 +415,13 @@ class EmailsettingsAction extends AccountSettingsAction
$confirm = $this->getConfirmation();
if (!$confirm) {
+ // TRANS: Message given canceling e-mail address confirmation that is not pending.
$this->showForm(_('No pending confirmation to cancel.'));
return;
}
if ($confirm->address != $email) {
- $this->showForm(_('That is the wrong IM address.'));
+ // TRANS: Message given canceling e-mail address confirmation for the wrong e-mail address.
+ $this->showForm(_('That is the wrong email address.'));
return;
}
@@ -388,11 +429,13 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__);
+ // TRANS: Server error thrown on database error canceling e-mail address confirmation.
$this->serverError(_('Couldn\'t delete email confirmation.'));
return;
}
- $this->showForm(_('Confirmation cancelled.'), true);
+ // TRANS: Message given after successfully canceling e-mail address confirmation.
+ $this->showForm(_('Email confirmation cancelled.'), true);
}
/**
@@ -410,6 +453,8 @@ class EmailsettingsAction extends AccountSettingsAction
// Maybe an old tab open...?
if ($user->email != $email) {
+ // TRANS: Message given trying to remove an e-mail address that is not
+ // TRANS: registered for the active user.
$this->showForm(_('That is not your email address.'));
return;
}
@@ -424,12 +469,14 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__);
+ // TRANS: Server error thrown on database error removing a registered e-mail address.
$this->serverError(_('Couldn\'t update user.'));
return;
}
$user->query('COMMIT');
- $this->showForm(_('The address was removed.'), true);
+ // TRANS: Message given after successfully removing a registered e-mail address.
+ $this->showForm(_('The email address was removed.'), true);
}
/**
@@ -453,9 +500,11 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__);
+ // TRANS: Server error thrown on database error removing incoming e-mail address.
$this->serverError(_("Couldn't update user record."));
}
+ // TRANS: Message given after successfully removing an incoming e-mail address.
$this->showForm(_('Incoming email address removed.'), true);
}
@@ -475,9 +524,11 @@ class EmailsettingsAction extends AccountSettingsAction
if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__);
+ // TRANS: Server error thrown on database error adding incoming e-mail address.
$this->serverError(_("Couldn't update user record."));
}
+ // TRANS: Message given after successfully adding an incoming e-mail address.
$this->showForm(_('New incoming email address added.'), true);
}
diff --git a/actions/groupblock.php b/actions/groupblock.php
index fc95c0e66..e52db6e11 100644
--- a/actions/groupblock.php
+++ b/actions/groupblock.php
@@ -173,8 +173,20 @@ class GroupblockAction extends RedirectingAction
$this->hidden($k, $v);
}
}
- $this->submit('form_action-no', _('No'), 'submit form_action-primary', 'no', _("Do not block this user from this group"));
- $this->submit('form_action-yes', _('Yes'), 'submit form_action-secondary', 'yes', _('Block this user from this group'));
+ $this->submit('form_action-no',
+ // TRANS: Button label on the form to block a user from a group.
+ _m('BUTTON','No'),
+ 'submit form_action-primary',
+ 'no',
+ // TRANS: Submit button title for 'No' when blocking a user from a group.
+ _('Do not block this user from this group'));
+ $this->submit('form_action-yes',
+ // TRANS: Button label on the form to block a user from a group.
+ _m('BUTTON','Yes'),
+ 'submit form_action-secondary',
+ 'yes',
+ // TRANS: Submit button title for 'Yes' when blocking a user from a group.
+ _('Block this user from this group'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
diff --git a/actions/grouprss.php b/actions/grouprss.php
index 490f6f945..98fdea38d 100644
--- a/actions/grouprss.php
+++ b/actions/grouprss.php
@@ -135,8 +135,10 @@ class groupRssAction extends Rss10Action
$c = array('url' => common_local_url('grouprss',
array('nickname' =>
$group->nickname)),
+ // TRANS: Message is used as link title. %s is a user nickname.
'title' => sprintf(_('%s timeline'), $group->nickname),
'link' => common_local_url('showgroup', array('nickname' => $group->nickname)),
+ // TRANS: Message is used as link description. %1$s is a username, %2$s is a site name.
'description' => sprintf(_('Updates from members of %1$s on %2$s!'),
$group->nickname, common_config('site', 'name')));
return $c;
diff --git a/actions/imsettings.php b/actions/imsettings.php
index c3360fb12..6691c8dad 100644
--- a/actions/imsettings.php
+++ b/actions/imsettings.php
@@ -56,6 +56,7 @@ class ImsettingsAction extends ConnectSettingsAction
function title()
{
+ // TRANS: Title for instance messaging settings.
return _('IM settings');
}
@@ -67,6 +68,9 @@ class ImsettingsAction extends ConnectSettingsAction
function getInstructions()
{
+ // TRANS: Instant messaging settings page instructions.
+ // TRANS: [instant messages] is link text, "(%%doc.im%%)" is the link.
+ // TRANS: the order and formatting of link text and link should remain unchanged.
return _('You can send and receive notices through '.
'Jabber/GTalk [instant messages](%%doc.im%%). '.
'Configure your address and settings below.');
@@ -86,6 +90,7 @@ class ImsettingsAction extends ConnectSettingsAction
{
if (!common_config('xmpp', 'enabled')) {
$this->element('div', array('class' => 'error'),
+ // TRANS: Message given in the IM settings if XMPP is not enabled on the site.
_('IM is not available.'));
return;
}
@@ -97,32 +102,41 @@ class ImsettingsAction extends ConnectSettingsAction
'action' =>
common_local_url('imsettings')));
$this->elementStart('fieldset', array('id' => 'settings_im_address'));
- $this->element('legend', null, _('Address'));
+ // TRANS: Form legend for IM settings form.
+ $this->element('legend', null, _('IM address'));
$this->hidden('token', common_session_token());
if ($user->jabber) {
$this->element('p', 'form_confirmed', $user->jabber);
+ // TRANS: Form note in IM settings form.
$this->element('p', 'form_note',
_('Current confirmed Jabber/GTalk address.'));
$this->hidden('jabber', $user->jabber);
- $this->submit('remove', _('Remove'));
+ // TRANS: Button label to remove a confirmed IM address.
+ $this->submit('remove', _m('BUTTON','Remove'));
} else {
$confirm = $this->getConfirmation();
if ($confirm) {
$this->element('p', 'form_unconfirmed', $confirm->address);
$this->element('p', 'form_note',
+ // TRANS: Form note in IM settings form.
+ // TRANS: %s is the IM address set for the site.
sprintf(_('Awaiting confirmation on this address. '.
'Check your Jabber/GTalk account for a '.
'message with further instructions. '.
'(Did you add %s to your buddy list?)'),
jabber_daemon_address()));
$this->hidden('jabber', $confirm->address);
- $this->submit('cancel', _('Cancel'));
+ // TRANS: Button label to cancel an IM address confirmation procedure.
+ $this->submit('cancel', _m('BUTTON','Cancel'));
} else {
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
+ // TRANS: Field label for IM address input in IM settings form.
$this->input('jabber', _('IM address'),
($this->arg('jabber')) ? $this->arg('jabber') : null,
+ // TRANS: IM address input field instructions in IM settings form.
+ // TRANS: %s is the IM address set for the site.
sprintf(_('Jabber or GTalk address, '.
'like "UserName@example.org". '.
'First, make sure to add %s to your '.
@@ -130,37 +144,44 @@ class ImsettingsAction extends ConnectSettingsAction
jabber_daemon_address()));
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('add', _('Add'));
+ // TRANS: Button label for adding an IM address in IM settings form.
+ $this->submit('add', _m('BUTTON','Add'));
}
}
$this->elementEnd('fieldset');
$this->elementStart('fieldset', array('id' => 'settings_im_preferences'));
- $this->element('legend', null, _('Preferences'));
+ // TRANS: Form legend for IM preferences form.
+ $this->element('legend', null, _('IM preferences'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
$this->checkbox('jabbernotify',
+ // TRANS: Checkbox label in IM preferences form.
_('Send me notices through Jabber/GTalk.'),
$user->jabbernotify);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('updatefrompresence',
+ // TRANS: Checkbox label in IM preferences form.
_('Post a notice when my Jabber/GTalk status changes.'),
$user->updatefrompresence);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('jabberreplies',
+ // TRANS: Checkbox label in IM preferences form.
_('Send me replies through Jabber/GTalk '.
'from people I\'m not subscribed to.'),
$user->jabberreplies);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('jabbermicroid',
+ // TRANS: Checkbox label in IM preferences form.
_('Publish a MicroID for my Jabber/GTalk address.'),
$user->jabbermicroid);
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('save', _('Save'));
+ // TRANS: Button label to save IM preferences.
+ $this->submit('save', _m('BUTTON','Save'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
@@ -217,6 +238,7 @@ class ImsettingsAction extends ConnectSettingsAction
} else if ($this->arg('remove')) {
$this->removeAddress();
} else {
+ // TRANS: Message given submitting a form with an unknown action in IM settings.
$this->showForm(_('Unexpected form submission.'));
}
}
@@ -232,7 +254,6 @@ class ImsettingsAction extends ConnectSettingsAction
function savePreferences()
{
-
$jabbernotify = $this->boolean('jabbernotify');
$updatefrompresence = $this->boolean('updatefrompresence');
$jabberreplies = $this->boolean('jabberreplies');
@@ -255,12 +276,14 @@ class ImsettingsAction extends ConnectSettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
+ // TRANS: Server error thrown on database error updating IM preferences.
$this->serverError(_('Couldn\'t update user.'));
return;
}
$user->query('COMMIT');
+ // TRANS: Confirmation message for successful IM preferences save.
$this->showForm(_('Preferences saved.'), true);
}
@@ -282,6 +305,7 @@ class ImsettingsAction extends ConnectSettingsAction
// Some validation
if (!$jabber) {
+ // TRANS: Message given saving IM address without having provided one.
$this->showForm(_('No Jabber ID.'));
return;
}
@@ -289,16 +313,20 @@ class ImsettingsAction extends ConnectSettingsAction
$jabber = jabber_normalize_jid($jabber);
if (!$jabber) {
+ // TRANS: Message given saving IM address that cannot be normalised.
$this->showForm(_('Cannot normalize that Jabber ID'));
return;
}
if (!jabber_valid_base_jid($jabber, common_config('email', 'domain_check'))) {
+ // TRANS: Message given saving IM address that not valid.
$this->showForm(_('Not a valid Jabber ID'));
return;
} else if ($user->jabber == $jabber) {
+ // TRANS: Message given saving IM address that is already set.
$this->showForm(_('That is already your Jabber ID.'));
return;
} else if ($this->jabberExists($jabber)) {
+ // TRANS: Message given saving IM address that is already set for another user.
$this->showForm(_('Jabber ID already belongs to another user.'));
return;
}
@@ -316,6 +344,7 @@ class ImsettingsAction extends ConnectSettingsAction
if ($result === false) {
common_log_db_error($confirm, 'INSERT', __FILE__);
+ // TRANS: Server error thrown on database error adding IM confirmation code.
$this->serverError(_('Couldn\'t insert confirmation code.'));
return;
}
@@ -324,6 +353,8 @@ class ImsettingsAction extends ConnectSettingsAction
$user->nickname,
$jabber);
+ // TRANS: Message given saving valid IM address that is to be confirmed.
+ // TRANS: %s is the IM address set for the site.
$msg = sprintf(_('A confirmation code was sent '.
'to the IM address you added. '.
'You must approve %s for '.
@@ -348,10 +379,12 @@ class ImsettingsAction extends ConnectSettingsAction
$confirm = $this->getConfirmation();
if (!$confirm) {
+ // TRANS: Message given canceling IM address confirmation that is not pending.
$this->showForm(_('No pending confirmation to cancel.'));
return;
}
if ($confirm->address != $jabber) {
+ // TRANS: Message given canceling IM address confirmation for the wrong IM address.
$this->showForm(_('That is the wrong IM address.'));
return;
}
@@ -360,11 +393,13 @@ class ImsettingsAction extends ConnectSettingsAction
if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__);
- $this->serverError(_('Couldn\'t delete email confirmation.'));
+ // TRANS: Server error thrown on database error canceling IM address confirmation.
+ $this->serverError(_('Couldn\'t delete IM confirmation.'));
return;
}
- $this->showForm(_('Confirmation cancelled.'), true);
+ // TRANS: Message given after successfully canceling IM address confirmation.
+ $this->showForm(_('IM confirmation cancelled.'), true);
}
/**
@@ -384,6 +419,8 @@ class ImsettingsAction extends ConnectSettingsAction
// Maybe an old tab open...?
if ($user->jabber != $jabber) {
+ // TRANS: Message given trying to remove an IM address that is not
+ // TRANS: registered for the active user.
$this->showForm(_('That is not your Jabber ID.'));
return;
}
@@ -398,6 +435,7 @@ class ImsettingsAction extends ConnectSettingsAction
if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__);
+ // TRANS: Server error thrown on database error removing a registered IM address.
$this->serverError(_('Couldn\'t update user.'));
return;
}
@@ -405,7 +443,8 @@ class ImsettingsAction extends ConnectSettingsAction
// XXX: unsubscribe to the old address
- $this->showForm(_('The address was removed.'), true);
+ // TRANS: Message given after successfully removing a registered IM address.
+ $this->showForm(_('The IM address was removed.'), true);
}
/**
diff --git a/actions/invite.php b/actions/invite.php
index 5dac048b0..4bba8893d 100644
--- a/actions/invite.php
+++ b/actions/invite.php
@@ -224,8 +224,10 @@ class InviteAction extends CurrentUserDesignAction
$headers['From'] = mail_notify_from();
$headers['To'] = trim($email);
+ // TRANS: Subject for invitation email. Note that 'them' is correct as a gender-neutral singular 3rd-person pronoun in English.
$headers['Subject'] = sprintf(_('%1$s has invited you to join them on %2$s'), $bestname, $sitename);
+ // TRANS: Body text for invitation email. Note that 'them' is correct as a gender-neutral singular 3rd-person pronoun in English.
$body = sprintf(_("%1\$s has invited you to join them on %2\$s (%3\$s).\n\n".
"%2\$s is a micro-blogging service that lets you keep up-to-date with people you know and people who interest you.\n\n".
"You can also share news about yourself, your thoughts, or your life online with people who know about you. ".
diff --git a/actions/register.php b/actions/register.php
index da8d0a0bb..d1bc381fb 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -341,7 +341,7 @@ class RegisterAction extends Action
} else {
$instr =
common_markup_to_html(_('With this form you can create '.
- ' a new account. ' .
+ 'a new account. ' .
'You can then post notices and '.
'link up to friends and colleagues. '));
diff --git a/actions/shownotice.php b/actions/shownotice.php
index 7be9618f8..9c5d83441 100644
--- a/actions/shownotice.php
+++ b/actions/shownotice.php
@@ -167,7 +167,7 @@ class ShownoticeAction extends OwnerDesignAction
function title()
{
if (!empty($this->profile->fullname)) {
- $base = $this->profile->fullname . ' (' . $this->profile->nickname . ') ';
+ $base = $this->profile->fullname . ' (' . $this->profile->nickname . ')';
} else {
$base = $this->profile->nickname;
}
diff --git a/actions/smssettings.php b/actions/smssettings.php
index 751495d57..6af1872a0 100644
--- a/actions/smssettings.php
+++ b/actions/smssettings.php
@@ -55,6 +55,7 @@ class SmssettingsAction extends ConnectSettingsAction
function title()
{
+ // TRANS: Title for SMS settings.
return _('SMS settings');
}
@@ -66,6 +67,10 @@ class SmssettingsAction extends ConnectSettingsAction
function getInstructions()
{
+ // XXX: For consistency of parameters in messages, this should be a
+ // regular parameters, replaced with sprintf().
+ // TRANS: SMS settings page instructions.
+ // TRANS: %%site.name%% is the name of the site.
return _('You can receive SMS messages through email from %%site.name%%.');
}
@@ -88,6 +93,7 @@ class SmssettingsAction extends ConnectSettingsAction
{
if (!common_config('sms', 'enabled')) {
$this->element('div', array('class' => 'error'),
+ // TRANS: Message given in the SMS settings if SMS is not enabled on the site.
_('SMS is not available.'));
return;
}
@@ -101,7 +107,8 @@ class SmssettingsAction extends ConnectSettingsAction
common_local_url('smssettings')));
$this->elementStart('fieldset', array('id' => 'settings_sms_address'));
- $this->element('legend', null, _('Address'));
+ // TRANS: Form legend for SMS settings form.
+ $this->element('legend', null, _('SMS address'));
$this->hidden('token', common_session_token());
if ($user->sms) {
@@ -109,10 +116,12 @@ class SmssettingsAction extends ConnectSettingsAction
$this->element('p', 'form_confirmed',
$user->sms . ' (' . $carrier->name . ')');
$this->element('p', 'form_guide',
+ // TRANS: Form guide in SMS settings form.
_('Current confirmed SMS-enabled phone number.'));
$this->hidden('sms', $user->sms);
$this->hidden('carrier', $user->carrier);
- $this->submit('remove', _('Remove'));
+ // TRANS: Button label to remove a confirmed SMS address.
+ $this->submit('remove', _m('BUTTON','Remove'));
} else {
$confirm = $this->getConfirmation();
if ($confirm) {
@@ -120,57 +129,75 @@ class SmssettingsAction extends ConnectSettingsAction
$this->element('p', 'form_unconfirmed',
$confirm->address . ' (' . $carrier->name . ')');
$this->element('p', 'form_guide',
+ // TRANS: Form guide in IM settings form.
_('Awaiting confirmation on this phone number.'));
$this->hidden('sms', $confirm->address);
$this->hidden('carrier', $confirm->address_extra);
- $this->submit('cancel', _('Cancel'));
+ // TRANS: Button label to cancel a SMS address confirmation procedure.
+ $this->submit('cancel', _m('BUTTON','Cancel'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
+ // TRANS: Field label for SMS address input in SMS settings form.
$this->input('code', _('Confirmation code'), null,
+ // TRANS: Form field instructions in SMS settings form.
_('Enter the code you received on your phone.'));
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('confirm', _('Confirm'));
+ // TRANS: Button label to confirm SMS confirmation code in SMS settings.
+ $this->submit('confirm', _m('BUTTON','Confirm'));
} else {
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
+ // TRANS: Field label for SMS phone number input in SMS settings form.
$this->input('sms', _('SMS phone number'),
($this->arg('sms')) ? $this->arg('sms') : null,
+ // TRANS: SMS phone number input field instructions in SMS settings form.
_('Phone number, no punctuation or spaces, '.
'with area code'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->carrierSelect();
- $this->submit('add', _('Add'));
+ // TRANS: Button label for adding a SMS phone number in SMS settings form.
+ $this->submit('add', _m('BUTTON','Add'));
}
}
$this->elementEnd('fieldset');
if ($user->sms) {
$this->elementStart('fieldset', array('id' => 'settings_sms_incoming_email'));
+ // XXX: Confused! This is about SMS. Should this message be updated?
+ // TRANS: Form legend for incoming SMS settings form.
$this->element('legend', null, _('Incoming email'));
if ($user->incomingemail) {
$this->element('p', 'form_unconfirmed', $user->incomingemail);
$this->element('p', 'form_note',
+ // XXX: Confused! This is about SMS. Should this message be updated?
+ // TRANS: Form instructions for incoming SMS e-mail address form in SMS settings.
_('Send email to this address to post new notices.'));
- $this->submit('removeincoming', _('Remove'));
+ // TRANS: Button label for removing a set sender SMS e-mail address to post notices from.
+ $this->submit('removeincoming', _m('BUTTON','Remove'));
}
$this->element('p', 'form_guide',
+ // XXX: Confused! This is about SMS. Should this message be updated?
+ // TRANS: Instructions for incoming SMS e-mail address input form.
_('Make a new email address for posting to; '.
'cancels the old one.'));
- $this->submit('newincoming', _('New'));
+ // TRANS: Button label for adding an SMS e-mail address to send notices from.
+ $this->submit('newincoming', _m('BUTTON','New'));
$this->elementEnd('fieldset');
}
$this->elementStart('fieldset', array('id' => 'settings_sms_preferences'));
- $this->element('legend', null, _('Preferences'));
+ // TRANS: Form legend for SMS preferences form.
+ $this->element('legend', null, _('SMS preferences'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
$this->checkbox('smsnotify',
+ // TRANS: Checkbox label in SMS preferences form.
_('Send me notices through SMS; '.
'I understand I may incur '.
'exorbitant charges from my carrier.'),
@@ -178,7 +205,8 @@ class SmssettingsAction extends ConnectSettingsAction
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('save', _('Save'));
+ // TRANS: Button label to save SMS preferences.
+ $this->submit('save', _m('BUTTON','Save'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
@@ -245,6 +273,7 @@ class SmssettingsAction extends ConnectSettingsAction
} else if ($this->arg('confirm')) {
$this->confirmCode();
} else {
+ // TRANS: Message given submitting a form with an unknown action in SMS settings.
$this->showForm(_('Unexpected form submission.'));
}
}
@@ -275,13 +304,15 @@ class SmssettingsAction extends ConnectSettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
+ // TRANS: Server error thrown on database error updating SMS preferences.
$this->serverError(_('Couldn\'t update user.'));
return;
}
$user->query('COMMIT');
- $this->showForm(_('Preferences saved.'), true);
+ // TRANS: Confirmation message for successful SMS preferences save.
+ $this->showForm(_('SMS preferences saved.'), true);
}
/**
@@ -303,11 +334,13 @@ class SmssettingsAction extends ConnectSettingsAction
// Some validation
if (!$sms) {
+ // TRANS: Message given saving SMS phone number without having provided one.
$this->showForm(_('No phone number.'));
return;
}
if (!$carrier_id) {
+ // TRANS: Message given saving SMS phone number without having selected a carrier.
$this->showForm(_('No carrier selected.'));
return;
}
@@ -315,9 +348,11 @@ class SmssettingsAction extends ConnectSettingsAction
$sms = common_canonical_sms($sms);
if ($user->sms == $sms) {
+ // TRANS: Message given saving SMS phone number that is already set.
$this->showForm(_('That is already your phone number.'));
return;
} else if ($this->smsExists($sms)) {
+ // TRANS: Message given saving SMS phone number that is already set for another user.
$this->showForm(_('That phone number already belongs to another user.'));
return;
}
@@ -334,6 +369,7 @@ class SmssettingsAction extends ConnectSettingsAction
if ($result === false) {
common_log_db_error($confirm, 'INSERT', __FILE__);
+ // TRANS: Server error thrown on database error adding SMS confirmation code.
$this->serverError(_('Couldn\'t insert confirmation code.'));
return;
}
@@ -344,6 +380,7 @@ class SmssettingsAction extends ConnectSettingsAction
$user->nickname,
$carrier->toEmailAddress($sms));
+ // TRANS: Message given saving valid SMS phone number that is to be confirmed.
$msg = _('A confirmation code was sent to the phone number you added. '.
'Check your phone for the code and instructions '.
'on how to use it.');
@@ -367,10 +404,12 @@ class SmssettingsAction extends ConnectSettingsAction
$confirm = $this->getConfirmation();
if (!$confirm) {
+ // TRANS: Message given canceling SMS phone number confirmation that is not pending.
$this->showForm(_('No pending confirmation to cancel.'));
return;
}
if ($confirm->address != $sms) {
+ // TRANS: Message given canceling SMS phone number confirmation for the wrong phone number.
$this->showForm(_('That is the wrong confirmation number.'));
return;
}
@@ -379,11 +418,13 @@ class SmssettingsAction extends ConnectSettingsAction
if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__);
+ // TRANS: Server error thrown on database error canceling SMS phone number confirmation.
$this->serverError(_('Couldn\'t delete email confirmation.'));
return;
}
- $this->showForm(_('Confirmation cancelled.'), true);
+ // TRANS: Message given after successfully canceling SMS phone number confirmation.
+ $this->showForm(_('SMS confirmation cancelled.'), true);
}
/**
@@ -402,6 +443,8 @@ class SmssettingsAction extends ConnectSettingsAction
// Maybe an old tab open...?
if ($user->sms != $sms) {
+ // TRANS: Message given trying to remove an SMS phone number that is not
+ // TRANS: registered for the active user.
$this->showForm(_('That is not your phone number.'));
return;
}
@@ -417,12 +460,14 @@ class SmssettingsAction extends ConnectSettingsAction
$result = $user->updateKeys($original);
if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__);
+ // TRANS: Server error thrown on database error removing a registered SMS phone number.
$this->serverError(_('Couldn\'t update user.'));
return;
}
$user->query('COMMIT');
- $this->showForm(_('The address was removed.'), true);
+ // TRANS: Message given after successfully removing a registered SMS phone number.
+ $this->showForm(_('The SMS phone number was removed.'), true);
}
/**
@@ -462,10 +507,12 @@ class SmssettingsAction extends ConnectSettingsAction
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
+ // TRANS: Label for mobile carrier dropdown menu in SMS settings.
$this->element('label', array('for' => 'carrier'), _('Mobile carrier'));
$this->elementStart('select', array('name' => 'carrier',
'id' => 'carrier'));
$this->element('option', array('value' => 0),
+ // TRANS: Default option for mobile carrier dropdown menu in SMS settings.
_('Select a carrier'));
while ($carrier->fetch()) {
$this->element('option', array('value' => $carrier->id),
@@ -473,6 +520,8 @@ class SmssettingsAction extends ConnectSettingsAction
}
$this->elementEnd('select');
$this->element('p', 'form_guide',
+ // TRANS: Form instructions for mobile carrier dropdown menu in SMS settings.
+ // TRANS: %s is an administrative contact's e-mail address.
sprintf(_('Mobile carrier for your phone. '.
'If you know a carrier that accepts ' .
'SMS over email but isn\'t listed here, ' .
@@ -495,6 +544,7 @@ class SmssettingsAction extends ConnectSettingsAction
$code = $this->trimmed('code');
if (!$code) {
+ // TRANS: Message given saving SMS phone number confirmation code without having provided one.
$this->showForm(_('No code entered'));
return;
}
diff --git a/actions/snapshotadminpanel.php b/actions/snapshotadminpanel.php
index df6b168dc..be0a793e5 100644
--- a/actions/snapshotadminpanel.php
+++ b/actions/snapshotadminpanel.php
@@ -197,7 +197,7 @@ class SnapshotAdminPanelForm extends AdminForm
$this->out->elementStart('ul', 'form_data');
$this->li();
$snapshot = array(
- 'web' => _('Randomly during Web hit'),
+ 'web' => _('Randomly during web hit'),
'cron' => _('In a scheduled job'),
'never' => _('Never')
);
diff --git a/actions/tag.php b/actions/tag.php
index 953240404..7c6f99d92 100644
--- a/actions/tag.php
+++ b/actions/tag.php
@@ -102,12 +102,17 @@ class TagAction extends Action
function showContent()
{
- $nl = new NoticeList($this->notice, $this);
+ if(Event::handle('StartTagShowContent', array($this))) {
+
+ $nl = new NoticeList($this->notice, $this);
- $cnt = $nl->show();
+ $cnt = $nl->show();
- $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
- $this->page, 'tag', array('tag' => $this->tag));
+ $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
+ $this->page, 'tag', array('tag' => $this->tag));
+
+ Event::handle('EndTagShowContent', array($this));
+ }
}
function isReadOnly($args)
diff --git a/actions/usergroups.php b/actions/usergroups.php
index 29bda0a76..6606e76cd 100644
--- a/actions/usergroups.php
+++ b/actions/usergroups.php
@@ -59,8 +59,10 @@ class UsergroupsAction extends OwnerDesignAction
function title()
{
if ($this->page == 1) {
+ // TRANS: Message is used as a page title. %s is a nick name.
return sprintf(_('%s groups'), $this->user->nickname);
} else {
+ // TRANS: Message is used as a page title. %1$s is a nick name, %2$d is a page number.
return sprintf(_('%1$s groups, page %2$d'),
$this->user->nickname,
$this->page);
diff --git a/actions/userrss.php b/actions/userrss.php
index cf7d18ca8..b7078fcaf 100644
--- a/actions/userrss.php
+++ b/actions/userrss.php
@@ -72,7 +72,7 @@ class UserrssAction extends Rss10Action
{
$notice = $this->user->getNotices(
0,
- ($limit == 0) ? NOTICES_PER_PAGE : $limit
+ ($this->limit == 0) ? NOTICES_PER_PAGE : $this->limit
);
$notices = array();
@@ -90,8 +90,10 @@ class UserrssAction extends Rss10Action
$c = array('url' => common_local_url('userrss',
array('nickname' =>
$user->nickname)),
+ // TRANS: Message is used as link title. %s is a user nickname.
'title' => sprintf(_('%s timeline'), $user->nickname),
'link' => $profile->profileurl,
+ // TRANS: Message is used as link description. %1$s is a username, %2$s is a site name.
'description' => sprintf(_('Updates from %1$s on %2$s!'),
$user->nickname, common_config('site', 'name')));
return $c;