diff options
author | Evan Prodromou <evan@status.net> | 2010-03-13 06:36:25 -0600 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-03-13 06:36:25 -0600 |
commit | c1e96cbdefa66e66815c421378b9452d7c8d5548 (patch) | |
tree | a08e80d705d08ffb33233991bf80e7c19867552a /lib/adminpanelaction.php | |
parent | a2cc26ba8a21aa3614ebfc4a77c0bec9ffb2655d (diff) | |
parent | 9e9ab23e1f936eb62014d8f7b0051f0314ae482c (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'lib/adminpanelaction.php')
-rw-r--r-- | lib/adminpanelaction.php | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/lib/adminpanelaction.php b/lib/adminpanelaction.php index d43ea7698..a927e2333 100644 --- a/lib/adminpanelaction.php +++ b/lib/adminpanelaction.php @@ -69,6 +69,7 @@ class AdminPanelAction extends Action // User must be logged in. if (!common_logged_in()) { + // TRANS: Client error message $this->clientError(_('Not logged in.')); return false; } @@ -93,6 +94,7 @@ class AdminPanelAction extends Action // User must have the right to change admin settings if (!$user->hasRight(Right::CONFIGURESITE)) { + // TRANS: Client error message $this->clientError(_('You cannot make changes to this site.')); return false; } @@ -104,6 +106,7 @@ class AdminPanelAction extends Action $name = mb_substr($name, 0, -10); if (!self::canAdmin($name)) { + // TRANS: Client error message $this->clientError(_('Changes to that panel are not allowed.'), 403); return false; } @@ -134,6 +137,7 @@ class AdminPanelAction extends Action Config::loadSettings(); $this->success = true; + // TRANS: Message after successful saving of administrative settings. $this->msg = _('Settings saved.'); } catch (Exception $e) { $this->success = false; @@ -221,6 +225,7 @@ class AdminPanelAction extends Action function showForm() { + // TRANS: Client error message $this->clientError(_('showForm() not implemented.')); return; } @@ -250,6 +255,7 @@ class AdminPanelAction extends Action function saveSettings() { + // TRANS: Client error message $this->clientError(_('saveSettings() not implemented.')); return; } @@ -273,6 +279,7 @@ class AdminPanelAction extends Action $result = $config->delete(); if (!$result) { common_log_db_error($config, 'DELETE', __FILE__); + // TRANS: Client error message $this->clientError(_("Unable to delete design setting.")); return null; } @@ -337,43 +344,67 @@ class AdminPanelNav extends Widget if (Event::handle('StartAdminPanelNav', array($this))) { if (AdminPanelAction::canAdmin('site')) { - $this->out->menuItem(common_local_url('siteadminpanel'), _('Site'), - _('Basic site configuration'), $action_name == 'siteadminpanel', 'nav_site_admin_panel'); + // TRANS: Menu item title/tooltip + $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')) { - $this->out->menuItem(common_local_url('designadminpanel'), _('Design'), - _('Design configuration'), $action_name == 'designadminpanel', 'nav_design_admin_panel'); + // TRANS: Menu item title/tooltip + $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')) { + // TRANS: Menu item title/tooltip + $menu_title = _('User configuration'); + // TRANS: Menu item for site administration $this->out->menuItem(common_local_url('useradminpanel'), _('User'), - _('User configuration'), $action_name == 'useradminpanel', 'nav_user_admin_panel'); + $menu_title, $action_name == 'useradminpanel', 'nav_user_admin_panel'); } if (AdminPanelAction::canAdmin('access')) { + // TRANS: Menu item title/tooltip + $menu_title = _('Access configuration'); + // TRANS: Menu item for site administration $this->out->menuItem(common_local_url('accessadminpanel'), _('Access'), - _('Access configuration'), $action_name == 'accessadminpanel', 'nav_access_admin_panel'); + $menu_title, $action_name == 'accessadminpanel', 'nav_access_admin_panel'); } if (AdminPanelAction::canAdmin('paths')) { + // TRANS: Menu item title/tooltip + $menu_title = _('Paths configuration'); + // TRANS: Menu item for site administration $this->out->menuItem(common_local_url('pathsadminpanel'), _('Paths'), - _('Paths configuration'), $action_name == 'pathsadminpanel', 'nav_paths_admin_panel'); + $menu_title, $action_name == 'pathsadminpanel', 'nav_paths_admin_panel'); } if (AdminPanelAction::canAdmin('sessions')) { + // TRANS: Menu item title/tooltip + $menu_title = _('Sessions configuration'); + // TRANS: Menu item for site administration $this->out->menuItem(common_local_url('sessionsadminpanel'), _('Sessions'), - _('Sessions configuration'), $action_name == 'sessionsadminpanel', 'nav_sessions_admin_panel'); + $menu_title, $action_name == 'sessionsadminpanel', 'nav_sessions_admin_panel'); } if (AdminPanelAction::canAdmin('sitenotice')) { + // TRANS: Menu item title/tooltip + $menu_title = _('Edit site notice'); + // TRANS: Menu item for site administration $this->out->menuItem(common_local_url('sitenoticeadminpanel'), _('Site notice'), - _('Edit site notice'), $action_name == 'sitenoticeadminpanel', 'nav_sitenotice_admin_panel'); + $menu_title, $action_name == 'sitenoticeadminpanel', 'nav_sitenotice_admin_panel'); } if (AdminPanelAction::canAdmin('snapshot')) { + // TRANS: Menu item title/tooltip + $menu_title = _('Snapshots configuration'); + // TRANS: Menu item for site administration $this->out->menuItem(common_local_url('snapshotadminpanel'), _('Snapshots'), - _('Snapshots configuration'), $action_name == 'snapshotadminpanel', 'nav_snapshot_admin_panel'); + $menu_title, $action_name == 'snapshotadminpanel', 'nav_snapshot_admin_panel'); } Event::handle('EndAdminPanelNav', array($this)); |