Skip to content

Commit

Permalink
Change Cake Console files to new use of shortcut for translations.
Browse files Browse the repository at this point in the history
  • Loading branch information
predominant committed Apr 15, 2010
1 parent c87d97b commit 1e42590
Show file tree
Hide file tree
Showing 26 changed files with 413 additions and 414 deletions.
6 changes: 3 additions & 3 deletions cake/console/cake.php
Expand Up @@ -322,7 +322,7 @@ public function dispatch() {
$Shell = $this->_getShell($plugin);

if (!$Shell) {
$title = sprintf(__('Error: Class %s could not be loaded.', true), $this->shellClass);
$title = sprintf(__('Error: Class %s could not be loaded.'), $this->shellClass);
$this->stderr($title . "\n");
return false;
}
Expand Down Expand Up @@ -374,8 +374,8 @@ public function dispatch() {
}
}

$title = sprintf(__('Error: Unknown %1$s command %2$s.', true), $this->shellName, $arg);
$message = sprintf(__('For usage try `cake %s help`', true), $this->shell);
$title = sprintf(__('Error: Unknown %1$s command %2$s.'), $this->shellName, $arg);
$message = sprintf(__('For usage try `cake %s help`'), $this->shell);
$this->stderr($title . "\n" . $message . "\n");
return false;
}
Expand Down
28 changes: 14 additions & 14 deletions cake/console/error.php
Expand Up @@ -75,7 +75,7 @@ public function error404($params) {
$this->error(array(
'code' => '404',
'name' => 'Not found',
'message' => sprintf(__("The requested address %s was not found on this server.", true), $url, $message)
'message' => sprintf(__('The requested address %s was not found on this server.'), $url, $message)
));
$this->_stop();
}
Expand All @@ -88,7 +88,7 @@ public function error404($params) {
public function missingController($params) {
extract($params, EXTR_OVERWRITE);
$controllerName = str_replace('Controller', '', $className);
$this->stderr(sprintf(__("Missing Controller '%s'", true), $controllerName));
$this->stderr(sprintf(__("Missing Controller '%s'"), $controllerName));
$this->_stop();
}

Expand All @@ -99,7 +99,7 @@ public function missingController($params) {
*/
public function missingAction($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Method '%s' in '%s'", true), $action, $className));
$this->stderr(sprintf(__("Missing Method '%s' in '%s'"), $action, $className));
$this->_stop();
}

Expand All @@ -110,7 +110,7 @@ public function missingAction($params) {
*/
public function privateAction($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Trying to access private method '%s' in '%s'", true), $action, $className));
$this->stderr(sprintf(__("Trying to access private method '%s' in '%s'"), $action, $className));
$this->_stop();
}

Expand All @@ -121,7 +121,7 @@ public function privateAction($params) {
*/
public function missingTable($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing database table '%s' for model '%s'", true), $table, $className));
$this->stderr(sprintf(__("Missing database table '%s' for model '%s'"), $table, $className));
$this->_stop();
}

Expand All @@ -131,7 +131,7 @@ public function missingTable($params) {
* @param array $params Parameters
*/
public function missingDatabase($params = array()) {
$this->stderr(__("Missing Database", true));
$this->stderr(__('Missing Database'));
$this->_stop();
}

Expand All @@ -142,7 +142,7 @@ public function missingDatabase($params = array()) {
*/
public function missingView($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing View '%s' for '%s' in '%s'", true), $file, $action, $className));
$this->stderr(sprintf(__("Missing View '%s' for '%s' in '%s'"), $file, $action, $className));
$this->_stop();
}

Expand All @@ -153,7 +153,7 @@ public function missingView($params) {
*/
public function missingLayout($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Layout '%s'", true), $file));
$this->stderr(sprintf(__("Missing Layout '%s'"), $file));
$this->_stop();
}

Expand All @@ -164,7 +164,7 @@ public function missingLayout($params) {
*/
public function missingConnection($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(__("Missing Database Connection. Try 'cake bake'", true));
$this->stderr(__("Missing Database Connection. Try 'cake bake'"));
$this->_stop();
}

Expand All @@ -175,7 +175,7 @@ public function missingConnection($params) {
*/
public function missingHelperFile($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Helper file '%s' for '%s'", true), $file, Inflector::camelize($helper)));
$this->stderr(sprintf(__("Missing Helper file '%s' for '%s'"), $file, Inflector::camelize($helper)));
$this->_stop();
}

Expand All @@ -186,7 +186,7 @@ public function missingHelperFile($params) {
*/
public function missingHelperClass($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Helper class '%s' in '%s'", true), Inflector::camelize($helper), $file));
$this->stderr(sprintf(__("Missing Helper class '%s' in '%s'"), Inflector::camelize($helper), $file));
$this->_stop();
}

Expand All @@ -197,7 +197,7 @@ public function missingHelperClass($params) {
*/
public function missingComponentFile($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Component file '%s' for '%s'", true), $file, Inflector::camelize($component)));
$this->stderr(sprintf(__("Missing Component file '%s' for '%s'"), $file, Inflector::camelize($component)));
$this->_stop();
}

Expand All @@ -208,7 +208,7 @@ public function missingComponentFile($params) {
*/
public function missingComponentClass($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Component class '%s' in '%s'", true), Inflector::camelize($component), $file));
$this->stderr(sprintf(__("Missing Component class '%s' in '%s'"), Inflector::camelize($component), $file));
$this->_stop();
}

Expand All @@ -219,7 +219,7 @@ public function missingComponentClass($params) {
*/
public function missingModel($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing model '%s'", true), $className));
$this->stderr(sprintf(__("Missing model '%s'"), $className));
$this->_stop();
}

Expand Down

0 comments on commit 1e42590

Please sign in to comment.