Add translator documentation
Signed-off-by: Siebrand Mazeland <s.mazeland@xs4all.nl>
This commit is contained in:
parent
380439ba77
commit
878818d2c0
|
@ -69,6 +69,7 @@ class AdminPanelAction extends Action
|
||||||
// User must be logged in.
|
// User must be logged in.
|
||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
|
// TRANS: Client error message
|
||||||
$this->clientError(_('Not logged in.'));
|
$this->clientError(_('Not logged in.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -93,6 +94,7 @@ class AdminPanelAction extends Action
|
||||||
// User must have the right to change admin settings
|
// User must have the right to change admin settings
|
||||||
|
|
||||||
if (!$user->hasRight(Right::CONFIGURESITE)) {
|
if (!$user->hasRight(Right::CONFIGURESITE)) {
|
||||||
|
// TRANS: Client error message
|
||||||
$this->clientError(_('You cannot make changes to this site.'));
|
$this->clientError(_('You cannot make changes to this site.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -104,6 +106,7 @@ class AdminPanelAction extends Action
|
||||||
$name = mb_substr($name, 0, -10);
|
$name = mb_substr($name, 0, -10);
|
||||||
|
|
||||||
if (!self::canAdmin($name)) {
|
if (!self::canAdmin($name)) {
|
||||||
|
// TRANS: Client error message
|
||||||
$this->clientError(_('Changes to that panel are not allowed.'), 403);
|
$this->clientError(_('Changes to that panel are not allowed.'), 403);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -134,6 +137,7 @@ class AdminPanelAction extends Action
|
||||||
Config::loadSettings();
|
Config::loadSettings();
|
||||||
|
|
||||||
$this->success = true;
|
$this->success = true;
|
||||||
|
// TRANS: Message after successful saving of administrative settings.
|
||||||
$this->msg = _('Settings saved.');
|
$this->msg = _('Settings saved.');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->success = false;
|
$this->success = false;
|
||||||
|
@ -203,6 +207,7 @@ class AdminPanelAction extends Action
|
||||||
|
|
||||||
function showForm()
|
function showForm()
|
||||||
{
|
{
|
||||||
|
// TRANS: Client error message
|
||||||
$this->clientError(_('showForm() not implemented.'));
|
$this->clientError(_('showForm() not implemented.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -232,6 +237,7 @@ class AdminPanelAction extends Action
|
||||||
|
|
||||||
function saveSettings()
|
function saveSettings()
|
||||||
{
|
{
|
||||||
|
// TRANS: Client error message
|
||||||
$this->clientError(_('saveSettings() not implemented.'));
|
$this->clientError(_('saveSettings() not implemented.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -255,6 +261,7 @@ class AdminPanelAction extends Action
|
||||||
$result = $config->delete();
|
$result = $config->delete();
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($config, 'DELETE', __FILE__);
|
common_log_db_error($config, 'DELETE', __FILE__);
|
||||||
|
// TRANS: Client error message
|
||||||
$this->clientError(_("Unable to delete design setting."));
|
$this->clientError(_("Unable to delete design setting."));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -319,33 +326,51 @@ class AdminPanelNav extends Widget
|
||||||
if (Event::handle('StartAdminPanelNav', array($this))) {
|
if (Event::handle('StartAdminPanelNav', array($this))) {
|
||||||
|
|
||||||
if (AdminPanelAction::canAdmin('site')) {
|
if (AdminPanelAction::canAdmin('site')) {
|
||||||
$this->out->menuItem(common_local_url('siteadminpanel'), _('Site'),
|
// TRANS: Menu item title/tooltip
|
||||||
_('Basic site configuration'), $action_name == 'siteadminpanel', 'nav_site_admin_panel');
|
$menu_title = _('Basic site configuration');
|
||||||
|
// TRANS: Menu item for site administration
|
||||||
|
$this->out->menuItem(common_local_url('siteadminpanel'), _m('MENU', 'Site'),
|
||||||
|
$menu_title, $action_name == 'siteadminpanel', 'nav_site_admin_panel');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AdminPanelAction::canAdmin('design')) {
|
if (AdminPanelAction::canAdmin('design')) {
|
||||||
$this->out->menuItem(common_local_url('designadminpanel'), _('Design'),
|
// TRANS: Menu item title/tooltip
|
||||||
_('Design configuration'), $action_name == 'designadminpanel', 'nav_design_admin_panel');
|
$menu_title = _('Design configuration');
|
||||||
|
// TRANS: Menu item for site administration
|
||||||
|
$this->out->menuItem(common_local_url('designadminpanel'), _m('MENU', 'Design'),
|
||||||
|
$menu_title, $action_name == 'designadminpanel', 'nav_design_admin_panel');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AdminPanelAction::canAdmin('user')) {
|
if (AdminPanelAction::canAdmin('user')) {
|
||||||
$this->out->menuItem(common_local_url('useradminpanel'), _('User'),
|
// TRANS: Menu item title/tooltip
|
||||||
_('User configuration'), $action_name == 'useradminpanel', 'nav_design_admin_panel');
|
$menu_title = _('User configuration');
|
||||||
|
// TRANS: Menu item for site administration
|
||||||
|
$this->out->menuItem(common_local_url('useradminpanel'), _m('MENU', 'User'),
|
||||||
|
$menu_title, $action_name == 'useradminpanel', 'nav_design_admin_panel');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AdminPanelAction::canAdmin('access')) {
|
if (AdminPanelAction::canAdmin('access')) {
|
||||||
$this->out->menuItem(common_local_url('accessadminpanel'), _('Access'),
|
// TRANS: Menu item title/tooltip
|
||||||
_('Access configuration'), $action_name == 'accessadminpanel', 'nav_design_admin_panel');
|
$menu_title = _('Access configuration');
|
||||||
|
// TRANS: Menu item for site administration
|
||||||
|
$this->out->menuItem(common_local_url('accessadminpanel'), _m('MENU', 'Access'),
|
||||||
|
$menu_title, $action_name == 'accessadminpanel', 'nav_design_admin_panel');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AdminPanelAction::canAdmin('paths')) {
|
if (AdminPanelAction::canAdmin('paths')) {
|
||||||
$this->out->menuItem(common_local_url('pathsadminpanel'), _('Paths'),
|
// TRANS: Menu item title/tooltip
|
||||||
_('Paths configuration'), $action_name == 'pathsadminpanel', 'nav_design_admin_panel');
|
$menu_title = _('Paths configuration');
|
||||||
|
// TRANS: Menu item for site administration
|
||||||
|
$this->out->menuItem(common_local_url('pathsadminpanel'), _m('MENU', 'Paths'),
|
||||||
|
$menu_title, $action_name == 'pathsadminpanel', 'nav_design_admin_panel');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AdminPanelAction::canAdmin('sessions')) {
|
if (AdminPanelAction::canAdmin('sessions')) {
|
||||||
$this->out->menuItem(common_local_url('sessionsadminpanel'), _('Sessions'),
|
// TRANS: Menu item title/tooltip
|
||||||
_('Sessions configuration'), $action_name == 'sessionsadminpanel', 'nav_design_admin_panel');
|
$menu_title = _('Sessions configuration');
|
||||||
|
// TRANS: Menu item for site administration
|
||||||
|
$this->out->menuItem(common_local_url('sessionsadminpanel'), _m('MENU', 'Sessions'),
|
||||||
|
$menu_title, $action_name == 'sessionsadminpanel', 'nav_design_admin_panel');
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::handle('EndAdminPanelNav', array($this));
|
Event::handle('EndAdminPanelNav', array($this));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user