Index: trunk/extensions/Translate/groupStatistics.php |
— | — | @@ -138,14 +138,15 @@ |
139 | 139 | $g->fill( $messages, $code ); |
140 | 140 | |
141 | 141 | // Remove untranslated messages from the list |
142 | | - foreach ( $messages as $key => $o ) { |
143 | | - if ( $o->translation === null ) { |
| 142 | + foreach ( $messages->keys() as $key ) { |
| 143 | + if ( $messages[$key]->translation === null ) { |
144 | 144 | unset( $messages[$key] ); |
145 | 145 | } |
146 | 146 | } |
147 | 147 | |
148 | 148 | // Count the completion percent and output it |
149 | 149 | $translated = count( $messages ); |
| 150 | + |
150 | 151 | $out->element( $out->formatPercent( $translated, $total, |
151 | 152 | /* Inverted color */ false, /* Decimals */ 2 ) |
152 | 153 | ); |
Index: trunk/extensions/Translate/Message.php |
— | — | @@ -168,13 +168,13 @@ |
169 | 169 | return strpos($this->database, TRANSLATE_FUZZY) !== false; |
170 | 170 | } |
171 | 171 | |
172 | | - private $fProperties = array( 'authors', 'changed', 'translated', 'translation', 'fuzzy' ); |
| 172 | + private static $fProperties = array( 'authors', 'changed', 'translated', 'translation', 'fuzzy' ); |
173 | 173 | |
174 | 174 | public function __get( $name ) { |
175 | 175 | if ( isset( $this->$name) ) { |
176 | 176 | return $this->$name; |
177 | 177 | } else { |
178 | | - if ( in_array( $name, $this->fProperties ) ) { |
| 178 | + if ( in_array( $name, self::$fProperties ) ) { |
179 | 179 | return $this->$name(); |
180 | 180 | } |
181 | 181 | } |