From 68a3139d0b86a2a716b24a481e677aa5d4699396 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Mon, 2 Feb 2009 01:43:41 +0100 Subject: [PATCH] =?utf8?q?Fix=20#81:=20Profile=20and=20personal=20shows=20?= =?utf8?q?=E2=80=9Eyou=E2=80=9C=20instead=20of=20username=20when=20looking?= =?utf8?q?=20at=20own=20profile=20/=20personal.=20While=20doing=20so=20I?= =?utf8?q?=20fixed=20a=20wrong=20gettext=20usage=20were=20the=20result=20w?= =?utf8?q?as=20not=20sprintf'd,=20but=20concat'd.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- actions/all.php | 11 +++++++++++ actions/showstream.php | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/actions/all.php b/actions/all.php index 428466f243..b03ad7ec36 100644 --- a/actions/all.php +++ b/actions/all.php @@ -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)); + } + } + } diff --git a/actions/showstream.php b/actions/showstream.php index 90ffcacf9a..4b16799697 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -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() -- 2.39.5