From 3601f4f585122213ecdf22d7dff95c5b27d86e42 Mon Sep 17 00:00:00 2001 From: Alexandre Cases Date: Fri, 29 Apr 2016 16:13:11 +0200 Subject: [PATCH] Traduction message confirmation/erreur add/edit/delete --- src/Controller/DocumentsController.php | 12 ++++++------ src/Controller/EmpruntsController.php | 12 ++++++------ src/Controller/MaterielsController.php | 12 ++++++------ src/Controller/SuivisController.php | 12 ++++++------ src/Controller/UsersController.php | 12 ++++++------ 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/Controller/DocumentsController.php b/src/Controller/DocumentsController.php index 5c814dc..42f8a05 100755 --- a/src/Controller/DocumentsController.php +++ b/src/Controller/DocumentsController.php @@ -55,10 +55,10 @@ class DocumentsController extends AppController if ($this->request->is('post')) { $document = $this->Documents->patchEntity($document, $this->request->data); if ($this->Documents->save($document)) { - $this->Flash->success(__('The document has been saved.')); + $this->Flash->success(__('Le fichier a bien été ajouté.')); return $this->redirect(['action' => 'index']); } else { - $this->Flash->error(__('The document could not be saved. Please, try again.')); + $this->Flash->error(__('Le fichier n\'a pas pu être ajouté.')); } } $materiels = $this->Documents->Materiels->find('list', ['limit' => 200]); @@ -82,10 +82,10 @@ class DocumentsController extends AppController if ($this->request->is(['patch', 'post', 'put'])) { $document = $this->Documents->patchEntity($document, $this->request->data); if ($this->Documents->save($document)) { - $this->Flash->success(__('The document has been saved.')); + $this->Flash->success(__('Le fichier a bien été édité.')); return $this->redirect(['action' => 'index']); } else { - $this->Flash->error(__('The document could not be saved. Please, try again.')); + $this->Flash->error(__('Le fichier n\'a pas pu être édité.')); } } $materiels = $this->Documents->Materiels->find('list', ['limit' => 200]); @@ -106,9 +106,9 @@ class DocumentsController extends AppController $this->request->allowMethod(['post', 'delete']); $document = $this->Documents->get($id); if ($this->Documents->delete($document)) { - $this->Flash->success(__('The document has been deleted.')); + $this->Flash->success(__('Le fichier a bien été supprimé.')); } else { - $this->Flash->error(__('The document could not be deleted. Please, try again.')); + $this->Flash->error(__('Le fichier n\'a pas pu être supprimé.')); } return $this->redirect(['action' => 'index']); } diff --git a/src/Controller/EmpruntsController.php b/src/Controller/EmpruntsController.php index bccc6c4..fb5a82e 100755 --- a/src/Controller/EmpruntsController.php +++ b/src/Controller/EmpruntsController.php @@ -55,10 +55,10 @@ class EmpruntsController extends AppController if ($this->request->is('post')) { $emprunt = $this->Emprunts->patchEntity($emprunt, $this->request->data); if ($this->Emprunts->save($emprunt)) { - $this->Flash->success(__('The emprunt has been saved.')); + $this->Flash->success(__('L\'emprunt a bien été ajouté.')); return $this->redirect(['action' => 'index']); } else { - $this->Flash->error(__('The emprunt could not be saved. Please, try again.')); + $this->Flash->error(__('L\'emprunt n\'a pas pu être ajouté..')); } } $materiels = $this->Emprunts->Materiels->find('list', ['limit' => 200]); @@ -81,10 +81,10 @@ class EmpruntsController extends AppController if ($this->request->is(['patch', 'post', 'put'])) { $emprunt = $this->Emprunts->patchEntity($emprunt, $this->request->data); if ($this->Emprunts->save($emprunt)) { - $this->Flash->success(__('The emprunt has been saved.')); + $this->Flash->success(__('L\'emprunt a bien été édité.')); return $this->redirect(['action' => 'index']); } else { - $this->Flash->error(__('The emprunt could not be saved. Please, try again.')); + $this->Flash->error(__('L\'emprunt n\'a pas pu être édité.')); } } $materiels = $this->Emprunts->Materiels->find('list', ['limit' => 200]); @@ -104,9 +104,9 @@ class EmpruntsController extends AppController $this->request->allowMethod(['post', 'delete']); $emprunt = $this->Emprunts->get($id); if ($this->Emprunts->delete($emprunt)) { - $this->Flash->success(__('The emprunt has been deleted.')); + $this->Flash->success(__('L\'emprunt a bien été supprimé.')); } else { - $this->Flash->error(__('The emprunt could not be deleted. Please, try again.')); + $this->Flash->error(__('L\'emprunt n\'a pas pu être supprimé.')); } return $this->redirect(['action' => 'index']); } diff --git a/src/Controller/MaterielsController.php b/src/Controller/MaterielsController.php index b92d000..4a22920 100755 --- a/src/Controller/MaterielsController.php +++ b/src/Controller/MaterielsController.php @@ -58,10 +58,10 @@ class MaterielsController extends AppController if ($this->request->is('post')) { $materiel = $this->Materiels->patchEntity($materiel, $this->request->data); if ($this->Materiels->save($materiel)) { - $this->Flash->success(__('The materiel has been saved.')); + $this->Flash->success(__('Le matériel a bien été ajouté.')); return $this->redirect(['action' => 'index']); } else { - $this->Flash->error(__('The materiel could not be saved. Please, try again.')); + $this->Flash->error(__('Le matériel n\'a pas pu être ajouté.')); } } $surCategories = $this->Materiels->SurCategories->find('list', ['limit' => 200]); @@ -90,10 +90,10 @@ class MaterielsController extends AppController if ($this->request->is(['patch', 'post', 'put'])) { $materiel = $this->Materiels->patchEntity($materiel, $this->request->data); if ($this->Materiels->save($materiel)) { - $this->Flash->success(__('The materiel has been saved.')); + $this->Flash->success(__('Le matériel a bien été édité.')); return $this->redirect(['action' => 'index']); } else { - $this->Flash->error(__('The materiel could not be saved. Please, try again.')); + $this->Flash->error(__('Le matériel n\'a pas pu être édité.')); } } $surCategories = $this->Materiels->SurCategories->find('list', ['limit' => 200]); @@ -119,9 +119,9 @@ class MaterielsController extends AppController $this->request->allowMethod(['post', 'delete']); $materiel = $this->Materiels->get($id); if ($this->Materiels->delete($materiel)) { - $this->Flash->success(__('The materiel has been deleted.')); + $this->Flash->success(__('Le matériel a bien été supprimé.')); } else { - $this->Flash->error(__('The materiel could not be deleted. Please, try again.')); + $this->Flash->error(__('Le matériel n\'a pas pu être supprimé.')); } return $this->redirect(['action' => 'index']); } diff --git a/src/Controller/SuivisController.php b/src/Controller/SuivisController.php index 41ebf3d..dc24a84 100755 --- a/src/Controller/SuivisController.php +++ b/src/Controller/SuivisController.php @@ -55,10 +55,10 @@ class SuivisController extends AppController if ($this->request->is('post')) { $suivi = $this->Suivis->patchEntity($suivi, $this->request->data); if ($this->Suivis->save($suivi)) { - $this->Flash->success(__('The suivi has been saved.')); + $this->Flash->success(__('Le suivi a bien été ajouté.')); return $this->redirect(['action' => 'index']); } else { - $this->Flash->error(__('The suivi could not be saved. Please, try again.')); + $this->Flash->error(__('Le suivi n\'a pas pu être ajouté.')); } } $materiels = $this->Suivis->Materiels->find('list', ['limit' => 200]); @@ -81,10 +81,10 @@ class SuivisController extends AppController if ($this->request->is(['patch', 'post', 'put'])) { $suivi = $this->Suivis->patchEntity($suivi, $this->request->data); if ($this->Suivis->save($suivi)) { - $this->Flash->success(__('The suivi has been saved.')); + $this->Flash->success(__('Le suivi a bien été édité.')); return $this->redirect(['action' => 'index']); } else { - $this->Flash->error(__('The suivi could not be saved. Please, try again.')); + $this->Flash->error(__('Le suivi n\'a pas pu être édité.')); } } $materiels = $this->Suivis->Materiels->find('list', ['limit' => 200]); @@ -104,9 +104,9 @@ class SuivisController extends AppController $this->request->allowMethod(['post', 'delete']); $suivi = $this->Suivis->get($id); if ($this->Suivis->delete($suivi)) { - $this->Flash->success(__('The suivi has been deleted.')); + $this->Flash->success(__('Le suivi a bien été supprimé.')); } else { - $this->Flash->error(__('The suivi could not be deleted. Please, try again.')); + $this->Flash->error(__('Le suivi n\'a pas pu être supprimé.')); } return $this->redirect(['action' => 'index']); } diff --git a/src/Controller/UsersController.php b/src/Controller/UsersController.php index f128481..2ee716c 100755 --- a/src/Controller/UsersController.php +++ b/src/Controller/UsersController.php @@ -80,13 +80,13 @@ class UsersController extends AppController if ($this->request->is('post')) { $user = $this->Users->patchEntity($user, $this->request->data); if ($this->Users->save($user)) { - $this->Flash->success(__('The user has been saved.')); + $this->Flash->success(__('L\'utilisateur a bien été ajouté.')); return $this->redirect([ 'controller' => 'Pages', 'action' => 'display' ]); } else { - $this->Flash->error(__('The user could not be saved. Please, try again.')); + $this->Flash->error(__('L\utilisateur n\'a pas pu être ajouté.')); } } $groupesMetiers = $this->Users->GroupesMetiers->find('list', ['limit' => 200]); @@ -109,10 +109,10 @@ class UsersController extends AppController if ($this->request->is(['patch', 'post', 'put'])) { $user = $this->Users->patchEntity($user, $this->request->data); if ($this->Users->save($user)) { - $this->Flash->success(__('The user has been saved.')); + $this->Flash->success(__('L\utilisateur a bien été édité.')); return $this->redirect(['action' => 'index']); } else { - $this->Flash->error(__('The user could not be saved. Please, try again.')); + $this->Flash->error(__('L\utilisateur n\'a pas pu être édité.')); } } $groupesMetiers = $this->Users->GroupesMetiers->find('list', ['limit' => 200]); @@ -132,9 +132,9 @@ class UsersController extends AppController $this->request->allowMethod(['post', 'delete']); $user = $this->Users->get($id); if ($this->Users->delete($user)) { - $this->Flash->success(__('The user has been deleted.')); + $this->Flash->success(__('L\utilisateur a bien été supprimé.')); } else { - $this->Flash->error(__('The user could not be deleted. Please, try again.')); + $this->Flash->error(__('L\utilisateur n\'a pas pu être supprimé.')); } return $this->redirect(['action' => 'index']); } -- libgit2 0.21.2