Skip to content

Commit

Permalink
[features:*] Add translations. (#3156)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas authored Feb 4, 2017
1 parent 36623db commit 94aba20
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Command/Shared/FeatureTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
namespace Drupal\Console\Command\Shared;

use Drupal\Console\Core\Style\DrupalStyle;
use Symfony\Component\Console\Input\ArgvInput;
use Drupal\features\FeaturesManagerInterface;
use Drupal\features\ConfigurationItem;
use Drupal\features\Plugin\FeaturesGeneration\FeaturesGenerationWrite;
use Drupal\Component\Diff\DiffFormatter;
use Drupal\config_update\ConfigRevertInterface;

/**
Expand All @@ -27,7 +25,9 @@ public function packageQuestion(DrupalStyle $io)
$packages = $this->getPackagesByBundle($bundle);

if (empty($packages)) {
throw new \Exception('No packages available');
throw new \Exception(
$this->trans('commands.features.message.no-packages')
);
}

$package = $io->choiceNoList(
Expand Down Expand Up @@ -68,7 +68,7 @@ protected function getAssigner($bundle_name)
*
* @param bundle
*
* @return features
* @return array
*/
protected function getFeatureList($bundle)
{
Expand Down Expand Up @@ -101,7 +101,7 @@ protected function getFeatureList($bundle)
}


protected function importFeature($io, $packages)
protected function importFeature(DrupalStyle $io, $packages)
{
$manager = $this->getFeatureManager();

Expand Down Expand Up @@ -180,7 +180,6 @@ public function import($io, $components)
)
);
} else {

// Revert existing component.
$item = $config[$feature];
$type = ConfigurationItem::fromConfigStringToConfigType($item->getType());
Expand Down

0 comments on commit 94aba20

Please sign in to comment.