http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69049

Revision: 69049
Author:   nikerabbit
Date:     2010-07-05 09:42:00 +0000 (Mon, 05 Jul 2010)

Log Message:
-----------
Added insertion arrow for "in other languages" too

Modified Paths:
--------------
    trunk/extensions/Translate/utils/TranslationHelpers.php

Modified: trunk/extensions/Translate/utils/TranslationHelpers.php
===================================================================
--- trunk/extensions/Translate/utils/TranslationHelpers.php     2010-07-05 
09:14:29 UTC (rev 69048)
+++ trunk/extensions/Translate/utils/TranslationHelpers.php     2010-07-05 
09:42:00 UTC (rev 69049)
@@ -531,7 +531,7 @@
                        TranslateUtils::convertWhiteSpaceToHTML( $en )
                );
 
-               $msg .= Html::element( 'pre', array( 'id' => $id, 'style' => 
'display: none;' ), $en );
+               $msg .= $this->wrapInsert( $id, $en );
 
                $class = array( 'class' => 'mw-sp-translate-edit-definition 
mw-translate-edit-definition' );
 
@@ -608,9 +608,16 @@
                                $label = self::ajaxEditLink( $target, 
htmlspecialchars( $label ) );
                        }
 
-                       $text = TranslateUtils::convertWhiteSpaceToHTML( $text 
);
+                       $dialogID = $this->dialogID();
+                       $id = Sanitizer::escapeId( "other-$fbcode-$dialogID" );
+
                        $params = array( 'class' => 'mw-translate-edit-item' );
-                       $boxes[] = Html::rawElement( 'div', $params, 
self::legend( $label ) . $text . self::clear() );
+
+                       $contents = $this->adder( $id ) . "\n" . self::legend( 
$label ) .
+                               TranslateUtils::convertWhiteSpaceToHTML( $text 
) . self::clear();
+
+                       $boxes[] = Html::rawElement( 'div', $params, $contents 
) .
+                               $this->wrapInsert( $id, $text );
                }
 
                if ( count( $boxes ) ) {
@@ -883,6 +890,10 @@
                        return Html::element( 'a', $params, '↓' );
        }
 
+       public function wrapInsert( $id, $text ) {
+               return Html::element( 'pre', array( 'id' => $id, 'style' => 
'display: none;' ), $text );
+       }
+
        public function suggestionField( $text ) {
                static $counter = 0;
 
@@ -890,7 +901,7 @@
                $dialogID = $this->dialogID();
                $id = Sanitizer::escapeId( "tmsug-$dialogID-$counter" );
                $contents = TranslateUtils::convertWhiteSpaceToHTML( $text );
-               $contents .= Html::element( 'pre', array( 'id' => $id, 'style' 
=> 'display: none;' ), $text );
+               $contents .= $this->wrapInsert( $id, $text );
 
                return $this->adder( $id ) . "\n" . $contents;
        }



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to