From 87b494f1ebbe7640d194ef322af12fdf378295df Mon Sep 17 00:00:00 2001 From: Mike Cochrane Date: Tue, 8 Jul 2008 05:45:31 -0400 Subject: Convert _t() to _() for gettext. darcs-hash:20080708094531-533db-83399a46e6ec4c0fcc6249b0235961f969d1ae73.gz --- lib/settingsaction.php | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) (limited to 'lib/settingsaction.php') diff --git a/lib/settingsaction.php b/lib/settingsaction.php index 1fbf88ecb..22be36720 100644 --- a/lib/settingsaction.php +++ b/lib/settingsaction.php @@ -24,7 +24,7 @@ class SettingsAction extends Action { function handle($args) { parent::handle($args); if (!common_logged_in()) { - common_user_error(_t('Not logged in.')); + common_user_error(_('Not logged in.')); return; } else if (!common_is_real_login()) { # Cookie theft means that automatic logins can't @@ -80,21 +80,30 @@ class SettingsAction extends Action { function settings_menu() { # action => array('prompt', 'title') static $menu = - array('profilesettings' => - array('Profile', - 'Change your profile settings'), - 'avatar' => - array('Avatar', - 'Upload a new profile image'), - 'password' => - array('Password', - 'Change your password'), - 'openidsettings' => - array('OpenID', - 'Add or remove OpenIDs'), - 'imsettings' => - array('IM', - 'Updates by instant messenger (IM)')); - $this->nav_menu($menu); + array('profilesettings' => + array('Profile', + 'Change your profile settings'), + 'avatar' => + array('Avatar', + 'Upload a new profile image'), + 'password' => + array('Password', + 'Change your password'), + 'openidsettings' => + array('OpenID', + 'Add or remove OpenIDs'), + 'imsettings' => + array('IM', + 'Updates by instant messenger (IM)')); + + $action = $this->trimmed('action'); + common_element_start('ul', array('id' => 'nav_views')); + foreach ($menu as $menuaction => $menudesc) { + common_menu_item(common_local_url($menuaction), + _t($menudesc[0]), + _t($menudesc[1]), + $action == $menuaction); + } + common_element_end('ul'); } } -- cgit v1.2.3-54-g00ecf