diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorFeedBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorFeedBlock.php index be1630f9..a9c6110 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorFeedBlock.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorFeedBlock.php @@ -77,7 +77,7 @@ public function getDerivativeDefinition($derivative_id, array $base_plugin_defin $result = $this->connection->query('SELECT fid, title, block FROM {aggregator_feed} WHERE block <> 0 AND fid = :fid', array(':fid' => $derivative_id))->fetchObject(); $this->derivatives[$derivative_id] = $base_plugin_definition; $this->derivatives[$derivative_id]['delta'] = $result->fid; - $this->derivatives[$derivative_id]['admin_label'] = $this->translationManager->translate('@title feed latest items', array('@title' => $result->title)); + $this->derivatives[$derivative_id]['admin_label'] = $this->t('@title feed latest items', array('@title' => $result->title)); return $this->derivatives[$derivative_id]; } @@ -90,9 +90,18 @@ public function getDerivativeDefinitions(array $base_plugin_definition) { foreach ($result as $feed) { $this->derivatives[$feed->fid] = $base_plugin_definition; $this->derivatives[$feed->fid]['delta'] = $feed->fid; - $this->derivatives[$feed->fid]['admin_label'] = $this->translationManager->translate('@title feed latest items', array('@title' => $feed->title)); + $this->derivatives[$feed->fid]['admin_label'] = $this->t('@title feed latest items', array('@title' => $feed->title)); } return $this->derivatives; } + /** + * Translates a string to the current language or to a given language. + * + * See the t() documentation for details. + */ + protected function t($string, array $args = array(), array $options = array()) { + return $this->translationManager->translate($string, $args, $options); + } + }