Skip to content

Commit c9742ef

Browse files
lyrixxfabpot
authored andcommitted
[Translator] Use quote to surround invalid locale
1 parent 4dbe0e1 commit c9742ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Translation/Translator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ protected function computeFallbackLocales($locale)
309309
private function assertValidLocale($locale)
310310
{
311311
if (1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) {
312-
throw new \InvalidArgumentException(sprintf('Invalid locale: %s.', $locale));
312+
throw new \InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale));
313313
}
314314
}
315315
}

0 commit comments

Comments
 (0)