mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-30 19:16:39 +00:00
Action::getPageTitle() should return a Message
Bug: T343994 Change-Id: Ice968d8a5651a21260b9389526b4f7694b3deca8
This commit is contained in:
parent
e825084546
commit
19fa706693
|
@ -156,6 +156,7 @@
|
|||
"discussiontools-topicheader-authorcount": "$1 {{PLURAL:$1|person|people}} in discussion",
|
||||
"discussiontools-topicheader-commentcount": "$1 {{PLURAL:$1|comment|comments}}",
|
||||
"discussiontools-topicheader-latestcomment": "Latest comment: $1",
|
||||
"discussiontools-topicsubscription-action-title": "$1{{int:pipe-separator}}$2",
|
||||
"discussiontools-topicsubscription-action-subscribe-button": "Subscribe",
|
||||
"discussiontools-topicsubscription-action-subscribe-prompt": "Subscribe to this topic?",
|
||||
"discussiontools-topicsubscription-action-subscribe-prompt-newtopics": "Subscribe to notifications about new topics on this page?",
|
||||
|
|
|
@ -170,6 +170,7 @@
|
|||
"discussiontools-topicheader-authorcount": "Label showing how many users have commented in a discussion.",
|
||||
"discussiontools-topicheader-commentcount": "Label showing how many comments have been posted in a discussion. for languages without plural counters, just apply <nowiki> {{PLURAL:$1|[''comment''_in_your_language]}}</nowiki>, but never delete the template or it triggers error alert.",
|
||||
"discussiontools-topicheader-latestcomment": "Label showing when the most recent comment was posted in a discussion. Parameters:\n* $1 – When the comment was posted, e.g. '1 hour ago'. This text is a link to the comment.",
|
||||
"discussiontools-topicsubscription-action-title": "Shown as page title when subscribing to or unsubscribing from a topic on a page. Parameters:\n* $1 - title of the page\n* $2 - title of the topic",
|
||||
"discussiontools-topicsubscription-action-subscribe-button": "Button to subscribe to a topic.\n{{identical|Subscribe}}",
|
||||
"discussiontools-topicsubscription-action-subscribe-prompt": "Prompt shown when about to subscribe to a topic on an action page.",
|
||||
"discussiontools-topicsubscription-action-subscribe-prompt-newtopics": "Prompt shown when about to subscribe to notifications about new topics on an action page.",
|
||||
|
|
|
@ -35,9 +35,8 @@ class SubscribeAction extends FormAction {
|
|||
protected function getPageTitle() {
|
||||
if ( $this->subscriptionTitle && !str_starts_with( $this->subscriptionName, 'p-topics-' ) ) {
|
||||
$title = $this->subscriptionTitle;
|
||||
return htmlspecialchars( $title->getPrefixedText() ) .
|
||||
$this->msg( 'pipe-separator' )->escaped() .
|
||||
htmlspecialchars( $title->getFragment() );
|
||||
return $this->msg( 'discussiontools-topicsubscription-action-title' )
|
||||
->plaintextParams( $title->getPrefixedText(), $title->getFragment() );
|
||||
} else {
|
||||
return parent::getPageTitle();
|
||||
}
|
||||
|
|
|
@ -35,9 +35,8 @@ class UnsubscribeAction extends FormAction {
|
|||
protected function getPageTitle() {
|
||||
if ( $this->subscriptionItem && !str_starts_with( $this->subscriptionItem->getItemName(), 'p-topics-' ) ) {
|
||||
$title = Title::newFromLinkTarget( $this->subscriptionItem->getLinkTarget() );
|
||||
return htmlspecialchars( $title->getPrefixedText() ) .
|
||||
$this->msg( 'pipe-separator' )->escaped() .
|
||||
htmlspecialchars( $title->getFragment() );
|
||||
return $this->msg( 'discussiontools-topicsubscription-action-title' )
|
||||
->plaintextParams( $title->getPrefixedText(), $title->getFragment() );
|
||||
} else {
|
||||
return parent::getPageTitle();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue