Skip to content
Permalink
Browse files

Remove broken database related features for i18n shell.

The i18n shell has not had any database related features for quite
a while. Remove them until we can sort out how to provide the ability to
seed the i18n tables again.

Refs #3835
  • Loading branch information...
markstory committed Jun 30, 2014
1 parent 422d5f0 commit 8cfa53d94a90f2178d3e593f004989d5144c1c8b
Showing with 4 additions and 45 deletions.
  1. +4 −45 src/Console/Command/I18nShell.php
@@ -24,38 +24,12 @@
*/
class I18nShell extends Shell {
/**
* Contains database source to use
*
* @var string
*/
public $dataSource = 'default';
/**
* Contains tasks to load and instantiate
*
* @var array
*/
public $tasks = ['DbConfig', 'Extract'];
/**
* Override startup of the Shell
*
* @return mixed
*/
public function startup() {
$this->_welcome();
if (isset($this->params['datasource'])) {
$this->dataSource = $this->params['datasource'];
}
if ($this->command && !in_array($this->command, ['help'])) {
if (!config('database')) {
$this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.'));
return $this->DbConfig->execute();
}
}
}
public $tasks = ['Extract'];
/**
* Override main() for help message hook
@@ -66,18 +40,14 @@ public function main() {
$this->out(__d('cake_console', '<info>I18n Shell</info>'));
$this->hr();
$this->out(__d('cake_console', '[E]xtract POT file from sources'));
$this->out(__d('cake_console', '[I]nitialize i18n database table'));
$this->out(__d('cake_console', '[H]elp'));
$this->out(__d('cake_console', '[Q]uit'));
$choice = strtolower($this->in(__d('cake_console', 'What would you like to do?'), ['E', 'I', 'H', 'Q']));
$choice = strtolower($this->in(__d('cake_console', 'What would you like to do?'), ['E', 'H', 'Q']));
switch ($choice) {
case 'e':
$this->Extract->execute();
break;
case 'i':
$this->initdb();
break;
case 'h':
$this->out($this->OptionParser->help());
break;
@@ -90,15 +60,6 @@ public function main() {
$this->main();
}
/**
* Initialize I18N database.
*
* @return void
*/
public function initdb() {
$this->dispatchShell('schema create i18n');
}
/**
* Gets the option parser instance and configures it.
*
@@ -108,10 +69,8 @@ public function getOptionParser() {
$parser = parent::getOptionParser();
$parser->description(
__d('cake_console', 'I18n Shell initializes i18n database table for your application and generates .pot files(s) with translations.')
)->addSubcommand('initdb', [
'help' => __d('cake_console', 'Initialize the i18n table.')
])->addSubcommand('extract', [
__d('cake_console', 'I18n Shell generates .pot files(s) with translations.')
)->addSubcommand('extract', [
'help' => __d('cake_console', 'Extract the po translations from your application'),
'parser' => $this->Extract->getOptionParser()
]);

0 comments on commit 8cfa53d

Please sign in to comment.
You can’t perform that action at this time.