r91102 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91101‎ | r91102 | r91103 >
Date:20:12, 29 June 2011
Author:robin
Status:deferred (Comments)
Tags:
Comment:
Fix r90876: English when there is documentation, otherwise $wgLang when it shows a message that there is no documentation
Modified paths:
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -796,9 +796,15 @@
797797 if ( $info !== null && $gettext ) $info .= Html::element( 'hr' );
798798 $info .= $gettext;
799799
 800+ // The information is most likely in English
 801+ $divAttribs = array( 'dir' => 'ltr', 'lang' => 'en' );
 802+
800803 if ( strval( $info ) === '' ) {
 804+ global $wgLang;
801805 $info = wfMsg( 'translate-edit-no-information' );
802806 $class = 'mw-sp-translate-edit-noinfo';
 807+ // The message saying that there's no info, should be translated
 808+ $divAttribs = array( 'dir' => $wgLang->getDir(), 'lang' => $wgLang->getCode() );
803809 }
804810 $class .= ' mw-sp-translate-message-documentation';
805811
@@ -808,7 +814,7 @@
809815
810816 return TranslateUtils::fieldset(
811817 wfMsgHtml( 'translate-edit-information', $edit, $page ), Html::rawElement( 'div',
812 - array( 'dir' => 'ltr', 'lang' => 'en' ), $contents ), array( 'class' => $class )
 818+ $divAttribs, $contents ), array( 'class' => $class )
813819 );
814820
815821 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90876Correct alignment depending on the directionality of the language (assuming t...robin14:04, 27 June 2011

Comments

#Comment by Nikerabbit (talk | contribs)   05:29, 30 June 2011

Even this will fail if there is no translation. But it cannot be fixed yet.

Status & tagging log