From 7424e4621dbceaa309909757b9a8dab990618b5c Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole Date: Sun, 1 Jun 2014 11:56:59 +0100 Subject: [PATCH] Issue #2276571 by alexpott: Fixed Use StringTranslationTrait in ConfigManager. --- core/lib/Drupal/Core/Config/ConfigManager.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/core/lib/Drupal/Core/Config/ConfigManager.php b/core/lib/Drupal/Core/Config/ConfigManager.php index 47b171c9ce9..e0d57e18695 100644 --- a/core/lib/Drupal/Core/Config/ConfigManager.php +++ b/core/lib/Drupal/Core/Config/ConfigManager.php @@ -11,6 +11,7 @@ use Drupal\Component\Serialization\Yaml; use Drupal\Core\Config\Entity\ConfigDependencyManager; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\TranslationManager; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -18,6 +19,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; * The ConfigManager provides helper functions for the configuration system. */ class ConfigManager implements ConfigManagerInterface { + use StringTranslationTrait; /** * The entity manager. @@ -40,13 +42,6 @@ class ConfigManager implements ConfigManagerInterface { */ protected $typedConfigManager; - /** - * The string translation service. - * - * @var \Drupal\Core\StringTranslation\TranslationManager - */ - protected $stringTranslation; - /** * The active configuration storage. * @@ -148,11 +143,11 @@ class ConfigManager implements ConfigManagerInterface { // Check for new or removed files. if ($source_data === array('false')) { // Added file. - $source_data = array($this->stringTranslation->translate('File added')); + $source_data = array($this->t('File added')); } if ($target_data === array('false')) { // Deleted file. - $target_data = array($this->stringTranslation->translate('File removed')); + $target_data = array($this->t('File removed')); } return new \Diff($source_data, $target_data);