diff --git a/core/modules/image/lib/Drupal/image/Controller/ImageStyleDownloadController.php b/core/modules/image/lib/Drupal/image/Controller/ImageStyleDownloadController.php index c3acf36..34146c2 100644 --- a/core/modules/image/lib/Drupal/image/Controller/ImageStyleDownloadController.php +++ b/core/modules/image/lib/Drupal/image/Controller/ImageStyleDownloadController.php @@ -42,11 +42,11 @@ class ImageStyleDownloadController extends FileDownloadController implements Con protected $lock; /** - * The translation manager service. + * The translator service. * * @var \Drupal\Core\StringTranslation\Translator\TranslatorInterface */ - protected $translationManager; + protected $translator; /** * Constructs a ImageStyleDownloadController object. @@ -57,14 +57,14 @@ class ImageStyleDownloadController extends FileDownloadController implements Con * The config factory. * @param \Drupal\Core\Lock\LockBackendInterface $lock * The lock backend. - * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translation_manager - * The translation manager. + * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator + * The translator service. */ - public function __construct(ModuleHandlerInterface $module_handler, ConfigFactory $config_factory, LockBackendInterface $lock, TranslatorInterface $translation_manager) { + public function __construct(ModuleHandlerInterface $module_handler, ConfigFactory $config_factory, LockBackendInterface $lock, TranslatorInterface $translator) { parent::__construct($module_handler); $this->configFactory = $config_factory; $this->lock = $lock; - $this->translationManager = $translation_manager; + $this->translator = $translator; } /** @@ -135,7 +135,7 @@ public function deliver(Request $request, $scheme, ImageStyleInterface $image_st // Don't try to generate file if source is missing. if (!file_exists($image_uri)) { watchdog('image', 'Source image at %source_image_path not found while trying to generate derivative image at %derivative_path.', array('%source_image_path' => $image_uri, '%derivative_path' => $derivative_uri)); - return new Response($this->translationManager->translate('Error generating image, missing source file.'), 404); + return new Response($this->translator->translate('Error generating image, missing source file.'), 404); } // Don't start generating the image if the derivative already exists or if @@ -146,7 +146,7 @@ public function deliver(Request $request, $scheme, ImageStyleInterface $image_st if (!$lock_acquired) { // Tell client to retry again in 3 seconds. Currently no browsers are // known to support Retry-After. - throw new ServiceUnavailableHttpException(3, $this->translationManager->translate('Image generation in progress. Try again shortly.')); + throw new ServiceUnavailableHttpException(3, $this->translator->translate('Image generation in progress. Try again shortly.')); } } @@ -169,7 +169,7 @@ public function deliver(Request $request, $scheme, ImageStyleInterface $image_st } else { watchdog('image', 'Unable to generate the derived image located at %path.', array('%path' => $derivative_uri)); - return new Response($this->translationManager->translate('Error generating image.'), 500); + return new Response($this->translator->translate('Error generating image.'), 500); } }