From 52dc9c56d3fa5dc6a488128bab92dc8cd1e8a09e Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 21 Sep 2011 09:03:53 +0000 Subject: [PATCH] Wrap the copyright when its language is not the user's language; avoids problem when direction of the two languages is different --- includes/Skin.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 76a913bf41..a70c568ec2 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -729,7 +729,7 @@ abstract class Skin extends ContextSource { } function getCopyright( $type = 'detect' ) { - global $wgRightsPage, $wgRightsUrl, $wgRightsText; + global $wgRightsPage, $wgRightsUrl, $wgRightsText, $wgContLang; if ( $type == 'detect' ) { if ( !$this->isRevisionCurrent() && wfMsgForContent( 'history_copyright' ) !== '-' ) { @@ -763,7 +763,11 @@ abstract class Skin extends ContextSource { wfRunHooks( 'SkinCopyrightFooter', array( $this->getTitle(), $type, &$msg, &$link, &$forContent ) ); if ( $forContent ) { - return wfMsgForContent( $msg, $link ); + $msg = wfMsgForContent( $msg, $link ); + if ( $this->getLang()->getCode() !== $wgContLang->getCode() ) { + $msg = Html::rawElement( 'span', array( 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ), $msg ); + } + return $msg; } else { return wfMsg( $msg, $link ); } -- 2.20.1