diff -u b/core/modules/system/lib/Drupal/system/Controller/ThemeListingController.php b/core/modules/system/lib/Drupal/system/Controller/ThemeListingController.php --- b/core/modules/system/lib/Drupal/system/Controller/ThemeListingController.php +++ b/core/modules/system/lib/Drupal/system/Controller/ThemeListingController.php @@ -10,7 +10,7 @@ use Drupal\Core\Controller\ControllerInterface; use Drupal\Core\Config\Config; use Drupal\Core\Extension\ModuleHandlerInterface; -use Drupal\Core\StringTranslation\Translator\TranslatorInterface; +use Drupal\Core\StringTranslation\TranslationManager; use Drupal\Core\Access\CsrfTokenGenerator; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; @@ -37,9 +37,9 @@ /** * The translation service. * - * @var \Drupal\Core\StringTranslation\Translator\TranslatorInterface + * @var \Drupal\Core\StringTranslation\TranslationManager */ - protected $translator; + protected $translation; /** * The token generator manager service. @@ -55,15 +55,15 @@ * The system.theme config object. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler service. - * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator + * @param \Drupal\Core\StringTranslation\TranslationManager $translation * The translation manager service. * @param \Drupal\Core\Access\CsrfTokenGenerator * The Csrf token generator. */ - public function __construct(Config $config, ModuleHandlerInterface $module_handler, TranslatorInterface $translator, CsrfTokenGenerator $token_generator) { + public function __construct(Config $config, ModuleHandlerInterface $module_handler, TranslationManager $translation, CsrfTokenGenerator $token_generator) { $this->config = $config; $this->moduleHandler = $module_handler; - $this->translator = $translator; + $this->translation = $translation; $this->tokenGenerator = $token_generator; } @@ -115,8 +115,8 @@ if (isset($themes[$theme_key]) && file_exists($themes[$theme_key]->info['screenshot'])) { $theme->screenshot = array( 'uri' => $themes[$theme_key]->info['screenshot'], - 'alt' => $this->translator->translate('Screenshot for !theme theme', array('!theme' => $theme->info['name'])), - 'title' => $this->translator->translate('Screenshot for !theme theme', array('!theme' => $theme->info['name'])), + 'alt' => $this->translation->translate('Screenshot for !theme theme', array('!theme' => $theme->info['name'])), + 'title' => $this->translation->translate('Screenshot for !theme theme', array('!theme' => $theme->info['name'])), 'attributes' => array('class' => array('screenshot')), ); break; @@ -141,42 +141,42 @@ $query['theme'] = $theme->name; if (drupal_theme_access($theme)) { $theme->operations[] = array( - 'title' => $this->translator->translate('Settings'), + 'title' => $this->translation->translate('Settings'), 'href' => 'admin/appearance/settings/' . $theme->name, - 'attributes' => array('title' => $this->translator->translate('Settings for !theme theme', array('!theme' => $theme->info['name']))), + 'attributes' => array('title' => $this->translation->translate('Settings for !theme theme', array('!theme' => $theme->info['name']))), ); } if (!empty($theme->status)) { if (!$theme->is_default) { if ($theme->name != $admin_theme) { $theme->operations[] = array( - 'title' => $this->translator->translate('Disable'), + 'title' => $this->translation->translate('Disable'), 'href' => 'admin/appearance/disable', 'query' => $query, - 'attributes' => array('title' => $this->translator->translate('Disable !theme theme', array('!theme' => $theme->info['name']))), + 'attributes' => array('title' => $this->translation->translate('Disable !theme theme', array('!theme' => $theme->info['name']))), ); } $theme->operations[] = array( - 'title' => $this->translator->translate('Set default'), + 'title' => $this->translation->translate('Set default'), 'href' => 'admin/appearance/default', 'query' => $query, - 'attributes' => array('title' => $this->translator->translate('Set !theme as default theme', array('!theme' => $theme->info['name']))), + 'attributes' => array('title' => $this->translation->translate('Set !theme as default theme', array('!theme' => $theme->info['name']))), ); } $admin_theme_options[$theme->name] = $theme->info['name']; } else { $theme->operations[] = array( - 'title' => $this->translator->translate('Enable'), + 'title' => $this->translation->translate('Enable'), 'href' => 'admin/appearance/enable', 'query' => $query, - 'attributes' => array('title' => $this->translator->translate('Enable !theme theme', array('!theme' => $theme->info['name']))), + 'attributes' => array('title' => $this->translation->translate('Enable !theme theme', array('!theme' => $theme->info['name']))), ); $theme->operations[] = array( - 'title' => $this->translator->translate('Enable and set default'), + 'title' => $this->translation->translate('Enable and set default'), 'href' => 'admin/appearance/default', 'query' => $query, - 'attributes' => array('title' => $this->translator->translate('Enable !theme as default theme', array('!theme' => $theme->info['name']))), + 'attributes' => array('title' => $this->translation->translate('Enable !theme as default theme', array('!theme' => $theme->info['name']))), ); } } @@ -186,11 +186,11 @@ $theme->classes = array(); if ($theme->is_default) { $theme->classes[] = 'theme-default'; - $theme->notes[] = $this->translator->translate('default theme'); + $theme->notes[] = $this->translation->translate('default theme'); } if ($theme->name == $admin_theme || ($theme->is_default && $admin_theme == '0')) { $theme->classes[] = 'theme-admin'; - $theme->notes[] = $this->translator->translate('admin theme'); + $theme->notes[] = $this->translation->translate('admin theme'); } // Sort enabled and disabled themes into their own groups.