(bug 46031) scribunto-doc-subpage-name needs to be in the content language

Bug: 46031
Change-Id: I6e3c2c244f85258838774491d3bcc6ebd6a2c8c3
This commit is contained in:
Brad Jorsch 2013-03-12 14:18:28 -04:00
parent b6ea64f132
commit 7617f25a8b
2 changed files with 3 additions and 3 deletions

View file

@ -73,7 +73,7 @@ class Scribunto {
* @return boolean * @return boolean
*/ */
public static function isDocSubpage( $title ) { public static function isDocSubpage( $title ) {
$docSubpage = wfMessage( 'scribunto-doc-subpage-name' ); $docSubpage = wfMessage( 'scribunto-doc-subpage-name' )->inContentLanguage();
if ( $docSubpage->isDisabled() ) { if ( $docSubpage->isDisabled() ) {
return false; return false;
} }
@ -88,7 +88,7 @@ class Scribunto {
* @return Title|null * @return Title|null
*/ */
public static function getDocSubpage( $title ) { public static function getDocSubpage( $title ) {
$docSubpage = wfMessage( 'scribunto-doc-subpage-name' ); $docSubpage = wfMessage( 'scribunto-doc-subpage-name' )->inContentLanguage();
if ( $docSubpage->isDisabled() ) { if ( $docSubpage->isDisabled() ) {
return null; return null;
} }

View file

@ -332,7 +332,7 @@ WIKI;
$title = $article->getTitle(); $title = $article->getTitle();
if( $title->getNamespace() === NS_MODULE && Scribunto::isDocSubpage( $title ) ) { 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 ); $title = substr( $title, 0, -strlen( $docSubpage ) - 1 );
$wgOut->addHTML( $wgOut->addHTML(
wfMessage( 'scribunto-doc-subpage-header', $title )->parseAsBlock() wfMessage( 'scribunto-doc-subpage-header', $title )->parseAsBlock()