Index: trunk/extensions/Translate/FFS.php |
— | — | @@ -1107,13 +1107,18 @@ |
1108 | 1108 | |
1109 | 1109 | protected function writeBlock( MessageCollection $collection ) { |
1110 | 1110 | $block = ''; |
| 1111 | + $messages = array(); |
1111 | 1112 | foreach( $collection as $message ) { |
1112 | 1113 | if( $message->translation() == '' ) continue; |
1113 | 1114 | $translation = str_replace( '\\', '\\\\', $message->translation() ); |
1114 | 1115 | $translation = str_replace( '\'', '\\\'', $translation ); |
1115 | 1116 | $translation = str_replace( "\n", '\n', $translation ); |
1116 | | - $block .= "\t\t'{$message->key()}': u'{$translation}',\n"; |
| 1117 | + $messages[$message->key()] = $translation; |
1117 | 1118 | } |
| 1119 | + ksort( $messages ); |
| 1120 | + foreach( $messages as $key => $translation ) { |
| 1121 | + $block .= "\t\t'{$key}': u'{$translation}',\n"; |
| 1122 | + } |
1118 | 1123 | return $block; |
1119 | 1124 | } |
1120 | 1125 | |