Skip to content

Commit

Permalink
do not translate the plugin description when loading the information
Browse files Browse the repository at this point in the history
it might get translated using the default language otherwise or cached incorrect as the metadata is cached without the language
  • Loading branch information
sgiehl committed Jun 8, 2015
1 parent 6dbaf98 commit cd1bb24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/Plugin/MetadataLoader.php
Expand Up @@ -66,7 +66,7 @@ private function getDefaultPluginInformation()
{
$descriptionKey = $this->pluginName . '_PluginDescription';
return array(
'description' => Piwik::translate($descriptionKey),
'description' => $descriptionKey,
'homepage' => 'http://piwik.org/',
'authors' => array(array('name' => 'Piwik', 'homepage' => 'http://piwik.org/')),
'license' => 'GPL v3+',
Expand Down
4 changes: 4 additions & 0 deletions plugins/CorePluginsAdmin/Controller.php
Expand Up @@ -312,6 +312,10 @@ protected function getPluginsInfo($themesOnly = false)

$plugin['isCorePlugin'] = $pluginManager->isPluginBundledWithCore($pluginName);

if (!empty($plugin['info']['description'])) {
$plugin['info']['description'] = $this->translator->translate($plugin['info']['description']);
}

if (!isset($plugin['info'])) {

$suffix = $this->translator->translate('CorePluginsAdmin_PluginNotWorkingAlternative');
Expand Down

0 comments on commit cd1bb24

Please sign in to comment.