From 7e38142d4aa080767617724a98c0cf60c70961d0 Mon Sep 17 00:00:00 2001 From: Mike Cochrane Date: Thu, 10 Jul 2008 00:51:26 -0400 Subject: [PATCH] Resolve conflicts and convert _t( to _( where it was introduced again. darcs-hash:20080710045126-533db-ffd9bcfe1295b3a376579ed7cd2278d5597b1884.gz --- actions/login.php | 2 +- actions/register.php | 2 +- actions/showstream.php | 14 +++++++++++--- classes/Notice.php | 7 ++++--- classes/Profile.php | 12 ++++++------ classes/Reply.php | 4 ++-- lib/settingsaction.php | 4 ++-- lib/stream.php | 4 ++-- lib/util.php | 3 ++- 9 files changed, 31 insertions(+), 21 deletions(-) diff --git a/actions/login.php b/actions/login.php index 649f7ec9a4..d84a0b8cb9 100644 --- a/actions/login.php +++ b/actions/login.php @@ -66,7 +66,7 @@ class LoginAction extends Action { # success! if (!common_set_user($user)) { - common_server_error(_t('Error setting user.')); + common_server_error(_('Error setting user.')); return; } diff --git a/actions/register.php b/actions/register.php index 45446dce6a..37e787c9d0 100644 --- a/actions/register.php +++ b/actions/register.php @@ -66,7 +66,7 @@ class RegisterAction extends Action { } else { $user = $this->register_user($nickname, $password, $email); if (!$user) { - $this->show_form(_t('Invalid username or password.')); + $this->show_form(_('Invalid username or password.')); return; } # success! diff --git a/actions/showstream.php b/actions/showstream.php index 2a2d9d3b4d..b70c0b994c 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -337,7 +337,7 @@ class ShowstreamAction extends StreamAction { common_element('h2', NULL, _('Currently')); $notice = $profile->getCurrentNotice(); - + if ($notice) { # FIXME: URL, image, video, audio common_element_start('p', array('class' => 'notice_current')); @@ -375,11 +375,19 @@ class ShowstreamAction extends StreamAction { 'href' => $noticeurl, 'title' => common_exact_date($notice->created)), common_date_string($notice->created)); - common_element_start('a', + if ($notice->reply_to) { + $replyurl = common_local_url('shownotice', array('notice' => $notice->reply_to)); + common_text(' ('); + common_element('a', array('class' => 'inreplyto', + 'href' => $replyurl), + _('in reply to...')); + common_text(')'); + } + common_element_start('a', array('href' => common_local_url('newnotice', array('replyto' => $profile->nickname)), 'onclick' => 'doreply("'.$profile->nickname.'"); return false', - 'title' => _t('reply'), + 'title' => _('reply'), 'class' => 'replybutton')); common_raw('→'); common_element_end('a'); diff --git a/classes/Notice.php b/classes/Notice.php index 5a500a3aa7..0ea9763cba 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -33,11 +33,12 @@ class Notice extends DB_DataObject public $id; // int(4) primary_key not_null public $profile_id; // int(4) not_null public $uri; // varchar(255) unique_key - public $content; // varchar(140) - public $url; // varchar(255) + public $content; // varchar(140) + public $rendered; // text() + public $url; // varchar(255) public $created; // datetime() not_null public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP - public $reply_to; // int(4) + public $reply_to; // int(4) /* Static get */ function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Notice',$k,$v); } diff --git a/classes/Profile.php b/classes/Profile.php index 827339a602..dba7ca8a50 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -31,12 +31,12 @@ class Profile extends DB_DataObject public $__table = 'profile'; // table name public $id; // int(4) primary_key not_null - public $nickname; // varchar(64) not_null - public $fullname; // varchar(255) - public $profileurl; // varchar(255) - public $homepage; // varchar(255) - public $bio; // varchar(140) - public $location; // varchar(255) + public $nickname; // varchar(64) multiple_key not_null + public $fullname; // varchar(255) multiple_key + public $profileurl; // varchar(255) + public $homepage; // varchar(255) multiple_key + public $bio; // varchar(140) multiple_key + public $location; // varchar(255) multiple_key public $created; // datetime() not_null public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP diff --git a/classes/Reply.php b/classes/Reply.php index 507782391b..af8f0b098c 100644 --- a/classes/Reply.php +++ b/classes/Reply.php @@ -12,9 +12,9 @@ class Reply extends DB_DataObject public $__table = 'reply'; // table name public $notice_id; // int(4) primary_key not_null public $profile_id; // int(4) primary_key not_null - public $replied_id; // int(4) + public $replied_id; // int(4) public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP - public $replied_id; // int(4) + public $replied_id; // int(4) /* Static get */ function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Reply',$k,$v); } diff --git a/lib/settingsaction.php b/lib/settingsaction.php index 22be367209..fe0f48a7a2 100644 --- a/lib/settingsaction.php +++ b/lib/settingsaction.php @@ -100,8 +100,8 @@ class SettingsAction extends 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]), + _($menudesc[0]), + _($menudesc[1]), $action == $menuaction); } common_element_end('ul'); diff --git a/lib/stream.php b/lib/stream.php index d6180f4edd..ad65e2d2a2 100644 --- a/lib/stream.php +++ b/lib/stream.php @@ -98,14 +98,14 @@ class StreamAction extends Action { common_text(' ('); common_element('a', array('class' => 'inreplyto', 'href' => $replyurl), - _t(' in reply to...')); + _('in reply to...')); common_text(')'); } common_element_start('a', array('href' => common_local_url('newnotice', array('replyto' => $profile->nickname)), 'onclick' => 'doreply("'.$profile->nickname.'"); return false', - 'title' => _t('reply'), + 'title' => _('reply'), 'class' => 'replybutton')); common_raw('→'); common_element_end('a'); diff --git a/lib/util.php b/lib/util.php index 1af5d11770..1d661fb4e8 100644 --- a/lib/util.php +++ b/lib/util.php @@ -277,7 +277,8 @@ function common_nav_menu() { common_menu_item(common_local_url('all', array('nickname' => $user->nickname)), _('Home')); } - common_menu_item(common_local_url('public'), _t('Public')); + common_menu_item(common_local_url('public'), _('Public')); + common_menu_item(common_local_url('peoplesearch'), _('Search')); common_menu_item(common_local_url('doc', array('title' => 'help')), _('Help')); if ($user) {