EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/161479

Change subject: I3: Include board name in topic html title
......................................................................

I3: Include board name in topic html title

Change-Id: I13bec9cdd4ed889ecfd4c6e4757bc7d5c98d2497
---
M i18n/en.json
M i18n/qqq.json
M includes/Block/Topic.php
M includes/Block/TopicSummary.php
4 files changed, 17 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/79/161479/1

diff --git a/i18n/en.json b/i18n/en.json
index 96aba08..95aa1f9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -321,6 +321,7 @@
     "flow-anon-warning": "You are not logged in. To receive attribution with 
your name instead of your IP address, you can [$1 log in] or [$2 create an 
account].",
     "flow-cancel-warning": "You have entered text in this form. Are you sure 
you want to discard it?",
     "flow-topic-first-heading": "Topic on $1",
+    "flow-topic-html-title": "$1 on $2",
     "flow-topic-count-sidebar": "Showing $1 of $2 topics attached to this 
page",
     "flow-topic-count": "Topics ($1)",
     "flow-active-ago": "Active $1",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index d10ee0f..acc49b3 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -322,6 +322,7 @@
        "flow-anon-warning": "Warning message to be displayed when anonymous 
user starts writing a new topic or reply.\n* $1 is a URL to log in.\n* $2 is a 
URL to register an account.",
        "flow-cancel-warning": "Warning message to be displayed when user tries 
to discard the text they have entered in a form field",
        "flow-topic-first-heading": "First heading on any page in the topic 
namespace. Parameters:\n* $1 - the title of the page that is being linked to",
+       "flow-topic-html-title": "Message displayed in the browser title bar 
when visiting a page in the Topic namespace. Parameters:\n* $1 - The title of 
the topic\n* $2 - The page the topic started on",
        "flow-topic-count-sidebar": "Message displayed at the bottom of the 
sidebar showing the number of topics current displayed and the total 
available.",
        "flow-topic-count": "Message displayed at the top of the sidebar 
showing the number of topics loaded on the page\n{{Identical|Topic}}",
        "flow-active-ago": "Message displayed in the topic title bar to 
indicate how long ago the topic was last changed. Parameters:\n* $1 - Humanized 
time ago from CLDR. ex: 17 hours 
ago\n{{Related|Flow-active-ago}}\n{{Identical|Active}}",
diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php
index 1cd71f5..0b784da 100644
--- a/includes/Block/Topic.php
+++ b/includes/Block/Topic.php
@@ -19,6 +19,7 @@
 use Flow\Repository\RootPostLoader;
 use Flow\RevisionActionPermissions;
 use Flow\Templating;
+use Message;
 
 class TopicBlock extends AbstractBlock {
 
@@ -806,7 +807,12 @@
 
                $title = $this->workflow->getOwnerTitle();
                $out->setPageTitle( $out->msg( 'flow-topic-first-heading', 
$title->getPrefixedText() ) );
-               $out->setHtmlTitle( $templating->getContent( $topic, 'wikitext' 
) );
+               $out->setHtmlTitle( $out->msg( 'flow-topic-html-title', array(
+                       // This must be a rawParam to not expand {{foo}} in the 
title, it must
+                       // not be htmlspecialchar'd because 
OutputPage::setHtmlTitle handles that.
+                       Message::rawParam( $templating->getContent( $topic, 
'wikitext' ) ),
+                       $title->getPrefixedText()
+               ) ) );
                $out->setSubtitle( '< ' . \Linker::link( $title ) );
        }
 }
diff --git a/includes/Block/TopicSummary.php b/includes/Block/TopicSummary.php
index 724bde2..6e21944 100644
--- a/includes/Block/TopicSummary.php
+++ b/includes/Block/TopicSummary.php
@@ -13,6 +13,7 @@
 use Flow\Model\PostSummary;
 use Flow\Templating;
 use Flow\RevisionActionPermissions;
+use Message;
 
 class TopicSummaryBlock extends AbstractBlock {
 
@@ -351,7 +352,13 @@
                $topic = $this->findTopicTitle();
                $title = $this->workflow->getOwnerTitle();
                $out->setPageTitle( $out->msg( 'flow-topic-first-heading', 
$title->getPrefixedText() ) );
-               $out->setHtmlTitle( $templating->getContent( $topic, 'wikitext' 
) );
+               $out->setHtmlTitle( $out->msg( 'flow-topic-html-title', array(
+                       // This must be a rawParam to not expand {{foo}} in the 
title, it must
+                       // not be htmlspecialchar'd because 
OutputPage::setHtmlTitle handles that.
+                       Message::rawParam( $templating->getContent( $topic, 
'wikitext' ) ),
+                       $title->getPrefixedText()
+               ) ) );
+
                $out->setSubtitle( '< ' . \Linker::link( $title ) );
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/161479
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13bec9cdd4ed889ecfd4c6e4757bc7d5c98d2497
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to