From: Rotem Liss Date: Sun, 29 Jul 2007 02:04:43 +0000 (+0000) Subject: Use native newlines when rebuilding a messages file. X-Git-Tag: 1.31.0-rc.0~51956 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=18b93f8d90866b80232d46488ce54015b4f25bf3;p=lhc%2Fweb%2Fwiklou.git Use native newlines when rebuilding a messages file. --- diff --git a/maintenance/language/writeMessagesArray.inc b/maintenance/language/writeMessagesArray.inc index f9340bef7d..bcbf05eeb7 100644 --- a/maintenance/language/writeMessagesArray.inc +++ b/maintenance/language/writeMessagesArray.inc @@ -1,8 +1,6 @@ $messages ) { # Skip if it's the block of unknown messages - handle that in the end of file if ( $block == 'unknown' ) { @@ -87,7 +86,8 @@ function writeMessagesArray( $messages, $ignoredComments = false ) { } ksort( $sortedMessages['unknown'] ); $messagesText .= writeMessagesBlock( 'unknown', 'Unknown messages', $sortedMessages['unknown'], $ignoredComments ); # Write the unknown messages, alphabetically sorted - $messagesText .= ");\n"; + $messagesText .= "); +"; return array( $messagesText, $sortedMessages ); } @@ -115,9 +115,13 @@ function writeMessagesBlock( $name, $comment, $messages, $ignoredComments ) { # Format the block comment (if exists); check for multiple lines comments if ( !empty( $comment ) ) { if ( strpos( $comment, "\n" ) === false ) { - $blockText .= "# $comment\n"; + $blockText .= "# $comment +"; } else { - $blockText .= "/*\n$comment\n*/\n"; + $blockText .= "/* +$comment +*/ +"; } } @@ -173,11 +177,13 @@ function writeMessagesBlock( $name, $comment, $messages, $ignoredComments ) { } # Newline - $blockText .= "\n"; + $blockText .= " +"; } # Newline to end the block - $blockText .= "\n"; + $blockText .= " +"; return $blockText; }