Translator documentation updated/added.
i18n tweaks. Superfluous whitespace removed. YAY! All StatusNet core messages in the 1.0.x branch have been documented at this point in time!!!
This commit is contained in:
parent
c642eb2771
commit
2dbdb0f185
|
@ -53,7 +53,7 @@ class CancelsubscriptionAction extends Action
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class DeletenoticeAction extends Action
|
|||
$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;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ class DisfavorAction extends Action
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class FavorAction extends Action
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ class GroupblockAction extends RedirectingAction
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ class GroupunblockAction extends Action
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ class LogoutAction extends Action
|
|||
{
|
||||
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))) {
|
||||
|
|
|
@ -58,7 +58,7 @@ class MakeadminAction extends RedirectingAction
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ class NewmessageAction extends Action
|
|||
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();
|
||||
|
|
|
@ -64,7 +64,7 @@ class NewnoticeAction extends Action
|
|||
function title()
|
||||
{
|
||||
// TRANS: Page title for sending a new notice.
|
||||
return _('New notice');
|
||||
return _m('TITLE','New notice');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -83,7 +83,7 @@ class NewnoticeAction extends Action
|
|||
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
|
||||
|
@ -289,7 +289,8 @@ class NewnoticeAction extends Action
|
|||
{
|
||||
$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');
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class NudgeAction extends Action
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ class PluginEnableAction extends Action
|
|||
$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;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class SubeditAction extends Action
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ class SubscribeAction extends Action
|
|||
$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;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class TagotherAction extends Action
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class UnsubscribeAction extends Action
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
14
index.php
14
index.php
|
@ -106,20 +106,22 @@ function handleError($error)
|
|||
$_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.'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -127,6 +129,7 @@ function handleError($error)
|
|||
$dac->showPage();
|
||||
|
||||
} catch (Exception $e) {
|
||||
// TRANS: Error message.
|
||||
echo _('An error occurred.');
|
||||
}
|
||||
exit(-1);
|
||||
|
@ -250,6 +253,7 @@ function main()
|
|||
|
||||
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."
|
||||
|
@ -281,6 +285,7 @@ function main()
|
|||
$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;
|
||||
|
@ -335,6 +340,7 @@ function main()
|
|||
$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 {
|
||||
|
|
|
@ -67,7 +67,7 @@ class AdminPanelAction extends Action
|
|||
// 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;
|
||||
}
|
||||
|
|
|
@ -47,13 +47,11 @@ if (!defined('STATUSNET')) {
|
|||
* @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;
|
||||
|
||||
/**
|
||||
|
@ -62,7 +60,6 @@ class DeleteGroupForm extends Form
|
|||
* @param HTMLOutputter $out output channel
|
||||
* @param group $group group to join
|
||||
*/
|
||||
|
||||
function __construct($out=null, $group=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
|
@ -75,7 +72,6 @@ class DeleteGroupForm extends Form
|
|||
*
|
||||
* @return string ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'group-delete-' . $this->group->id;
|
||||
|
@ -86,7 +82,6 @@ class DeleteGroupForm extends Form
|
|||
*
|
||||
* @return string of the form class
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_group_delete';
|
||||
|
@ -97,7 +92,6 @@ class DeleteGroupForm extends Form
|
|||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return common_local_url('deletegroup',
|
||||
|
@ -115,9 +109,9 @@ class DeleteGroupForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit('submit', _('Delete'));
|
||||
// TRANS: Button text for deleting a group.
|
||||
$this->out->submit('submit', _m('BUTTON','Delete'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,13 +46,11 @@ require_once INSTALLDIR.'/lib/form.php';
|
|||
*
|
||||
* @see UnsubscribeForm
|
||||
*/
|
||||
|
||||
class JoinForm extends Form
|
||||
{
|
||||
/**
|
||||
* group for user to join
|
||||
*/
|
||||
|
||||
var $group = null;
|
||||
|
||||
/**
|
||||
|
@ -61,7 +59,6 @@ class JoinForm extends Form
|
|||
* @param HTMLOutputter $out output channel
|
||||
* @param group $group group to join
|
||||
*/
|
||||
|
||||
function __construct($out=null, $group=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
|
@ -74,7 +71,6 @@ class JoinForm extends Form
|
|||
*
|
||||
* @return string ID of the form
|
||||
*/
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'group-join-' . $this->group->id;
|
||||
|
@ -85,7 +81,6 @@ class JoinForm extends Form
|
|||
*
|
||||
* @return string of the form class
|
||||
*/
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_group_join ajax';
|
||||
|
@ -96,7 +91,6 @@ class JoinForm extends Form
|
|||
*
|
||||
* @return string URL of the action
|
||||
*/
|
||||
|
||||
function action()
|
||||
{
|
||||
return common_local_url('joingroup',
|
||||
|
@ -108,9 +102,9 @@ class JoinForm extends Form
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function formActions()
|
||||
{
|
||||
$this->out->submit('submit', _('Join'));
|
||||
// TRANS: Button text for joining a group.
|
||||
$this->out->submit('submit', _m('BUTTON','Join'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -256,9 +256,9 @@ class ResultItem
|
|||
*
|
||||
* @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':
|
||||
|
@ -277,5 +277,4 @@ class ResultItem
|
|||
|
||||
return $source_name;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -256,6 +256,7 @@ class NoticeForm extends Form
|
|||
'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(
|
||||
|
|
|
@ -53,7 +53,6 @@ require_once INSTALLDIR.'/lib/attachmentlist.php';
|
|||
* @see NoticeListItem
|
||||
* @see ProfileNoticeList
|
||||
*/
|
||||
|
||||
class NoticeList extends Widget
|
||||
{
|
||||
/** the current stream of notices being displayed. */
|
||||
|
@ -65,7 +64,6 @@ class NoticeList extends Widget
|
|||
*
|
||||
* @param Notice $notice stream of notices from DB_DataObject
|
||||
*/
|
||||
|
||||
function __construct($notice, $out=null)
|
||||
{
|
||||
parent::__construct($out);
|
||||
|
@ -80,11 +78,11 @@ class NoticeList extends Widget
|
|||
*
|
||||
* @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;
|
||||
|
@ -122,10 +120,8 @@ class NoticeList extends Widget
|
|||
*
|
||||
* @return NoticeListItem a list item for displaying the notice
|
||||
*/
|
||||
|
||||
function newListItem($notice)
|
||||
{
|
||||
return new NoticeListItem($notice, $this->out);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -420,6 +420,7 @@ class NoticeListItem extends Widget
|
|||
$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');
|
||||
|
|
|
@ -57,7 +57,7 @@ class PrimaryNav extends Menu
|
|||
// 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)) {
|
||||
|
@ -65,14 +65,15 @@ class PrimaryNav extends Menu
|
|||
// 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 {
|
||||
|
@ -80,7 +81,7 @@ class PrimaryNav extends Menu
|
|||
// 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');
|
||||
}
|
||||
|
@ -90,7 +91,7 @@ class PrimaryNav extends Menu
|
|||
// 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');
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ class ProfileFormAction extends RedirectingAction
|
|||
|
||||
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.
|
||||
|
|
|
@ -69,6 +69,7 @@ class SettingsAction extends CurrentUserDesignAction
|
|||
{
|
||||
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()) {
|
||||
|
|
|
@ -64,7 +64,7 @@ class FinishaddopenidAction extends Action
|
|||
{
|
||||
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();
|
||||
|
|
|
@ -95,7 +95,7 @@ class SearchsubAction extends Action
|
|||
$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;
|
||||
}
|
||||
|
|
|
@ -133,6 +133,7 @@ abstract class BaseMirrorAction 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(_m('Not logged in.'));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ class TagsubAction extends Action
|
|||
$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;
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ class AdminprofileflagAction extends Action
|
|||
// 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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user