Index: trunk/extensions/Translate/groups/MediaWikiExtensions.php |
— | — | @@ -155,9 +155,18 @@ |
156 | 156 | protected $label = 'MediaWiki extensions'; |
157 | 157 | protected $id = 'ext-0-all'; |
158 | 158 | protected $meta = true; |
159 | | - |
| 159 | + protected $type = 'mediawiki'; |
160 | 160 | protected $classes = null; |
161 | 161 | |
| 162 | + public function getProblematic( $code ) { |
| 163 | + $this->init(); |
| 164 | + $array = array(); |
| 165 | + foreach ( $this->classes as $class ) { |
| 166 | + $array = wfArrayMerge( $array, $class->getProblematic( $code ) ); |
| 167 | + } |
| 168 | + return $array; |
| 169 | + } |
| 170 | + |
162 | 171 | // Don't add the (mw ext) thingie |
163 | 172 | public function getLabel() { return $this->label; } |
164 | 173 | |
— | — | @@ -189,7 +198,7 @@ |
190 | 199 | $this->init(); |
191 | 200 | $array = array(); |
192 | 201 | foreach ( $this->classes as $class ) { |
193 | | - $array = array_merge( $array, $class->getDefinitions() ); |
| 202 | + $array = wfArrayMerge( $array, $class->getDefinitions() ); |
194 | 203 | } |
195 | 204 | return $array; |
196 | 205 | } |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
13 | 13 | */ |
14 | 14 | |
15 | | -define( 'TRANSLATE_VERSION', '9 (2008-07-14:1)' ); |
| 15 | +define( 'TRANSLATE_VERSION', '9 (2008-07-15:1)' ); |
16 | 16 | |
17 | 17 | $wgExtensionCredits['specialpage'][] = array( |
18 | 18 | 'name' => 'Translate', |
Index: trunk/extensions/Translate/scripts/createCheckIndex.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | } |
74 | 74 | |
75 | 75 | // Add it to the array |
76 | | - $problematic[$code][] = strtolower( "$namespace:$key" ); |
| 76 | + $problematic[$code][] = $key; |
77 | 77 | } |
78 | 78 | } |
79 | 79 | } |
Index: trunk/extensions/Translate/MessageChecks.php |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | * @return Array of warning messages, html-format. |
53 | 53 | */ |
54 | 54 | public function doChecks( TMessage $message, $type, $code ) { |
55 | | - if ( $message->translation === null) return false; |
| 55 | + if ( $message->translation === null) return array(); |
56 | 56 | $warnings = array(); |
57 | 57 | |
58 | 58 | foreach ( $this->checksForType[$type] as $check ) { |
Index: trunk/extensions/Translate/README |
— | — | @@ -34,6 +34,11 @@ |
35 | 35 | |
36 | 36 | == Changes in version 10 == |
37 | 37 | |
| 38 | +* 2008-07-14:1 |
| 39 | + - improved message checks |
| 40 | + - can now work for meta groups too |
| 41 | + - fixed messages not shown in the list anymore, but script still needed to find |
| 42 | + the broken ones |
38 | 43 | * 2008-07-13:2 group filter for graphs |
39 | 44 | * 2008-07-13:1 experimental alias-export for extensions |
40 | 45 | * 2008-07-08:1 simple edit stats with phplot |
Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -30,6 +30,22 @@ |
31 | 31 | public function getIgnored() { return $this->ignored; } |
32 | 32 | public function setIgnored( $value ) { $this->ignored = $value; } |
33 | 33 | |
| 34 | + protected $problematic = null; |
| 35 | + protected function getProblematic( $code ) { |
| 36 | + if ( $this->problematic === null ) { |
| 37 | + $this->problematic = array(); |
| 38 | + $file = TRANSLATE_CHECKFILE . '-' . $this->id; |
| 39 | + if ( file_exists($file) ) { |
| 40 | + $problematic = unserialize( file_get_contents($file) ); |
| 41 | + if ( isset($problematic[$code]) ) { |
| 42 | + $this->problematic = $problematic[$code]; |
| 43 | + } |
| 44 | + } |
| 45 | + } |
| 46 | + return $this->problematic; |
| 47 | + } |
| 48 | + |
| 49 | + protected function setProblematic( $value ) { $this->problematic = $value ; } |
34 | 50 | /** |
35 | 51 | * Returns a list of optional and ignored messages in 2-d array. |
36 | 52 | */ |