1
0
mirror of https://github.com/flarum/core.git synced 2025-07-23 09:41:26 +02:00

Allow hyphens in referenced key names

This commit is contained in:
Toby Zerner
2015-10-22 17:01:21 +10:30
parent b299bd36e8
commit 5f9f4a1536

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