formatting for CLI

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44598 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-11-11 22:44:40 +00:00
parent a3793afb22
commit cf1dbb8014

View File

@ -1032,7 +1032,11 @@ class i18n extends Controller {
if($fh = fopen($langFolder . '/en_US.php', "w")) {
fwrite($fh, "<?php\n\nglobal \$lang;\n\n" . $mst . "\n?>");
fclose($fh);
if(Director::is_cli()) {
echo "Created file: $langFolder/en_US.php\n";
} else {
echo "Created file: $langFolder/en_US.php<br />";
}
} else {
user_error("Cannot write language file! Please check permissions of $langFolder/en_US.php", E_USER_ERROR);
@ -1304,7 +1308,7 @@ class i18n extends Controller {
// Write the generated master string tables
self::write_mst($baseDir, $mst, $includedtpl);
echo "Done!";
echo "Done!\n";
}
}