Merge pull request #260 from Asturyan/master

Fix "Undefined variable: ex" and add translation to jQplot title on Dashboard
This commit is contained in:
Manuel Raynaud
2014-03-21 23:11:55 +01:00
5 changed files with 1928 additions and 1920 deletions

View File

@@ -335,6 +335,7 @@ abstract class AbstractCrudController extends BaseAdminController
$error_msg = $ex->getMessage();
}
if (false !== $error_msg) {
$this->setupFormErrorContext(
$this->getTranslator()->trans("%obj creation", array('%obj' => $this->objectName)),
$error_msg,
@@ -345,6 +346,7 @@ abstract class AbstractCrudController extends BaseAdminController
// At this point, the form has error, and should be redisplayed.
return $this->renderList();
}
}
/**
* Load a object for modification, and display the edit template.
@@ -435,6 +437,7 @@ abstract class AbstractCrudController extends BaseAdminController
$error_msg = $ex->getMessage();*/
}
if (false !== $error_msg) {
// At this point, the form has errors, and should be redisplayed.
$this->setupFormErrorContext(
$this->getTranslator()->trans("%obj modification", array('%obj' => $this->objectName)),
@@ -445,6 +448,7 @@ abstract class AbstractCrudController extends BaseAdminController
return $this->renderEditionTemplate();
}
}
/**
* Update object position (only for objects whichsupport that)

View File

@@ -222,6 +222,7 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
$this->getParserContext()->addForm($changeForm);
}
if (false !== $error_msg) {
$this->setupFormErrorContext(
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
$error_msg,
@@ -232,4 +233,5 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
// At this point, the form has errors, and should be redisplayed.
return $this->renderEditionTemplate();
}
}
}

View File

@@ -45,7 +45,7 @@ class HomeController extends BaseAdminController
$data = new \stdClass();
$data->title = "Stats on " . $this->getRequest()->query->get('month', date('m')) . "/" . $this->getRequest()->query->get('year', date('Y'));
$data->title = $this->getTranslator()->trans("Stats on %month/%year", array('%month' => $this->getRequest()->query->get('month', date('m')), '%year' => $this->getRequest()->query->get('year', date('Y'))));
/* sales */
$saleSeries = new \stdClass();

View File

@@ -753,6 +753,7 @@ return array(
'Sorry, variable ID=%id was not found.' => 'Sorry, variable ID=%id was not found.',
'Source IP' => 'Source IP',
'Source IP :' => 'Source IP :',
'Stats on %month/%year' => 'Stats on %month/%year',
'Status' => 'Status',
'Stock' => 'Stock',
'Store' => 'Store',

View File

@@ -752,6 +752,7 @@ return array(
'Sorry, variable ID=%id was not found.' => 'Désolé, la variable ID=%id n\'a pas été trouvé',
'Source IP' => 'IP source',
'Source IP :' => 'IP source : ',
'Stats on %month/%year' => 'Statistiques du %month/%year',
'Status' => 'Etat',
'Stock' => 'Stock',
'Store' => 'Information boutique',