Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-02-20 15:44:10 +0300
committerGitHub <noreply@github.com>2020-02-20 15:44:10 +0300
commitfa23dc76e4ed1ba729a45d51da76edf7c0202eec (patch)
tree5ae8bb1d47f953cac06b3963526b292abb903dd0 /plugins/CoreConsole
parent361bc551294d313631a3c61e07ddf65b97e72041 (diff)
Removes deprecated class Piwik\Translate (#15586)
* Removes deprecated class Piwik\Translate * use submodule branches * adjust test * fix typo * readd deprecated Piwik\Translate * submodule updates
Diffstat (limited to 'plugins/CoreConsole')
-rw-r--r--plugins/CoreConsole/Commands/GenerateReport.php5
-rw-r--r--plugins/CoreConsole/Commands/GenerateWidget.php8
2 files changed, 6 insertions, 7 deletions
diff --git a/plugins/CoreConsole/Commands/GenerateReport.php b/plugins/CoreConsole/Commands/GenerateReport.php
index a7e3af28d0..d9bad9f209 100644
--- a/plugins/CoreConsole/Commands/GenerateReport.php
+++ b/plugins/CoreConsole/Commands/GenerateReport.php
@@ -10,11 +10,10 @@
namespace Piwik\Plugins\CoreConsole\Commands;
use Piwik\Columns\Dimension;
+use Piwik\Container\StaticContainer;
use Piwik\Piwik;
use Piwik\Plugin\Manager;
-use Piwik\Plugin\Report;
use Piwik\Plugin\ReportsProvider;
-use Piwik\Translate;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
@@ -210,7 +209,7 @@ class GenerateReport extends GeneratePluginBase
$validate($category);
}
- $translationKey = Translate::findTranslationKeyForTranslation($category);
+ $translationKey = StaticContainer::get('Piwik\Translation\Translator')->findTranslationKeyForTranslation($category);
if (!empty($translationKey)) {
return $translationKey;
}
diff --git a/plugins/CoreConsole/Commands/GenerateWidget.php b/plugins/CoreConsole/Commands/GenerateWidget.php
index 5968ea8a04..20624b3ba0 100644
--- a/plugins/CoreConsole/Commands/GenerateWidget.php
+++ b/plugins/CoreConsole/Commands/GenerateWidget.php
@@ -9,9 +9,9 @@
namespace Piwik\Plugins\CoreConsole\Commands;
+use Piwik\Container\StaticContainer;
use Piwik\Piwik;
use Piwik\Plugin\Manager;
-use Piwik\Translate;
use Piwik\Widget\WidgetsList;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
@@ -125,7 +125,7 @@ class GenerateWidget extends GeneratePluginBase
/**
* @param InputInterface $input
* @param OutputInterface $output
- * @return array
+ * @return string
* @throws \RuntimeException
*/
protected function getCategory(InputInterface $input, OutputInterface $output)
@@ -148,7 +148,7 @@ class GenerateWidget extends GeneratePluginBase
$validate($category);
}
- $translationKey = Translate::findTranslationKeyForTranslation($category);
+ $translationKey = StaticContainer::get('Piwik\Translation\Translator')->findTranslationKeyForTranslation($category);
if (!empty($translationKey)) {
return $translationKey;
}
@@ -161,7 +161,7 @@ class GenerateWidget extends GeneratePluginBase
/**
* @param InputInterface $input
* @param OutputInterface $output
- * @return array
+ * @return string
* @throws \RuntimeException
*/
protected function getPluginName(InputInterface $input, OutputInterface $output)