Index: trunk/phase3/maintenance/language/writeMessagesArray.inc |
— | — | @@ -1,8 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | 4 | * Write a messages array as a PHP text. |
5 | | - * TODO: make it possible to use Windows endlines |
6 | | - * TODO: remove PHP ending tags recently removed from MediaWiki files |
7 | 5 | * |
8 | 6 | * @addtogroup Maintenance |
9 | 7 | */ |
— | — | @@ -75,7 +73,8 @@ |
76 | 74 | } |
77 | 75 | |
78 | 76 | # Write all the messages |
79 | | - $messagesText = "\$messages = array(\n"; |
| 77 | + $messagesText = "\$messages = array( |
| 78 | +"; |
80 | 79 | foreach( $sortedMessages as $block => $messages ) { |
81 | 80 | # Skip if it's the block of unknown messages - handle that in the end of file |
82 | 81 | if ( $block == 'unknown' ) { |
— | — | @@ -87,7 +86,8 @@ |
88 | 87 | } |
89 | 88 | ksort( $sortedMessages['unknown'] ); |
90 | 89 | $messagesText .= writeMessagesBlock( 'unknown', 'Unknown messages', $sortedMessages['unknown'], $ignoredComments ); # Write the unknown messages, alphabetically sorted |
91 | | - $messagesText .= ");\n"; |
| 90 | + $messagesText .= "); |
| 91 | +"; |
92 | 92 | |
93 | 93 | return array( $messagesText, $sortedMessages ); |
94 | 94 | } |
— | — | @@ -115,9 +115,13 @@ |
116 | 116 | # Format the block comment (if exists); check for multiple lines comments |
117 | 117 | if ( !empty( $comment ) ) { |
118 | 118 | if ( strpos( $comment, "\n" ) === false ) { |
119 | | - $blockText .= "# $comment\n"; |
| 119 | + $blockText .= "# $comment |
| 120 | +"; |
120 | 121 | } else { |
121 | | - $blockText .= "/*\n$comment\n*/\n"; |
| 122 | + $blockText .= "/* |
| 123 | +$comment |
| 124 | +*/ |
| 125 | +"; |
122 | 126 | } |
123 | 127 | } |
124 | 128 | |
— | — | @@ -173,11 +177,13 @@ |
174 | 178 | } |
175 | 179 | |
176 | 180 | # Newline |
177 | | - $blockText .= "\n"; |
| 181 | + $blockText .= " |
| 182 | +"; |
178 | 183 | } |
179 | 184 | |
180 | 185 | # Newline to end the block |
181 | | - $blockText .= "\n"; |
| 186 | + $blockText .= " |
| 187 | +"; |
182 | 188 | |
183 | 189 | return $blockText; |
184 | 190 | } |