From d244442e70288f852af769798dcb9a798a4ccd58 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Tue, 28 Jul 2015 12:11:07 -0600 Subject: [PATCH] fixed translations with multiple plugins --- system/src/Grav/Common/Config/Config.php | 5 ++++- system/src/Grav/Common/Config/ConfigFinder.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Common/Config/Config.php b/system/src/Grav/Common/Config/Config.php index cebfc7ec3..a6bf9c183 100644 --- a/system/src/Grav/Common/Config/Config.php +++ b/system/src/Grav/Common/Config/Config.php @@ -414,7 +414,10 @@ class Config extends Data { foreach ($files as $name => $item) { $file = CompiledYamlFile::instance($item['file']); - $this->languages->join($name, $file->content(), '/'); + $content = $file->content(); + foreach ((array) $content as $key => $value) { + $this->languages->join($key, $value, '/'); + } } } diff --git a/system/src/Grav/Common/Config/ConfigFinder.php b/system/src/Grav/Common/Config/ConfigFinder.php index 7d79b765b..46069410d 100644 --- a/system/src/Grav/Common/Config/ConfigFinder.php +++ b/system/src/Grav/Common/Config/ConfigFinder.php @@ -143,7 +143,7 @@ class ConfigFinder $filename = "{$path}/{$name}/$find"; if (file_exists($filename)) { - $list["plugins"] = ['file' => $filename, 'modified' => filemtime($filename)]; + $list[$name] = ['file' => $filename, 'modified' => filemtime($filename)]; } } }