From e9aa9ddfc3b3f18206f62f57f24af85f7aaa292e Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sat, 13 Sep 2008 06:50:56 +0000 Subject: [PATCH] Clean up some of the i18n stuff in HTMLDiff. Still not perfect, but better. --- includes/diff/HTMLDiff.php | 14 +++++++------- languages/messages/MessagesEn.php | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/includes/diff/HTMLDiff.php b/includes/diff/HTMLDiff.php index 8a162c1d36..8af4a27df9 100644 --- a/includes/diff/HTMLDiff.php +++ b/includes/diff/HTMLDiff.php @@ -772,9 +772,9 @@ class TagToString { if ($this->sem == TagToStringFactory::MOVED) { $txt->addHtml( wfMsgExt( 'diff-movedoutof', 'parseinline', $tagDescription ) ); } else if ($this->sem == TagToStringFactory::STYLE) { - $txt->addHtml($tagDescription . ' ' . wfMsgExt( 'diff-styleremoved' , 'parseinline' ) ); + $txt->addHtml( wfMsgExt( 'diff-styleremoved' , 'parseinline', $tagDescription ) ); } else { - $txt->addHtml($tagDescription . ' ' . wfMsgExt( 'diff-removed' , 'parseinline' ) ); + $txt->addHtml( wfMsgExt( 'diff-removed' , 'parseinline', $tagDescription ) ); } $this->addAttributes($txt, $this->node->attributes); $txt->addHtml('.'); @@ -788,9 +788,9 @@ class TagToString { if ($this->sem == TagToStringFactory::MOVED) { $txt->addHtml( wfMsgExt( 'diff-movedto' , 'parseinline', $tagDescription) ); } else if ($this->sem == TagToStringFactory::STYLE) { - $txt->addHtml($tagDescription . ' ' . wfMsgExt( 'diff-styleadded', 'parseinline' ) ); + $txt->addHtml( wfMsgExt( 'diff-styleadded', 'parseinline', $tagDescription ) ); } else { - $txt->addHtml($tagDescription . ' ' . wfMsgExt( 'diff-added', 'parseinline' ) ); + $txt->addHtml( wfMsgExt( 'diff-added', 'parseinline', $tagDescription ) ); } $this->addAttributes($txt, $this->node->attributes); $txt->addHtml('.'); @@ -844,13 +844,13 @@ class NoContentTagToString extends TagToString { if( wfEmptyMsg( 'diff-' . $this->node->qName, $tagDescription ) ){ $tagDescription = "<" . $this->node->qName . ">"; } - $txt->addHtml( wfMsgExt('diff-changedto', 'parseinline' ) . ' ' . $tagDescription); + $txt->addHtml( wfMsgExt('diff-changedto', 'parseinline', $tagDescription ) ); $this->addAttributes($txt, $this->node->attributes); $txt->addHtml('.'); } public function getRemovedDescription(ChangeText $txt) { - $txt->addHtml( wfMsgExt('diff-changedfrom', 'parseinline' ) . ' ' . $tagDescription); + $txt->addHtml( wfMsgExt('diff-changedfrom', 'parseinline', $tagDescription ) ); $this->addAttributes($txt, $this->node->attributes); $txt->addHtml('.'); } @@ -864,7 +864,7 @@ class AnchorToString extends TagToString { protected function addAttributes(ChangeText $txt, array $attributes) { if (array_key_exists('href', $attributes)) { - $txt->addHtml(' ' . wfMsgExt( 'diff-withdestination', 'parseinline' ) . ' ' . htmlspecialchars($attributes['href'])); + $txt->addHtml(' ' . wfMsgExt( 'diff-withdestination', 'parseinline', htmlspecialchars($attributes['href']) ) ); unset($attributes['href']); } parent::addAttributes($txt, $attributes); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index edc5a9bb34..e5426e69cf 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1344,15 +1344,15 @@ Note that using the navigation links will reset this column.', 'editundo' => 'undo', 'diff-multi' => '({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} not shown.)', 'diff-movedto' => 'moved to $1', -'diff-styleadded' => 'style added', -'diff-added' => 'added', -'diff-changedto' => 'changed to', +'diff-styleadded' => '$1 style added', +'diff-added' => '$1 added', +'diff-changedto' => 'changed to $1', 'diff-movedoutof' => 'moved out of $1', -'diff-styleremoved' => 'style removed', -'diff-removed' => 'removed', -'diff-changedfrom' => 'changed from', +'diff-styleremoved' => '$1 style removed', +'diff-removed' => '$1 removed', +'diff-changedfrom' => 'changed from $1', 'diff-src' => 'source', -'diff-withdestination' => 'with destination', +'diff-withdestination' => 'with destination $1', 'diff-with' => ' with $1 $2', 'diff-with-additional' => '$1 $2', # only translate this message to other languages if you have to change it 'diff-with-final' => ' and $1 $2', -- 2.20.1