diff --git a/src/Form/ClassesForm.php b/src/Form/ClassesForm.php
index 64c9530..05f4dca 100644
--- a/src/Form/ClassesForm.php
+++ b/src/Form/ClassesForm.php
@@ -27,7 +27,7 @@ class ClassesForm extends ConfigFormBase {
       '#type' => 'textarea',
       '#title' => $this->t('CSS classes for regions'),
       '#default_value' => implode("\n", $config->get('classes.region')),
-      '#description' => t('Configure CSS classes which you can add to regions on the "manage display" screens. Add multiple CSS classes line by line.<br />If you want to have a friendly name, separate class and friendly name by |, but this is not required. eg:<br /><em>class_name_1<br />class_name_2|Friendly name<br />class_name_3</em>'),
+      '#description' => $this->t('Configure CSS classes which you can add to regions on the "manage display" screens. Add multiple CSS classes line by line.<br />If you want to have a friendly name, separate class and friendly name by |, but this is not required. eg:<br /><em>class_name_1<br />class_name_2|Friendly name<br />class_name_3</em>'),
     );
 
     // Only show field classes if DS extras module is enabled.
diff --git a/src/Form/EmergencyForm.php b/src/Form/EmergencyForm.php
index b80ac68..1406ec4 100644
--- a/src/Form/EmergencyForm.php
+++ b/src/Form/EmergencyForm.php
@@ -129,7 +129,7 @@ class EmergencyForm extends ConfigFormBase {
    */
   public function submitFieldAttach(array &$form, FormStateInterface $form_state) {
     $this->state->set('ds.disabled', ($this->state->get('ds.disabled', FALSE) ? FALSE : TRUE));
-    drupal_set_message(t('The configuration options have been saved.'));
+    drupal_set_message($this->t('The configuration options have been saved.'));
   }
 
   /**
@@ -162,7 +162,7 @@ class EmergencyForm extends ConfigFormBase {
       }
 
       if ($save) {
-        drupal_set_message(t('Block regions were removed.'));
+        drupal_set_message($this->t('Block regions were removed.'));
 
         // Clear cached block and ds plugin definitions.
         \Drupal::service('plugin.manager.block')->clearCachedDefinitions();
diff --git a/src/Form/FieldDeleteForm.php b/src/Form/FieldDeleteForm.php
index a86723f..dfb455d 100644
--- a/src/Form/FieldDeleteForm.php
+++ b/src/Form/FieldDeleteForm.php
@@ -79,7 +79,7 @@ class FieldDeleteForm extends ConfirmFormBase implements ContainerInjectionInter
     $this->field = $config->get();
 
     if (empty($this->field)) {
-      drupal_set_message(t('Field not found.'));
+      drupal_set_message($this->t('Field not found.'));
       return new RedirectResponse('/admin/structure/ds/fields');
     }
 
@@ -102,7 +102,7 @@ class FieldDeleteForm extends ConfirmFormBase implements ContainerInjectionInter
     // Redirect.
     $url = new Url('ds.fields_list');
     $form_state->setRedirectUrl($url);
-    drupal_set_message(t('The field @field has been deleted.', array('@field' => $field['label'])));
+    drupal_set_message($this->t('The field @field has been deleted.', array('@field' => $field['label'])));
   }
 
   /**
diff --git a/src/Form/FieldFormBase.php b/src/Form/FieldFormBase.php
index 245649f..eb9a671 100644
--- a/src/Form/FieldFormBase.php
+++ b/src/Form/FieldFormBase.php
@@ -245,7 +245,7 @@ class FieldFormBase extends ConfigFormBase implements ContainerInjectionInterfac
     // Redirect.
     $url = new Url('ds.fields_list');
     $form_state->setRedirectUrl($url);
-    drupal_set_message(t('The field %field has been saved.', array('%field' => $field['label'])));
+    drupal_set_message($this->t('The field %field has been saved.', array('%field' => $field['label'])));
   }
 
 }
diff --git a/src/Plugin/DsLayout.php b/src/Plugin/DsLayout.php
index 7b56eb0..834c4b1 100644
--- a/src/Plugin/DsLayout.php
+++ b/src/Plugin/DsLayout.php
@@ -164,7 +164,7 @@ class DsLayout extends LayoutBase {
         $url = Url::fromRoute('ds.classes');
         $destination = \Drupal::destination()->getAsArray();
         $url->setOption('query', $destination);
-        $form['ds_classes']['info'] = array('#markup' => \Drupal::l(t('Manage region and field CSS classes'), $url));
+        $form['ds_classes']['info'] = array('#markup' => \Drupal::l($this->t('Manage region and field CSS classes'), $url));
       }
     }
     else {
@@ -172,7 +172,7 @@ class DsLayout extends LayoutBase {
         $url = Url::fromRoute('ds.classes');
         $destination  = \Drupal::destination()->getAsArray();
         $url->setOption('query', $destination);
-        $form['ds_classes']['info'] = array('#markup' => '<p>' . $this->t('You have not defined any CSS classes which can be used on regions.') . '</p><p>' . \Drupal::l(t('Manage region and field CSS classes'), $url) . '</p>');
+        $form['ds_classes']['info'] = array('#markup' => '<p>' . $this->t('You have not defined any CSS classes which can be used on regions.') . '</p><p>' . \Drupal::l($this->t('Manage region and field CSS classes'), $url) . '</p>');
       }
       else {
         $form['ds_classes']['#access'] = FALSE;
