From: Niklas Laxström Date: Tue, 1 Apr 2014 08:03:05 +0000 (+0000) Subject: Add newline at the end of converted json files X-Git-Tag: 1.31.0-rc.0~16414 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=3e05447e381a33ed4a01be922afadd953736c246;p=lhc%2Fweb%2Fwiklou.git Add newline at the end of converted json files 1) Some text editors add missing newline at the end of the file automatically. 2) It's generally a nice thing to do to avoid messing up display for example when cat'ing a file Change-Id: Icf636721c4edcf4ae706c9a346fe36233928cae8 --- diff --git a/maintenance/generateJsonI18n.php b/maintenance/generateJsonI18n.php index 27a9ff16d9..8dc89ed518 100644 --- a/maintenance/generateJsonI18n.php +++ b/maintenance/generateJsonI18n.php @@ -83,7 +83,7 @@ class GenerateJsonI18n extends Maintenance { $jsonfile = "$jsondir/$langcode.json"; $success = file_put_contents( $jsonfile, - FormatJson::encode( $langmsgs, true, FormatJson::ALL_OK ) + FormatJson::encode( $langmsgs, true, FormatJson::ALL_OK ) . "\n" ); if ( $success === false ) { $this->error( "FAILED to write $jsonfile", 1 );