diff --git a/cake/console/libs/i18n.php b/cake/console/libs/i18n.php index 319191b95..4c920367e 100644 --- a/cake/console/libs/i18n.php +++ b/cake/console/libs/i18n.php @@ -109,7 +109,9 @@ class I18nShell extends Shell { */ protected function _getOptionParser() { $parser = parent::_getOptionParser(); - return $parser->description(__('I18n Shell initializes i18n database table for your application and generates .pot files(s) with translations.')); + return $parser->description(__('I18n Shell initializes i18n database table for your application and generates .pot files(s) with translations.')) + ->addSubcommand('initdb', array('help' => __('Initialize the i18n table.'))) + ->addSubcommand('extract', array('help' => __('Extract the po translations from your application'))); } /** diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index 9815ab06d..44b891593 100644 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -320,14 +320,14 @@ class Shell extends Object { $isMethod = $this->hasMethod($command); $isMain = $this->hasMethod('main'); - if ($isTask || $isMethod) { + if ($isTask || $isMethod && $command !== 'execute') { array_shift($argv); } $this->OptionParser = $this->_getOptionParser(); list($this->params, $this->args) = $this->OptionParser->parse($argv); - if ($isTask || $isMethod || $isMain) { + if (($isTask || $isMethod || $isMain) && $command !== 'execute' ) { $this->startup(); } if ($isTask) {