r56804 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56803‎ | r56804 | r56805 >
Date:10:29, 23 September 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Some color for avar
Modified paths:
  • /trunk/extensions/Translate/Translate.css (modified) (history)
  • /trunk/extensions/Translate/utils/MessageTable.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/Translate.css
@@ -27,6 +27,11 @@
2828 background-color: #F2F200;
2929 }
3030
 31+.mw-sp-translate-table .untranslated {
 32+ background-color: #a2f290;
 33+}
 34+
 35+
3136 .mw-sp-translate-table td {
3237 vertical-align: top;
3338 }
Index: trunk/extensions/Translate/utils/MessageTable.php
@@ -113,7 +113,13 @@
114114 $title = $this->keyToTitle( $key );
115115
116116 $original = $m->definition();
117 - $message = $m->translation() ? $m->translation() : $original;
 117+ if ( $m->translation() ) {
 118+ $message = $m->translation();
 119+ $rclasses = array( 'class' => 'translated' );
 120+ } else {
 121+ $message = $original;
 122+ $rclasses = array( 'class' => 'untranslated' );
 123+ }
118124
119125 global $wgLang;
120126 $niceTitle = htmlspecialchars( $wgLang->truncate( $key, - 30 ) );
@@ -147,7 +153,7 @@
148154 } else {
149155 $output .= Xml::tags( 'tr', array( 'class' => 'def' ),
150156 Xml::tags( 'td', null, $leftColumn ) .
151 - Xml::tags( 'td', null, TranslateUtils::convertWhiteSpaceToHTML( $message ) )
 157+ Xml::tags( 'td', $rclasses, TranslateUtils::convertWhiteSpaceToHTML( $message ) )
152158 );
153159 }
154160

Status & tagging log