From 29e810a98cc8aafdf27cc5b83530050b4d4a397b Mon Sep 17 00:00:00 2001 From: Filip Komar Date: Sun, 2 Mar 2014 15:14:50 +0000 Subject: added rebuilding existing po files + some error managament + verbosity improvements --- tools/extract2gettext.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'tools/extract2gettext.php') diff --git a/tools/extract2gettext.php b/tools/extract2gettext.php index 559285573..0b1687540 100644 --- a/tools/extract2gettext.php +++ b/tools/extract2gettext.php @@ -24,6 +24,7 @@ define('APP_ROOT', realpath(__DIR__ . '/..')); $php_source = isset($argv[1]) ? $argv[1] : null; $domain = isset($argv[2]) ? $argv[2] : null; +$quiet = isset($argv[3]) ? $argv[3] : false; if (is_null($php_source) || is_null($domain)) { echo << $strs) { mkdir($dir, 0755, true); } echo sprintf("saved %d strings in %s\n", count($strs), $dest); - if (FALSE === file_put_contents($dest, $f)) + if (FALSE === file_put_contents($dest, $f)) { echo "Failed to write.\n"; + $error = 3; + } } -echo "Done. thxbye.\n"; +if(!$quiet) { echo "Done. thxbye.\n"; } exit($error); -- cgit v1.2.1