Start to improve HTMLDiff.php localization. For the time being, I recommend that...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 21 Aug 2008 22:16:44 +0000 (22:16 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 21 Aug 2008 22:16:44 +0000 (22:16 +0000)
includes/HTMLDiff.php
languages/messages/MessagesEn.php

index ef9e0aa..ec076b9 100644 (file)
@@ -1215,7 +1215,7 @@ class TagToString {
                        $tagDescription = $this->node->qName;
                }
                if ($this->sem == TagToStringFactory::MOVED) {
-                       $txt->addHtml( wfMsgExt( 'diff-movedoutof' , 'parseinline' ) . ' ' . $tagDescription );
+                       $txt->addHtml( wfMsgExt( 'diff-movedoutof', 'parseinline', $tagDescription ) );
                } else if ($this->sem == TagToStringFactory::STYLE) {
                        $txt->addHtml($tagDescription . ' ' . wfMsgExt( 'diff-styleremoved' , 'parseinline' ) );
                } else {
@@ -1231,11 +1231,11 @@ class TagToString {
                        $tagDescription = $this->node->qName;
                }
                if ($this->sem == TagToStringFactory::MOVED) {
-                       $txt->addHtml( wfMsgExt( 'diff-movedto' , 'parseinline' ) . ' ' . $tagDescription);
+                       $txt->addHtml( wfMsgExt( 'diff-movedto' , 'parseinline', $tagDescription) );
                } else if ($this->sem == TagToStringFactory::STYLE) {
-                       $txt->addHtml($tagDescription . ' ' . wfMsgExt( 'diff-styleadded', 'parseinline'  ) );
+                       $txt->addHtml($tagDescription . ' ' . wfMsgExt( 'diff-styleadded', 'parseinline' ) );
                } else {
-                       $txt->addHtml($tagDescription . ' ' . wfMsgExt( 'diff-added', 'parseinline'  ) );
+                       $txt->addHtml($tagDescription . ' ' . wfMsgExt( 'diff-added', 'parseinline' ) );
                }
                $this->addAttributes($txt, $this->node->attributes);
                $txt->addHtml('.');
@@ -1253,16 +1253,19 @@ class TagToString {
                        $attr = $attributes[$key];
                        if($firstOne) {
                                $firstOne = false;
-                               $txt->addHtml(' ' . wfMsgExt('diff-with', 'parseinline' ) . ' ' . $this->translateArgument($key) . ' '
-                               . htmlspecialchars($attr));
+                               $txt->addHtml( wfMsgExt('diff-with', 'escapenoentities', $this->translateArgument($key), htmlspecialchars($attr) ) );
                                continue;
                        }
-                       $txt->addHtml(', ' . $this->translateArgument($key) . ' ' . htmlspecialchars($attr));
+                       $txt->addHtml( wfMsgExt( 'comma-separator', 'escapenoentities' ) .
+                               wfMsgExt( 'diff-with-additional', 'escapenoentities',
+                               $this->translateArgument( $key ), htmlspecialchars( $attr ) )
+                       );
                }
 
                if ($nbAttributes_min_1 > 0) {
-                       $txt->addHtml(' ' . wfMsgExt('diff-and', 'parseinline' ) . ' ' . $this->translateArgument($keys[$nbAttributes_min_1]) . ' '
-                       . htmlspecialchars($attributes[$keys[$nbAttributes_min_1]]));
+                       $txt->addHtml( wfMsgExt( 'diff-with-final', 'escapenoentities',
+                       $this->translateArgument($keys[$nbAttributes_min_1]),
+                       htmlspecialchars($attributes[$keys[$nbAttributes_min_1]]) ) );
                }
        }
 
index 12cd590..90989db 100644 (file)
@@ -1331,18 +1331,19 @@ Note that using the navigation links will reset this column.',
 'wikicodecomparison'      => 'Wikitext comparison',
 'editundo'                => 'undo',
 'diff-multi'              => '({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} not shown.)',
-'diff-movedto'            => 'moved to',
+'diff-movedto'            => 'moved to $1',
 'diff-styleadded'         => 'style added',
 'diff-added'              => 'added',
 'diff-changedto'          => 'changed to',
-'diff-movedoutof'         => 'moved out of',
+'diff-movedoutof'         => 'moved out of $1',
 'diff-styleremoved'       => 'style removed',
 'diff-removed'            => 'removed',
 'diff-changedfrom'        => 'changed from',
 'diff-src'                => 'source',
 'diff-withdestination'    => 'with destination',
-'diff-and'                => 'and',
-'diff-with'               => 'with',
+'diff-with'               => '&#32;with $1 $2',
+'diff-with-additional'    => '$1 $2',
+'diff-with-final'         => '&#32;and $1 $2',
 'diff-width'              => 'width',
 'diff-height'             => 'height',
 'diff-p'                  => "a '''paragraph'''",