diff --git a/common/Common.php b/common/Common.php index 4b7e5acb..880be329 100644 --- a/common/Common.php +++ b/common/Common.php @@ -73,7 +73,7 @@ class Scribunto { * @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 @@ class Scribunto { * @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 c5eb761b..0d2a22c5 100644 --- a/common/Hooks.php +++ b/common/Hooks.php @@ -332,7 +332,7 @@ WIKI; $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()