Index: trunk/extensions/Translate/TranslateTasks.php |
— | — | @@ -177,7 +177,8 @@ |
178 | 178 | } |
179 | 179 | |
180 | 180 | protected function output() { |
181 | | - $table = new MessageTable( $this->collection, $this->group ); |
| 181 | + $code = $this->options->getLanguage(); |
| 182 | + $table = new MessageTable( $this->collection, $this->group, $code ); |
182 | 183 | $table->appendEditLinkParams( 'loadtask', $this->getId() ); |
183 | 184 | |
184 | 185 | return $table->fullTable(); |
— | — | @@ -200,7 +201,8 @@ |
201 | 202 | } |
202 | 203 | |
203 | 204 | protected function output() { |
204 | | - $table = new MessageTable( $this->collection, $this->group ); |
| 205 | + $code = $this->options->getLanguage(); |
| 206 | + $table = new MessageTable( $this->collection, $this->group, $code ); |
205 | 207 | $table->appendEditLinkParams( 'loadtask', $this->getId() ); |
206 | 208 | $table->setReviewMode(); |
207 | 209 | |
Index: trunk/extensions/Translate/utils/MessageTable.php |
— | — | @@ -15,6 +15,7 @@ |
16 | 16 | protected $reviewMode = false; |
17 | 17 | protected $collection = null; |
18 | 18 | protected $group = null; |
| 19 | + protected $code = null; |
19 | 20 | protected $editLinkParams = array(); |
20 | 21 | |
21 | 22 | protected $headers = array( |
— | — | @@ -23,9 +24,10 @@ |
24 | 25 | 'default' => array( 'msg', 'allmessagesdefault' ), |
25 | 26 | ); |
26 | 27 | |
27 | | - public function __construct( MessageCollection $collection, MessageGroup $group ) { |
| 28 | + public function __construct( MessageCollection $collection, MessageGroup $group, $code ) { |
28 | 29 | $this->collection = $collection; |
29 | 30 | $this->group = $group; |
| 31 | + $this->code = $code; |
30 | 32 | $this->setHeaderText( 'table', $group->getLabel() ); |
31 | 33 | $this->appendEditLinkParams( 'loadgroup', $group->getId() ); |
32 | 34 | } |
— | — | @@ -122,6 +124,10 @@ |
123 | 125 | |
124 | 126 | $optional = wfMsgHtml( 'translate-optional' ); |
125 | 127 | |
| 128 | + $mlang = Language::factory( $this->code ); |
| 129 | + $mespa = array( 'dir' => $mlang->getDir(), 'lang' => $this->code ); |
| 130 | + unset($mlang); |
| 131 | + |
126 | 132 | $batch = new LinkBatch(); |
127 | 133 | if ( method_exists( $batch, 'setCaller' ) ) { |
128 | 134 | $batch->setCaller( __METHOD__ ); |
— | — | @@ -142,9 +148,10 @@ |
143 | 149 | $title = $this->keyToTitle( $key ); |
144 | 150 | |
145 | 151 | $original = $m->definition(); |
| 152 | + #TODO: handle directionality of fallback language(s) |
146 | 153 | if ( $m->translation() ) { |
147 | 154 | $message = $m->translation(); |
148 | | - $rclasses = array( 'class' => 'translated' ); |
| 155 | + $rclasses = array_merge ( $mespa, array( 'class' => 'translated' ) ); |
149 | 156 | } else { |
150 | 157 | $message = $original; |
151 | 158 | $rclasses = array( 'class' => 'untranslated' ); |
— | — | @@ -179,7 +186,7 @@ |
180 | 187 | ); |
181 | 188 | |
182 | 189 | $output .= Xml::tags( 'tr', array( 'class' => 'new' ), |
183 | | - Xml::tags( 'td', null, TranslateUtils::convertWhiteSpaceToHTML( $message ) ) |
| 190 | + Xml::tags( 'td', $mespa, TranslateUtils::convertWhiteSpaceToHTML( $message ) ) |
184 | 191 | ); |
185 | 192 | } else { |
186 | 193 | $output .= Xml::tags( 'tr', array( 'class' => 'def' ), |