Index: trunk/extensions/Translate/groups/ComplexMessages.php |
— | — | @@ -332,7 +332,12 @@ |
333 | 333 | foreach ( array_keys( $this->data ) as $group ) { |
334 | 334 | foreach ( $this->getIterator( $group ) as $key ) { |
335 | 335 | $data = $request->getText( $this->getKeyForEdit( $key ) ); |
336 | | - $data = implode( ', ', array_map( 'trim', explode( ',', $data ) ) ); |
| 336 | + // Make a nice array out of the submit with trimmed values. |
| 337 | + $data = array_map( 'trim', explode( ',', $data ) ); |
| 338 | + // Normalise: Replace spaces with underscores. |
| 339 | + $data = str_replace( ' ', '_', $data ); |
| 340 | + // Create final format. |
| 341 | + $data = implode( ', ', $data ); |
337 | 342 | if ( $data !== '' ) { |
338 | 343 | $text .= "$key = $data\n" ; |
339 | 344 | } |