mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 08:14:09 +00:00
(bug 46031) scribunto-doc-subpage-name needs to be in the content language
Bug: 46031 Change-Id: I6e3c2c244f85258838774491d3bcc6ebd6a2c8c3
This commit is contained in:
parent
b6ea64f132
commit
7617f25a8b
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue