diff options
author | sgiehl <stefan@piwik.org> | 2015-06-25 00:12:06 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-06-25 00:12:06 +0300 |
commit | e4e7aba3ae3b233aa39a1414d33cfd202c671e75 (patch) | |
tree | ba50aed6ba00f29a433f02cf390c818c11b2a3cc /core/Plugin/MetadataLoader.php | |
parent | 444712509c614f92cdd5a62a079ac3405c611a4b (diff) |
use translation of plugin description if available, even if defined in plugin.json
Diffstat (limited to 'core/Plugin/MetadataLoader.php')
-rw-r--r-- | core/Plugin/MetadataLoader.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/Plugin/MetadataLoader.php b/core/Plugin/MetadataLoader.php index 931fffaa00..5a6b2617e6 100644 --- a/core/Plugin/MetadataLoader.php +++ b/core/Plugin/MetadataLoader.php @@ -49,9 +49,17 @@ class MetadataLoader */ public function load() { + $defaults = $this->getDefaultPluginInformation(); + $plugin = $this->loadPluginInfoJson(); + + // use translated plugin description if available + if ($defaults['description'] != Piwik::translate($defaults['description'])) { + unset($plugin['description']); + } + return array_merge( - $this->getDefaultPluginInformation(), - $this->loadPluginInfoJson() + $defaults, + $plugin ); } |