Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x

This commit is contained in:
Brion Vibber 2010-10-20 16:18:48 -07:00
commit bd7c8825ce
3 changed files with 8 additions and 10 deletions

View File

@ -898,9 +898,11 @@ class User extends Memcached_DataObject
if ($user) { if ($user) {
return $user; return $user;
} else { } else {
throw new ServerException(_("No single user defined for single-user mode.")); // TRANS: Server exception.
throw new ServerException(_('No single user defined for single-user mode.'));
} }
} else { } else {
// TRANS: Server exception.
throw new ServerException(_('Single-user mode code called when not enabled.')); throw new ServerException(_('Single-user mode code called when not enabled.'));
} }
} }

View File

@ -527,20 +527,20 @@ class Action extends HTMLOutputter // lawsuit
} }
// TRANS: Tooltip for main menu option "Login" // TRANS: Tooltip for main menu option "Login"
$tooltip = _m('TOOLTIP', 'Login to the site'); $tooltip = _m('TOOLTIP', 'Login to the site');
// TRANS: Main menu option when not logged in to log in
$this->menuItem(common_local_url('login'), $this->menuItem(common_local_url('login'),
// TRANS: Main menu option when not logged in to log in
_m('MENU', 'Login'), $tooltip, false, 'nav_login'); _m('MENU', 'Login'), $tooltip, false, 'nav_login');
} }
// TRANS: Tooltip for main menu option "Help" // TRANS: Tooltip for main menu option "Help"
$tooltip = _m('TOOLTIP', 'Help me!'); $tooltip = _m('TOOLTIP', 'Help me!');
// TRANS: Main menu option for help on the StatusNet site
$this->menuItem(common_local_url('doc', array('title' => 'help')), $this->menuItem(common_local_url('doc', array('title' => 'help')),
// TRANS: Main menu option for help on the StatusNet site
_m('MENU', 'Help'), $tooltip, false, 'nav_help'); _m('MENU', 'Help'), $tooltip, false, 'nav_help');
if ($user || !common_config('site', 'private')) { if ($user || !common_config('site', 'private')) {
// TRANS: Tooltip for main menu option "Search" // TRANS: Tooltip for main menu option "Search"
$tooltip = _m('TOOLTIP', 'Search for people or text'); $tooltip = _m('TOOLTIP', 'Search for people or text');
// TRANS: Main menu option when logged in or when the StatusNet instance is not private
$this->menuItem(common_local_url('peoplesearch'), $this->menuItem(common_local_url('peoplesearch'),
// TRANS: Main menu option when logged in or when the StatusNet instance is not private
_m('MENU', 'Search'), $tooltip, false, 'nav_search'); _m('MENU', 'Search'), $tooltip, false, 'nav_search');
} }
Event::handle('EndPrimaryNav', array($this)); Event::handle('EndPrimaryNav', array($this));

View File

@ -34,7 +34,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
require_once 'Net/URL/Mapper.php'; require_once 'Net/URL/Mapper.php';
class StatusNet_URL_Mapper extends Net_URL_Mapper { class StatusNet_URL_Mapper extends Net_URL_Mapper {
private static $_singleton = null; private static $_singleton = null;
private function __construct() private function __construct()
@ -71,7 +70,6 @@ class StatusNet_URL_Mapper extends Net_URL_Mapper {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class Router class Router
{ {
var $m = null; var $m = null;
@ -692,7 +690,6 @@ class Router
$m->connect('admin/snapshot', array('action' => 'snapshotadminpanel')); $m->connect('admin/snapshot', array('action' => 'snapshotadminpanel'));
$m->connect('admin/license', array('action' => 'licenseadminpanel')); $m->connect('admin/license', array('action' => 'licenseadminpanel'));
$m->connect('getfile/:filename', $m->connect('getfile/:filename',
array('action' => 'getfile'), array('action' => 'getfile'),
array('filename' => '[A-Za-z0-9._-]+')); array('filename' => '[A-Za-z0-9._-]+'));
@ -757,9 +754,7 @@ class Router
$m->connect('', $m->connect('',
array('action' => 'showstream', array('action' => 'showstream',
'nickname' => $nickname)); 'nickname' => $nickname));
} else { } else {
$m->connect('', array('action' => 'public')); $m->connect('', array('action' => 'public'));
$m->connect('rss', array('action' => 'publicrss')); $m->connect('rss', array('action' => 'publicrss'));
$m->connect('featuredrss', array('action' => 'featuredrss')); $m->connect('featuredrss', array('action' => 'featuredrss'));
@ -840,7 +835,8 @@ class Router
} catch (Net_URL_Mapper_InvalidException $e) { } catch (Net_URL_Mapper_InvalidException $e) {
common_log(LOG_ERR, "Problem getting route for $path - " . common_log(LOG_ERR, "Problem getting route for $path - " .
$e->getMessage()); $e->getMessage());
$cac = new ClientErrorAction("Page not found.", 404); // TRANS: Client error on action trying to visit a non-existing page.
$cac = new ClientErrorAction(_('Page not found.'), 404);
$cac->showPage(); $cac->showPage();
} }