diff --git a/src/Ds.php b/src/Ds.php
index 8acc559..52b6616 100644
--- a/src/Ds.php
+++ b/src/Ds.php
@@ -175,7 +175,7 @@ class Ds {
       $classes[$name] = array();
       $custom_classes = \Drupal::config('ds.settings')->get('classes.' . $name);
       if (!empty($custom_classes)) {
-        $classes[$name][''] = t('None');
+        $classes[$name][''] = $this->t('None');
         foreach ($custom_classes as $value) {
           $classes_splitted = explode("|", $value);
           $key = trim($classes_splitted[0]);
diff --git a/src/Form/ChangeLayoutForm.php b/src/Form/ChangeLayoutForm.php
index 7ad2247..695b9f5 100644
--- a/src/Form/ChangeLayoutForm.php
+++ b/src/Form/ChangeLayoutForm.php
@@ -195,7 +195,7 @@ class ChangeLayoutForm extends FormBase {
     \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
 
     // Show message.
-    drupal_set_message(t('The layout change has been saved.'));
+    drupal_set_message($this->t('The layout change has been saved.'));
   }
 
 }
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/Derivative/DsEntityRow.php b/src/Plugin/Derivative/DsEntityRow.php
index 91fd78d..e4edd7f 100644
--- a/src/Plugin/Derivative/DsEntityRow.php
+++ b/src/Plugin/Derivative/DsEntityRow.php
@@ -93,7 +93,7 @@ class DsEntityRow implements ContainerDeriverInterface {
           'id' => 'ds_entity:' . $entity_type_id,
           'provider' => 'ds',
           'title' => 'Display Suite: ' . $entity_type->getLabel(),
-          'help' => t('Display the @label', array('@label' => $entity_type->getLabel())),
+          'help' => $this->t('Display the @label', array('@label' => $entity_type->getLabel())),
           'base' => array($entity_type->getDataTable() ?: $entity_type->getBaseTable()),
           'entity_type' => $entity_type_id,
           'display_types' => array('normal'),
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;
diff --git a/src/Plugin/views/row/EntityRow.php b/src/Plugin/views/row/EntityRow.php
index df881e2..7d56105 100644
--- a/src/Plugin/views/row/EntityRow.php
+++ b/src/Plugin/views/row/EntityRow.php
@@ -158,7 +158,7 @@ class EntityRow extends ViewsEntityRow {
       $form['grouping_fieldset']['group_field_function'] = array(
         '#type' => 'textfield',
         '#title' => 'Heading function',
-        '#description' => Html::escape(t('The value of the field can be in a very raw format (eg, date created). Enter a custom function which you can use to format that value. The value and the object will be passed into that function eg. custom_function($raw_value, $object);')),
+        '#description' => Html::escape($this->t('The value of the field can be in a very raw format (eg, date created). Enter a custom function which you can use to format that value. The value and the object will be passed into that function eg. custom_function($raw_value, $object);')),
         '#default_value' => isset($this->options['grouping_fieldset']['group_field_function']) ? $this->options['grouping_fieldset']['group_field_function'] : '',
       );
     }
diff --git a/src/Tests/BlockFieldPluginTest.php b/src/Tests/BlockFieldPluginTest.php
index 947faff..7d481b3 100644
--- a/src/Tests/BlockFieldPluginTest.php
+++ b/src/Tests/BlockFieldPluginTest.php
@@ -85,18 +85,18 @@ class BlockFieldPluginTest extends FastTestBase {
 
     // Look at node and verify the block title is overridden.
     $this->drupalGet('node/' . $node->id());
-    $this->assertRaw('Test block title field', t('Default field label.'));
+    $this->assertRaw('Test block title field', $this->t('Default field label.'));
 
     // Update testing label.
     $edit = array(
       'use_block_title' => '1',
     );
-    $this->drupalPostForm('admin/structure/ds/fields/manage_block/test_block_title_field', $edit, t('Save'));
-    $this->assertText(t('The field Test block title field has been saved'), t('Test field label override updated'));
+    $this->drupalPostForm('admin/structure/ds/fields/manage_block/test_block_title_field', $edit, $this->t('Save'));
+    $this->assertText(t('The field Test block title field has been saved'), $this->t('Test field label override updated'));
 
     // Look at node and verify the block title is overridden.
     $this->drupalGet('node/' . $node->id());
-    $this->assertRaw('Block title from view', t('Field label from view block display.'));
+    $this->assertRaw('Block title from view', $this->t('Field label from view block display.'));
   }
 
   /**
diff --git a/src/Tests/BlockTest.php b/src/Tests/BlockTest.php
index cb62201..83d16d9 100644
--- a/src/Tests/BlockTest.php
+++ b/src/Tests/BlockTest.php
@@ -63,14 +63,14 @@ class BlockTest extends FastTestBase {
       'label' => 'Basic Block',
       'id' => 'basic',
     );
-    $this->drupalPostForm('admin/structure/block/block-content/types/add', $edit, t('Save'), array());
+    $this->drupalPostForm('admin/structure/block/block-content/types/add', $edit, $this->t('Save'), array());
     $this->assertText('Custom block type Basic Block has been added.', 'Basic block type added');
 
     // Create a basic block.
     $edit = array();
     $edit['info[0][value]'] = 'Test Block';
     $edit['body[0][value]'] = $this->randomMachineName(16);
-    $this->drupalPostForm('block/add/basic', $edit, t('Save'), array());
+    $this->drupalPostForm('block/add/basic', $edit, $this->t('Save'), array());
     $this->assertText('Basic Block Test Block has been created.', 'Basic Block Test Block created');
 
     // Place the block.
@@ -81,12 +81,12 @@ class BlockTest extends FastTestBase {
     );
     $block = BlockContent::load(1);
     $url = 'admin/structure/block/add/block_content:' . $block->uuid() . '/' . $this->config('system.theme')->get('default');
-    $this->drupalPostForm($url, $instance, t('Save block'));
+    $this->drupalPostForm($url, $instance, $this->t('Save block'));
 
     // Change to a DS layout.
     $url = 'admin/structure/block/block-content/manage/basic/display';
     $edit = array('layout' => 'ds_2col');
-    $this->drupalPostForm($url, $edit, t('Save'), array());
+    $this->drupalPostForm($url, $edit, $this->t('Save'), array());
 
     $fields = array(
       'fields[block_description][region]' => 'left',
diff --git a/src/Tests/DsTestTrait.php b/src/Tests/DsTestTrait.php
index 9ee47cd..97f7bef 100644
--- a/src/Tests/DsTestTrait.php
+++ b/src/Tests/DsTestTrait.php
@@ -15,19 +15,19 @@ trait DsTestTrait {
       'layout' => 'ds_2col_stacked',
     );
 
-    $this->drupalPostForm($url, $edit, t('Save'), $options);
+    $this->drupalPostForm($url, $edit, $this->t('Save'), $options);
 
     $assert += array(
       'regions' => array(
-        'header' => '<td colspan="8">' . t('Header') . '</td>',
-        'left' => '<td colspan="8">' . t('Left') . '</td>',
-        'right' => '<td colspan="8">' . t('Right') . '</td>',
-        'footer' => '<td colspan="8">' . t('Footer') . '</td>',
+        'header' => '<td colspan="8">' . $this->t('Header') . '</td>',
+        'left' => '<td colspan="8">' . $this->t('Left') . '</td>',
+        'right' => '<td colspan="8">' . $this->t('Right') . '</td>',
+        'footer' => '<td colspan="8">' . $this->t('Footer') . '</td>',
       ),
     );
 
     foreach ($assert['regions'] as $region => $raw) {
-      $this->assertRaw($region, t('Region @region found', array('@region' => $region)));
+      $this->assertRaw($region, $this->t('Region @region found', array('@region' => $region)));
     }
   }
 
@@ -40,8 +40,8 @@ trait DsTestTrait {
       'regions' => "class_name_1\nclass_name_2|Friendly name",
     );
 
-    $this->drupalPostForm('admin/structure/ds/classes', $edit, t('Save configuration'));
-    $this->assertText(t('The configuration options have been saved.'), t('CSS classes configuration saved'));
+    $this->drupalPostForm('admin/structure/ds/classes', $edit, $this->t('Save configuration'));
+    $this->assertText($this->t('The configuration options have been saved.'), $this->t('CSS classes configuration saved'));
     $this->assertRaw('class_name_1', 'Class name 1 found');
     $this->assertRaw('class_name_2', 'Class name 1 found');
   }
@@ -56,14 +56,14 @@ trait DsTestTrait {
       "layout_configuration[ds_classes][footer][]" => 'class_name_2',
     );
 
-    $this->drupalPostForm($url, $edit, t('Save'));
+    $this->drupalPostForm($url, $edit, $this->t('Save'));
   }
 
   /**
    * Configure Field UI.
    */
   function dsConfigureUi($edit, $url = 'admin/structure/types/manage/article/display') {
-    $this->drupalPostForm($url, $edit, t('Save'));
+    $this->drupalPostForm($url, $edit, $this->t('Save'));
   }
 
   /**
@@ -79,8 +79,8 @@ trait DsTestTrait {
       unset($edit['fields[' . $field_name . '][settings_edit_form][third_party_settings][ds][ft][id]']);
     }
 
-    $this->drupalPostForm(NULL, $edit, t('Update'));
-    $this->drupalPostForm(NULL, array(), t('Save'));
+    $this->drupalPostForm(NULL, $edit, $this->t('Update'));
+    $this->drupalPostForm(NULL, array(), $this->t('Save'));
   }
 
   /**
@@ -96,8 +96,8 @@ trait DsTestTrait {
       unset($edit['fields[' . $field_name . '][settings_edit_form][third_party_settings][ds][ds_limit]']);
     }
 
-    $this->drupalPostForm(NULL, $edit, t('Update'));
-    $this->drupalPostForm(NULL, array(), t('Save'));
+    $this->drupalPostForm(NULL, $edit, $this->t('Update'));
+    $this->drupalPostForm(NULL, array(), $this->t('Save'));
   }
 
   /**
@@ -116,8 +116,8 @@ trait DsTestTrait {
       'content[value]' => 'Test field',
     );
 
-    $this->drupalPostForm($url, $edit, t('Save'));
-    $this->assertText(t('The field @name has been saved', array('@name' => $edit['name'])), t('@name field has been saved', array('@name' => $edit['name'])));
+    $this->drupalPostForm($url, $edit, $this->t('Save'));
+    $this->assertText($this->t('The field @name has been saved', array('@name' => $edit['name'])), $this->t('@name field has been saved', array('@name' => $edit['name'])));
   }
 
   /**
@@ -136,8 +136,8 @@ trait DsTestTrait {
       'block' => 'system_powered_by_block',
     );
 
-    $this->drupalPostForm($url, $edit, t('Save'));
-    $this->assertText(t('The field @name has been saved', array('@name' => $edit['name'])), t('@name field has been saved', array('@name' => $edit['name'])));
+    $this->drupalPostForm($url, $edit, $this->t('Save'));
+    $this->assertText($this->t('The field @name has been saved', array('@name' => $edit['name'])), $this->t('@name field has been saved', array('@name' => $edit['name'])));
   }
 
   /**
@@ -154,7 +154,7 @@ trait DsTestTrait {
 
     // Create field CSS classes.
     $edit = array('fields' => "test_field_class\ntest_field_class_2|Field class 2\n[node:nid]");
-    $this->drupalPostForm('admin/structure/ds/classes', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/structure/ds/classes', $edit, $this->t('Save configuration'));
 
     // Create a token field.
     $token_field = array(
diff --git a/src/Tests/DynamicFieldPluginTest.php b/src/Tests/DynamicFieldPluginTest.php
index 12220d1..0a141e4 100644
--- a/src/Tests/DynamicFieldPluginTest.php
+++ b/src/Tests/DynamicFieldPluginTest.php
@@ -24,25 +24,25 @@ class DynamicFieldPluginTest extends FastTestBase {
     $this->dsCreateTokenField($edit);
 
     // Create the same and assert it already exists.
-    $this->drupalPostForm('admin/structure/ds/fields/manage_token', $edit, t('Save'));
-    $this->assertText(t('The machine-readable name is already in use. It must be unique.'), t('Field testing already exists.'));
+    $this->drupalPostForm('admin/structure/ds/fields/manage_token', $edit,$this->t('Save'));
+    $this->assertText($this->t('The machine-readable name is already in use. It must be unique.'), $this->t('Field testing already exists.'));
 
     $this->dsSelectLayout();
 
     // Assert it's found on the Field UI for article.
     $this->drupalGet('admin/structure/types/manage/article/display');
-    $this->assertRaw('fields[dynamic_token_field:node-test_field][weight]', t('Test field found on node article.'));
+    $this->assertRaw('fields[dynamic_token_field:node-test_field][weight]', $this->t('Test field found on node article.'));
 
     // Assert it's not found on the Field UI for users.
     $this->drupalGet('admin/config/people/accounts/display');
-    $this->assertNoRaw('fields[dynamic_token_field:node-test_field][weight]', t('Test field not found on user.'));
+    $this->assertNoRaw('fields[dynamic_token_field:node-test_field][weight]', $this->t('Test field not found on user.'));
 
     // Update testing label.
     $edit = array(
       'name' => 'Test field 2',
     );
-    $this->drupalPostForm('admin/structure/ds/fields/manage_token/test_field', $edit, t('Save'));
-    $this->assertText(t('The field Test field 2 has been saved'), t('Test field label updated'));
+    $this->drupalPostForm('admin/structure/ds/fields/manage_token/test_field', $edit, $this->t('Save'));
+    $this->assertText($this->t('The field Test field 2 has been saved'), $this->t('Test field label updated'));
 
     // Use the Field UI limit option.
     $this->dsSelectLayout(array(), array(), 'admin/structure/types/manage/page/display');
@@ -50,31 +50,31 @@ class DynamicFieldPluginTest extends FastTestBase {
     $edit = array(
       'ui_limit' => 'article|default',
     );
-    $this->drupalPostForm('admin/structure/ds/fields/manage_token/test_field', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/ds/fields/manage_token/test_field', $edit, $this->t('Save'));
 
     $this->drupalGet('admin/structure/types/manage/article/display');
-    $this->assertRaw('fields[dynamic_token_field:node-test_field][weight]', t('Test field field found on node article, default.'));
+    $this->assertRaw('fields[dynamic_token_field:node-test_field][weight]', $this->t('Test field field found on node article, default.'));
 
     $this->drupalGet('admin/structure/types/manage/article/display/teaser');
-    $this->assertNoRaw('fields[dynamic_token_field:node-test_field][weight]', t('Test field field not found on node article, teaser.'));
+    $this->assertNoRaw('fields[dynamic_token_field:node-test_field][weight]', $this->t('Test field field not found on node article, teaser.'));
     $this->drupalGet('admin/structure/types/manage/page/display');
-    $this->assertNoRaw('fields[dynamic_token_field:node-test_field][weight]', t('Test field field not found on node page, default.'));
+    $this->assertNoRaw('fields[dynamic_token_field:node-test_field][weight]', $this->t('Test field field not found on node page, default.'));
     $edit = array(
       'ui_limit' => 'article|*',
     );
-    $this->drupalPostForm('admin/structure/ds/fields/manage_token/test_field', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/ds/fields/manage_token/test_field', $edit, $this->t('Save'));
     $this->drupalGet('admin/structure/types/manage/article/display');
-    $this->assertRaw('fields[dynamic_token_field:node-test_field][weight]', t('Test field field found on node article, default.'));
+    $this->assertRaw('fields[dynamic_token_field:node-test_field][weight]', $this->t('Test field field found on node article, default.'));
     $this->drupalGet('admin/structure/types/manage/article/display/teaser');
-    $this->assertRaw('fields[dynamic_token_field:node-test_field][weight]', t('Test field field found on node article, teaser.'));
+    $this->assertRaw('fields[dynamic_token_field:node-test_field][weight]', $this->t('Test field field found on node article, teaser.'));
 
     // Remove the field.
-    $this->drupalPostForm('admin/structure/ds/fields/delete/test_field', array(), t('Confirm'));
-    $this->assertText(t('The field Test field 2 has been deleted'), t('Test field removed'));
+    $this->drupalPostForm('admin/structure/ds/fields/delete/test_field', array(), $this->t('Confirm'));
+    $this->assertText($this->t('The field Test field 2 has been deleted'), $this->t('Test field removed'));
 
     // Assert the field is gone at the manage display screen.
     $this->drupalGet('admin/structure/types/manage/article/display');
-    $this->assertNoRaw('fields[dynamic_token_field:node-test_field][weight]', t('Test field field not found on node article.'));
+    $this->assertNoRaw('fields[dynamic_token_field:node-test_field][weight]', $this->t('Test field field not found on node article.'));
 
     // Block fields.
     $edit = array(
@@ -87,33 +87,33 @@ class DynamicFieldPluginTest extends FastTestBase {
     $this->dsCreateBlockField($edit);
 
     // Create the same and assert it already exists.
-    $this->drupalPostForm('admin/structure/ds/fields/manage_block', $edit, t('Save'));
-    $this->assertText(t('The machine-readable name is already in use. It must be unique.'), t('Block test field already exists.'));
+    $this->drupalPostForm('admin/structure/ds/fields/manage_block', $edit, $this->t('Save'));
+    $this->assertText($this->t('The machine-readable name is already in use. It must be unique.'), t('Block test field already exists.'));
 
     $this->dsSelectLayout();
 
     // Assert it's found on the Field UI for article.
     $this->drupalGet('admin/structure/types/manage/article/display');
-    $this->assertRaw('fields[dynamic_block_field:node-test_block_field][weight]', t('Test block field found on node article.'));
+    $this->assertRaw('fields[dynamic_block_field:node-test_block_field][weight]', $this->t('Test block field found on node article.'));
 
     // Assert it's not found on the Field UI for users.
     $this->drupalGet('admin/config/people/accounts/display');
-    $this->assertNoRaw('fields[dynamic_block_field:node-test_block_field][weight]', t('Test block field not found on user.'));
+    $this->assertNoRaw('fields[dynamic_block_field:node-test_block_field][weight]', $this->t('Test block field not found on user.'));
 
     // Update testing label.
     $edit = array(
       'name' => 'Test block field 2',
     );
-    $this->drupalPostForm('admin/structure/ds/fields/manage_block/test_block_field', $edit, t('Save'));
-    $this->assertText(t('The field Test block field 2 has been saved'), t('Test field label updated'));
+    $this->drupalPostForm('admin/structure/ds/fields/manage_block/test_block_field', $edit, $this->t('Save'));
+    $this->assertText(t('The field Test block field 2 has been saved'), $this->t('Test field label updated'));
 
     // Remove the block field.
-    $this->drupalPostForm('admin/structure/ds/fields/delete/test_block_field', array(), t('Confirm'));
-    $this->assertText(t('The field Test block field 2 has been deleted'), t('Test field removed'));
+    $this->drupalPostForm('admin/structure/ds/fields/delete/test_block_field', array(), $this->t('Confirm'));
+    $this->assertText(t('The field Test block field 2 has been deleted'), $this->t('Test field removed'));
 
     // Assert the block field is gone at the manage display screen.
     $this->drupalGet('admin/structure/types/manage/article/display');
-    $this->assertNoRaw('fields[dynamic_block_field:node-test_block_field][weight]', t('Test block field not found on node article.'));
+    $this->assertNoRaw('fields[dynamic_block_field:node-test_block_field][weight]', $this->t('Test block field not found on node article.'));
 
     // Create a configurable block field.
     $edit = array(
@@ -129,15 +129,15 @@ class DynamicFieldPluginTest extends FastTestBase {
     $edit = array(
       'depth' => '3',
     );
-    $this->drupalPostForm('admin/structure/ds/fields/manage_block/test_block_configurable/block_config', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/ds/fields/manage_block/test_block_configurable/block_config', $edit, $this->t('Save'));
 
     // Assert it's found on the Field UI for article.
     $this->drupalGet('admin/structure/types/manage/article/display');
-    $this->assertRaw('fields[dynamic_block_field:node-test_block_configurable][weight]', t('Test configurable block field found on node article.'));
+    $this->assertRaw('fields[dynamic_block_field:node-test_block_configurable][weight]', $this->t('Test configurable block field found on node article.'));
 
     // Assert it's not found on the Field UI for users.
     $this->drupalGet('admin/config/people/accounts/display');
-    $this->assertNoRaw('fields[dynamic_block_field:node-test_block_configurable][weight]', t('Test configurable block field not found on user.'));
+    $this->assertNoRaw('fields[dynamic_block_field:node-test_block_configurable][weight]', $this->t('Test configurable block field not found on user.'));
 
     // Add block to display.
     $fields = array(
@@ -150,17 +150,17 @@ class DynamicFieldPluginTest extends FastTestBase {
 
     // Look at node and verify the menu is visible.
     $this->drupalGet('node/' . $node->id());
-    $this->assertRaw('Add content', t('Tools menu found.'));
+    $this->assertRaw('Add content', $this->t('Tools menu found.'));
 
     // Try to set the depth to 3, to ensure we can save the block.
     $edit = array(
       'level' => '2',
     );
-    $this->drupalPostForm('admin/structure/ds/fields/manage_block/test_block_configurable/block_config', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/ds/fields/manage_block/test_block_configurable/block_config', $edit, $this->t('Save'));
 
     // Look at node and verify the menu is not visible.
     $this->drupalGet('node/' . $node->id());
-    $this->assertNoRaw('Add content', t('Tools menu not found.'));
+    $this->assertNoRaw('Add content', $this->t('Tools menu not found.'));
   }
 
 }
diff --git a/src/Tests/EntitiesTest.php b/src/Tests/EntitiesTest.php
index 611480e..0df9aac 100644
--- a/src/Tests/EntitiesTest.php
+++ b/src/Tests/EntitiesTest.php
@@ -61,7 +61,7 @@ class EntitiesTest extends FastTestBase {
     // Look at node and verify token and block field.
     $this->drupalGet('node/' . $node->id());
     $this->assertRaw('node--view-mode-full', 'Template file found (in full view mode)');
-    $this->assertRaw('<div class="field field--name-dynamic-token-fieldnode-token-field field--type-ds field--label-hidden field__item">', t('Token field found'));
+    $this->assertRaw('<div class="field field--name-dynamic-token-fieldnode-token-field field--type-ds field--label-hidden field__item">', $this->t('Token field found'));
     $xpath = $this->xpath('//div[@class="field field--name-dynamic-token-fieldnode-token-field field--type-ds field--label-hidden field__item"]');
     $this->assertEqual((string) $xpath[0]->p, $node->getTitle(), 'Token field content found');
     $this->assertRaw('group-header', 'Template found (region header)');
@@ -78,8 +78,8 @@ class EntitiesTest extends FastTestBase {
     );
     $teaser_assert = array(
       'regions' => array(
-        'left' => '<td colspan="8">' . t('Left') . '</td>',
-        'right' => '<td colspan="8">' . t('Right') . '</td>',
+        'left' => '<td colspan="8">' . $this->t('Left') . '</td>',
+        'right' => '<td colspan="8">' . $this->t('Right') . '</td>',
       ),
     );
     $this->dsSelectLayout($teaser, $teaser_assert, 'admin/structure/types/manage/article/display/teaser');
@@ -93,7 +93,7 @@ class EntitiesTest extends FastTestBase {
 
     // Switch view mode on full node page.
     $edit = array('ds_switch' => 'teaser');
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
+    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, $this->t('Save and keep published'));
     $this->assertRaw('node--view-mode-teaser', 'Switched to teaser mode');
     $this->assertRaw('group-left', 'Template found (region left)');
     $this->assertRaw('group-right', 'Template found (region right)');
@@ -101,7 +101,7 @@ class EntitiesTest extends FastTestBase {
     $this->assertNoRaw('group-footer', 'Template found (no region footer)');
 
     $edit = array('ds_switch' => '');
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
+    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, $this->t('Save and keep published'));
     $this->assertRaw('node--view-mode-full', 'Switched to full mode again');
 
     // Test all options of a block field.
@@ -123,14 +123,14 @@ class EntitiesTest extends FastTestBase {
     $edit = array(
       'display_modes_custom[revision]' => '1',
     );
-    $this->drupalPostForm('admin/structure/types/manage/article/display', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/types/manage/article/display', $edit, $this->t('Save'));
 
     // Enable the override revision mode and configure it.
     $edit = array(
       'fs3[override_node_revision]' => TRUE,
       'fs3[override_node_revision_view_mode]' => 'revision',
     );
-    $this->drupalPostForm('admin/structure/ds/settings', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/structure/ds/settings', $edit, $this->t('Save configuration'));
 
     // Select layout and configure fields.
     $edit = array(
@@ -138,8 +138,8 @@ class EntitiesTest extends FastTestBase {
     );
     $assert = array(
       'regions' => array(
-        'left' => '<td colspan="8">' . t('Left') . '</td>',
-        'right' => '<td colspan="8">' . t('Right') . '</td>',
+        'left' => '<td colspan="8">' . $this->t('Left') . '</td>',
+        'right' => '<td colspan="8">' . $this->t('Right') . '</td>',
       ),
     );
     $this->dsSelectLayout($edit, $assert, 'admin/structure/types/manage/article/display/revision');
@@ -155,7 +155,7 @@ class EntitiesTest extends FastTestBase {
       'revision' => TRUE,
       'revision_log[0][value]' => 'Test revision',
     );
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
+    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, $this->t('Save and keep published'));
 
     // Verify the revision is created.
     $this->drupalGet('node/' . $node->id() . '/revisions');
@@ -175,7 +175,7 @@ class EntitiesTest extends FastTestBase {
       'field_tags[0][target_id]' => 'Tag 1',
       'field_tags[1][target_id]' => 'Tag 2',
     );
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
+    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, $this->t('Save and keep published'));
     $edit = array(
       'fields[field_tags][region]' => 'right',
       'fields[field_tags][type]' => 'entity_reference_label',
@@ -201,7 +201,7 @@ class EntitiesTest extends FastTestBase {
     $edit = array(
       'title[0][value]' => 'Hi, I am an article <script>alert(\'with a javascript tag in the title\');</script>',
     );
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save and keep published'));
+    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, $this->t('Save and keep published'));
     $this->drupalGet('node/' . $node->id());
     $this->assertRaw('<h2>Hi, I am an article &lt;script&gt;alert(&#039;with a javascript tag in the title&#039;);&lt;/script&gt;</h2>');
   }
diff --git a/src/Tests/ExportablesTest.php b/src/Tests/ExportablesTest.php
index a612544..5e4b119 100644
--- a/src/Tests/ExportablesTest.php
+++ b/src/Tests/ExportablesTest.php
@@ -59,10 +59,10 @@ class ExportablesTest extends FastTestBase {
 
     $assert = array(
       'regions' => array(
-        'header' => '<td colspan="8">' . t('Header') . '</td>',
-        'left' => '<td colspan="8">' . t('Left') . '</td>',
-        'right' => '<td colspan="8">' . t('Right') . '</td>',
-        'footer' => '<td colspan="8">' . t('Footer') . '</td>',
+        'header' => '<td colspan="8">' . $this->t('Header') . '</td>',
+        'left' => '<td colspan="8">' . $this->t('Left') . '</td>',
+        'right' => '<td colspan="8">' . $this->t('Right') . '</td>',
+        'footer' => '<td colspan="8">' . $this->t('Footer') . '</td>',
       ),
     );
 
diff --git a/src/Tests/FieldGroupTest.php b/src/Tests/FieldGroupTest.php
index e871673..58dfa7e 100644
--- a/src/Tests/FieldGroupTest.php
+++ b/src/Tests/FieldGroupTest.php
@@ -28,8 +28,8 @@ class FieldGroupTest extends FastTestBase {
     );
     $layout_assert = array(
       'regions' => array(
-        'left' => '<td colspan="8">' . t('Left') . '</td>',
-        'right' => '<td colspan="8">' . t('Right') . '</td>',
+        'left' => '<td colspan="8">' . $this->t('Left') . '</td>',
+        'right' => '<td colspan="8">' . $this->t('Right') . '</td>',
       ),
     );
     $this->dsSelectLayout($layout, $layout_assert);
diff --git a/src/Tests/FieldPermissionsTest.php b/src/Tests/FieldPermissionsTest.php
index 16a1f49..cdc0f9f 100644
--- a/src/Tests/FieldPermissionsTest.php
+++ b/src/Tests/FieldPermissionsTest.php
@@ -55,7 +55,7 @@ class FieldPermissionsTest extends FastTestBase {
       'authenticated[view node_author on node]' => 1,
       'authenticated[view test_field on node]' => 1,
     );
-    $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions'));
+    $this->drupalPostForm('admin/people/permissions', $edit, $this->t('Save permissions'));
     $this->drupalGet('node/' . $node->id());
     $this->assertRaw('group-left', 'Template found (region left)');
     $this->assertText('Test field plugin on node ' . $node->id(), 'Test field plugin found');
diff --git a/src/Tests/FieldTemplateTest.php b/src/Tests/FieldTemplateTest.php
index 9ddfaf4..935ff09 100644
--- a/src/Tests/FieldTemplateTest.php
+++ b/src/Tests/FieldTemplateTest.php
@@ -68,7 +68,7 @@ class FieldTemplateTest extends FastTestBase {
     $edit = array(
       'fs1[ft-default]' => 'reset',
     );
-    $this->drupalPostForm('admin/structure/ds/settings', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/structure/ds/settings', $edit, $this->t('Save configuration'));
 
     // As long as we don't change anything in the UI, the default template will
     // be used.
@@ -107,7 +107,7 @@ class FieldTemplateTest extends FastTestBase {
     $edit = array(
       'fs1[ft-show-colon]' => 'reset',
     );
-    $this->drupalPostForm('admin/structure/ds/settings', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/structure/ds/settings', $edit, $this->t('Save configuration'));
     // Clear node cache to get the colon.
     $tags = $node->getCacheTags();
     Cache::invalidateTags($tags);
diff --git a/src/Tests/HiddenRegionTest.php b/src/Tests/HiddenRegionTest.php
index 4ff1686..c0f30c0 100644
--- a/src/Tests/HiddenRegionTest.php
+++ b/src/Tests/HiddenRegionTest.php
@@ -17,7 +17,7 @@ class HiddenRegionTest extends FastTestBase {
     $edit = array(
       'fs3[hidden_region]' => TRUE,
     );
-    $this->drupalPostForm('admin/structure/ds/settings', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/structure/ds/settings', $edit, $this->t('Save configuration'));
 
     $this->dsSelectLayout();
 
diff --git a/src/Tests/LayoutClassesTest.php b/src/Tests/LayoutClassesTest.php
index 00e9644..f47a171 100644
--- a/src/Tests/LayoutClassesTest.php
+++ b/src/Tests/LayoutClassesTest.php
@@ -46,10 +46,10 @@ class LayoutClassesTest extends FastTestBase {
 
     $assert = array(
       'regions' => array(
-        'header' => '<td colspan="8">' . t('Header') . '</td>',
-        'left' => '<td colspan="8">' . t('Left') . '</td>',
-        'right' => '<td colspan="8">' . t('Right') . '</td>',
-        'footer' => '<td colspan="8">' . t('Footer') . '</td>',
+        'header' => '<td colspan="8">' . $this->t('Header') . '</td>',
+        'left' => '<td colspan="8">' . $this->t('Left') . '</td>',
+        'right' => '<td colspan="8">' . $this->t('Right') . '</td>',
+        'footer' => '<td colspan="8">' . $this->t('Footer') . '</td>',
       ),
     );
 
@@ -79,18 +79,18 @@ class LayoutClassesTest extends FastTestBase {
     $entity_display = entity_load('entity_view_display', 'node.article.default');
     $data = $entity_display->getThirdPartySettings('ds');
 
-    $this->assertTrue(!empty($data), t('Configuration found for layout settings for node article'));
-    $this->assertTrue(in_array('ds_extras_extra_test_field', $data['regions']['header']), t('Extra field is in header'));
-    $this->assertTrue(in_array('node_post_date', $data['regions']['header']), t('Post date is in header'));
-    $this->assertTrue(in_array('dynamic_token_field:node-test_field', $data['regions']['left']), t('Test field is in left'));
-    $this->assertTrue(in_array('node_author', $data['regions']['left']), t('Author is in left'));
-    $this->assertTrue(in_array('node_links', $data['regions']['left']), t('Links is in left'));
-    $this->assertTrue(in_array('dynamic_block_field:node-test_block_field', $data['regions']['left']), t('Test block field is in left'));
-    $this->assertTrue(in_array('body', $data['regions']['right']), t('Body is in right'));
-    $this->assertTrue(in_array('class_name_1', $data['layout']['settings']['classes']['header']), t('Class name 1 is in header'));
-    $this->assertTrue(empty($data['layout']['settings']['classes']['left']), t('Left has no classes'));
-    $this->assertTrue(empty($data['layout']['settings']['classes']['right']), t('Right has classes'));
-    $this->assertTrue(in_array('class_name_2', $data['layout']['settings']['classes']['footer']), t('Class name 2 is in header'));
+    $this->assertTrue(!empty($data), $this->t('Configuration found for layout settings for node article'));
+    $this->assertTrue(in_array('ds_extras_extra_test_field', $data['regions']['header']), $this->t('Extra field is in header'));
+    $this->assertTrue(in_array('node_post_date', $data['regions']['header']), $this->t('Post date is in header'));
+    $this->assertTrue(in_array('dynamic_token_field:node-test_field', $data['regions']['left']), $this->t('Test field is in left'));
+    $this->assertTrue(in_array('node_author', $data['regions']['left']), $this->t('Author is in left'));
+    $this->assertTrue(in_array('node_links', $data['regions']['left']), $this->t('Links is in left'));
+    $this->assertTrue(in_array('dynamic_block_field:node-test_block_field', $data['regions']['left']), $this->t('Test block field is in left'));
+    $this->assertTrue(in_array('body', $data['regions']['right']), $this->t('Body is in right'));
+    $this->assertTrue(in_array('class_name_1', $data['layout']['settings']['classes']['header']), $this->t('Class name 1 is in header'));
+    $this->assertTrue(empty($data['layout']['settings']['classes']['left']), $this->t('Left has no classes'));
+    $this->assertTrue(empty($data['layout']['settings']['classes']['right']), $this->t('Right has classes'));
+    $this->assertTrue(in_array('class_name_2', $data['layout']['settings']['classes']['footer']), $this->t('Class name 2 is in header'));
 
     // Create a article node and verify settings.
     $settings = array(
@@ -111,10 +111,10 @@ class LayoutClassesTest extends FastTestBase {
     $this->assertRaw('class_name_2 group-footer', 'Class found (class_name_2)');
 
     // Assert custom fields.
-    $this->assertRaw('field--name-dynamic-token-fieldnode-test-field', t('Custom field found'));
-    $this->assertRaw('field--name-dynamic-block-fieldnode-test-block-field', t('Custom block field found'));
+    $this->assertRaw('field--name-dynamic-token-fieldnode-test-field', $this->t('Custom field found'));
+    $this->assertRaw('field--name-dynamic-block-fieldnode-test-block-field', $this->t('Custom block field found'));
 
-    $this->assertRaw('Submitted by', t('Submitted field found'));
+    $this->assertRaw('Submitted by', $this->t('Submitted field found'));
     $this->assertText('This is an extra field made available through "Extra fields" functionality.');
 
     // Test HTML5 wrappers.
@@ -134,7 +134,7 @@ class LayoutClassesTest extends FastTestBase {
 
     // Remove all the node classes.
     $edit = array('entity_classes' => 'no_classes');
-    $this->drupalPostForm('admin/structure/types/manage/article/display', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/types/manage/article/display', $edit, $this->t('Save'));
     $this->drupalGet('node/' . $node->id());
 
     // Assert that there are no entity classes.
@@ -142,7 +142,7 @@ class LayoutClassesTest extends FastTestBase {
 
     // Only show view mode (deprecated).
     $edit = array('entity_classes' => 'old_view_mode');
-    $this->drupalPostForm('admin/structure/types/manage/article/display', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/types/manage/article/display', $edit, $this->t('Save'));
     $this->drupalGet('node/' . $node->id());
 
     // Assert that the old view mode class name is added (deprecated).
@@ -150,7 +150,7 @@ class LayoutClassesTest extends FastTestBase {
 
     // Let's create a block field, enable the full mode first.
     $edit = array('display_modes_custom[full]' => '1');
-    $this->drupalPostForm('admin/structure/types/manage/article/display', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/types/manage/article/display', $edit, $this->t('Save'));
 
     // Select layout.
     $layout = array(
@@ -159,8 +159,8 @@ class LayoutClassesTest extends FastTestBase {
 
     $assert = array(
       'regions' => array(
-        'left' => '<td colspan="8">' . t('Left') . '</td>',
-        'right' => '<td colspan="8">' . t('Right') . '</td>',
+        'left' => '<td colspan="8">' . $this->t('Left') . '</td>',
+        'right' => '<td colspan="8">' . $this->t('Right') . '</td>',
       ),
     );
     $this->dsSelectLayout($layout, $assert, 'admin/structure/types/manage/article/display/full');
@@ -170,8 +170,8 @@ class LayoutClassesTest extends FastTestBase {
       'new_block_region' => 'Block region',
       'new_block_region_key' => 'block_region',
     );
-    $this->drupalPostForm('admin/structure/types/manage/article/display/full', $edit, t('Save'));
-    $this->assertRaw('<td colspan="9">' . t('Block region') . '</td>', 'Block region found');
+    $this->drupalPostForm('admin/structure/types/manage/article/display/full', $edit, $this->t('Save'));
+    $this->assertRaw('<td colspan="9">' . $this->t('Block region') . '</td>', 'Block region found');
 
     // Configure fields.
     $fields = array(
@@ -185,8 +185,8 @@ class LayoutClassesTest extends FastTestBase {
     // Change layout via admin/structure/ds/layout-change.
     // First verify that header and footer are not here.
     $this->drupalGet('admin/structure/types/manage/article/display/full');
-    $this->assertNoRaw('<td colspan="8">' . t('Header') . '</td>', 'Header region not found');
-    $this->assertNoRaw('<td colspan="8">' . t('Footer') . '</td>', 'Footer region not found');
+    $this->assertNoRaw('<td colspan="8">' . $this->t('Header') . '</td>', 'Header region not found');
+    $this->assertNoRaw('<td colspan="8">' . $this->t('Footer') . '</td>', 'Footer region not found');
 
     // Remap the regions.
     $edit = array(
@@ -194,21 +194,21 @@ class LayoutClassesTest extends FastTestBase {
       'ds_right' => 'footer',
       'ds_block_region' => 'footer',
     );
-    $this->drupalPostForm('admin/structure/ds/change-layout/node/article/full/ds_2col_stacked', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/ds/change-layout/node/article/full/ds_2col_stacked', $edit, $this->t('Save'));
     $this->drupalGet('admin/structure/types/manage/article/display/full');
 
     // Verify new regions.
-    $this->assertRaw('<td colspan="9">' . t('Header') . '</td>', 'Header region found');
-    $this->assertRaw('<td colspan="9">' . t('Footer') . '</td>', 'Footer region found');
-    $this->assertRaw('<td colspan="9">' . t('Block region') . '</td>', 'Block region found');
+    $this->assertRaw('<td colspan="9">' . $this->t('Header') . '</td>', 'Header region found');
+    $this->assertRaw('<td colspan="9">' . $this->t('Footer') . '</td>', 'Footer region found');
+    $this->assertRaw('<td colspan="9">' . $this->t('Block region') . '</td>', 'Block region found');
 
     // Verify settings.
     $entity_display = EntityViewDisplay::load('node.article.full', TRUE);
     $data = $entity_display->getThirdPartySettings('ds');
-    $this->assertTrue(in_array('node_author', $data['regions']['header']), t('Author is in header'));
-    $this->assertTrue(in_array('node_links', $data['regions']['header']), t('Links field is in header'));
-    $this->assertTrue(in_array('body', $data['regions']['footer']), t('Body field is in footer'));
-    $this->assertTrue(in_array('dynamic_token_field:node-test_field', $data['regions']['footer']), t('Test field is in footer'));
+    $this->assertTrue(in_array('node_author', $data['regions']['header']), $this->t('Author is in header'));
+    $this->assertTrue(in_array('node_links', $data['regions']['header']), $this->t('Links field is in header'));
+    $this->assertTrue(in_array('body', $data['regions']['footer']), $this->t('Body field is in footer'));
+    $this->assertTrue(in_array('dynamic_token_field:node-test_field', $data['regions']['footer']), $this->t('Test field is in footer'));
 
     // Test that a default view mode with no layout is not affected by a
     // disabled view mode.
@@ -216,7 +216,7 @@ class LayoutClassesTest extends FastTestBase {
       'layout' => '',
       'display_modes_custom[full]' => FALSE,
     );
-    $this->drupalPostForm('admin/structure/types/manage/article/display', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/types/manage/article/display', $edit, $this->t('Save'));
     $this->drupalGet('node/' . $node->id());
     $this->assertNoText('Test code field on node 1', 'No ds field from full view mode layout');
   }
diff --git a/src/Tests/LayoutFluidTest.php b/src/Tests/LayoutFluidTest.php
index bf2cf14..cb1a520 100644
--- a/src/Tests/LayoutFluidTest.php
+++ b/src/Tests/LayoutFluidTest.php
@@ -23,8 +23,8 @@ class LayoutFluidTest extends FastTestBase {
 
     $assert = array(
       'regions' => array(
-        'left' => '<td colspan="8">' . t('Left') . '</td>',
-        'right' => '<td colspan="8">' . t('Right') . '</td>',
+        'left' => '<td colspan="8">' . $this->t('Left') . '</td>',
+        'right' => '<td colspan="8">' . $this->t('Right') . '</td>',
       ),
     );
 
diff --git a/src/Tests/LayoutPluginTest.php b/src/Tests/LayoutPluginTest.php
index fdde4b4..4498d59 100644
--- a/src/Tests/LayoutPluginTest.php
+++ b/src/Tests/LayoutPluginTest.php
@@ -24,8 +24,8 @@ class LayoutPluginTest extends FastTestBase {
 
     $assert = array(
       'regions' => array(
-        'left' => '<td colspan="8">' . t('Left') . '</td>',
-        'right' => '<td colspan="8">' . t('Right') . '</td>',
+        'left' => '<td colspan="8">' . $this->t('Left') . '</td>',
+        'right' => '<td colspan="8">' . $this->t('Right') . '</td>',
       ),
     );
 
@@ -67,7 +67,7 @@ class LayoutPluginTest extends FastTestBase {
 
     $assert = array(
       'regions' => array(
-        'ds_content' => '<td colspan="8">' . t('Content') . '</td>',
+        'ds_content' => '<td colspan="8">' . $this->t('Content') . '</td>',
       ),
     );
 
diff --git a/src/Tests/TwigRenderTest.php b/src/Tests/TwigRenderTest.php
index 8ac245d..cfa3d65 100644
--- a/src/Tests/TwigRenderTest.php
+++ b/src/Tests/TwigRenderTest.php
@@ -24,7 +24,7 @@ class TwigRenderTest extends FastTestBase {
     );
     $layout_assert = array(
       'regions' => array(
-        'ds_content' => '<td colspan="8">' . t('Content') . '</td>',
+        'ds_content' => '<td colspan="8">' . $this->t('Content') . '</td>',
       ),
     );
     $this->dsSelectLayout($layout, $layout_assert);
@@ -42,7 +42,7 @@ class TwigRenderTest extends FastTestBase {
     $edit = array(
       'fs3[use_field_names]' => FALSE,
     );
-    $this->drupalPostForm('admin/structure/ds/settings', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/structure/ds/settings', $edit, $this->t('Save configuration'));
 
     $this->drupalGet('node/' . $node->id());
 
diff --git a/src/Tests/ViewsTest.php b/src/Tests/ViewsTest.php
index ae377bd..983ad60 100644
--- a/src/Tests/ViewsTest.php
+++ b/src/Tests/ViewsTest.php
@@ -71,21 +71,21 @@ class ViewsTest extends FastTestBase {
       'created' => REQUEST_TIME,
     );
     $node_1 = $this->drupalCreateNode($settings_1);
-    $this->drupalPostForm('node/' . $node_1->id() . '/edit', $edit_tag_1, t('Save and keep published'));
+    $this->drupalPostForm('node/' . $node_1->id() . '/edit', $edit_tag_1, $this->t('Save and keep published'));
     $settings_2 = array(
       'type' => 'article',
       'title' => 'Article 2',
       'created' => REQUEST_TIME + 3600,
     );
     $node_2 = $this->drupalCreateNode($settings_2);
-    $this->drupalPostForm('node/' . $node_2->id() . '/edit', $edit_tag_1, t('Save and keep published'));
+    $this->drupalPostForm('node/' . $node_2->id() . '/edit', $edit_tag_1, $this->t('Save and keep published'));
     $settings_3 = array(
       'type' => 'article',
       'title' => 'Article 3',
       'created' => REQUEST_TIME + 7200,
     );
     $node_3 = $this->drupalCreateNode($settings_3);
-    $this->drupalPostForm('node/' . $node_3->id() . '/edit', $edit_tag_2, t('Save and keep published'));
+    $this->drupalPostForm('node/' . $node_3->id() . '/edit', $edit_tag_2, $this->t('Save and keep published'));
 
     // Configure teaser and full layout.
     $layout = array(
@@ -97,8 +97,8 @@ class ViewsTest extends FastTestBase {
     );
     $assert = array(
       'regions' => array(
-        'left' => '<td colspan="8">' . t('Left') . '</td>',
-        'right' => '<td colspan="8">' . t('Right') . '</td>',
+        'left' => '<td colspan="8">' . $this->t('Left') . '</td>',
+        'right' => '<td colspan="8">' . $this->t('Right') . '</td>',
       ),
     );
     $this->dsSelectLayout($layout, $assert, 'admin/structure/types/manage/article/display/teaser');
@@ -114,10 +114,10 @@ class ViewsTest extends FastTestBase {
     );
     $assert = array(
       'regions' => array(
-        'first' => '<td colspan="8">' . t('First') . '</td>',
-        'second' => '<td colspan="8">' . t('Second') . '</td>',
-        'third' => '<td colspan="8">' . t('Third') . '</td>',
-        'fourth' => '<td colspan="8">' . t('Fourth') . '</td>',
+        'first' => '<td colspan="8">' . $this->t('First') . '</td>',
+        'second' => '<td colspan="8">' . $this->t('Second') . '</td>',
+        'third' => '<td colspan="8">' . $this->t('Third') . '</td>',
+        'fourth' => '<td colspan="8">' . $this->t('Fourth') . '</td>',
       ),
     );
     $this->dsSelectLayout($layout, $assert);
@@ -126,7 +126,7 @@ class ViewsTest extends FastTestBase {
     // Get default teaser view.
     $this->drupalGet('ds-testing');
     foreach (array('group-left', 'group-right') as $region) {
-      $this->assertRaw($region, t('Region @region found', array('@region' => $region)));
+      $this->assertRaw($region, $this->t('Region @region found', array('@region' => $region)));
     }
     $this->assertRaw('Article 1');
     $this->assertRaw('Article 2');
@@ -143,7 +143,7 @@ class ViewsTest extends FastTestBase {
       'fourth',
     );
     foreach ($regions as $region) {
-      $this->assertRaw($region, t('Region @region found', array('@region' => $region)));
+      $this->assertRaw($region, $this->t('Region @region found', array('@region' => $region)));
     }
     $this->assertNoRaw('Article 1');
     $this->assertRaw('Article 2');
@@ -152,7 +152,7 @@ class ViewsTest extends FastTestBase {
     // Get grouping view (without changing header function).
     $this->drupalGet('ds-testing-3');
     foreach (array('group-left', 'group-right') as $region) {
-      $this->assertRaw($region, t('Region @region found', array('@region' => $region)));
+      $this->assertRaw($region, $this->t('Region @region found', array('@region' => $region)));
     }
     $this->assertRaw('Article 1');
     $this->assertRaw('Article 2');
@@ -163,7 +163,7 @@ class ViewsTest extends FastTestBase {
     // Get grouping view (with changing header function).
     $this->drupalGet('ds-testing-4');
     foreach (array('group-left', 'group-right') as $region) {
-      $this->assertRaw($region, t('Region @region found', array('@region' => $region)));
+      $this->assertRaw($region, $this->t('Region @region found', array('@region' => $region)));
     }
     $this->assertRaw('Article 1');
     $this->assertRaw('Article 2');
