Merge pull request #449 from bovisp/patch-1

Added a translation for "Validation failed:" text
This commit is contained in:
Flavio Copes
2015-11-17 22:32:00 +01:00

View File

@@ -77,7 +77,8 @@ class Blueprint
$this->validateArray($data, $this->nested);
} catch (\RuntimeException $e) {
$language = self::getGrav()['language'];
throw new \RuntimeException(sprintf('<b>Validation failed:</b> %s', $language->translate($e->getMessage())));
$message = sprintf($language->translate('FORM.VALIDATION_FAIL', null, true) . ' %s', $e->getMessage());
throw new \RuntimeException($message);
}
}