Security update for Core, with self-updated composer
[yaffs-website] / vendor / drupal / console / src / Command / Locale / TranslationStatusCommand.php
index 95ed676fd8bd75043fe2d546768d310bbe31f2dd..f25188725bd560abb04d760ec21136c78b1ff7c7 100644 (file)
@@ -10,10 +10,8 @@ namespace Drupal\Console\Command\Locale;
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Command\Command;
-use Drupal\Console\Core\Style\DrupalStyle;
+use Drupal\Console\Core\Command\Command;
 use Drupal\Console\Command\Shared\LocaleTrait;
-use Drupal\Console\Core\Command\Shared\CommandTrait;
 use Drupal\Console\Utils\Site;
 use Drupal\Console\Extension\Manager;
 use Drupal\Console\Annotations\DrupalCommand;
@@ -26,7 +24,6 @@ use Drupal\Console\Annotations\DrupalCommand;
  */
 class TranslationStatusCommand extends Command
 {
-    use CommandTrait;
     use LocaleTrait;
 
     /**
@@ -68,7 +65,6 @@ class TranslationStatusCommand extends Command
 
     protected function execute(InputInterface $input, OutputInterface $output)
     {
-        $io = new DrupalStyle($input, $output);
         $language = $input->getArgument('language');
         $tableHeader = [
             $this->trans('commands.locale.translation.status.messages.project'),
@@ -85,12 +81,12 @@ class TranslationStatusCommand extends Command
         $status = locale_translation_get_status();
 
         if (!$languages) {
-            $io->info($this->trans('commands.locale.translation.status.messages.no-languages'));
+            $this->getIo()->info($this->trans('commands.locale.translation.status.messages.no-languages'));
             return 1;
         }
 
         if (empty($status)) {
-            $io->info($this->trans('commands.locale.translation.status.messages.no-translations'));
+            $this->getIo()->info($this->trans('commands.locale.translation.status.messages.no-translations'));
             return 1;
         }
 
@@ -102,14 +98,14 @@ class TranslationStatusCommand extends Command
                 if ($language !='' && !($language == $langcode || strtolower($language) == strtolower($languages[$langcode]->getName()))) {
                     continue;
                 }
-                $io->info($languages[$langcode]->getName());
+                $this->getIo()->info($languages[$langcode]->getName());
                 foreach ($rows as $row) {
                     if ($row[0] == 'drupal') {
                         $row[0] = $this->trans('commands.common.messages.drupal-core');
                     }
                     $tableRows[] = $row;
                 }
-                $io->table($tableHeader, $tableRows, 'compact');
+                $this->getIo()->table($tableHeader, $tableRows, 'compact');
             }
         }