diff --git a/core/modules/config/src/Controller/ConfigController.php b/core/modules/config/src/Controller/ConfigController.php
index 4f101d6f7b..f3cd9825fc 100644
--- a/core/modules/config/src/Controller/ConfigController.php
+++ b/core/modules/config/src/Controller/ConfigController.php
@@ -6,7 +6,7 @@
 use Drupal\Core\Config\ConfigManagerInterface;
 use Drupal\Core\Config\ImportStorageTransformer;
 use Drupal\Core\Config\StorageInterface;
-use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
+use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Diff\DiffFormatter;
 use Drupal\Core\File\Exception\FileException;
 use Drupal\Core\File\FileSystemInterface;
@@ -19,7 +19,7 @@
 /**
  * Returns responses for config module routes.
  */
-class ConfigController implements ContainerInjectionInterface {
+class ConfigController extends ControllerBase {
 
   /**
    * The target storage.
@@ -177,7 +177,7 @@ public function diff($source_name, $target_name = NULL, $collection = NULL) {
 
     $build = [];
 
-    $build['#title'] = t('View changes of @config_file', ['@config_file' => $source_name]);
+    $build['#title'] = $this->t('View changes of @config_file', ['@config_file' => $source_name]);
     // Add the CSS for the inline diff.
     $build['#attached']['library'][] = 'system/diff';
 
@@ -187,8 +187,8 @@ public function diff($source_name, $target_name = NULL, $collection = NULL) {
         'class' => ['diff'],
       ],
       '#header' => [
-        ['data' => t('Active'), 'colspan' => '2'],
-        ['data' => t('Staged'), 'colspan' => '2'],
+        ['data' => $this->t('Active'), 'colspan' => '2'],
+        ['data' => $this->t('Staged'), 'colspan' => '2'],
       ],
       '#rows' => $this->diffFormatter->format($diff),
     ];
@@ -200,7 +200,7 @@ public function diff($source_name, $target_name = NULL, $collection = NULL) {
           'dialog-cancel',
         ],
       ],
-      '#title' => "Back to 'Synchronize configuration' page.",
+      '#title' => $this->t("Back to 'Synchronize configuration' page."),
       '#url' => Url::fromRoute('config.sync'),
     ];
 
diff --git a/core/modules/config/src/Form/ConfigSync.php b/core/modules/config/src/Form/ConfigSync.php
index 2d8be27114..8ae2af8610 100644
--- a/core/modules/config/src/Form/ConfigSync.php
+++ b/core/modules/config/src/Form/ConfigSync.php
@@ -365,10 +365,10 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
         $batch = [
           'operations' => [],
           'finished' => [ConfigImporterBatch::class, 'finish'],
-          'title' => t('Synchronizing configuration'),
-          'init_message' => t('Starting configuration synchronization.'),
-          'progress_message' => t('Completed step @current of @total.'),
-          'error_message' => t('Configuration synchronization has encountered an error.'),
+          'title' => $this->t('Synchronizing configuration'),
+          'init_message' => $this->t('Starting configuration synchronization.'),
+          'progress_message' => $this->t('Completed step @current of @total.'),
+          'error_message' => $this->t('Configuration synchronization has encountered an error.'),
         ];
         foreach ($sync_steps as $sync_step) {
           $batch['operations'][] = [[ConfigImporterBatch::class, 'process'], [$config_importer, $sync_step]];
diff --git a/core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php b/core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php
index de9fefcc4a..411a7a0dec 100644
--- a/core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php
+++ b/core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php
@@ -4,6 +4,7 @@
 
 use Drupal\Core\Cache\CacheableMetadata;
 use Drupal\Core\Cache\Context\CacheContextInterface;
+use Drupal\Core\StringTranslation\TranslatableMarkup;
 
 /**
  * A cache context service intended for the config override integration test.
@@ -16,7 +17,7 @@ class ConfigOverrideIntegrationTestCacheContext implements CacheContextInterface
    * {@inheritdoc}
    */
   public static function getLabel() {
-    return t('Config override integration test');
+    return new TranslatableMarkup('Config override integration test');
   }
 
   /**
diff --git a/core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php b/core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php
index b9e2490f37..67a12c32c9 100644
--- a/core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php
+++ b/core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php
@@ -4,6 +4,7 @@
 
 use Drupal\Core\Cache\CacheableMetadata;
 use Drupal\Core\Cache\Context\CacheContextInterface;
+use Drupal\Core\StringTranslation\TranslatableMarkup;
 
 /**
  * Defines the PirateDayCacheContext service that allows to cache the booty.
@@ -27,7 +28,7 @@ class PirateDayCacheContext implements CacheContextInterface {
    * {@inheritdoc}
    */
   public static function getLabel() {
-    return t('Pirate day');
+    return new TranslatableMarkup('Pirate day');
   }
 
   /**
diff --git a/core/modules/config/tests/config_test/src/ConfigTestForm.php b/core/modules/config/tests/config_test/src/ConfigTestForm.php
index 49cc195832..a01b6d400f 100644
--- a/core/modules/config/tests/config_test/src/ConfigTestForm.php
+++ b/core/modules/config/tests/config_test/src/ConfigTestForm.php
@@ -23,7 +23,7 @@ public function form(array $form, FormStateInterface $form_state) {
     $entity = $this->entity;
     $form['label'] = [
       '#type' => 'textfield',
-      '#title' => 'Label',
+      '#title' => $this->t('Label'),
       '#default_value' => $entity->label(),
       '#required' => TRUE,
     ];
@@ -38,12 +38,12 @@ public function form(array $form, FormStateInterface $form_state) {
     ];
     $form['weight'] = [
       '#type' => 'weight',
-      '#title' => 'Weight',
+      '#title' => $this->t('Weight'),
       '#default_value' => $entity->get('weight'),
     ];
     $form['style'] = [
       '#type' => 'select',
-      '#title' => 'Image style',
+      '#title' => $this->t('Image style'),
       '#options' => [],
       '#default_value' => $entity->get('style'),
       '#access' => FALSE,
@@ -66,11 +66,11 @@ public function form(array $form, FormStateInterface $form_state) {
     ];
     $form['size_wrapper']['size'] = [
       '#type' => 'select',
-      '#title' => 'Size',
+      '#title' => $this->t('Size'),
       '#options' => [
         'custom' => 'Custom',
       ],
-      '#empty_option' => '- None -',
+      '#empty_option' => $this->t('- None -'),
       '#default_value' => $size,
       '#ajax' => [
         'callback' => '::updateSize',
@@ -79,7 +79,7 @@ public function form(array $form, FormStateInterface $form_state) {
     ];
     $form['size_wrapper']['size_submit'] = [
       '#type' => 'submit',
-      '#value' => t('Change size'),
+      '#value' => $this->t('Change size'),
       '#attributes' => [
         'class' => ['js-hide'],
       ],
@@ -87,7 +87,7 @@ public function form(array $form, FormStateInterface $form_state) {
     ];
     $form['size_wrapper']['size_value'] = [
       '#type' => 'select',
-      '#title' => 'Custom size value',
+      '#title' => $this->t('Custom size value'),
       '#options' => [
         'small' => 'Small',
         'medium' => 'Medium',
@@ -99,7 +99,7 @@ public function form(array $form, FormStateInterface $form_state) {
 
     $form['langcode'] = [
       '#type' => 'language_select',
-      '#title' => t('Language'),
+      '#title' => $this->t('Language'),
       '#languages' => LanguageInterface::STATE_ALL,
       '#default_value' => $entity->language()->getId(),
     ];
@@ -107,11 +107,11 @@ public function form(array $form, FormStateInterface $form_state) {
     $form['actions'] = ['#type' => 'actions'];
     $form['actions']['submit'] = [
       '#type' => 'submit',
-      '#value' => 'Save',
+      '#value' => $this->t('Save'),
     ];
     $form['actions']['delete'] = [
       '#type' => 'submit',
-      '#value' => 'Delete',
+      '#value' => $this->t('Delete'),
     ];
 
     return $form;
diff --git a/core/modules/config/tests/config_test/src/ConfigTestListBuilder.php b/core/modules/config/tests/config_test/src/ConfigTestListBuilder.php
index e94a68b71f..8fbfca03c8 100644
--- a/core/modules/config/tests/config_test/src/ConfigTestListBuilder.php
+++ b/core/modules/config/tests/config_test/src/ConfigTestListBuilder.php
@@ -16,8 +16,8 @@ class ConfigTestListBuilder extends ConfigEntityListBuilder {
    * {@inheritdoc}
    */
   public function buildHeader() {
-    $header['label'] = t('Label');
-    $header['id'] = t('Machine name');
+    $header['label'] = $this->t('Label');
+    $header['id'] = $this->t('Machine name');
     return $header + parent::buildHeader();
   }
 
