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:
authorThomas Steur <thomas.steur@gmail.com>2013-11-11 04:22:54 +0400
committerThomas Steur <thomas.steur@gmail.com>2013-11-11 04:22:54 +0400
commit3a2bfb0e865655f45a54fb83d05e0656b001043b (patch)
tree8f95884e3d3f5fcf88fe5587186002ab00acb338 /plugins/LanguagesManager/Commands/PluginsWithTranslations.php
parent1a3b0681ccee5db70cc9756be9f78307a5e3d2cb (diff)
refs #4241 moving translation commands to LanguagesManager
Diffstat (limited to 'plugins/LanguagesManager/Commands/PluginsWithTranslations.php')
-rw-r--r--plugins/LanguagesManager/Commands/PluginsWithTranslations.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/plugins/LanguagesManager/Commands/PluginsWithTranslations.php b/plugins/LanguagesManager/Commands/PluginsWithTranslations.php
new file mode 100644
index 0000000000..0538d399b7
--- /dev/null
+++ b/plugins/LanguagesManager/Commands/PluginsWithTranslations.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Piwik - Open source web analytics
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ * @category Piwik_Plugins
+ * @package CoreConsole
+ */
+
+namespace Piwik\Plugins\LanguagesManager\Commands;
+
+use Piwik\Plugin\ConsoleCommand;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * @package CoreConsole
+ */
+class PluginsWithTranslations extends ConsoleCommand
+{
+ protected function configure()
+ {
+ $this->setName('translations:plugins')
+ ->setDescription('Shows all plugins that have own translation files');
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $output->writeln("Following plugins contain their own translation files:");
+ $command = sprintf('ls -d1 %s/plugins/*/lang | egrep -o "([a-zA-Z]+)/lang" | '.
+ 'awk \'{print substr($1, 0, length($1)-5)}\' | uniq | sort',
+ PIWIK_DOCUMENT_ROOT);
+ passthru($command);
+ }
+} \ No newline at end of file