[Translator] Use quote to surround invalid locale
This commit is contained in:
parent
4dbe0e1c34
commit
c9742efe99
@ -309,7 +309,7 @@ class Translator implements TranslatorInterface
|
||||
private function assertValidLocale($locale)
|
||||
{
|
||||
if (1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) {
|
||||
throw new \InvalidArgumentException(sprintf('Invalid locale: %s.', $locale));
|
||||
throw new \InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user