diff --git a/core/lib/Drupal/Core/Cache/PathCacheContext.php b/core/lib/Drupal/Core/Cache/PathCacheContext.php index 522f243..25c8209 100644 --- a/core/lib/Drupal/Core/Cache/PathCacheContext.php +++ b/core/lib/Drupal/Core/Cache/PathCacheContext.php @@ -7,6 +7,8 @@ namespace Drupal\Core\Cache; +use Drupal\Core\StringTranslation\StringTranslationTrait; + /** * Defines the PathCacheContext service, for "per URL path" caching. * @@ -17,11 +19,13 @@ */ class PathCacheContext extends RequestStackCacheContextBase { + use StringTranslationTrait; + /** * {@inheritdoc} */ public static function getLabel() { - return t('Path'); + return $this->t('Path'); } /**