From 77d80f12f3acf53ee918b85acedd18bae5b0c087 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 2 Nov 2015 17:28:46 -0700 Subject: [PATCH] Fix for untranslated validation messages #246 --- system/src/Grav/Common/Data/Blueprint.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Data/Blueprint.php b/system/src/Grav/Common/Data/Blueprint.php index 15cdce65c..4f24620af 100644 --- a/system/src/Grav/Common/Data/Blueprint.php +++ b/system/src/Grav/Common/Data/Blueprint.php @@ -76,7 +76,8 @@ class Blueprint try { $this->validateArray($data, $this->nested); } catch (\RuntimeException $e) { - throw new \RuntimeException(sprintf('Validation failed: %s', $e->getMessage())); + $language = self::getGrav()['language']; + throw new \RuntimeException(sprintf('Validation failed: %s', $language->translate($e->getMessage()))); } }