Commit 68a3139d authored by Adrian Lang's avatar Adrian Lang Committed by Evan Prodromou

Fix #81: Profile and personal shows „you“ instead of username when looking at...

Fix #81: Profile and personal shows „you“ instead of username when looking at own profile / personal. While doing so I fixed a wrong gettext usage were the result was not sprintf'd, but concat'd.
parent 43feee78
......@@ -101,4 +101,15 @@ class AllAction extends Action
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
$this->page, 'all', array('nickname' => $this->user->nickname));
}
function showPageTitle()
{
$user =& common_current_user();
if ($user && ($user->id == $this->user->id)) {
$this->element('h1', NULL, _("You and friends"));
} else {
$this->element('h1', NULL, sprintf(_('%s and friends'), $this->user->nickname));
}
}
}
......@@ -140,7 +140,12 @@ class ShowstreamAction extends Action
function showPageTitle()
{
$this->element('h1', NULL, $this->profile->nickname._("'s profile"));
$user =& common_current_user();
if ($user && ($user->id == $this->profile->id)) {
$this->element('h1', NULL, _("Your profile"));
} else {
$this->element('h1', NULL, sprintf(_('%s\'s profile'), $this->profile->nickname));
}
}
function showPageNoticeBlock()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment