diff --git a/cake/libs/controller/scaffold.php b/cake/libs/controller/scaffold.php index 0891616fd..ea5e9031f 100644 --- a/cake/libs/controller/scaffold.php +++ b/cake/libs/controller/scaffold.php @@ -303,7 +303,7 @@ class Scaffold extends Object { } if (!$this->ScaffoldModel->exists()) { - $message = __(sprintf("Invalid id for %s::edit()", Inflector::humanize($this->modelKey), true)); + $message = sprintf(__("Invalid id for %s::edit()", true), Inflector::humanize($this->modelKey)); if ($this->_validSession) { $this->controller->Session->setFlash($message); $this->controller->redirect($this->redirect); @@ -321,9 +321,10 @@ class Scaffold extends Object { if ($this->ScaffoldModel->save($this->controller->data)) { if ($this->controller->_afterScaffoldSave($action)) { - $message = __( - sprintf('The %1$s has been %2$s', Inflector::humanize($this->modelKey), $success), - true + $message = sprintf( + __('The %1$s has been %2$s', true), + Inflector::humanize($this->modelKey), + $success ); if ($this->_validSession) { $this->controller->Session->setFlash($message); @@ -376,8 +377,9 @@ class Scaffold extends Object { */ function __scaffoldDelete($params = array()) { if ($this->controller->_beforeScaffold('delete')) { - $message = __( - sprintf("No id set for %s::delete()", Inflector::humanize($this->modelKey)), true + $message = sprintf( + __("No id set for %s::delete()", true), + Inflector::humanize($this->modelKey) ); if (isset($params['pass'][0])) { $id = $params['pass'][0]; @@ -390,9 +392,9 @@ class Scaffold extends Object { } if ($this->ScaffoldModel->delete($id)) { - $message = __( - sprintf('The %1$s with id: %2$d has been deleted.', Inflector::humanize($this->modelClass), $id), - true + $message = sprintf( + __('The %1$s with id: %2$d has been deleted.', true), + Inflector::humanize($this->modelClass), $id ); if ($this->_validSession) { $this->controller->Session->setFlash($message); @@ -402,10 +404,10 @@ class Scaffold extends Object { return $this->_output(); } } else { - $message = __(sprintf( - 'There was an error deleting the %1$s with id: %2$d', + $message = sprintf( + __('There was an error deleting the %1$s with id: %2$d', true), Inflector::humanize($this->modelClass), $id - ), true); + ); if ($this->_validSession) { $this->controller->Session->setFlash($message); $this->controller->redirect($this->redirect);