From: Michael M Slusarz Date: Wed, 1 Dec 2010 05:46:40 +0000 (-0700) Subject: Need to init bin/translation properly. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=41ca9d742e419bb2d4a5c71fa5ed23de21394ceb;p=horde.git Need to init bin/translation properly. Things like the injector need to be set. --- diff --git a/horde/bin/translation b/horde/bin/translation index 32385f7ba..95ab7ed14 100755 --- a/horde/bin/translation +++ b/horde/bin/translation @@ -612,8 +612,6 @@ function init() $lang = getenv('LANG'); } - $registry = new Horde_Registry(Horde_Registry::SESSION_NONE); - for ($i = 0; $i < count($dirs); $i++) { if (!empty($module) && $module != $apps[$i]) { continue; @@ -621,7 +619,7 @@ function init() $package = ucfirst($apps[$i]); $version = substr($apps[$i], 0, 6) == 'Horde_' ? '' - : ' ' . $registry->getVersion($apps[$i]); + : ' ' . $GLOBALS['registry']->getVersion($apps[$i]); printf('Initializing module %s... ', $apps[$i]); $dir = $dirs[$i] . DS . 'locale' . DS; $pot = $dir . $apps[$i] . '.pot'; @@ -1350,12 +1348,12 @@ if (empty($language)) { } require_once dirname(__FILE__) . '/../lib/Application.php'; +Horde_Registry::appInit('horde', array( + 'authentication' => 'none', + 'cli' => true +)); -$c = new Horde_Cli(); -if (!$c->runningFromCLI()) { - $c->fatal('This script must be run from the command line.'); -} -$c->init(); +$c = $cli; $c->writeln($c->bold('---------------------------')); $c->writeln($c->bold('Horde translation generator'));