|
@@ -529,7 +529,7 @@ class CRUDController extends Controller
|
|
|
// show an error message if the form failed validation
|
|
|
if (!$isFormValid) {
|
|
|
if (!$this->isXmlHttpRequest()) {
|
|
|
- $this->addFlash('sonata_flash_error', 'flash_create_error');
|
|
|
+ $this->addFlash('sonata_flash_error', $this->admin->trans('flash_create_error', array('%name%' => $this->admin->toString($object)), 'SonataAdminBundle'));
|
|
|
}
|
|
|
} elseif ($this->isPreviewRequested()) {
|
|
|
// pick the preview template if the form was valid and preview was requested
|