Fix for untranslated validation messages #246

This commit is contained in:
Andy Miller
2015-11-02 17:28:46 -07:00
parent e400207a65
commit 77d80f12f3

View File

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