Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/53398
Change subject: (bug 46031) scribunto-doc-subpage-name needs to be in the
content language
......................................................................
(bug 46031) scribunto-doc-subpage-name needs to be in the content language
Bug: 46031
Change-Id: I6e3c2c244f85258838774491d3bcc6ebd6a2c8c3
---
M common/Common.php
M common/Hooks.php
2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto
refs/changes/98/53398/1
diff --git a/common/Common.php b/common/Common.php
index 4b7e5ac..880be32 100644
--- a/common/Common.php
+++ b/common/Common.php
@@ -73,7 +73,7 @@
* @return boolean
*/
public static function isDocSubpage( $title ) {
- $docSubpage = wfMessage( 'scribunto-doc-subpage-name' );
+ $docSubpage = wfMessage( 'scribunto-doc-subpage-name'
)->inContentLanguage();
if ( $docSubpage->isDisabled() ) {
return false;
}
@@ -88,7 +88,7 @@
* @return Title|null
*/
public static function getDocSubpage( $title ) {
- $docSubpage = wfMessage( 'scribunto-doc-subpage-name' );
+ $docSubpage = wfMessage( 'scribunto-doc-subpage-name'
)->inContentLanguage();
if ( $docSubpage->isDisabled() ) {
return null;
}
diff --git a/common/Hooks.php b/common/Hooks.php
index c5eb761..0d2a22c 100644
--- a/common/Hooks.php
+++ b/common/Hooks.php
@@ -332,7 +332,7 @@
$title = $article->getTitle();
if( $title->getNamespace() === NS_MODULE &&
Scribunto::isDocSubpage( $title ) ) {
- $docSubpage = wfMessage( 'scribunto-doc-subpage-name'
)->plain();
+ $docSubpage = wfMessage( 'scribunto-doc-subpage-name'
)->inContentLanguage()->plain();
$title = substr( $title, 0, -strlen( $docSubpage ) - 1
);
$wgOut->addHTML(
wfMessage( 'scribunto-doc-subpage-header',
$title )->parseAsBlock()
--
To view, visit https://gerrit.wikimedia.org/r/53398
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e3c2c244f85258838774491d3bcc6ebd6a2c8c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits