i18n: Make LogEventsList user language direction aware
authorEbrahim Byagowi <ebrahim@gnu.org>
Thu, 19 Dec 2013 14:20:24 +0000 (14:20 +0000)
committerEbrahim Byagowi <ebrahim@gnu.org>
Thu, 19 Dec 2013 18:08:19 +0000 (18:08 +0000)
Bug: 58685
Change-Id: I9627689febb296dfeed588a52bfd30d8a9a46cda

includes/logging/LogEventsList.php

index c069fdb..ead418d 100644 (file)
@@ -561,7 +561,14 @@ class LogEventsList extends ContextSource {
 
                if ( $logBody ) {
                        if ( $msgKey[0] ) {
-                               $s = '<div class="mw-warning-with-logexcerpt">';
+                               $dir = $context->getLanguage()->getDir();
+                               $lang = $context->getLanguage()->getCode();
+
+                               $s = Xml::openElement( 'div', array(
+                                       'class' => "mw-warning-with-logexcerpt mw-content-$dir",
+                                       'dir' => $dir,
+                                       'lang' => $lang,
+                               ) );
 
                                if ( count( $msgKey ) == 1 ) {
                                        $s .= $context->msg( $msgKey[0] )->parseAsBlock();