Commit 13991f7e authored by Siebrand Mazeland's avatar Siebrand Mazeland

* add/update translator documentation.

* remove superfluous whitespace.
* update punctuation on form validation messages.
* L10n tweaks.
* add fixme for missing class documentation.
parent dd572184
......@@ -45,7 +45,6 @@ define('MEMBERS_PER_SECTION', 27);
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
class groupRssAction extends Rss10Action
{
/** group we're viewing. */
......@@ -56,7 +55,6 @@ class groupRssAction extends Rss10Action
*
* @return boolean true
*/
function isReadOnly($args)
{
return true;
......@@ -71,7 +69,6 @@ class groupRssAction extends Rss10Action
*
* @return boolean success flag
*/
function prepare($args)
{
parent::prepare($args);
......@@ -88,6 +85,7 @@ class groupRssAction extends Rss10Action
}
if (!$nickname) {
// TRANS: Client error displayed when requesting a group RSS feed without providing a group nickname.
$this->clientError(_('No nickname.'), 404);
return false;
}
......@@ -95,6 +93,7 @@ class groupRssAction extends Rss10Action
$local = Local_group::staticGet('nickname', $nickname);
if (!$local) {
// TRANS: Client error displayed when requesting a group RSS feed for group that does not exist.
$this->clientError(_('No such group.'), 404);
return false;
}
......@@ -102,6 +101,7 @@ class groupRssAction extends Rss10Action
$this->group = User_group::staticGet('id', $local->group_id);
if (!$this->group) {
// TRANS: Client error displayed when requesting a group RSS feed for an object that is not a group.
$this->clientError(_('No such group.'), 404);
return false;
}
......@@ -112,7 +112,6 @@ class groupRssAction extends Rss10Action
function getNotices($limit=0)
{
$group = $this->group;
if (is_null($group)) {
......
......@@ -45,7 +45,6 @@ require_once INSTALLDIR.'/lib/grouplist.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 GroupsAction extends Action
{
var $page = null;
......@@ -59,9 +58,12 @@ class GroupsAction extends Action
function title()
{
if ($this->page == 1) {
return _("Groups");
// TRANS: Title for first page of the groups list.
return _m('TITLE',"Groups");
} else {
return sprintf(_("Groups, page %d"), $this->page);
// TRANS: Title for all but the first page of the groups list.
// TRANS: %d is the page number.
return sprintf(_m('TITLE',"Groups, page %d"), $this->page);
}
}
......@@ -87,12 +89,15 @@ class GroupsAction extends Action
function showPageNotice()
{
$notice =
// TRANS: Page notice of group list. %%%%site.name%%%% is the StatusNet site name,
// TRANS: %%%%action.groupsearch%%%% and %%%%action.newgroup%%%% are URLs. Do not change them.
// TRANS: This message contains Markdown links in the form [link text](link).
sprintf(_('%%%%site.name%%%% groups let you find and talk with ' .
'people of similar interests. After you join a group ' .
'you can send messages to all other members using the ' .
'syntax "!groupname". Don\'t see a group you like? Try ' .
'[searching for one](%%%%action.groupsearch%%%%) or ' .
'[start your own!](%%%%action.newgroup%%%%)'));
'[start your own](%%%%action.newgroup%%%%)!'));
$this->elementStart('div', 'instructions');
$this->raw(common_markup_to_html($notice));
$this->elementEnd('div');
......@@ -104,6 +109,7 @@ class GroupsAction extends Action
$this->elementStart('p', array('id' => 'new_group'));
$this->element('a', array('href' => common_local_url('newgroup'),
'class' => 'more'),
// TRANS: Link to create a new group on the group list page.
_('Create a new group'));
$this->elementEnd('p');
}
......
......@@ -49,12 +49,14 @@ class GroupsearchAction extends SearchAction
{
function getInstructions()
{
// TRANS: Instructions for page where groups can be searched. %%site.name%% is the name of the StatusNet site.
return _('Search for groups on %%site.name%% by their name, location, or description. ' .
'Separate the terms by spaces; they must be 3 characters or more.');
}
function title()
{
// TRANS: Title for page where groups can be searched.
return _('Group search');
}
......@@ -76,12 +78,17 @@ class GroupsearchAction extends SearchAction
$this->pagination($page > 1, $cnt > GROUPS_PER_PAGE,
$page, 'groupsearch', array('q' => $q));
} else {
// TRANS: Text on page where groups can be searched if no results were found for a query.
$this->element('p', 'error', _('No results.'));
$this->searchSuggestions($q);
if (common_logged_in()) {
$message = _('If you can\'t find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
// TRANS: Additional text on page where groups can be searched if no results were found for a query for a logged in user.
// TRANS: This message contains Markdown links in the form [link text](link).
$message = _('If you cannot find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
}
else {
// TRANS: Additional text on page where groups can be searched if no results were found for a query for a not logged in user.
// TRANS: This message contains Markdown links in the form [link text](link).
$message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!');
}
$this->elementStart('div', 'guide');
......@@ -116,4 +123,3 @@ class GroupSearchResults extends GroupList
return preg_replace($this->pattern, '<strong>\\1</strong>', htmlspecialchars($text));
}
}
......@@ -79,6 +79,7 @@ class GroupunblockAction extends Action
}
$group_id = $this->trimmed('unblockgroup');
if (empty($group_id)) {
// TRANS: Client error displayed when trying to unblock a user from a group without providing a group.
$this->clientError(_('No group specified.'));
return false;
}
......
......@@ -40,7 +40,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
* @link http://status.net/
*/
class HcardAction extends Action
{
var $user;
......@@ -64,6 +63,7 @@ class HcardAction extends Action
$this->user = User::staticGet('nickname', $nickname);
if (!$this->user) {
// TRANS: Client error displayed when trying to get a user hCard for a non-existing user.
$this->clientError(_('No such user.'), 404);
return false;
}
......@@ -71,6 +71,7 @@ class HcardAction extends Action
$this->profile = $this->user->getProfile();
if (!$this->profile) {
// TRANS: Server error displayed when trying to get a user hCard for a user without a profile.
$this->serverError(_('User has no profile.'));
return false;
}
......@@ -117,4 +118,4 @@ class ShortUserProfile extends UserProfile
{
return;
}
}
\ No newline at end of file
}
......@@ -28,9 +28,9 @@ if (!defined('STATUSNET')) {
exit(1);
}
// @todo XXX: Add documentation.
class HostMetaAction extends Action
{
/**
* Is read only?
*
......@@ -51,11 +51,11 @@ class HostMetaAction extends Action
$xrd->host = $domain;
if(Event::handle('StartHostMetaLinks', array(&$xrd->links))) {
$url = common_local_url('userxrd');
$url.= '?uri={uri}';
$xrd->links[] = array('rel' => Discovery::LRDD_REL,
'template' => $url,
'title' => array('Resource Descriptor'));
$url = common_local_url('userxrd');
$url.= '?uri={uri}';
$xrd->links[] = array('rel' => Discovery::LRDD_REL,
'template' => $url,
'title' => array('Resource Descriptor'));
Event::handle('EndHostMetaLinks', array(&$xrd->links));
}
......
This diff is collapsed.
......@@ -43,7 +43,6 @@ require_once INSTALLDIR.'/lib/mailbox.php';
* @link http://status.net/
* @see MailboxAction
*/
class InboxAction extends MailboxAction
{
......@@ -52,13 +51,16 @@ class InboxAction extends MailboxAction
*
* @return string page title
*/
function title()
{
if ($this->page > 1) {
// TRANS: Title for all but the first page of the inbox page.
// TRANS: %1$s is the user's nickname, %2$s is the page number.
return sprintf(_('Inbox for %1$s - page %2$d'), $this->user->nickname,
$this->page);
} else {
// TRANS: Title for the first page of the inbox page.
// TRANS: %s is the user's nickname.
return sprintf(_('Inbox for %s'), $this->user->nickname);
}
}
......@@ -72,7 +74,6 @@ class InboxAction extends MailboxAction
*
* @see MailboxAction::getMessages()
*/
function getMessages()
{
$message = new Message();
......@@ -98,7 +99,6 @@ class InboxAction extends MailboxAction
*
* @return Profile The profile that matches the message
*/
function getMessageProfile($message)
{
return $message->getFrom();
......@@ -109,9 +109,9 @@ class InboxAction extends MailboxAction
*
* @return string localised instructions for using the page
*/
function getInstructions()
{
// TRANS: Instructions for user inbox page.
return _('This is your inbox, which lists your incoming private messages.');
}
}
......@@ -19,6 +19,7 @@
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
// @todo XXX: Add documentation.
class InviteAction extends CurrentUserDesignAction
{
var $mode = null;
......@@ -217,7 +218,7 @@ class InviteAction extends CurrentUserDesignAction
$this->textarea('addresses', _('Email addresses'),
$this->trimmed('addresses'),
// TRANS: Tooltip for field label for a list of e-mail addresses.
_('Addresses of friends to invite (one per line)'));
_('Addresses of friends to invite (one per line).'));
$this->elementEnd('li');
$this->elementStart('li');
// TRANS: Field label for a personal message to send to invitees.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment