i18n tweaks.
Superfluous whitespace removed.
YAY! All StatusNet core messages in the 1.0.x branch have been documented at this point in time!!!
StatusNet::setApi(true);
}
if (!common_logged_in()) {
- // TRANS: Client error displayed when trying to leave a group while not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
return;
}
$this->user = common_current_user();
if (!$this->user) {
- // TRANS: Error message displayed trying to delete a notice while not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
common_user_error(_('Not logged in.'));
exit;
}
{
parent::handle($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed when trying to remove a favorite while not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
return;
}
{
parent::handle($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed when trying to mark a notice as favorite without being logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
return;
}
{
parent::prepare($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed trying to block a user from a group while not 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;
}
{
parent::prepare($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed when trying to unblock a user from a group while not 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;
}
{
parent::handle($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed trying to log out when not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
} else {
if (Event::handle('StartLogout', array($this))) {
{
parent::prepare($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed when trying to access the "make admin" page while not 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;
}
parent::handle($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed trying to create a new direct message while not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'), 403);
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->saveNewMessage();
function title()
{
// TRANS: Page title for sending a new notice.
- return _('New notice');
+ return _m('TITLE','New notice');
}
/**
function handle($args)
{
if (!common_logged_in()) {
- // TRANS: Client error displayed trying to send a notice while not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// check for this before token since all POST and FILES data
{
$this->startHTML('text/xml;charset=utf-8', true);
$this->elementStart('head');
- $this->element('title', null, _('New notice'));
+ // TRANS: Title for form to send a new notice.
+ $this->element('title', null, _m('TITLE','New notice'));
$this->elementEnd('head');
$this->elementStart('body');
parent::handle($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed trying to nudge a user without being logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
return;
}
$this->user = common_current_user();
if (empty($this->user)) {
- // TRANS: Client error displayed when trying to enable or disable a plugin while not 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;
}
parent::prepare($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed trying a change a subscription while not 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;
}
$this->user = common_current_user();
if (empty($this->user)) {
- // TRANS: Client error displayed trying to subscribe when not 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;
}
{
parent::prepare($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed on user tag page when trying to add tags while not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'), 403);
return false;
}
{
parent::handle($args);
if (!common_logged_in()) {
- // TRANS: Client error displayed when trying to unsubscribe while not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
return;
}
$_cur = null;
$msg = sprintf(
+ // TRANS: Database error message.
_(
- 'The database for %s isn\'t responding correctly, '.
- 'so the site won\'t work properly. '.
+ 'The database for %1$s is not responding correctly, '.
+ 'so the site will not work properly. '.
'The site admins probably know about the problem, '.
- 'but you can contact them at %s to make sure. '.
+ 'but you can contact them at %2$s to make sure. '.
'Otherwise, wait a few minutes and try again.'
),
common_config('site', 'name'),
common_config('site', 'email')
);
} else {
+ // TRANS: Error message.
$msg = _(
'An important error occured, probably related to email setup. '.
- 'Check logfiles for more info..'
+ 'Check logfiles for more info.'
);
}
$dac->showPage();
} catch (Exception $e) {
+ // TRANS: Error message.
echo _('An error occurred.');
}
exit(-1);
if (!_have_config()) {
$msg = sprintf(
+ // TRANS: Error message displayed when there is no StatusNet configuration file.
_(
"No configuration file found. Try running ".
"the installation program first."
$args = $r->map($path);
if (!$args) {
+ // TRANS: Error message displayed when trying to access a non-existing page.
$cac = new ClientErrorAction(_('Unknown page'), 404);
$cac->showPage();
return;
$action_class = ucfirst($action).'Action';
if (!class_exists($action_class)) {
+ // TRANS: Error message displayed when trying to perform an undefined action.
$cac = new ClientErrorAction(_('Unknown action'), 404);
$cac->showPage();
} else {
// User must be logged in.
if (!common_logged_in()) {
- // TRANS: Client error message thrown when trying to access the admin panel while not 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;
}
* @see UnsubscribeForm
* @fixme merge a bunch of this stuff with similar form types to reduce boilerplate
*/
-
class DeleteGroupForm extends Form
{
/**
* group for user to delete
*/
-
var $group = null;
/**
* @param HTMLOutputter $out output channel
* @param group $group group to join
*/
-
function __construct($out=null, $group=null)
{
parent::__construct($out);
*
* @return string ID of the form
*/
-
function id()
{
return 'group-delete-' . $this->group->id;
*
* @return string of the form class
*/
-
function formClass()
{
return 'form_group_delete';
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('deletegroup',
*
* @return void
*/
-
function formActions()
{
- $this->out->submit('submit', _('Delete'));
+ // TRANS: Button text for deleting a group.
+ $this->out->submit('submit', _m('BUTTON','Delete'));
}
}
*
* @see UnsubscribeForm
*/
-
class JoinForm extends Form
{
/**
* group for user to join
*/
-
var $group = null;
/**
* @param HTMLOutputter $out output channel
* @param group $group group to join
*/
-
function __construct($out=null, $group=null)
{
parent::__construct($out);
*
* @return string ID of the form
*/
-
function id()
{
return 'group-join-' . $this->group->id;
*
* @return string of the form class
*/
-
function formClass()
{
return 'form_group_join ajax';
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('joingroup',
*
* @return void
*/
-
function formActions()
{
- $this->out->submit('submit', _('Join'));
+ // TRANS: Button text for joining a group.
+ $this->out->submit('submit', _m('BUTTON','Join'));
}
}
*
* @return string a fully rendered source of the Notice
*/
-
function getSourceLink($source)
{
+ // Gettext translations for the below source types are available.
$source_name = _($source);
switch ($source) {
case 'web':
return $source_name;
}
-
}
'data-api' => common_local_url('geocode')));
// @fixme checkbox method allows no way to change the id without changing the name
+ //// TRANS: Checkbox label to allow sharing geo location in notices.
//$this->out->checkbox('notice_data-geo', _('Share my location'), true);
$this->out->elementStart('label', 'notice_data-geo');
$this->out->element('input', array(
* @see NoticeListItem
* @see ProfileNoticeList
*/
-
class NoticeList extends Widget
{
/** the current stream of notices being displayed. */
*
* @param Notice $notice stream of notices from DB_DataObject
*/
-
function __construct($notice, $out=null)
{
parent::__construct($out);
*
* @return int count of notices listed.
*/
-
function show()
{
$this->out->elementStart('div', array('id' =>'notices_primary'));
- $this->out->element('h2', null, _('Notices'));
+ // TRANS: Header in notice list.
+ $this->out->element('h2', null, _m('HEADER','Notices'));
$this->out->elementStart('ol', array('class' => 'notices xoxo'));
$cnt = 0;
*
* @return NoticeListItem a list item for displaying the notice
*/
-
function newListItem($notice)
{
return new NoticeListItem($notice, $this->out);
}
}
-
$ns = $this->notice->getSource();
if ($ns) {
+ // TRANS: A possible notice source (web interface).
$source_name = (empty($ns->name)) ? ($ns->code ? _($ns->code) : _m('SOURCE','web')) : _($ns->name);
$this->out->text(' ');
$this->out->elementStart('span', 'source');
// TRANS: Menu item in primary navigation panel.
_m('MENU','Settings'),
// TRANS: Menu item title in primary navigation panel.
- _('Change your personal settings'),
+ _('Change your personal settings.'),
false,
'nav_account');
if ($user->hasRight(Right::CONFIGURESITE)) {
// TRANS: Menu item in primary navigation panel.
_m('MENU','Admin'),
// TRANS: Menu item title in primary navigation panel.
- _('Site configuration'),
+ _('Site configuration.'),
false,
'nav_admin');
}
$this->action->menuItem(common_local_url('logout'),
// TRANS: Menu item in primary navigation panel.
_m('MENU','Logout'),
- _('Logout from the site'),
+ // TRANS: Menu item title in primary navigation panel.
+ _('Logout from the site.'),
false,
'nav_logout');
} else {
// TRANS: Menu item in primary navigation panel.
_m('MENU','Login'),
// TRANS: Menu item title in primary navigation panel.
- _('Login to the site'),
+ _('Login to the site.'),
false,
'nav_login');
}
// TRANS: Menu item in primary navigation panel.
_m('MENU','Search'),
// TRANS: Menu item title in primary navigation panel.
- _('Search the site'),
+ _('Search the site.'),
false,
'nav_search');
}
if (!common_logged_in()) {
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
- // TRANS: Client error displayed when trying to change user options while not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
} else {
// Redirect to login.
{
parent::handle($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;
} else if (!common_is_real_login()) {
{
parent::handle($args);
if (!common_logged_in()) {
- // TRANS: Client error message
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_m('Not logged in.'));
} else {
$this->tryLogin();
$this->user = common_current_user();
if (empty($this->user)) {
- // TRANS: Client error displayed trying to subscribe when not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_m('Not logged in.'));
return false;
}
$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(_m('Not logged in.'));
return false;
}
$this->user = common_current_user();
if (empty($this->user)) {
- // TRANS: Client error displayed trying to subscribe when not logged in.
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_m('Not logged in.'));
return false;
}
// User must be logged in.
if (!common_logged_in()) {
+ // TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_m('Not logged in.'));
return;
}