Example #1
0
 /**
  * Execute the Command
  *
  * @access protected
  * @param InputInterface $input
  * @param OutputInterface $output
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     // Fetch paths for Applications
     $applications = \Skeleton\Core\Application::get_all();
     // If the paths array hasn't been defined yet, make sure it exists
     if (!isset($paths) or !is_array($paths)) {
         $paths = [];
     }
     foreach ($applications as $application) {
         $paths[$application->name] = $application->path;
     }
     // Fetch additional paths to translate
     foreach (\Skeleton\I18n\Config::$additional_template_paths as $name => $path) {
         $paths[$name] = $path;
     }
     // Translate all the applications
     foreach ($paths as $application => $directory) {
         $log = $this->translate_application($application, $directory);
         $output->writeln($log);
     }
     $packages = \Skeleton\Core\Package::get_all();
     foreach ($packages as $package) {
         $log = $this->translate_skeleton_package($package);
         $output->writeln($log);
     }
     return 0;
 }