From 28ec9d64632a7a43be9144a474432a3c5b8d6b97 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Thu, 21 Oct 2010 01:12:56 +0200 Subject: [PATCH] * translator documentation added. * moved some translator comments that were not directly above the line with the message to the correct location. * i18n for UI text. * superfluous whitespace removed. --- classes/User.php | 4 +++- lib/action.php | 6 +++--- lib/router.php | 8 ++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/classes/User.php b/classes/User.php index c68be223de..f381ec6070 100644 --- a/classes/User.php +++ b/classes/User.php @@ -898,9 +898,11 @@ class User extends Memcached_DataObject if ($user) { return $user; } 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 { + // TRANS: Server exception. throw new ServerException(_('Single-user mode code called when not enabled.')); } } diff --git a/lib/action.php b/lib/action.php index e273b5d040..3d7d1d808a 100644 --- a/lib/action.php +++ b/lib/action.php @@ -527,20 +527,20 @@ class Action extends HTMLOutputter // lawsuit } // TRANS: Tooltip for main menu option "Login" $tooltip = _m('TOOLTIP', 'Login to the site'); - // TRANS: Main menu option when not logged in to log in $this->menuItem(common_local_url('login'), + // TRANS: Main menu option when not logged in to log in _m('MENU', 'Login'), $tooltip, false, 'nav_login'); } // TRANS: Tooltip for main menu option "Help" $tooltip = _m('TOOLTIP', 'Help me!'); - // TRANS: Main menu option for help on the StatusNet site $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'); if ($user || !common_config('site', 'private')) { // TRANS: Tooltip for main menu option "Search" $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'), + // TRANS: Main menu option when logged in or when the StatusNet instance is not private _m('MENU', 'Search'), $tooltip, false, 'nav_search'); } Event::handle('EndPrimaryNav', array($this)); diff --git a/lib/router.php b/lib/router.php index 8c682cefa9..417206e6bf 100644 --- a/lib/router.php +++ b/lib/router.php @@ -34,7 +34,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { require_once 'Net/URL/Mapper.php'; class StatusNet_URL_Mapper extends Net_URL_Mapper { - private static $_singleton = null; 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 * @link http://status.net/ */ - class Router { var $m = null; @@ -692,7 +690,6 @@ class Router $m->connect('admin/snapshot', array('action' => 'snapshotadminpanel')); $m->connect('admin/license', array('action' => 'licenseadminpanel')); - $m->connect('getfile/:filename', array('action' => 'getfile'), array('filename' => '[A-Za-z0-9._-]+')); @@ -757,9 +754,7 @@ class Router $m->connect('', array('action' => 'showstream', 'nickname' => $nickname)); - } else { - $m->connect('', array('action' => 'public')); $m->connect('rss', array('action' => 'publicrss')); $m->connect('featuredrss', array('action' => 'featuredrss')); @@ -840,7 +835,8 @@ class Router } catch (Net_URL_Mapper_InvalidException $e) { common_log(LOG_ERR, "Problem getting route for $path - " . $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(); }