diff --git a/src/Controller/ContentAccessController.php b/src/Controller/ContentAccessController.php
index 7d0d851..9cef47b 100644
--- a/src/Controller/ContentAccessController.php
+++ b/src/Controller/ContentAccessController.php
@@ -15,7 +15,7 @@ class ContentAccessController extends ControllerBase {
    */
   public function getContentAccessTitle() {
     $node = \Drupal::routeMatch()->getParameter('node');
-    $title = t('Access control for <em>@title</em>', ['@title' => $node->getTitle()]);
+    $title = $this->t('Access control for <em>@title</em>', ['@title' => $node->getTitle()]);
 
     return $title;
   }
diff --git a/src/Form/ContentAccessAdminSettingsForm.php b/src/Form/ContentAccessAdminSettingsForm.php
index 749cf05..1788f3c 100644
--- a/src/Form/ContentAccessAdminSettingsForm.php
+++ b/src/Form/ContentAccessAdminSettingsForm.php
@@ -70,33 +70,33 @@ class ContentAccessAdminSettingsForm extends FormBase {
     // Per node:
     $form['node'] = array(
       '#type' => 'fieldset',
-      '#title' => t('Per content node access control settings'),
+      '#title' => $this->t('Per content node access control settings'),
       '#collapsible' => TRUE,
-      '#description' => t('Optionally you can enable per content node access control settings. If enabled, a new tab for the content access settings appears when viewing content. You have to configure permission to access these settings at the @permissions page.', [
-        '@permissions' => \Drupal::l(t('permissions'), Url::fromRoute('user.admin_permissions')),
+      '#description' => $this->t('Optionally you can enable per content node access control settings. If enabled, a new tab for the content access settings appears when viewing content. You have to configure permission to access these settings at the @permissions page.', [
+        '@permissions' => \Drupal::l($this->t('permissions'), Url::fromRoute('user.admin_permissions')),
       ]),
     );
     $form['node']['per_node'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Enable per content node access control settings'),
+      '#title' => $this->t('Enable per content node access control settings'),
       '#default_value' => content_access_get_settings('per_node', $node_type),
     );
 
     $form['advanced'] = array(
       '#type' => 'fieldset',
-      '#title' => t('Advanced'),
+      '#title' => $this->t('Advanced'),
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
     );
     $form['advanced']['priority'] = array(
       '#type' => 'weight',
-      '#title' => t('Give content node grants priority'),
+      '#title' => $this->t('Give content node grants priority'),
       '#default_value' => content_access_get_settings('priority', $node_type),
-      '#description' => t('If you are only using this access control module, you can safely ignore this. If you are using multiple access control modules you can adjust the priority of this module.'),
+      '#description' => $this->t('If you are only using this access control module, you can safely ignore this. If you are using multiple access control modules you can adjust the priority of this module.'),
     );
     $form['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Submit'),
+      '#value' => $this->t('Submit'),
       '#weight' => 10,
     );
 
@@ -165,11 +165,11 @@ class ContentAccessAdminSettingsForm extends FormBase {
 
       if (content_access_mass_update([$node_type])) {
         $node_types = node_type_get_names();
-        drupal_set_message(t('Permissions have been successfully rebuilt for the content type @types.', array('@types' => $node_types[$node_type])));
+        drupal_set_message($this->t('Permissions have been successfully rebuilt for the content type @types.', array('@types' => $node_types[$node_type])));
       }
     }
 
-    drupal_set_message(t('Your changes have been saved.'));
+    drupal_set_message($this->t('Your changes have been saved.'));
   }
 
   /**
diff --git a/src/Form/ContentAccessPageForm.php b/src/Form/ContentAccessPageForm.php
index 6604f58..43440d0 100644
--- a/src/Form/ContentAccessPageForm.php
+++ b/src/Form/ContentAccessPageForm.php
@@ -85,21 +85,21 @@ class ContentAccessPageForm extends FormBase {
 
     $form['reset'] = array(
       '#type' => 'submit',
-      '#value' => t('Reset to defaults'),
+      '#value' => $this->t('Reset to defaults'),
       '#weight' => 10,
       '#submit' => ['::pageResetSubmit'],
       '#access' => !empty(content_access_get_per_node_settings($node)),
     );
     $form['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Submit'),
+      '#value' => $this->t('Submit'),
       '#weight' => 10,
     );
 
     // @todo not true anymore?
     // http://drupal.org/update/modules/6/7#hook_node_access_records
     if (!$node->isPublished()) {
-      drupal_set_message(t("Warning: Your content is not published, so this settings are not taken into account as long as the content remains unpublished."), 'error');
+      drupal_set_message($this->t("Warning: Your content is not published, so this settings are not taken into account as long as the content remains unpublished."), 'error');
     }
 
     return $form;
@@ -139,7 +139,7 @@ class ContentAccessPageForm extends FormBase {
       $cache_backend->deleteAll();
     }
 
-    drupal_set_message(t('Your changes have been saved.'));
+    drupal_set_message($this->t('Your changes have been saved.'));
   }
 
   /**
@@ -157,7 +157,7 @@ class ContentAccessPageForm extends FormBase {
         $element[$key]['#disabled'] = TRUE;
         $element[$key]['#default_value'] = FALSE;
         $element[$key]['#prefix'] = '<span ' . new Attribute([
-          'title' => t("This role is lacking the permission '@perm', so it has no access.", ['@perm' => t('access content')])
+          'title' => $this->t("This role is lacking the permission '@perm', so it has no access.", ['@perm' => $this->t('access content')])
         ]) . '>';
         $element[$key]['#suffix'] = "</span>";
       }
@@ -166,7 +166,7 @@ class ContentAccessPageForm extends FormBase {
         $element[$key]['#disabled'] = TRUE;
         $element[$key]['#default_value'] = TRUE;
         $element[$key]['#prefix'] = '<span ' . new Attribute([
-          'title' => t("This role has '@perm' permission, so access is granted.", ['@perm' => t('administer nodes')])
+          'title' => $this->t("This role has '@perm' permission, so access is granted.", ['@perm' => $this->t('administer nodes')])
         ]) . '>';
         $element[$key]['#suffix'] = "</span>";
       }
@@ -183,7 +183,7 @@ class ContentAccessPageForm extends FormBase {
     content_access_delete_per_node_settings($storage['node']);
     \Drupal::entityManager()->getAccessControlHandler('node')->writeGrants($storage['node']);
 
-    drupal_set_message(t('The permissions have been reseted to the content type defaults.'));
+    drupal_set_message($this->t('The permissions have been reseted to the content type defaults.'));
   }
 
 
@@ -202,7 +202,7 @@ class ContentAccessPageForm extends FormBase {
           $element[$op][$rid]['#checked'] = TRUE;
 
           $prefix_attr = new Attribute([
-            'title' => t('Permission is granted due to the content type\'s access control settings.'),
+            'title' => $this->t('Permission is granted due to the content type\'s access control settings.'),
           ]);
           $element[$op][$rid]['#prefix'] = '<span ' . $prefix_attr . '>';
           $element[$op][$rid]['#suffix'] = "</span>";
