mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 07:29:51 +00:00
Adding i18n to schema shell.
This commit is contained in:
parent
98b04dc0e7
commit
dd1075a330
1 changed files with 7 additions and 6 deletions
|
@ -232,7 +232,7 @@ class SchemaShell extends Shell {
|
||||||
*/
|
*/
|
||||||
function run() {
|
function run() {
|
||||||
if (!isset($this->args[0])) {
|
if (!isset($this->args[0])) {
|
||||||
$this->err('command not found');
|
$this->err(__('Command not found', true));
|
||||||
$this->_stop();
|
$this->_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ class SchemaShell extends Shell {
|
||||||
$this->__update($Schema, $table);
|
$this->__update($Schema, $table);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->err(__('command not found', true));
|
$this->err(__('Command not found', true));
|
||||||
$this->_stop();
|
$this->_stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -313,7 +313,7 @@ class SchemaShell extends Shell {
|
||||||
$this->out(array_keys($drop));
|
$this->out(array_keys($drop));
|
||||||
|
|
||||||
if ('y' == $this->in(__('Are you sure you want to drop the table(s)?', true), array('y', 'n'), 'n')) {
|
if ('y' == $this->in(__('Are you sure you want to drop the table(s)?', true), array('y', 'n'), 'n')) {
|
||||||
$this->out('Dropping table(s).');
|
$this->out(__('Dropping table(s).', true));
|
||||||
$this->__run($drop, 'drop', $Schema);
|
$this->__run($drop, 'drop', $Schema);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ class SchemaShell extends Shell {
|
||||||
$this->out(array_keys($create));
|
$this->out(array_keys($create));
|
||||||
|
|
||||||
if ('y' == $this->in(__('Are you sure you want to create the table(s)?', true), array('y', 'n'), 'y')) {
|
if ('y' == $this->in(__('Are you sure you want to create the table(s)?', true), array('y', 'n'), 'y')) {
|
||||||
$this->out('Creating table(s).');
|
$this->out(__('Creating table(s).', true));
|
||||||
$this->__run($create, 'create', $Schema);
|
$this->__run($create, 'create', $Schema);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ class SchemaShell extends Shell {
|
||||||
function __update($Schema, $table = null) {
|
function __update($Schema, $table = null) {
|
||||||
$db =& ConnectionManager::getDataSource($this->Schema->connection);
|
$db =& ConnectionManager::getDataSource($this->Schema->connection);
|
||||||
|
|
||||||
$this->out('Comparing Database to Schema...');
|
$this->out(__('Comparing Database to Schema...', true));
|
||||||
$Old = $this->Schema->read();
|
$Old = $this->Schema->read();
|
||||||
$compare = $this->Schema->compare($Old, $Schema);
|
$compare = $this->Schema->compare($Old, $Schema);
|
||||||
|
|
||||||
|
@ -415,7 +415,8 @@ class SchemaShell extends Shell {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function help() {
|
function help() {
|
||||||
$this->out("The Schema Shell generates a schema object from \n\t\tthe database and updates the database from the schema.");
|
$this->out("The Schema Shell generates a schema object from");
|
||||||
|
$this->out("the database and updates the database from the schema.");
|
||||||
$this->hr();
|
$this->hr();
|
||||||
$this->out("Usage: cake schema <command> <arg1> <arg2>...");
|
$this->out("Usage: cake schema <command> <arg1> <arg2>...");
|
||||||
$this->hr();
|
$this->hr();
|
||||||
|
|
Loading…
Add table
Reference in a new issue