r95704 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95703‎ | r95704 | r95705 >
Date:21:41, 29 August 2011
Author:robin
Status:ok
Tags:
Comment:
Add a 'lang' attribute to the AJAX translation edit box, besides the 'dir' attribute.
Modified paths:
  • /trunk/extensions/Translate/utils/TranslationEditPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationEditPage.php
@@ -80,13 +80,15 @@
8181 }
8282
8383 $translation = $helpers->getTranslation();
 84+ $targetLang = Language::factory( $helpers->getTargetLanguage() );
8485 $textareaParams = array(
8586 'name' => 'text',
8687 'class' => 'mw-translate-edit-area',
8788 'id' => $id,
8889 /* Target language might differ from interface language. Set
8990 * a suitable default direction */
90 - 'dir' => Language::factory( $helpers->getTargetLanguage() )->getDir(),
 91+ 'lang' => $targetLang->getCode(),
 92+ 'dir' => $targetLang->getDir(),
9193 );
9294 $textarea = Html::element( 'textarea', $textareaParams, $translation );
9395

Status & tagging log