1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 21:50:50 +02:00

Allow hyphens in referenced key names

This commit is contained in:
Toby Zerner
2015-10-22 17:01:21 +10:30
parent 415b68f84f
commit 9836fa64ed

View File

@@ -33,7 +33,7 @@ class YamlFileLoader extends BaseYamlFileLoader
{ {
$translation = $messages->get($id, $domain); $translation = $messages->get($id, $domain);
if (preg_match('/^=>\s*([a-z0-9_\.]+)$/i', $translation, $matches)) { if (preg_match('/^=>\s*([a-z0-9_\-\.]+)$/i', $translation, $matches)) {
return $this->getTranslation($messages, $matches[1], $domain); return $this->getTranslation($messages, $matches[1], $domain);
} }