From d60a66f16b48a0f9cd0623f924c5c486d89fb802 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Mon, 11 Jan 2010 17:47:43 -0200 Subject: [PATCH] Separate the variables of internationalized strings in controllers of cake bake. Signed-off-by: Mark Story --- .../default/actions/controller_actions.ctp | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cake/console/templates/default/actions/controller_actions.ctp b/cake/console/templates/default/actions/controller_actions.ctp index 6590a6e4de0..1f9baa2873d 100644 --- a/cake/console/templates/default/actions/controller_actions.ctp +++ b/cake/console/templates/default/actions/controller_actions.ctp @@ -27,10 +27,10 @@ function view($id = null) { if (!$id) { - $this->Session->setFlash(__('Invalid ', true)); + $this->Session->setFlash(sprintf(__('Invalid %s', true), '')); $this->redirect(array('action' => 'index')); - $this->flash(__('Invalid ', true), array('action' => 'index')); + $this->flash(sprintf(__('Invalid %s', true), ''), array('action' => 'index')); } $this->set('', $this->->read(null, $id)); @@ -42,14 +42,14 @@ $this->->create(); if ($this->->save($this->data)) { - $this->Session->setFlash(__('The has been saved', true)); + $this->Session->setFlash(sprintf(__('The %s has been saved', true), '')); $this->redirect(array('action' => 'index')); - $this->flash(__(' saved.', true), array('action' => 'index')); + $this->flash(sprintf(__('%s saved.', true), ''), array('action' => 'index')); } else { - $this->Session->setFlash(__('The could not be saved. Please, try again.', true)); + $this->Session->setFlash(sprintf(__('The %s could not be saved. Please, try again.', true), '')); } } @@ -74,23 +74,23 @@ function edit($id = null) { if (!$id && empty($this->data)) { - $this->Session->setFlash(__('Invalid ', true)); + $this->Session->setFlash(sprintf(__('Invalid %s', true), '')); $this->redirect(array('action' => 'index')); - $this->flash(__('Invalid ', true), array('action' => 'index')); + $this->flash(sprintf(__('Invalid %s', true), ''), array('action' => 'index')); } if (!empty($this->data)) { if ($this->->save($this->data)) { - $this->Session->setFlash(__('The has been saved', true)); + $this->Session->setFlash(sprintf(__('The %s has been saved', true), '')); $this->redirect(array('action' => 'index')); - $this->flash(__('The has been saved.', true), array('action' => 'index')); + $this->flash(sprintf(__('The %s has been saved.', true), ''), array('action' => 'index')); } else { - $this->Session->setFlash(__('The could not be saved. Please, try again.', true)); + $this->Session->setFlash(sprintf(__('The %s could not be saved. Please, try again.', true), '')); } } @@ -117,24 +117,24 @@ function delete($id = null) { if (!$id) { - $this->Session->setFlash(__('Invalid id for ', true)); + $this->Session->setFlash(sprintf(__('Invalid id for %s', true), '')); $this->redirect(array('action'=>'index')); - $this->flash(__('Invalid ', true), array('action' => 'index')); + $this->flash(sprintf(__('Invalid %s', true), ''), array('action' => 'index')); } if ($this->->delete($id)) { - $this->Session->setFlash(__(' deleted', true)); + $this->Session->setFlash(sprintf(__('%s deleted', true), '')); $this->redirect(array('action'=>'index')); - $this->flash(__(' deleted', true), array('action' => 'index')); + $this->flash(sprintf(__('%s deleted', true), ''), array('action' => 'index')); } - $this->Session->setFlash(__(' was not deleted', true)); + $this->Session->setFlash(sprintf(__('%s was not deleted', true), '')); - $this->flash(__(' was not deleted', true), array('action' => 'index')); + $this->flash(sprintf(__('%s was not deleted', true), ''), array('action' => 'index')); $this->redirect(array('action' => 'index')); } \ No newline at end of file