[Translator] Use quote to surround invalid locale

This commit is contained in:
Grégoire Pineau 2014-07-24 17:02:45 +02:00 committed by Fabien Potencier
parent 4dbe0e1c34
commit c9742efe99
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}
}
}