Index: trunk/extensions/Translate/ffs/Gettext.php |
— | — | @@ -264,8 +264,12 @@ |
265 | 265 | $pluralForm = $text; |
266 | 266 | foreach ( $plurals[0] as $index => $definition ) { |
267 | 267 | $parsedFormsArray = explode( '|', $plurals[1][$index] ); |
268 | | - if ( !isset($parsedFormsArray[$i]) ) throw new MWException( "Too few plural forms in: $text" ); |
269 | | - $pluralForm = str_replace( $pluralForm, $definition, $parsedFormsArray[$i] ); |
| 268 | + if ( !isset($parsedFormsArray[$i]) ) { |
| 269 | + error_log( "Too few plural forms in: $text" ); |
| 270 | + $pluralForm = ''; |
| 271 | + } else { |
| 272 | + $pluralForm = str_replace( $pluralForm, $definition, $parsedFormsArray[$i] ); |
| 273 | + } |
270 | 274 | } |
271 | 275 | $splitPlurals[$i] = $pluralForm; |
272 | 276 | } |
— | — | @@ -348,6 +352,8 @@ |
349 | 353 | // Then parse the messages |
350 | 354 | foreach ( $sections as $section ) { |
351 | 355 | if ( trim( $section ) === '' ) continue; |
| 356 | + // These inactive section are of no interest to us |
| 357 | + if ( preg_match( '/^#~/', $section ) ) continue; |
352 | 358 | |
353 | 359 | $item = array( |
354 | 360 | 'ctxt' => '', |