diff --git a/payment/uc_credit/src/Form/CreditCardTerminalForm.php b/payment/uc_credit/src/Form/CreditCardTerminalForm.php
index 04fd772..8804274 100644
--- a/payment/uc_credit/src/Form/CreditCardTerminalForm.php
+++ b/payment/uc_credit/src/Form/CreditCardTerminalForm.php
@@ -40,24 +40,24 @@ class CreditCardTerminalForm extends FormBase {
     $balance = uc_payment_balance($this->order);
 
     $form['order_total'] = array(
-      '#markup' => '<div><strong>' . t('Order total: @total', array('@total' => uc_currency_format($this->order->getTotal()))) . '</strong></div>',
+      '#markup' => '<div><strong>' . $this->t('Order total: @total', array('@total' => uc_currency_format($this->order->getTotal()))) . '</strong></div>',
     );
     $form['balance'] = array(
-      '#markup' => '<div><strong>' . t('Balance: @balance', array('@balance' => uc_currency_format($balance))) . '</strong></div>',
+      '#markup' => '<div><strong>' . $this->t('Balance: @balance', array('@balance' => uc_currency_format($balance))) . '</strong></div>',
     );
 
     // Let the administrator set the amount to charge.
     $form['amount'] = array(
       '#type' => 'uc_price',
-      '#title' => t('Charge Amount'),
+      '#title' => $this->t('Charge Amount'),
       '#default_value' => $balance > 0 ? uc_currency_format($balance, FALSE, FALSE, '.') : 0,
     );
 
     // Build a credit card form.
     $form['specify_card'] = array(
       '#type' => 'fieldset',
-      '#title' => t('Credit card details'),
-      '#description' => t('Use the available buttons in this fieldset to process with the specified card details.'),
+      '#title' => $this->t('Credit card details'),
+      '#description' => $this->t('Use the available buttons in this fieldset to process with the specified card details.'),
     );
     $form['specify_card']['cc_data'] = array(
       '#tree' => TRUE,
@@ -73,7 +73,7 @@ class CreditCardTerminalForm extends FormBase {
     if (in_array(UC_CREDIT_AUTH_CAPTURE, $types)) {
       $form['specify_card']['actions']['charge_card'] = array(
         '#type' => 'submit',
-        '#value' => t('Charge amount'),
+        '#value' => $this->t('Charge amount'),
       );
     }
 
@@ -81,7 +81,7 @@ class CreditCardTerminalForm extends FormBase {
     if (in_array(UC_CREDIT_AUTH_ONLY, $types)) {
       $form['specify_card']['actions']['authorize_card'] = array(
         '#type' => 'submit',
-        '#value' => t('Authorize amount only'),
+        '#value' => $this->t('Authorize amount only'),
       );
     }
 
@@ -89,7 +89,7 @@ class CreditCardTerminalForm extends FormBase {
     if (in_array(UC_CREDIT_REFERENCE_SET, $types)) {
       $form['specify_card']['actions']['reference_set'] = array(
         '#type' => 'submit',
-        '#value' => t('Set a reference only'),
+        '#value' => $this->t('Set a reference only'),
       );
     }
 
@@ -97,7 +97,7 @@ class CreditCardTerminalForm extends FormBase {
     if (in_array(UC_CREDIT_CREDIT, $types)) {
       $form['specify_card']['actions']['credit_card'] = array(
         '#type' => 'submit',
-        '#value' => t('Credit amount to this card'),
+        '#value' => $this->t('Credit amount to this card'),
       );
     }
 
@@ -107,7 +107,7 @@ class CreditCardTerminalForm extends FormBase {
     if (isset($this->order->data->cc_txns['authorizations'])) {
       foreach ($this->order->data->cc_txns['authorizations'] as $auth_id => $data) {
         if (empty($data['captured'])) {
-          $options[$auth_id] = t('@auth_id - @date - @amount authorized', array('@auth_id' => strtoupper($auth_id), '@date' => \Drupal::service('date.formatter')->format($data['authorized'], 'short'), '@amount' => uc_currency_format($data['amount'])));
+          $options[$auth_id] = $this->t('@auth_id - @date - @amount authorized', array('@auth_id' => strtoupper($auth_id), '@date' => \Drupal::service('date.formatter')->format($data['authorized'], 'short'), '@amount' => uc_currency_format($data['amount'])));
         }
       }
     }
@@ -117,13 +117,13 @@ class CreditCardTerminalForm extends FormBase {
       // Display a fieldset with the authorizations and available action buttons.
       $form['authorizations'] = array(
         '#type' => 'fieldset',
-        '#title' => t('Prior authorizations'),
-        '#description' => t('Use the available buttons in this fieldset to select and act on a prior authorization. The charge amount specified above will be captured against the authorization listed below.  Only one capture is possible per authorization, and a capture for more than the amount of the authorization may result in additional fees to you.'),
+        '#title' => $this->t('Prior authorizations'),
+        '#description' => $this->t('Use the available buttons in this fieldset to select and act on a prior authorization. The charge amount specified above will be captured against the authorization listed below.  Only one capture is possible per authorization, and a capture for more than the amount of the authorization may result in additional fees to you.'),
       );
 
       $form['authorizations']['select_auth'] = array(
         '#type' => 'radios',
-        '#title' => t('Select authorization'),
+        '#title' => $this->t('Select authorization'),
         '#options' => $options,
       );
 
@@ -133,7 +133,7 @@ class CreditCardTerminalForm extends FormBase {
       if (in_array(UC_CREDIT_PRIOR_AUTH_CAPTURE, $types)) {
         $form['authorizations']['actions']['auth_capture'] = array(
           '#type' => 'submit',
-          '#value' => t('Capture amount to this authorization'),
+          '#value' => $this->t('Capture amount to this authorization'),
         );
       }
 
@@ -141,7 +141,7 @@ class CreditCardTerminalForm extends FormBase {
       if (in_array(UC_CREDIT_VOID, $types)) {
         $form['authorizations']['actions']['auth_void'] = array(
           '#type' => 'submit',
-          '#value' => t('Void authorization'),
+          '#value' => $this->t('Void authorization'),
         );
       }
 
@@ -159,7 +159,7 @@ class CreditCardTerminalForm extends FormBase {
 
     if (isset($this->order->data->cc_txns['references'])) {
       foreach ($this->order->data->cc_txns['references'] as $ref_id => $data) {
-        $options[$ref_id] = t('@ref_id - @date - (Last 4) @card', array('@ref_id' => strtoupper($ref_id), '@date' => \Drupal::service('date.formatter')->format($data['created'], 'short'), '@card' => $data['card']));
+        $options[$ref_id] = $this->t('@ref_id - @date - (Last 4) @card', array('@ref_id' => strtoupper($ref_id), '@date' => \Drupal::service('date.formatter')->format($data['created'], 'short'), '@card' => $data['card']));
       }
     }
 
@@ -168,13 +168,13 @@ class CreditCardTerminalForm extends FormBase {
       // Display a fieldset with the authorizations and available action buttons.
       $form['references'] = array(
         '#type' => 'fieldset',
-        '#title' => t('Customer references'),
-        '#description' => t('Use the available buttons in this fieldset to select and act on a customer reference.'),
+        '#title' => $this->t('Customer references'),
+        '#description' => $this->t('Use the available buttons in this fieldset to select and act on a customer reference.'),
       );
 
       $form['references']['select_ref'] = array(
         '#type' => 'radios',
-        '#title' => t('Select references'),
+        '#title' => $this->t('Select references'),
         '#options' => $options,
       );
 
@@ -184,7 +184,7 @@ class CreditCardTerminalForm extends FormBase {
       if (in_array(UC_CREDIT_REFERENCE_TXN, $types)) {
         $form['references']['actions']['ref_capture'] = array(
           '#type' => 'submit',
-          '#value' => t('Charge amount to this reference'),
+          '#value' => $this->t('Charge amount to this reference'),
         );
       }
 
@@ -192,7 +192,7 @@ class CreditCardTerminalForm extends FormBase {
       if (in_array(UC_CREDIT_REFERENCE_REMOVE, $types)) {
         $form['references']['actions']['ref_remove'] = array(
           '#type' => 'submit',
-          '#value' => t('Remove reference'),
+          '#value' => $this->t('Remove reference'),
         );
       }
 
@@ -200,7 +200,7 @@ class CreditCardTerminalForm extends FormBase {
       if (in_array(UC_CREDIT_REFERENCE_CREDIT, $types)) {
         $form['references']['actions']['ref_credit'] = array(
           '#type' => 'submit',
-          '#value' => t('Credit amount to this reference'),
+          '#value' => $this->t('Credit amount to this reference'),
         );
       }
 
@@ -222,7 +222,7 @@ class CreditCardTerminalForm extends FormBase {
     // Get the data from the form and replace masked data from the order.
     $cc_data = $form_state->getValue('cc_data');
 
-    if (strpos($cc_data['cc_number'], t('(Last 4) ')) === 0) {
+    if (strpos($cc_data['cc_number'], $this->t('(Last 4) ')) === 0) {
       $cc_data['cc_number'] = $this->order->payment_details['cc_number'];
     }
 
@@ -239,43 +239,43 @@ class CreditCardTerminalForm extends FormBase {
     $data = array();
 
     switch ($form_state->getValue('op')) {
-      case t('Charge amount'):
+      case $this->t('Charge amount'):
         $data['txn_type'] = UC_CREDIT_AUTH_CAPTURE;
         break;
 
-      case t('Authorize amount only'):
+      case $this->t('Authorize amount only'):
         $data['txn_type'] = UC_CREDIT_AUTH_ONLY;
         break;
 
-      case t('Set a reference only'):
+      case $this->t('Set a reference only'):
         $data['txn_type'] = UC_CREDIT_REFERENCE_SET;
         break;
 
-      case t('Credit amount to this card'):
+      case $this->t('Credit amount to this card'):
         $data['txn_type'] = UC_CREDIT_CREDIT;
         break;
 
-      case t('Capture amount to this authorization'):
+      case $this->t('Capture amount to this authorization'):
         $data['txn_type'] = UC_CREDIT_PRIOR_AUTH_CAPTURE;
         $data['auth_id'] = $form_state->getValue('select_auth');
         break;
 
-      case t('Void authorization'):
+      case $this->t('Void authorization'):
         $data['txn_type'] = UC_CREDIT_VOID;
         $data['auth_id'] = $form_state->getValue('select_auth');
         break;
 
-      case t('Charge amount to this reference'):
+      case $this->t('Charge amount to this reference'):
         $data['txn_type'] = UC_CREDIT_REFERENCE_TXN;
         $data['ref_id'] = $form_state->getValue('select_ref');
         break;
 
-      case t('Remove reference'):
+      case $this->t('Remove reference'):
         $data['txn_type'] = UC_CREDIT_REFERENCE_REMOVE;
         $data['ref_id'] = $form_state->getValue('select_ref');
         break;
 
-      case t('Credit amount to this reference'):
+      case $this->t('Credit amount to this reference'):
         $data['txn_type'] = UC_CREDIT_REFERENCE_CREDIT;
         $data['ref_id'] = $form_state->getValue('select_ref');
     }
@@ -284,10 +284,10 @@ class CreditCardTerminalForm extends FormBase {
     _uc_credit_save_cc_data_to_order(uc_credit_cache('load'), $this->order->id());
 
     if ($result) {
-      drupal_set_message(t('The credit card was processed successfully. See the admin comments for more details.'));
+      drupal_set_message($this->t('The credit card was processed successfully. See the admin comments for more details.'));
     }
     else {
-      drupal_set_message(t('There was an error processing the credit card.  See the admin comments for details.'), 'error');
+      drupal_set_message($this->t('There was an error processing the credit card.  See the admin comments for details.'), 'error');
     }
 
     $form_state->setRedirect('uc_order.admin_view', ['uc_order' => $this->order->id()]);
diff --git a/payment/uc_credit/src/Form/CreditSettingsForm.php b/payment/uc_credit/src/Form/CreditSettingsForm.php
index 40709f5..d1d3a2a 100644
--- a/payment/uc_credit/src/Form/CreditSettingsForm.php
+++ b/payment/uc_credit/src/Form/CreditSettingsForm.php
@@ -12,7 +12,7 @@ use Drupal\Core\Form\FormStateInterface;
 use Drupal\Component\Utility\SafeMarkup;
 
 /**
- * Displays the credit card terminal form for administrators.
+ * Credit card settings form.
  */
 class CreditSettingsForm extends FormBase {
 
@@ -31,7 +31,7 @@ class CreditSettingsForm extends FormBase {
     $account = $this->currentUser();
     if (!$account->hasPermission('administer credit cards')) {
       $form['notice'] = array(
-        '#markup' => '<div>' . t('You must have access to <b>administer credit cards</b> to adjust these settings.') . '</div>',
+        '#markup' => '<div>' . $this->t('You must have access to <b>administer credit cards</b> to adjust these settings.') . '</div>',
       );
       return $form;
     }
@@ -39,7 +39,7 @@ class CreditSettingsForm extends FormBase {
     $gateways = _uc_payment_gateway_list('credit');
     if (!count($gateways)) {
       $form['notice'] = array(
-        '#markup' => '<div>' . t('Please enable a credit card gateway module for your chosen payment provider.') . '</div>',
+        '#markup' => '<div>' . $this->t('Please enable a credit card gateway module for your chosen payment provider.') . '</div>',
       );
 // @todo - This is commented out to test this form without a gateway
 //      return $form;
@@ -56,7 +56,7 @@ class CreditSettingsForm extends FormBase {
 
     $form['cc_basic'] = array(
       '#type' => 'details',
-      '#title' => t('Basic settings'),
+      '#title' => $this->t('Basic settings'),
       '#group' => 'uc_credit',
     );
     $options = array();
@@ -65,131 +65,131 @@ class CreditSettingsForm extends FormBase {
     }
     $form['cc_basic']['uc_payment_credit_gateway'] = array(
       '#type' => 'radios',
-      '#title' => t('Default gateway'),
+      '#title' => $this->t('Default gateway'),
       '#options' => $options,
       '#default_value' => uc_credit_default_gateway(),
     );
     $form['cc_basic']['uc_credit_validate_numbers'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Validate credit card numbers at checkout.'),
-      '#description' => t('Invalid card numbers will show an error message to the user so they can correct it.'),
+      '#title' => $this->t('Validate credit card numbers at checkout.'),
+      '#description' => $this->t('Invalid card numbers will show an error message to the user so they can correct it.'),
       '#default_value' => $credit_config->get('validate_numbers'),
     );
 
     // Form elements that deal specifically with card number security.
     $form['cc_security'] = array(
       '#type' => 'details',
-      '#title' => t('Security settings'),
-      '#description' => t('You are responsible for the security of your website, including the protection of credit card numbers.  Please be aware that choosing some settings in this section may decrease the security of credit card data on your website and increase your liability for damages in the case of fraud.'),
+      '#title' => $this->t('Security settings'),
+      '#description' => $this->t('You are responsible for the security of your website, including the protection of credit card numbers.  Please be aware that choosing some settings in this section may decrease the security of credit card data on your website and increase your liability for damages in the case of fraud.'),
       '#group' => 'uc_credit',
     );
     $form['cc_security']['uc_credit_encryption_path'] = array(
       '#type' => 'textfield',
-      '#title' => t('Encryption key directory'),
-      '#description' => t('The card type, expiration date and last four digits of the card number are encrypted and stored temporarily while the customer is in the process of checking out.<br /><b>You must enable encryption</b> by following the <a href="!url">encryption instructions</a> in order to accept credit card payments.<br />In short, you must enter the path of a directory outside of your document root where the encryption key may be stored.<br />Relative paths will be resolved relative to the Drupal installation directory.<br />Once this directory is set, you should not change it.', ['!url' => 'http://drupal.org/node/1309226']),
-      '#default_value' => uc_credit_encryption_key() ? $credit_config->get('encryption_path') : t('Not configured.'),
+      '#title' => $this->t('Encryption key directory'),
+      '#description' => $this->t('The card type, expiration date and last four digits of the card number are encrypted and stored temporarily while the customer is in the process of checking out.<br /><b>You must enable encryption</b> by following the <a href="!url">encryption instructions</a> in order to accept credit card payments.<br />In short, you must enter the path of a directory outside of your document root where the encryption key may be stored.<br />Relative paths will be resolved relative to the Drupal installation directory.<br />Once this directory is set, you should not change it.', ['!url' => 'http://drupal.org/node/1309226']),
+      '#default_value' => uc_credit_encryption_key() ? $credit_config->get('encryption_path') : $this->t('Not configured.'),
     );
 
     // Form elements that deal with the type of data requested at checkout.
     $form['cc_fields'] = array(
       '#type' => 'details',
-      '#title' => t('Credit card fields'),
-      '#description' => t('Specify what information to collect from customers in addition to the card number.'),
+      '#title' => $this->t('Credit card fields'),
+      '#description' => $this->t('Specify what information to collect from customers in addition to the card number.'),
       '#group' => 'uc_credit',
       '#weight' => 10,
     );
     $form['cc_fields']['uc_credit_cvv_enabled'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Enable CVV text field on checkout form.'),
-      '#description' => t('The CVV is an added security measure on credit cards. On Visa, Mastercard, and Discover cards it is a three digit number, and on AmEx cards it is a four digit number. If your credit card processor or payment gateway requires this information, you should enable this feature here.'),
+      '#title' => $this->t('Enable CVV text field on checkout form.'),
+      '#description' => $this->t('The CVV is an added security measure on credit cards. On Visa, Mastercard, and Discover cards it is a three digit number, and on AmEx cards it is a four digit number. If your credit card processor or payment gateway requires this information, you should enable this feature here.'),
       '#default_value' => $credit_config->get('cvv_enabled'),
     );
     $form['cc_fields']['uc_credit_owner_enabled'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Enable card owner text field on checkout form.'),
+      '#title' => $this->t('Enable card owner text field on checkout form.'),
       '#default_value' => $credit_config->get('owner_enabled'),
     );
     $form['cc_fields']['uc_credit_start_enabled'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Enable card start date on checkout form.'),
+      '#title' => $this->t('Enable card start date on checkout form.'),
       '#default_value' => $credit_config->get('start_enabled'),
     );
     $form['cc_fields']['uc_credit_issue_enabled'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Enable card issue number text field on checkout form.'),
+      '#title' => $this->t('Enable card issue number text field on checkout form.'),
       '#default_value' => $credit_config->get('issue_enabled'),
     );
     $form['cc_fields']['uc_credit_bank_enabled'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Enable issuing bank text field on checkout form.'),
+      '#title' => $this->t('Enable issuing bank text field on checkout form.'),
       '#default_value' => $credit_config->get('bank_enabled'),
     );
     $form['cc_fields']['uc_credit_type_enabled'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Enable card type selection on checkout form.'),
-      '#description' => t('If enabled, specify in the textarea below which card options to populate the select box with.'),
+      '#title' => $this->t('Enable card type selection on checkout form.'),
+      '#description' => $this->t('If enabled, specify in the textarea below which card options to populate the select box with.'),
       '#default_value' => $credit_config->get('type_enabled'),
     );
     $form['cc_fields']['uc_credit_accepted_types'] = array(
       '#type' => 'textarea',
-      '#title' => t('Card type select box options'),
-      '#description' => t('Enter one card type per line. These fields will populate the card type select box if it is enabled.'),
+      '#title' => $this->t('Card type select box options'),
+      '#description' => $this->t('Enter one card type per line. These fields will populate the card type select box if it is enabled.'),
       '#default_value' => implode("\r\n", $credit_config->get('accepted_types')),
     );
 
     // Form elements that deal with card types accepted.
     $form['cc_fields']['cc_types'] = array(
       '#type' => 'details',
-      '#title' => t('Card types'),
-      '#description' => t('Use the checkboxes to specify which card types you accept for payment. Selected card types will show their icons in the payment method selection list and be used for card number validation.'),
+      '#title' => $this->t('Card types'),
+      '#description' => $this->t('Use the checkboxes to specify which card types you accept for payment. Selected card types will show their icons in the payment method selection list and be used for card number validation.'),
     );
     $form['cc_fields']['cc_types']['uc_credit_visa'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Visa'),
+      '#title' => $this->t('Visa'),
       '#default_value' => $credit_config->get('visa'),
     );
     $form['cc_fields']['cc_types']['uc_credit_mastercard'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Mastercard'),
+      '#title' => $this->t('Mastercard'),
       '#default_value' => $credit_config->get('mastercard'),
     );
     $form['cc_fields']['cc_types']['uc_credit_discover'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Discover'),
+      '#title' => $this->t('Discover'),
       '#default_value' => $credit_config->get('discover'),
     );
     $form['cc_fields']['cc_types']['uc_credit_amex'] = array(
       '#type' => 'checkbox',
-      '#title' => t('American Express'),
+      '#title' => $this->t('American Express'),
       '#default_value' => $credit_config->get('amex'),
     );
 
     // Form elements that deal with credit card messages to customers.
     $form['cc_messages'] = array(
       '#type' => 'details',
-      '#title' => t('Customer messages'),
-      '#description' => t('Here you can alter messages displayed to customers using credit cards.'),
+      '#title' => $this->t('Customer messages'),
+      '#description' => $this->t('Here you can alter messages displayed to customers using credit cards.'),
       '#group' => 'uc_credit',
       '#weight' => 10,
     );
     $form['cc_messages']['uc_credit_policy'] = array(
       '#type' => 'textarea',
-      '#title' => t('Credit card payment policy'),
-      '#description' => t('Instructions for customers on the checkout page above the credit card fields.'),
+      '#title' => $this->t('Credit card payment policy'),
+      '#description' => $this->t('Instructions for customers on the checkout page above the credit card fields.'),
       '#default_value' => $credit_config->get('policy'),
       '#rows' => 3,
     );
     $form['cc_messages']['uc_credit_fail_message'] = array(
       '#type' => 'textarea',
-      '#title' => t('Card processing failure message'),
-      '#description' => t('Error message displayed to customers when an attempted payment fails at checkout.'),
+      '#title' => $this->t('Card processing failure message'),
+      '#description' => $this->t('Error message displayed to customers when an attempted payment fails at checkout.'),
       '#default_value' => $credit_config->get('fail_message'),
     );
 
     $txn_types = array(
-      UC_CREDIT_AUTH_ONLY => t('Authorization only'),
-      UC_CREDIT_AUTH_CAPTURE => t('Authorize and capture immediately'),
-      UC_CREDIT_REFERENCE_SET => t('Set a reference only'),
+      UC_CREDIT_AUTH_ONLY => $this->t('Authorization only'),
+      UC_CREDIT_AUTH_CAPTURE => $this->t('Authorize and capture immediately'),
+      UC_CREDIT_REFERENCE_SET => $this->t('Set a reference only'),
     );
 
     foreach ($gateways as $id => $gateway) {
@@ -201,7 +201,7 @@ class CreditSettingsForm extends FormBase {
       );
       $form['gateways'][$id]['uc_pg_' . $id . '_enabled'] = array(
         '#type' => 'checkbox',
-        '#title' => t('Enable this payment gateway for use.'),
+        '#title' => $this->t('Enable this payment gateway for use.'),
         '#default_value' => $credit_config->get('uc_pg_' . $id . '_enabled'),
         '#weight' => -10,
       );
@@ -216,8 +216,8 @@ class CreditSettingsForm extends FormBase {
       }
       $form['gateways'][$id]['uc_pg_' . $id . '_cc_txn_type'] = array(
         '#type' => 'radios',
-        '#title' => t('Default credit transaction type'),
-        '#description' => t('Only available transaction types are listed. The default will be used unless an administrator chooses otherwise through the terminal.'),
+        '#title' => $this->t('Default credit transaction type'),
+        '#description' => $this->t('Only available transaction types are listed. The default will be used unless an administrator chooses otherwise through the terminal.'),
         '#options' => $options,
         '#default_value' => $credit_config->get('uc_pg_' . $id . '_cc_txn_type'),
         '#weight' => -5,
@@ -232,7 +232,7 @@ class CreditSettingsForm extends FormBase {
     }
 
     if (empty($_POST) && !uc_credit_encryption_key()) {
-      drupal_set_message(t('Credit card security settings must be configured in the security settings tab.'), 'warning');
+      drupal_set_message($this->t('Credit card security settings must be configured in the security settings tab.'), 'warning');
     }
 
     return $form;
@@ -250,7 +250,7 @@ class CreditSettingsForm extends FormBase {
 
     // Test to see if a path was entered.
     if (empty($key_path)) {
-      $form_state->setErrorByName('uc_credit_encryption_path', t('Key path must be specified in security settings tab.'));
+      $form_state->setErrorByName('uc_credit_encryption_path', $this->t('Key path must be specified in security settings tab.'));
     }
 
     // Construct complete key file path.
@@ -263,7 +263,7 @@ class CreditSettingsForm extends FormBase {
         $key = uc_credit_encryption_key();
         if ($key) {
           if (!preg_match("([0-9a-fA-F]{32})", $key)) {
-            $form_state->setErrorByName('uc_credit_encryption_path', t('Key file already exists in directory, but it contains an invalid key.'));
+            $form_state->setErrorByName('uc_credit_encryption_path', $this->t('Key file already exists in directory, but it contains an invalid key.'));
           }
           else {
             // Key file exists and is valid, save result of trim() back into
@@ -274,7 +274,7 @@ class CreditSettingsForm extends FormBase {
         }
       }
       else {
-        $form_state->setErrorByName('uc_credit_encryption_path', t('Key file already exists in directory, but is not readable. Please verify the file permissions.'));
+        $form_state->setErrorByName('uc_credit_encryption_path', $this->t('Key file already exists in directory, but is not readable. Please verify the file permissions.'));
       }
     }
 
@@ -287,13 +287,13 @@ class CreditSettingsForm extends FormBase {
       // Can we open for writing?
       $file = @fopen($key_path . '/encrypt.test', 'w');
       if ($file === FALSE) {
-        $form_state->setErrorByName('uc_credit_encryption_path', t('Cannot write to directory, please verify the directory permissions.'));
+        $form_state->setErrorByName('uc_credit_encryption_path', $this->t('Cannot write to directory, please verify the directory permissions.'));
         $form_state->setValue('update_cc_encrypt_dir', FALSE);
       }
       else {
         // Can we actually write?
         if (@fwrite($file, '0123456789') === FALSE) {
-          $form_state->setErrorByName('uc_credit_encryption_path', t('Cannot write to directory, please verify the directory permissions.'));
+          $form_state->setErrorByName('uc_credit_encryption_path', $this->t('Cannot write to directory, please verify the directory permissions.'));
           $form_state->setValue('update_cc_encrypt_dir', FALSE);
           fclose($file);
         }
@@ -302,7 +302,7 @@ class CreditSettingsForm extends FormBase {
           fclose($file);
           $file = @fopen($key_path . '/encrypt.test', 'r');
           if ($file === FALSE) {
-            $form_state->setErrorByName('uc_credit_encryption_path', t('Cannot read from directory, please verify the directory permissions.'));
+            $form_state->setErrorByName('uc_credit_encryption_path', $this->t('Cannot read from directory, please verify the directory permissions.'));
             $form_state->setValue('update_cc_encrypt_dir', FALSE);
           }
           else {
@@ -314,7 +314,7 @@ class CreditSettingsForm extends FormBase {
     }
     else {
       // Directory doesn't exist.
-      $form_state->setErrorByName('uc_credit_encryption_path', t('You have specified a non-existent directory.'));
+      $form_state->setErrorByName('uc_credit_encryption_path', $this->t('You have specified a non-existent directory.'));
     }
 
     // If validation succeeds, save result of trim() back into $form_state.
@@ -332,8 +332,8 @@ class CreditSettingsForm extends FormBase {
 
       if (!file_exists($key_file)) {
         if (!$file = fopen($key_file, 'wb')) {
-          drupal_set_message(t('Credit card encryption key file creation failed for file @file. Check your filepath settings and directory permissions.', ['@file' => $key_file]), 'error');
-          \Drupal::logger('uc_credit')->error('Credit card encryption key file creation failed for file @file. Check your filepath settings and directory permissions.', ['@file' => $key_file]);
+          drupal_set_message($this->t('Credit card encryption key file creation failed for file @file. Check your filepath settings and directory permissions.', ['@file' => $key_file]), 'error');
+          $this->logger('uc_credit')->error('Credit card encryption key file creation failed for file @file. Check your filepath settings and directory permissions.', ['@file' => $key_file]);
         }
         else {
           // Replacement key generation suggested by Barry Jaspan
@@ -341,8 +341,8 @@ class CreditSettingsForm extends FormBase {
           fwrite($file, md5(\Drupal::csrfToken()->get(serialize($_REQUEST) . serialize($_SERVER) . REQUEST_TIME)));
           fclose($file);
 
-          drupal_set_message(t('Credit card encryption key file generated. Card data will now be encrypted.'));
-          \Drupal::logger('uc_credit')->notice('Credit card encryption key file generated. Card data will now be encrypted.');
+          drupal_set_message($this->t('Credit card encryption key file generated. Card data will now be encrypted.'));
+          $this->logger('uc_credit')->notice('Credit card encryption key file generated. Card data will now be encrypted.');
         }
       }
     }
diff --git a/payment/uc_cybersource/src/Controller/HOPController.php b/payment/uc_cybersource/src/Controller/HOPController.php
index 1b30cfd..5e8fc70 100644
--- a/payment/uc_cybersource/src/Controller/HOPController.php
+++ b/payment/uc_cybersource/src/Controller/HOPController.php
@@ -23,7 +23,7 @@ class HOPController extends ControllerBase {
     if (!uc_cybersource_hop_include()) {
       \Drupal::logger('uc_cybersource_hop')->error('Unable to receive HOP POST due to missing or unreadable HOP.php file.');
       drupal_add_http_header('Status', '503 Service unavailable');
-      print t('The site was unable to receive a HOP post because of a missing or unreadble HOP.php');
+      print $this->t('The site was unable to receive a HOP post because of a missing or unreadble HOP.php');
       exit();
     }
     $verify = VerifyTransactionSignature($_POST);
@@ -76,20 +76,20 @@ class HOPController extends ControllerBase {
           ))
           ->execute();
 
-        $comment = t('CyberSource request ID: @txn_id', array('@txn_id' => $request_id));
+        $comment = $this->t('CyberSource request ID: @txn_id', array('@txn_id' => $request_id));
         uc_payment_enter($order_id, 'cybersource_hop', $payment_amount, $order->getUserId(), NULL, $comment);
         uc_cart_complete_sale($order);
-        uc_order_comment_save($order_id, 0, t('Payment of @amount @currency submitted through CyberSource with request ID @rid.', array('@amount' => $payment_amount, '@currency' => $payment_currency, '@rid' => $request_id)), 'order', 'payment_received');
+        uc_order_comment_save($order_id, 0, $this->t('Payment of @amount @currency submitted through CyberSource with request ID @rid.', array('@amount' => $payment_amount, '@currency' => $payment_currency, '@rid' => $request_id)), 'order', 'payment_received');
         break;
       case 'ERROR':
-        uc_order_comment_save($order_id, 0, t("Payment error:@reason with request ID @rid", array('@reason' => $reason, '@rid' => '@request_id')), 'admin');
+        uc_order_comment_save($order_id, 0, $this->t("Payment error:@reason with request ID @rid", array('@reason' => $reason, '@rid' => '@request_id')), 'admin');
         break;
       case 'REJECT':
-        uc_order_comment_save($order_id, 0, t("Payment is rejected:@reason with request ID @rid", array('@reason' => $reason, '@rid' => '@request_id')), 'admin');
+        uc_order_comment_save($order_id, 0, $this->t("Payment is rejected:@reason with request ID @rid", array('@reason' => $reason, '@rid' => '@request_id')), 'admin');
         break;
       case 'REVIEW':
         $order->setStatusId('review')->save();
-        uc_order_comment_save($order_id, 0, t('Payment is in review & not complete: @reason. Request ID @rid', array('@reason' => $reason, '@rid' => '@request_id')), 'admin');
+        uc_order_comment_save($order_id, 0, $this->t('Payment is in review & not complete: @reason. Request ID @rid', array('@reason' => $reason, '@rid' => '@request_id')), 'admin');
         break;
     }
   }
@@ -104,7 +104,7 @@ class HOPController extends ControllerBase {
     // legitimate checkout, the CyberSource POST will still register, so the
     // gets processed correctly. We'll leave an ambiguous message just in case.
     if (intval($_SESSION['cart_order']) != $uc_order->id()) {
-      drupal_set_message(t('Thank you for your order! We will be notified by CyberSource that we have received your payment.'));
+      drupal_set_message($this->t('Thank you for your order! We will be notified by CyberSource that we have received your payment.'));
       drupal_goto('cart');
     }
     // This lets us know it's a legitimate access of the complete page.
diff --git a/payment/uc_payment/src/Form/OrderPaymentsForm.php b/payment/uc_payment/src/Form/OrderPaymentsForm.php
index 79c8ee8..9fccb21 100644
--- a/payment/uc_payment/src/Form/OrderPaymentsForm.php
+++ b/payment/uc_payment/src/Form/OrderPaymentsForm.php
@@ -71,14 +71,14 @@ class OrderPaymentsForm extends FormBase {
 
     $form['order_total'] = array(
       '#type' => 'item',
-      '#title' => t('Order total'),
+      '#title' => $this->t('Order total'),
       '#theme' => 'uc_price',
       '#price' => $total,
     );
     $form['payments'] = array(
       '#type' => 'table',
       '#tree' => TRUE,
-      '#header' => array(t('Received'), t('User'), t('Method'), t('Amount'), t('Balance'), t('Comment'), t('Action')),
+      '#header' => array($this->t('Received'), $this->t('User'), $this->t('Method'), $this->t('Amount'), $this->t('Balance'), $this->t('Comment'), $this->t('Action')),
       '#weight' => 10,
     );
 
@@ -93,7 +93,7 @@ class OrderPaymentsForm extends FormBase {
           '#markup' => drupal_render($markup),
         );
         $form['payments'][$payment->receipt_id]['method'] = array(
-          '#markup' => ($payment->method == '') ? t('Unknown') : $payment->method,
+          '#markup' => ($payment->method == '') ? $this->t('Unknown') : $payment->method,
         );
         $form['payments'][$payment->receipt_id]['amount'] = array(
           '#theme' => 'uc_price',
@@ -108,7 +108,7 @@ class OrderPaymentsForm extends FormBase {
           '#markup' => ($payment->comment == '') ? '-' : Xss::filterAdmin($payment->comment),
         );
         if ($account->hasPermission('delete payments')) {
-          $action_value = \Drupal::l(t('Delete'), new Url('uc_payments.delete', ['uc_order' => $this->order->id(), 'payment' => $payment->receipt_id]));
+          $action_value = $this->l($this->t('Delete'), new Url('uc_payments.delete', ['uc_order' => $this->order->id(), 'payment' => $payment->receipt_id]));
         }
         else {
           $action_value = '-';
@@ -155,7 +155,7 @@ class OrderPaymentsForm extends FormBase {
       );
       $form['payments']['new']['comment'] = array(
         '#type' => 'textfield',
-        '#title' => t('Comment'),
+        '#title' => $this->t('Comment'),
         '#title_display' => 'invisible',
         '#size' => 32,
         '#maxlength' => 256,
@@ -163,7 +163,7 @@ class OrderPaymentsForm extends FormBase {
       $form['payments']['new']['action'] = array('#type' => 'actions');
       $form['payments']['new']['action']['action'] = array(
         '#type' => 'submit',
-        '#value' => t('Enter'),
+        '#value' => $this->t('Enter'),
       );
     }
 
diff --git a/shipping/uc_ups/src/Form/UPSSettingsForm.php b/shipping/uc_ups/src/Form/UPSSettingsForm.php
index fbfacfa..3067d0f 100644
--- a/shipping/uc_ups/src/Form/UPSSettingsForm.php
+++ b/shipping/uc_ups/src/Form/UPSSettingsForm.php
@@ -54,111 +54,111 @@ class UPSSettingsForm extends ConfigFormBase {
     // Container for credential forms
     $form['uc_ups_credentials'] = array(
       '#type'          => 'details',
-      '#title'         => t('Credentials'),
-      '#description'   => t('Account number and authorization information.'),
+      '#title'         => $this->t('Credentials'),
+      '#description'   => $this->t('Account number and authorization information.'),
       '#group'         => 'ups-settings',
     );
 
     $form['uc_ups_credentials']['uc_ups_access_license'] = array(
       '#type' => 'textfield',
-      '#title' => t('UPS OnLine Tools XML Access Key'),
+      '#title' => $this->t('UPS OnLine Tools XML Access Key'),
       '#default_value' => $ups_config->get('access_license'),
       '#required' => TRUE,
     );
     $form['uc_ups_credentials']['uc_ups_shipper_number'] = array(
       '#type' => 'textfield',
-      '#title' => t('UPS Shipper #'),
-      '#description' => t('The 6-character string identifying your UPS account as a shipper.'),
+      '#title' => $this->t('UPS Shipper #'),
+      '#description' => $this->t('The 6-character string identifying your UPS account as a shipper.'),
       '#default_value' => $ups_config->get('shipper_number'),
       '#required' => TRUE,
     );
     $form['uc_ups_credentials']['uc_ups_user_id'] = array(
       '#type' => 'textfield',
-      '#title' => t('UPS.com user ID'),
+      '#title' => $this->t('UPS.com user ID'),
       '#default_value' => $ups_config->get('user_id'),
       '#required' => TRUE,
     );
     $form['uc_ups_credentials']['uc_ups_password'] = array(
       '#type' => 'password',
-      '#title' => t('Password'),
+      '#title' => $this->t('Password'),
       '#default_value' => $ups_config->get('password'),
     );
     $form['uc_ups_credentials']['uc_ups_connection_address'] = array(
       '#type' => 'select',
-      '#title' => t('Server mode'),
-      '#description' => t('Use the Testing server while developing and configuring your site. Switch to the Production server only after you have demonstrated that transactions on the Testing server are working and you are ready to go live.'),
-      '#options' => array('https://wwwcie.ups.com/ups.app/xml/' => t('Testing'),
-        'https://onlinetools.ups.com/ups.app/xml/' => t('Production'),
+      '#title' => $this->t('Server mode'),
+      '#description' => $this->t('Use the Testing server while developing and configuring your site. Switch to the Production server only after you have demonstrated that transactions on the Testing server are working and you are ready to go live.'),
+      '#options' => array('https://wwwcie.ups.com/ups.app/xml/' => $this->t('Testing'),
+        'https://onlinetools.ups.com/ups.app/xml/' => $this->t('Production'),
       ),
       '#default_value' => $ups_config->get('connection_address'),
     );
 
     $form['services'] = array(
       '#type' => 'details',
-      '#title' => t('Service options'),
-      '#description' => t('Set the conditions that will return a UPS quote.'),
+      '#title' => $this->t('Service options'),
+      '#description' => $this->t('Set the conditions that will return a UPS quote.'),
       '#group'         => 'ups-settings',
     );
 
     $form['services']['uc_ups_services'] = array(
       '#type' => 'checkboxes',
-      '#title' => t('UPS services'),
+      '#title' => $this->t('UPS services'),
       '#default_value' => $ups_config->get('services'),
       '#options' => \Drupal\uc_ups\UPSUtilities::services(),
-      '#description' => t('Select the UPS services that are available to customers.'),
+      '#description' => $this->t('Select the UPS services that are available to customers.'),
     );
 
     // Container for quote options
     $form['uc_ups_quote_options'] = array(
       '#type'          => 'details',
-      '#title'         => t('Quote options'),
-      '#description'   => t('Preferences that affect computation of quote.'),
+      '#title'         => $this->t('Quote options'),
+      '#description'   => $this->t('Preferences that affect computation of quote.'),
       '#group'         => 'ups-settings',
     );
 
     $form['uc_ups_quote_options']['uc_ups_all_in_one'] = array(
       '#type' => 'radios',
-      '#title' => t('Product packages'),
+      '#title' => $this->t('Product packages'),
       '#default_value' => $ups_config->get('all_in_one'),
       '#options' => array(
-        0 => t('Each product in its own package'),
-        1 => t('All products in one package'),
+        0 => $this->t('Each product in its own package'),
+        1 => $this->t('All products in one package'),
       ),
-      '#description' => t('Indicate whether each product is quoted as shipping separately or all in one package. Orders with one kind of product will still use the package quantity to determine the number of packages needed, however.'),
+      '#description' => $this->t('Indicate whether each product is quoted as shipping separately or all in one package. Orders with one kind of product will still use the package quantity to determine the number of packages needed, however.'),
     );
 
     // Form to select package types
     $form['uc_ups_quote_options']['uc_ups_package_type'] = array(
       '#type' => 'select',
-      '#title' => t('Default Package Type'),
+      '#title' => $this->t('Default Package Type'),
       '#default_value' => $ups_config->get('package_type'),
       '#options' => \Drupal\uc_ups\UPSUtilities::packageTypes(),
-      '#description' => t('Type of packaging to be used.  May be overridden on a per-product basis via the product node edit form.'),
+      '#description' => $this->t('Type of packaging to be used.  May be overridden on a per-product basis via the product node edit form.'),
     );
     $form['uc_ups_quote_options']['uc_ups_classification'] = array(
       '#type' => 'select',
-      '#title' => t('UPS Customer classification'),
+      '#title' => $this->t('UPS Customer classification'),
       '#options' => array(
-        '01' => t('Wholesale'),
-        '03' => t('Occasional'),
-        '04' => t('Retail'),
+        '01' => $this->t('Wholesale'),
+        '03' => $this->t('Occasional'),
+        '04' => $this->t('Retail'),
       ),
       '#default_value' => $ups_config->get('classification'),
-      '#description' => t('The kind of customer you are to UPS. For daily pickups the default is wholesale; for customer counter pickups the default is retail; for other pickups the default is occasional.'),
+      '#description' => $this->t('The kind of customer you are to UPS. For daily pickups the default is wholesale; for customer counter pickups the default is retail; for other pickups the default is occasional.'),
     );
 
     $form['uc_ups_quote_options']['uc_ups_negotiated_rates'] = array(
       '#type' => 'radios',
-      '#title' => t('Negotiated rates'),
+      '#title' => $this->t('Negotiated rates'),
       '#default_value' => $ups_config->get('negotiated_rates'),
-      '#options' => array(1 => t('Yes'), 0 => t('No')),
-      '#description' => t('Is your UPS account receiving negotiated rates on shipments?'),
+      '#options' => array(1 => $this->t('Yes'), 0 => $this->t('No')),
+      '#description' => $this->t('Is your UPS account receiving negotiated rates on shipments?'),
     );
 
     // Form to select pickup type
     $form['uc_ups_quote_options']['uc_ups_pickup_type'] = array(
       '#type' => 'select',
-      '#title' => t('Pickup type'),
+      '#title' => $this->t('Pickup type'),
       '#options' => array(
         '01' => 'Daily Pickup',
         '03' => 'Customer Counter',
@@ -173,69 +173,69 @@ class UPSSettingsForm extends ConfigFormBase {
 
     $form['uc_ups_quote_options']['uc_ups_residential_quotes'] = array(
       '#type' => 'radios',
-      '#title' => t('Assume UPS shipping quotes will be delivered to'),
+      '#title' => $this->t('Assume UPS shipping quotes will be delivered to'),
       '#default_value' => $ups_config->get('residential_quotes'),
       '#options' => array(
-        0 => t('Business locations'),
-        1 => t('Residential locations (extra fees)'),
+        0 => $this->t('Business locations'),
+        1 => $this->t('Residential locations (extra fees)'),
       ),
     );
 
     $form['uc_ups_quote_options']['uc_ups_unit_system'] = array(
       '#type' => 'select',
-      '#title' => t('System of measurement'),
+      '#title' => $this->t('System of measurement'),
       '#default_value' => $ups_config->get('unit_system', \Drupal::config('uc_store.settings')->get('length.units')),
       '#options' => array(
-        'in' => t('Imperial'),
-        'cm' => t('Metric'),
+        'in' => $this->t('Imperial'),
+        'cm' => $this->t('Metric'),
       ),
-      '#description' => t('Choose the standard system of measurement for your country.'),
+      '#description' => $this->t('Choose the standard system of measurement for your country.'),
     );
 
     $form['uc_ups_quote_options']['uc_ups_insurance'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Package insurance'),
+      '#title' => $this->t('Package insurance'),
       '#default_value' => $ups_config->get('insurance'),
-      '#description' => t('When enabled, the quotes presented to the customer will include the cost of insurance for the full sales price of all products in the order.'),
+      '#description' => $this->t('When enabled, the quotes presented to the customer will include the cost of insurance for the full sales price of all products in the order.'),
     );
 
     // Container for markup forms
     $form['uc_ups_markups'] = array(
       '#type'          => 'details',
-      '#title'         => t('Markups'),
-      '#description'   => t('Modifiers to the shipping weight and quoted rate.'),
+      '#title'         => $this->t('Markups'),
+      '#description'   => $this->t('Modifiers to the shipping weight and quoted rate.'),
       '#group'         => 'ups-settings',
     );
 
     // Form to select type of rate markup
     $form['uc_ups_markups']['uc_ups_rate_markup_type'] = array(
       '#type' => 'select',
-      '#title' => t('Rate markup type'),
+      '#title' => $this->t('Rate markup type'),
       '#default_value' => $ups_config->get('rate_markup_type'),
       '#options' => array(
-        'percentage' => t('Percentage (%)'),
-        'multiplier' => t('Multiplier (×)'),
-        'currency' => t('Addition (!currency)', array('!currency' => \Drupal::config('uc_store.settings')->get('currency.symbol'))),
+        'percentage' => $this->t('Percentage (%)'),
+        'multiplier' => $this->t('Multiplier (×)'),
+        'currency' => $this->t('Addition (!currency)', array('!currency' => \Drupal::config('uc_store.settings')->get('currency.symbol'))),
       ),
     );
 
     // Form to select rate markup amount
     $form['uc_ups_markups']['uc_ups_rate_markup'] = array(
       '#type' => 'textfield',
-      '#title' => t('Shipping rate markup'),
+      '#title' => $this->t('Shipping rate markup'),
       '#default_value' => $ups_config->get('rate_markup'),
-      '#description' => t('Markup shipping rate quote by currency amount, percentage, or multiplier.'),
+      '#description' => $this->t('Markup shipping rate quote by currency amount, percentage, or multiplier.'),
     );
 
     // Form to select type of weight markup
     $form['uc_ups_markups']['uc_ups_weight_markup_type'] = array(
       '#type'          => 'select',
-      '#title'         => t('Weight markup type'),
+      '#title'         => $this->t('Weight markup type'),
       '#default_value' => $ups_config->get('weight_markup_type'),
       '#options'       => array(
-        'percentage' => t('Percentage (%)'),
-        'multiplier' => t('Multiplier (×)'),
-        'mass'       => t('Addition (!mass)', array('!mass' => '#')),
+        'percentage' => $this->t('Percentage (%)'),
+        'multiplier' => $this->t('Multiplier (×)'),
+        'mass'       => $this->t('Addition (!mass)', array('!mass' => '#')),
       ),
       '#disabled' => TRUE,
     );
@@ -243,45 +243,45 @@ class UPSSettingsForm extends ConfigFormBase {
     // Form to select weight markup amount
     $form['uc_ups_markups']['uc_ups_weight_markup'] = array(
       '#type'          => 'textfield',
-      '#title'         => t('Shipping weight markup'),
+      '#title'         => $this->t('Shipping weight markup'),
       '#default_value' => $ups_config->get('weight_markup'),
-      '#description'   => t('Markup UPS shipping weight on a per-package basis before quote, by weight amount, percentage, or multiplier.'),
+      '#description'   => $this->t('Markup UPS shipping weight on a per-package basis before quote, by weight amount, percentage, or multiplier.'),
       '#disabled' => TRUE,
     );
 
     // Container for label printing
     $form['uc_ups_labels'] = array(
       '#type'          => 'details',
-      '#title'         => t('Label Printing'),
-      '#description'   => t('Preferences for UPS Shipping Label Printing.  Additional permissions from UPS are required to use this feature.'),
+      '#title'         => $this->t('Label Printing'),
+      '#description'   => $this->t('Preferences for UPS Shipping Label Printing.  Additional permissions from UPS are required to use this feature.'),
       '#group'         => 'ups-settings',
     );
 
     $intervals = array(86400, 302400, 604800, 1209600, 2419200, 0);
     $period = array_map(array(\Drupal::service('date.formatter'), 'formatInterval'), array_combine($intervals, $intervals));
-    $period[0] = t('Forever');
+    $period[0] = $this->t('Forever');
 
     // Form to select how long labels stay on server
     $form['uc_ups_labels']['uc_ups_label_lifetime'] = array(
       '#type'          => 'select',
-      '#title'         => t('Label lifetime'),
+      '#title'         => $this->t('Label lifetime'),
       '#default_value' => $ups_config->get('label_lifetime'),
       '#options'       => $period,
-      '#description'   => t('Controls how long labels are stored on the server before being automatically deleted. Cron must be enabled for automatic deletion. Default is never delete the labels, keep them forever.'),
+      '#description'   => $this->t('Controls how long labels are stored on the server before being automatically deleted. Cron must be enabled for automatic deletion. Default is never delete the labels, keep them forever.'),
     );
 
     // Taken from system_settings_form(). Only, don't use its submit handler.
     $form['actions']['#type'] = 'actions';
     $form['actions']['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Save configuration'),
+      '#value' => $this->t('Save configuration'),
     );
     $form['actions']['cancel'] = array(
-      '#markup' => \Drupal::l(t('Cancel'), new Url('uc_quote.methods')),
+      '#markup' => $this->l($this->t('Cancel'), new Url('uc_quote.methods')),
     );
 
     if (!empty($_POST) && $form_state->getErrors()) {
-      drupal_set_message(t('The settings have not been saved because of the errors.'), 'error');
+      drupal_set_message($this->t('The settings have not been saved because of the errors.'), 'error');
     }
     if (!isset($form['#theme'])) {
       $form['#theme'] = 'system_settings_form';
@@ -301,15 +301,15 @@ class UPSSettingsForm extends ConfigFormBase {
         $form_state->setValueForElement($form['uc_ups_credentials']['uc_ups_password'], $old_password);
       }
       else {
-        $form_state->setErrorByName('uc_ups_password', t('Password field is required.'));
+        $form_state->setErrorByName('uc_ups_password', $this->t('Password field is required.'));
       }
     }
 
     if (!is_numeric($form_state->getValue('uc_ups_rate_markup'))) {
-      $form_state->setErrorByName('uc_ups_rate_markup', t('Rate markup must be a numeric value.'));
+      $form_state->setErrorByName('uc_ups_rate_markup', $this->t('Rate markup must be a numeric value.'));
     }
     if (!is_numeric($form_state->getValue('uc_ups_weight_markup'))) {
-      $form_state->setErrorByName('uc_ups_weight_markup', t('Weight markup must be a numeric value.'));
+      $form_state->setErrorByName('uc_ups_weight_markup', $this->t('Weight markup must be a numeric value.'));
     }
   }
 
@@ -342,7 +342,7 @@ class UPSSettingsForm extends ConfigFormBase {
       ->set('insurance', $values['uc_ups_insurance'])
       ->save();
 
-    drupal_set_message(t('The configuration options have been saved.'));
+    drupal_set_message($this->t('The configuration options have been saved.'));
 
     // @todo: Still need these two lines?
     //cache_clear_all();
diff --git a/shipping/uc_usps/src/Form/USPSSettingsForm.php b/shipping/uc_usps/src/Form/USPSSettingsForm.php
index fbe9e2a..3a67c49 100644
--- a/shipping/uc_usps/src/Form/USPSSettingsForm.php
+++ b/shipping/uc_usps/src/Form/USPSSettingsForm.php
@@ -51,151 +51,151 @@ class USPSSettingsForm extends ConfigFormBase {
     // Container for credential forms
     $form['uc_usps_credentials'] = array(
       '#type'          => 'details',
-      '#title'         => t('Credentials'),
-      '#description'   => t('Account number and authorization information.'),
+      '#title'         => $this->t('Credentials'),
+      '#description'   => $this->t('Account number and authorization information.'),
       '#group'         => 'usps-settings',
     );
 
     $form['uc_usps_credentials']['uc_usps_user_id'] = array(
       '#type' => 'textfield',
-      '#title' => t('USPS user ID'),
-      '#description' => t('To acquire or locate your user ID, refer to the <a href="!url">USPS documentation</a>.', array('!url' => 'http://drupal.org/node/1308256')),
+      '#title' => $this->t('USPS user ID'),
+      '#description' => $this->t('To acquire or locate your user ID, refer to the <a href="!url">USPS documentation</a>.', array('!url' => 'http://drupal.org/node/1308256')),
       '#default_value' => $usps_config->get('user_id'),
     );
 
     $form['domestic'] = array(
       '#type' => 'details',
-      '#title' => t('USPS Domestic'),
-      '#description' => t('Set the conditions that will return a USPS quote.'),
+      '#title' => $this->t('USPS Domestic'),
+      '#description' => $this->t('Set the conditions that will return a USPS quote.'),
       '#group'         => 'usps-settings',
     );
 
     $form['domestic']['uc_usps_online_rates'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Display USPS "online" rates'),
+      '#title' => $this->t('Display USPS "online" rates'),
       '#default_value' => $usps_config->get('online_rates'),
-      '#description' => t('Show your customer standard USPS rates (default) or discounted "online" rates.  Online rates apply only if you, the merchant, pay for and print out postage from the USPS <a href="https://cns.usps.com/labelInformation.shtml">Click-N-Ship</a> web site.'),
+      '#description' => $this->t('Show your customer standard USPS rates (default) or discounted "online" rates.  Online rates apply only if you, the merchant, pay for and print out postage from the USPS <a href="https://cns.usps.com/labelInformation.shtml">Click-N-Ship</a> web site.'),
     );
 
     $form['domestic']['uc_usps_env_services'] = array(
       '#type' => 'checkboxes',
-      '#title' => t('USPS envelope services'),
+      '#title' => $this->t('USPS envelope services'),
       '#default_value' => $usps_config->get('env_services'),
       '#options' => \Drupal\uc_usps\USPSUtilities::envelopeServices(),
-      '#description' => t('Select the USPS services that are available to customers. Be sure to include the services that the Postal Service agrees are available to you.'),
+      '#description' => $this->t('Select the USPS services that are available to customers. Be sure to include the services that the Postal Service agrees are available to you.'),
     );
 
     $form['domestic']['uc_usps_services'] = array(
       '#type' => 'checkboxes',
-      '#title' => t('USPS parcel services'),
+      '#title' => $this->t('USPS parcel services'),
       '#default_value' => $usps_config->get('services'),
       '#options' => \Drupal\uc_usps\USPSUtilities::services(),
-      '#description' => t('Select the USPS services that are available to customers. Be sure to include the services that the Postal Service agrees are available to you.'),
+      '#description' => $this->t('Select the USPS services that are available to customers. Be sure to include the services that the Postal Service agrees are available to you.'),
     );
 
     $form['international'] = array(
       '#type' => 'details',
-      '#title' => t('USPS International'),
-      '#description' => t('Set the conditions that will return a USPS International quote.'),
+      '#title' => $this->t('USPS International'),
+      '#description' => $this->t('Set the conditions that will return a USPS International quote.'),
       '#group'         => 'usps-settings',
     );
 
     $form['international']['uc_usps_intl_env_services'] = array(
       '#type' => 'checkboxes',
-      '#title' => t('USPS international envelope services'),
+      '#title' => $this->t('USPS international envelope services'),
       '#default_value' => $usps_config->get('intl_env_services'),
       '#options' => \Drupal\uc_usps\USPSUtilities::internationalEnvelopeServices(),
-      '#description' => t('Select the USPS services that are available to customers. Be sure to include the services that the Postal Service agrees are available to you.'),
+      '#description' => $this->t('Select the USPS services that are available to customers. Be sure to include the services that the Postal Service agrees are available to you.'),
     );
 
     $form['international']['uc_usps_intl_services'] = array(
       '#type' => 'checkboxes',
-      '#title' => t('USPS international parcel services'),
+      '#title' => $this->t('USPS international parcel services'),
       '#default_value' => $usps_config->get('intl_services'),
       '#options' => \Drupal\uc_usps\USPSUtilities::internationalServices(),
-      '#description' => t('Select the USPS services that are available to customers. Be sure to include the services that the Postal Service agrees are available to you.'),
+      '#description' => $this->t('Select the USPS services that are available to customers. Be sure to include the services that the Postal Service agrees are available to you.'),
     );
 
     // Container for quote options
     $form['uc_usps_quote_options'] = array(
       '#type'          => 'details',
-      '#title'         => t('Quote options'),
-      '#description'   => t('Preferences that affect computation of quote.'),
+      '#title'         => $this->t('Quote options'),
+      '#description'   => $this->t('Preferences that affect computation of quote.'),
       '#group'         => 'usps-settings',
     );
 
     $form['uc_usps_quote_options']['uc_usps_all_in_one'] = array(
       '#type' => 'radios',
-      '#title' => t('Product packages'),
+      '#title' => $this->t('Product packages'),
       '#default_value' => $usps_config->get('all_in_one'),
       '#options' => array(
-        0 => t('Each product in its own package'),
-        1 => t('All products in one package'),
+        0 => $this->t('Each product in its own package'),
+        1 => $this->t('All products in one package'),
       ),
-      '#description' => t('Indicate whether each product is quoted as shipping separately or all in one package. Orders with one kind of product will still use the package quantity to determine the number of packages needed, however.'),
+      '#description' => $this->t('Indicate whether each product is quoted as shipping separately or all in one package. Orders with one kind of product will still use the package quantity to determine the number of packages needed, however.'),
     );
 
     // Insurance
     $form['uc_usps_quote_options']['uc_usps_insurance'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Package insurance'),
+      '#title' => $this->t('Package insurance'),
       '#default_value' => $usps_config->get('insurance'),
-      '#description' => t('When enabled, the quotes presented to the customer will include the cost of insurance for the full sales price of all products in the order.'),
+      '#description' => $this->t('When enabled, the quotes presented to the customer will include the cost of insurance for the full sales price of all products in the order.'),
       '#disabled' => TRUE,
     );
 
     // Delivery Confirmation
     $form['uc_usps_quote_options']['uc_usps_delivery_confirmation'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Delivery confirmation'),
+      '#title' => $this->t('Delivery confirmation'),
       '#default_value' => $usps_config->get('delivery_confirmation'),
-      '#description' => t('When enabled, the quotes presented to the customer will include the cost of delivery confirmation for all packages in the order.'),
+      '#description' => $this->t('When enabled, the quotes presented to the customer will include the cost of delivery confirmation for all packages in the order.'),
       '#disabled' => TRUE,
     );
 
     // Signature Confirmation
     $form['uc_usps_quote_options']['uc_usps_signature_confirmation'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Signature confirmation'),
+      '#title' => $this->t('Signature confirmation'),
       '#default_value' => $usps_config->get('signature_confirmation'),
-      '#description' => t('When enabled, the quotes presented to the customer will include the cost of signature confirmation for all packages in the order.'),
+      '#description' => $this->t('When enabled, the quotes presented to the customer will include the cost of signature confirmation for all packages in the order.'),
       '#disabled' => TRUE,
     );
 
     // Container for markup forms
     $form['uc_usps_markups'] = array(
       '#type'          => 'details',
-      '#title'         => t('Markups'),
-      '#description'   => t('Modifiers to the shipping weight and quoted rate.'),
+      '#title'         => $this->t('Markups'),
+      '#description'   => $this->t('Modifiers to the shipping weight and quoted rate.'),
       '#group'         => 'usps-settings',
     );
 
     $form['uc_usps_markups']['uc_usps_rate_markup_type'] = array(
       '#type' => 'select',
-      '#title' => t('Rate markup type'),
+      '#title' => $this->t('Rate markup type'),
       '#default_value' => $usps_config->get('rate_markup_type'),
       '#options' => array(
-        'percentage' => t('Percentage (%)'),
-        'multiplier' => t('Multiplier (×)'),
-        'currency' => t('Addition (!currency)', array('!currency' => \Drupal::config('uc_store.settings')->get('currency.symbol'))),
+        'percentage' => $this->t('Percentage (%)'),
+        'multiplier' => $this->t('Multiplier (×)'),
+        'currency' => $this->t('Addition (!currency)', array('!currency' => \Drupal::config('uc_store.settings')->get('currency.symbol'))),
       ),
     );
     $form['uc_usps_markups']['uc_usps_rate_markup'] = array(
       '#type' => 'textfield',
-      '#title' => t('Shipping rate markup'),
+      '#title' => $this->t('Shipping rate markup'),
       '#default_value' => $usps_config->get('rate_markup'),
-      '#description' => t('Markup shipping rate quote by dollar amount, percentage, or multiplier.'),
+      '#description' => $this->t('Markup shipping rate quote by dollar amount, percentage, or multiplier.'),
     );
 
     // Form to select type of weight markup
     $form['uc_usps_markups']['uc_usps_weight_markup_type'] = array(
       '#type'          => 'select',
-      '#title'         => t('Weight markup type'),
+      '#title'         => $this->t('Weight markup type'),
       '#default_value' => $usps_config->get('weight_markup_type'),
       '#options'       => array(
-        'percentage' => t('Percentage (%)'),
-        'multiplier' => t('Multiplier (×)'),
-        'mass'       => t('Addition (!mass)', array('!mass' => '#')),
+        'percentage' => $this->t('Percentage (%)'),
+        'multiplier' => $this->t('Multiplier (×)'),
+        'mass'       => $this->t('Addition (!mass)', array('!mass' => '#')),
       ),
       '#disabled' => TRUE,
     );
@@ -203,10 +203,10 @@ class USPSSettingsForm extends ConfigFormBase {
     // Form to select weight markup amount
     $form['uc_usps_markups']['uc_usps_weight_markup'] = array(
       '#type'          => 'textfield',
-      '#title'         => t('Shipping weight markup'),
+      '#title'         => $this->t('Shipping weight markup'),
       //'#default_value' => $usps_config->get('weight_markup'),
       '#default_value' => 0,
-      '#description'   => t('Markup shipping weight on a per-package basis before quote, by weight amount, percentage, or multiplier.'),
+      '#description'   => $this->t('Markup shipping weight on a per-package basis before quote, by weight amount, percentage, or multiplier.'),
       '#disabled' => TRUE,
     );
 
@@ -214,14 +214,14 @@ class USPSSettingsForm extends ConfigFormBase {
     $form['actions']['#type'] = 'actions';
     $form['actions']['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Save configuration'),
+      '#value' => $this->t('Save configuration'),
     );
     $form['actions']['cancel'] = array(
-      '#markup' => \Drupal::l(t('Cancel'), new Url('uc_quote.methods')),
+      '#markup' => $this->l($this->t('Cancel'), new Url('uc_quote.methods')),
     );
 
     if (!empty($_POST) && $form_state->getErrors()) {
-      drupal_set_message(t('The settings have not been saved because of the errors.'), 'error');
+      drupal_set_message($this->t('The settings have not been saved because of the errors.'), 'error');
     }
     if (!isset($form['#theme'])) {
       $form['#theme'] = 'system_settings_form';
@@ -236,10 +236,10 @@ class USPSSettingsForm extends ConfigFormBase {
    */
   public function validateForm(array &$form, FormStateInterface $form_state) {
     if (!is_numeric($form_state->getValue('uc_usps_rate_markup'))) {
-      $form_state->setErrorByName('uc_usps_rate_markup', t('Rate markup must be a numeric value.'));
+      $form_state->setErrorByName('uc_usps_rate_markup', $this->t('Rate markup must be a numeric value.'));
     }
     if (!is_numeric($form_state->getValue('uc_usps_weight_markup'))) {
-      $form_state->setErrorByName('uc_usps_weight_markup', t('Weight markup must be a numeric value.'));
+      $form_state->setErrorByName('uc_usps_weight_markup', $this->t('Weight markup must be a numeric value.'));
     }
   }
 
@@ -267,7 +267,7 @@ class USPSSettingsForm extends ConfigFormBase {
       ->set('signature_confirmation', $values['uc_usps_signature_confirmation'])
       ->save();
 
-    drupal_set_message(t('The configuration options have been saved.'));
+    drupal_set_message($this->t('The configuration options have been saved.'));
 
     // @todo: Still need these two lines?
     //cache_clear_all();
diff --git a/uc_ajax_admin/src/Form/AjaxAdminForm.php b/uc_ajax_admin/src/Form/AjaxAdminForm.php
index f930777..df00b48 100644
--- a/uc_ajax_admin/src/Form/AjaxAdminForm.php
+++ b/uc_ajax_admin/src/Form/AjaxAdminForm.php
@@ -47,7 +47,7 @@ class AjaxAdminForm extends FormBase {
         throw new NotFoundHttpException();
     }
     $form['#uc_ajax_target'] = $target_form;
-    $config = \Drupal::config('uc_cart.settings')->get('ajax.' . $target_form);
+    $config = $this->config('uc_cart.settings')->get('ajax.' . $target_form);
     $form['#uc_ajax_config'] = $config ?: _uc_ajax_defaults($target_form);
 
     $form['table'] = uc_ajax_admin_table($triggers, $wrappers, $form['#uc_ajax_config']);
@@ -80,7 +80,7 @@ class AjaxAdminForm extends FormBase {
         $config[$key] = $entry['panes'];
       }
     }
-    \Drupal::configFactory()->getEditable('uc_cart.settings')
+    $this->configFactory()->getEditable('uc_cart.settings')
       ->set('ajax.' . $form['#uc_ajax_target'], $config)
       ->save();
     drupal_set_message(t('Your changes have been saved.'));
diff --git a/uc_attribute/src/Form/AttributeFormBase.php b/uc_attribute/src/Form/AttributeFormBase.php
index 1e4cfd3..8193fd2 100644
--- a/uc_attribute/src/Form/AttributeFormBase.php
+++ b/uc_attribute/src/Form/AttributeFormBase.php
@@ -29,50 +29,50 @@ abstract class AttributeFormBase extends FormBase {
   public function buildForm(array $form, FormStateInterface $form_state) {
     $form['name'] = array(
       '#type' => 'textfield',
-      '#title' => t('Name'),
-      '#description' => t('The name of the attribute used in administrative forms'),
+      '#title' => $this->t('Name'),
+      '#description' => $this->t('The name of the attribute used in administrative forms'),
       '#default_value' => '',
       '#required' => TRUE,
     );
     $form['label'] = array(
       '#type' => 'textfield',
-      '#title' => t('Label'),
-      '#description' => t("Enter a label that customers will see instead of the attribute name. Use &lt;none&gt; if you don't want a title to appear at all."),
+      '#title' => $this->t('Label'),
+      '#description' => $this->t("Enter a label that customers will see instead of the attribute name. Use &lt;none&gt; if you don't want a title to appear at all."),
       '#default_value' => '',
     );
     $form['description'] = array(
       '#type' => 'textfield',
-      '#title' => t('Help text'),
-      '#description' => t('<b>Optional.</b> Enter the help text that will display beneath the attribute on product add to cart forms.'),
+      '#title' => $this->t('Help text'),
+      '#description' => $this->t('<b>Optional.</b> Enter the help text that will display beneath the attribute on product add to cart forms.'),
       '#default_value' => '',
       '#maxlength' => 255,
     );
     $form['required'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Make this attribute required, forcing the customer to choose an option.'),
-      '#description' => t('Selecting this for an attribute will disregard any default option you specify.<br />May be overridden at the product level.'),
+      '#title' => $this->t('Make this attribute required, forcing the customer to choose an option.'),
+      '#description' => $this->t('Selecting this for an attribute will disregard any default option you specify.<br />May be overridden at the product level.'),
       '#default_value' => 0,
     );
     $form['display'] = array(
       '#type' => 'select',
-      '#title' => t('Display type'),
-      '#description' => t('This specifies how the options for this attribute will be presented.<br />May be overridden at the product level.'),
+      '#title' => $this->t('Display type'),
+      '#description' => $this->t('This specifies how the options for this attribute will be presented.<br />May be overridden at the product level.'),
       '#options' => _uc_attribute_display_types(),
       '#default_value' => 1,
     );
     $form['ordering'] = array(
       '#type' => 'weight',
       '#delta' => 25,
-      '#title' => t('List position'),
-      '#description' => t('Multiple attributes on an add to cart form are sorted by this value and then by their name.<br />May be overridden at the product level.'),
+      '#title' => $this->t('List position'),
+      '#description' => $this->t('Multiple attributes on an add to cart form are sorted by this value and then by their name.<br />May be overridden at the product level.'),
       '#default_value' => 0,
     );
 
     $form['actions'] = array('#type' => 'actions');
     $form['actions']['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Submit'),
-      '#suffix' => \Drupal::l(t('Cancel'), new Url('uc_attribute.overview')),
+      '#value' => $this->t('Submit'),
+      '#suffix' => $this->l($this->t('Cancel'), new Url('uc_attribute.overview')),
     );
 
     return $form;
diff --git a/uc_attribute/src/Form/AttributeOptionsForm.php b/uc_attribute/src/Form/AttributeOptionsForm.php
index 9b27c6e..63bb728 100644
--- a/uc_attribute/src/Form/AttributeOptionsForm.php
+++ b/uc_attribute/src/Form/AttributeOptionsForm.php
@@ -93,7 +93,7 @@ class AttributeOptionsForm extends FormBase {
     $form['actions'] = array('#type' => 'actions');
     $form['actions']['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Save changes'),
+      '#value' => $this->t('Save changes'),
     );
 
     return $form;
@@ -112,7 +112,7 @@ class AttributeOptionsForm extends FormBase {
         ->execute();
     }
 
-    drupal_set_message(t('The changes have been saved.'));
+    drupal_set_message($this->t('The changes have been saved.'));
   }
 
 }
diff --git a/uc_attribute/src/Form/ObjectAttributesAddFormBase.php b/uc_attribute/src/Form/ObjectAttributesAddFormBase.php
index 8e44ff4..5a548f7 100644
--- a/uc_attribute/src/Form/ObjectAttributesAddFormBase.php
+++ b/uc_attribute/src/Form/ObjectAttributesAddFormBase.php
@@ -61,14 +61,14 @@ abstract class ObjectAttributesAddFormBase extends FormBase {
 
     $form['add_attributes'] = array(
       '#type' => 'checkboxes',
-      '#title' => t('Attributes'),
-      '#options' => $unused_attributes ?: array(t('No attributes left to add.')),
+      '#title' => $this->t('Attributes'),
+      '#options' => $unused_attributes ?: array($this->t('No attributes left to add.')),
       '#disabled' => empty($unused_attributes),
     );
     $form['actions'] = array('#type' => 'actions');
     $form['actions']['add'] = array(
       '#type' => 'submit',
-      '#value' => t('Add attributes'),
+      '#value' => $this->t('Add attributes'),
     );
 
     return $form;
diff --git a/uc_attribute/src/Form/ObjectAttributesFormBase.php b/uc_attribute/src/Form/ObjectAttributesFormBase.php
index 6222dfe..c11214a 100644
--- a/uc_attribute/src/Form/ObjectAttributesFormBase.php
+++ b/uc_attribute/src/Form/ObjectAttributesFormBase.php
@@ -87,7 +87,7 @@ abstract class ObjectAttributesFormBase extends FormBase {
         '#size' => 20,
       );
       $form['attributes'][$aid]['option'] = array(
-        '#markup' => $option ? (SafeMarkup::checkPlain($option->name) . ' (' . uc_currency_format($option->price) . ')' ) : t('n/a'),
+        '#markup' => $option ? (SafeMarkup::checkPlain($option->name) . ' (' . uc_currency_format($option->price) . ')' ) : $this->t('n/a'),
       );
       $form['attributes'][$aid]['required'] = array(
         '#type' => 'checkbox',
@@ -114,7 +114,7 @@ abstract class ObjectAttributesFormBase extends FormBase {
     $form['actions'] = array('#type' => 'actions');
     $form['actions']['save'] = array(
       '#type' => 'submit',
-      '#value' => t('Save changes'),
+      '#value' => $this->t('Save changes'),
     );
 
     return $form;
@@ -160,7 +160,7 @@ abstract class ObjectAttributesFormBase extends FormBase {
     }
 
     if ($changed) {
-      drupal_set_message(t('The changes have been saved.'));
+      drupal_set_message($this->t('The changes have been saved.'));
     }
   }
 
diff --git a/uc_attribute/src/Form/ObjectOptionsFormBase.php b/uc_attribute/src/Form/ObjectOptionsFormBase.php
index 333f4bb..f460863 100644
--- a/uc_attribute/src/Form/ObjectOptionsFormBase.php
+++ b/uc_attribute/src/Form/ObjectOptionsFormBase.php
@@ -55,12 +55,12 @@ abstract class ObjectOptionsFormBase extends FormBase {
         $form['attributes'][$aid]['options'] = array(
           '#type' => 'table',
           '#header' => array(
-            t('Options'),
-            t('Default'),
-            t('Cost'),
-            t('Price'),
-            t('Weight'),
-            t('List position'),
+            $this->t('Options'),
+            $this->t('Default'),
+            $this->t('Cost'),
+            $this->t('Price'),
+            $this->t('Weight'),
+            $this->t('List position'),
           ),
           '#caption' => '<h2>' . SafeMarkup::checkPlain($attribute->name) . '</h2>',
           '#empty' => $this->t('This attribute does not have any options.'),
@@ -184,7 +184,7 @@ abstract class ObjectOptionsFormBase extends FormBase {
     }
 
     if ($error) {
-      drupal_set_message(t('All attributes with enabled options must specify an enabled option as default.'), 'error');
+      drupal_set_message($this->t('All attributes with enabled options must specify an enabled option as default.'), 'error');
     }
   }
 
@@ -226,7 +226,7 @@ abstract class ObjectOptionsFormBase extends FormBase {
       }
     }
 
-    drupal_set_message(t('The changes have been saved.'));
+    drupal_set_message($this->t('The changes have been saved.'));
   }
 
   /**
diff --git a/uc_attribute/src/Form/OptionAddForm.php b/uc_attribute/src/Form/OptionAddForm.php
index 671e9e0..d080cad 100644
--- a/uc_attribute/src/Form/OptionAddForm.php
+++ b/uc_attribute/src/Form/OptionAddForm.php
@@ -34,8 +34,8 @@ class OptionAddForm extends OptionFormBase {
     // Remove Form API elements from $form_state
     $form_state->cleanValues();
     $oid = db_insert('uc_attribute_options')->fields($form_state->getValues())->execute();
-    drupal_set_message(t('Created new option %option.', ['%option' => $form_state->getValue('name')]));
-    \Drupal::logger('uc_attribute')->notice('Created new option %option.', ['%option' => $form_state->getValue('name'), 'link' => 'admin/store/products/attributes/' . $form_state->getValue('aid') . '/options/add']);
+    drupal_set_message($this->t('Created new option %option.', ['%option' => $form_state->getValue('name')]));
+    $this->logger('uc_attribute')->notice('Created new option %option.', ['%option' => $form_state->getValue('name'), 'link' => 'admin/store/products/attributes/' . $form_state->getValue('aid') . '/options/add']);
     $form_state->setRedirect('uc_attribute.option_add', ['aid' => $form_state->getValue('aid')]);
   }
 
diff --git a/uc_attribute/src/Form/OptionEditForm.php b/uc_attribute/src/Form/OptionEditForm.php
index 4c70954..ebef659 100644
--- a/uc_attribute/src/Form/OptionEditForm.php
+++ b/uc_attribute/src/Form/OptionEditForm.php
@@ -44,8 +44,8 @@ class OptionEditForm extends OptionFormBase {
       ->key(array('aid' => $form_state->getValue('aid'), 'oid' => $form_state->getValue('oid')))
       ->fields($form_state->getValues())
       ->execute();
-    drupal_set_message(t('Updated option %option.', ['%option' => $form_state->getValue('name')]));
-    \Drupal::logger('uc_attribute')->notice('Updated option %option.', ['%option' => $form_state->getValue('name'), 'link' => 'admin/store/products/attributes/' . $form_state->getValue('aid') . '/options/' . $form_state->getValue('oid')]);
+    drupal_set_message($this->t('Updated option %option.', ['%option' => $form_state->getValue('name')]));
+    $this->logger('uc_attribute')->notice('Updated option %option.', ['%option' => $form_state->getValue('name'), 'link' => 'admin/store/products/attributes/' . $form_state->getValue('aid') . '/options/' . $form_state->getValue('oid')]);
     $form_state->setRedirect('uc_attribute.options', ['aid' => $form_state->getValue('aid')]);
   }
 
diff --git a/uc_attribute/src/Form/OptionFormBase.php b/uc_attribute/src/Form/OptionFormBase.php
index 618d4dc..fc0fc1b 100644
--- a/uc_attribute/src/Form/OptionFormBase.php
+++ b/uc_attribute/src/Form/OptionFormBase.php
@@ -31,8 +31,8 @@ abstract class OptionFormBase extends FormBase {
 
     $form['name'] = array(
       '#type' => 'textfield',
-      '#title' => t('Name'),
-      '#description' => t('This name will appear to customers on product add to cart forms.'),
+      '#title' => $this->t('Name'),
+      '#description' => $this->t('This name will appear to customers on product add to cart forms.'),
       '#default_value' => '',
       '#required' => TRUE,
       '#weight' => 0,
@@ -40,34 +40,34 @@ abstract class OptionFormBase extends FormBase {
     $form['ordering'] = array(
       '#type' => 'weight',
       '#delta' => 50,
-      '#title' => t('List position'),
-      '#description' => t('Options will be listed sorted by this value and then by their name.<br />May be overridden at the product level.'),
+      '#title' => $this->t('List position'),
+      '#description' => $this->t('Options will be listed sorted by this value and then by their name.<br />May be overridden at the product level.'),
       '#default_value' => 0,
       '#weight' => 4,
     );
     $form['adjustments'] = array(
       '#type' => 'fieldset',
-      '#title' => t('Default adjustments'),
-      '#description' => t('Enter a positive or negative value for each adjustment applied when this option is selected.<br />Any of these may be overriden at the product level.'),
+      '#title' => $this->t('Default adjustments'),
+      '#description' => $this->t('Enter a positive or negative value for each adjustment applied when this option is selected.<br />Any of these may be overriden at the product level.'),
       '#weight' => 8,
     );
     $form['adjustments']['cost'] = array(
       '#type' => 'uc_price',
-      '#title' => t('Cost'),
+      '#title' => $this->t('Cost'),
       '#default_value' => 0,
       '#weight' => 1,
       '#allow_negative' => TRUE,
     );
     $form['adjustments']['price'] = array(
       '#type' => 'uc_price',
-      '#title' => t('Price'),
+      '#title' => $this->t('Price'),
       '#default_value' => 0,
       '#weight' => 2,
       '#allow_negative' => TRUE,
     );
     $form['adjustments']['weight'] = array(
       '#type' => 'textfield',
-      '#title' => t('Weight'),
+      '#title' => $this->t('Weight'),
       '#default_value' => 0,
       '#weight' => 3,
     );
@@ -75,8 +75,8 @@ abstract class OptionFormBase extends FormBase {
     $form['actions'] = array('#type' => 'actions');
     $form['actions']['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Submit'),
-      '#suffix' => \Drupal::l(t('Cancel'), new Url('uc_attribute.options', ['aid' => $aid])),
+      '#value' => $this->t('Submit'),
+      '#suffix' => $this->l($this->t('Cancel'), new Url('uc_attribute.options', ['aid' => $aid])),
       '#weight' => 10,
     );
 
diff --git a/uc_attribute/src/Form/ProductAdjustmentsForm.php b/uc_attribute/src/Form/ProductAdjustmentsForm.php
index ee2725d..5aa5472 100644
--- a/uc_attribute/src/Form/ProductAdjustmentsForm.php
+++ b/uc_attribute/src/Form/ProductAdjustmentsForm.php
@@ -87,7 +87,7 @@ class ProductAdjustmentsForm extends FormBase {
       $result = $query->execute();
 
       $form['original'] = array(
-        '#markup' => '<p><b>' . t('Default product SKU: @sku', ['@sku' => $model]) . '</b></p>',
+        '#markup' => '<p><b>' . $this->t('Default product SKU: @sku', ['@sku' => $model]) . '</b></p>',
       );
       $form['default'] = array(
         '#type' => 'value',
@@ -98,7 +98,7 @@ class ProductAdjustmentsForm extends FormBase {
         '#suffix' => '</table>',
       );
       $form['table']['head'] = array(
-        '#markup' => '<thead><tr>' . $attribute_names . '<th>' . t('Alternate SKU') . '</th></tr></thead>',
+        '#markup' => '<thead><tr>' . $attribute_names . '<th>' . $this->t('Alternate SKU') . '</th></tr></thead>',
         '#weight' => 0,
       );
       $form['table']['body'] = array(
@@ -155,12 +155,12 @@ class ProductAdjustmentsForm extends FormBase {
       $form['actions'] = array('#type' => 'actions');
       $form['actions']['submit'] = array(
         '#type' => 'submit',
-        '#value' => t('Submit'),
+        '#value' => $this->t('Submit'),
       );
     }
     else {
       $form['error'] = array(
-        '#markup' => '<div><br />' . t('This product does not have any attributes that can be used for SKU adjustments.') . '</div>',
+        '#markup' => '<div><br />' . $this->t('This product does not have any attributes that can be used for SKU adjustments.') . '</div>',
       );
     }
 
@@ -194,7 +194,7 @@ class ProductAdjustmentsForm extends FormBase {
           ->execute();
       }
     }
-    drupal_set_message(t('Product adjustments have been saved.'));
+    drupal_set_message($this->t('Product adjustments have been saved.'));
   }
 
 }
diff --git a/uc_cart/src/Controller/Cart.php b/uc_cart/src/Controller/Cart.php
index 4055f60..c678e50 100644
--- a/uc_cart/src/Controller/Cart.php
+++ b/uc_cart/src/Controller/Cart.php
@@ -45,7 +45,7 @@ class Cart extends ControllerBase implements CartInterface {
     // Force the order to load from the DB instead of the entity cache.
     // @todo Remove this once uc_payment_enter() can modify order objects?
     // @todo Should we be overwriting $order with this newly-loaded db_order?
-    $db_order = \Drupal::entityManager()->getStorage('uc_order')->loadUnchanged($order->id());
+    $db_order = $this->entityManager()->getStorage('uc_order')->loadUnchanged($order->id());
     $order->data = $db_order->data;
 
     // Ensure that user creation and triggers are only run once.
@@ -184,7 +184,7 @@ class Cart extends ControllerBase implements CartInterface {
         ->execute();
 
       if (!empty($result)) {
-        $storage = \Drupal::entityManager()->getStorage('uc_cart_item');
+        $storage = $this->entityManager()->getStorage('uc_cart_item');
         $storage->resetCache(array_keys($result));
         $items[$cid] = $storage->loadMultiple(array_keys($result));
       }
@@ -336,7 +336,7 @@ class Cart extends ControllerBase implements CartInterface {
       ->execute();
 
     if (!empty($result)) {
-      $storage = \Drupal::entityManager()->getStorage('uc_cart_item');
+      $storage = $this->entityManager()->getStorage('uc_cart_item');
       $entities = $storage->loadMultiple(array_keys($result));
       $storage->delete($entities);
     }
diff --git a/uc_cart/src/Controller/CheckoutController.php b/uc_cart/src/Controller/CheckoutController.php
index 2f7c1fe..e76325b 100644
--- a/uc_cart/src/Controller/CheckoutController.php
+++ b/uc_cart/src/Controller/CheckoutController.php
@@ -128,7 +128,7 @@ class CheckoutController extends ControllerBase implements ContainerInjectionInt
           ->condition('order_id', $order->id())
           ->execute();
         if (!empty($result)) {
-          $storage = \Drupal::entityManager()->getStorage('uc_order_product');
+          $storage = $this->entityManager()->getStorage('uc_order_product');
           $entities = $storage->loadMultiple(array_keys($result));
           $storage->delete($entities);
         }
diff --git a/uc_cart/src/Form/CartForm.php b/uc_cart/src/Form/CartForm.php
index 7700239..644a7ef 100644
--- a/uc_cart/src/Form/CartForm.php
+++ b/uc_cart/src/Form/CartForm.php
@@ -117,7 +117,7 @@ class CartForm extends FormBase {
       // Add the element to the form based on the element type.
       if ($cart_config->get('continue_shopping_type') == 'link') {
         $form['actions']['continue_shopping'] = array(
-          '#markup' => \Drupal::l($this->t('Continue shopping'), Url::fromUri('internal:' . $this->continueShoppingUrl())),
+          '#markup' => $this->l($this->t('Continue shopping'), Url::fromUri('internal:' . $this->continueShoppingUrl())),
         );
       }
       elseif ($cart_config->get('continue_shopping_type') == 'button') {
diff --git a/uc_cart/src/Form/CartSettingsForm.php b/uc_cart/src/Form/CartSettingsForm.php
index 9a187ad..8be732d 100644
--- a/uc_cart/src/Form/CartSettingsForm.php
+++ b/uc_cart/src/Form/CartSettingsForm.php
@@ -63,7 +63,7 @@ class CartSettingsForm extends ConfigFormBase {
       '#description' => t('Enter the page to redirect to when a customer adds an item to their cart, or &lt;none&gt; for no redirect.'),
       '#default_value' => $cart_config->get('add_item_redirect'),
       '#size' => 32,
-      '#field_prefix' => \Drupal::url('<front>', [], ['absolute' => TRUE]),
+      '#field_prefix' => $this->url('<front>', [], ['absolute' => TRUE]),
     );
 
     $form['general']['uc_cart_empty_button'] = array(
@@ -161,7 +161,7 @@ class CartSettingsForm extends ConfigFormBase {
       '#title' => t('Default <em>continue shopping</em> destination'),
       '#default_value' => $cart_config->get('continue_shopping_url'),
       '#size' => 32,
-      '#field_prefix' => \Drupal::url('<front>', [], ['absolute' => TRUE]),
+      '#field_prefix' => $this->url('<front>', [], ['absolute' => TRUE]),
     );
 
     $form['breadcrumb'] = array(
@@ -181,7 +181,7 @@ class CartSettingsForm extends ConfigFormBase {
       '#title' => t('Cart page breadcrumb destination'),
       '#default_value' => $cart_config->get('breadcrumb_url'),
       '#size' => 32,
-      '#field_prefix' => \Drupal::url('<front>', [], ['absolute' => TRUE]),
+      '#field_prefix' => $this->url('<front>', [], ['absolute' => TRUE]),
     );
 
     return parent::buildForm($form, $form_state);
diff --git a/uc_catalog/src/CatalogBreadcrumbBuilder.php b/uc_catalog/src/CatalogBreadcrumbBuilder.php
index 7cabbdd..a1d982f 100644
--- a/uc_catalog/src/CatalogBreadcrumbBuilder.php
+++ b/uc_catalog/src/CatalogBreadcrumbBuilder.php
@@ -74,7 +74,7 @@ class CatalogBreadcrumbBuilder implements BreadcrumbBuilderInterface {
    */
   protected function catalogBreadcrumb($node) {
     $breadcrumb[] = Link::createFromRoute($this->t('Home'), '<front>');
-    $breadcrumb[] = new Link(t('Catalog'), Url::fromRoute('view.uc_catalog.page_1'));
+    $breadcrumb[] = new Link($this->t('Catalog'), Url::fromRoute('view.uc_catalog.page_1'));
     if ($parents = \Drupal::entityManager()->getStorage('taxonomy_term')->loadAllParents($node->taxonomy_catalog->target_id)) {
       $parents = array_reverse($parents);
       foreach ($parents as $parent) {
@@ -89,7 +89,7 @@ class CatalogBreadcrumbBuilder implements BreadcrumbBuilderInterface {
    */
   protected function catalogTermBreadcrumb($tid) {
     $breadcrumb[] = Link::createFromRoute($this->t('Home'), '<front>');
-    $breadcrumb[] = new Link(t('Catalog'), Url::fromRoute('view.uc_catalog.page_1'));
+    $breadcrumb[] = new Link($this->t('Catalog'), Url::fromRoute('view.uc_catalog.page_1'));
     if ($parents = \Drupal::entityManager()->getStorage('taxonomy_term')->loadAllParents($tid)) {
       array_shift($parents);
       $parents = array_reverse($parents);
diff --git a/uc_catalog/src/Form/CatalogSettingsForm.php b/uc_catalog/src/Form/CatalogSettingsForm.php
index 7806b63..68b77de 100644
--- a/uc_catalog/src/Form/CatalogSettingsForm.php
+++ b/uc_catalog/src/Form/CatalogSettingsForm.php
@@ -49,7 +49,7 @@ class CatalogSettingsForm extends ConfigFormBase {
 
     $form['uc_catalog_display'] = array(
       '#type' => 'select',
-      '#title' => t('Catalog display'),
+      '#title' => $this->t('Catalog display'),
       '#default_value' => $config->get('display'),
       '#options' => $displays,
     );
@@ -59,7 +59,7 @@ class CatalogSettingsForm extends ConfigFormBase {
       $catalog = \Drupal\taxonomy\Entity\Vocabulary::load($vid);
 
       $form['catalog_vid'] = array(
-        '#markup' => '<p>' . t('The taxonomy vocabulary <a href="!edit-url">%name</a> is set as the product catalog.', array('!edit-url' => \Drupal::url('entity.taxonomy_vocabulary.edit_form', ['taxonomy_vocabulary' => $catalog->id()]), '%name' => $catalog->label())) . '</p>',
+        '#markup' => '<p>' . $this->t('The taxonomy vocabulary <a href="!edit-url">%name</a> is set as the product catalog.', array('!edit-url' => $this->url('entity.taxonomy_vocabulary.edit_form', ['taxonomy_vocabulary' => $catalog->id()]), '%name' => $catalog->label())) . '</p>',
       );
     }
 
@@ -71,14 +71,14 @@ class CatalogSettingsForm extends ConfigFormBase {
 
     $form['uc_catalog_vid'] = array(
       '#type' => 'select',
-      '#title' => t('Catalog vocabulary'),
+      '#title' => $this->t('Catalog vocabulary'),
       '#default_value' => $config->get('vocabulary'),
       '#options' => $vocabs,
     );
 
     $form['uc_catalog_breadcrumb'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Display the catalog breadcrumb'),
+      '#title' => $this->t('Display the catalog breadcrumb'),
       '#default_value' => $config->get('breadcrumb'),
     );
     return parent::buildForm($form, $form_state);
diff --git a/uc_country/src/CountryListBuilder.php b/uc_country/src/CountryListBuilder.php
index 8824c32..a0c93db 100644
--- a/uc_country/src/CountryListBuilder.php
+++ b/uc_country/src/CountryListBuilder.php
@@ -28,8 +28,8 @@ class CountryListBuilder extends ConfigEntityListBuilder {
    * {@inheritdoc}
    */
   public function buildHeader() {
-    $header['title'] = t('Name');
-    $header['code'] = t('Code');
+    $header['title'] = $this->t('Name');
+    $header['code'] = $this->t('Code');
     return $header + parent::buildHeader();
   }
 
diff --git a/uc_file/src/Form/ShowForm.php b/uc_file/src/Form/ShowForm.php
index a66b970..1f05318 100644
--- a/uc_file/src/Form/ShowForm.php
+++ b/uc_file/src/Form/ShowForm.php
@@ -39,9 +39,9 @@ class ShowForm extends FormBase {
     $form['#tree'] = TRUE;
 
     $header = array(
-      'filename' => array('data' => t('File'), 'field' => 'f.filename', 'sort' => 'asc'),
-      'title' => array('data' => t('Product'), 'field' => 'n.title'),
-      'model' => array('data' => t('SKU'), 'field' => 'fp.model')
+      'filename' => array('data' => $this->t('File'), 'field' => 'f.filename', 'sort' => 'asc'),
+      'title' => array('data' => $this->t('Product'), 'field' => 'n.title'),
+      'model' => array('data' => $this->t('SKU'), 'field' => 'fp.model')
     );
 
     // Create pager.
@@ -73,7 +73,7 @@ class ShowForm extends FormBase {
           'data' => SafeMarkup::checkPlain($file->filename),
           'class' => is_dir(uc_file_qualify_file($file->filename)) ? array('uc-file-directory-view') : array(),
         ),
-        'title' => \Drupal::l($file->title, new Url('entity.node.canonical', ['node' => $file->nid])),
+        'title' => $this->l($file->title, new Url('entity.node.canonical', ['node' => $file->nid])),
         'model' => SafeMarkup::checkPlain($file->model),
       );
     }
@@ -83,18 +83,18 @@ class ShowForm extends FormBase {
       '#type' => 'tableselect',
       '#header' => $header,
       '#options' => $options,
-      '#empty' => t('No file downloads available.'),
+      '#empty' => $this->t('No file downloads available.'),
     );
 
     $form['uc_file_action'] = array(
       '#type' => 'fieldset',
-      '#title' => t('File options'),
+      '#title' => $this->t('File options'),
     );
 
     // Set our default actions.
     $file_actions = array(
-      'uc_file_upload' => t('Upload file'),
-      'uc_file_delete' => t('Delete file(s)'),
+      'uc_file_upload' => $this->t('Upload file'),
+      'uc_file_delete' => $this->t('Delete file(s)'),
     );
 
     // Check if any hook_uc_file_action('info', $args) are implemented
@@ -113,7 +113,7 @@ class ShowForm extends FormBase {
 
     $form['uc_file_action']['action'] = array(
       '#type' => 'select',
-      '#title' => t('Action'),
+      '#title' => $this->t('Action'),
       '#options' => $file_actions,
       '#prefix' => '<div class="duration">',
       '#suffix' => '</div>',
@@ -122,7 +122,7 @@ class ShowForm extends FormBase {
     $form['uc_file_actions']['actions'] = array('#type' => 'actions');
     $form['uc_file_action']['actions']['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Perform action'),
+      '#value' => $this->t('Perform action'),
       '#prefix' => '<div class="duration">',
       '#suffix' => '</div>',
     );
@@ -145,7 +145,7 @@ class ShowForm extends FormBase {
           }
         }
         if (count($file_ids) == 0) {
-          $form_state->setErrorByName('', t('You must select at least one file to delete.'));
+          $form_state->setErrorByName('', $this->t('You must select at least one file to delete.'));
         }
         break;
     }
@@ -174,7 +174,7 @@ class ShowForm extends FormBase {
     $form = $variables['form'];
 
     // Render everything.
-    $output = '<p>' . t('File downloads can be attached to any Ubercart product as a product feature. For security reasons the <a href="!download_url">file downloads directory</a> is separated from the Drupal <a href="!file_url">file system</a>. Below is the list of files (and their associated Ubercart products, if any) that can be used for file downloads.', array('!download_url' => \Drupal::url('uc_product.admin', [], ['query' => ['destination' => 'admin/store/products/files']]), '!file_url' => \Drupal::url('system.file_system_settings'))) . '</p>';
+    $output = '<p>' . $this->t('File downloads can be attached to any Ubercart product as a product feature. For security reasons the <a href="!download_url">file downloads directory</a> is separated from the Drupal <a href="!file_url">file system</a>. Below is the list of files (and their associated Ubercart products, if any) that can be used for file downloads.', array('!download_url' => \Drupal::url('uc_product.admin', [], ['query' => ['destination' => 'admin/store/products/files']]), '!file_url' => \Drupal::url('system.file_system_settings'))) . '</p>';
     $output .= drupal_render($form['uc_file_action']);
     $output .= drupal_render($form['file_select']);
     $output .= theme('pager');
diff --git a/uc_order/src/Form/OrderStatusAddForm.php b/uc_order/src/Form/OrderStatusAddForm.php
index b9fc140..a1c59c1 100644
--- a/uc_order/src/Form/OrderStatusAddForm.php
+++ b/uc_order/src/Form/OrderStatusAddForm.php
@@ -29,8 +29,8 @@ class OrderStatusAddForm extends FormBase {
   public function buildForm(array $form, FormStateInterface $form_state) {
     $form['id'] = array(
       '#type' => 'textfield',
-      '#title' => t('Order status ID'),
-      '#description' => t('Must be a unique ID with no spaces.'),
+      '#title' => $this->t('Order status ID'),
+      '#description' => $this->t('Must be a unique ID with no spaces.'),
       '#size' => 32,
       '#maxlength' => 32,
       '#required' => TRUE,
@@ -38,8 +38,8 @@ class OrderStatusAddForm extends FormBase {
 
     $form['name'] = array(
       '#type' => 'textfield',
-      '#title' => t('Title'),
-      '#description' => t('The order status title displayed to users.'),
+      '#title' => $this->t('Title'),
+      '#description' => $this->t('The order status title displayed to users.'),
       '#size' => 32,
       '#maxlength' => 48,
       '#required' => TRUE,
@@ -47,15 +47,15 @@ class OrderStatusAddForm extends FormBase {
 
     $form['state'] = array(
       '#type' => 'select',
-      '#title' => t('Order state'),
-      '#description' => t('Set which order state this status is for.'),
+      '#title' => $this->t('Order state'),
+      '#description' => $this->t('Set which order state this status is for.'),
       '#options' => uc_order_state_options_list(),
       '#default_value' => 'post_checkout',
     );
 
     $form['weight'] = array(
       '#type' => 'weight',
-      '#title' => t('List position'),
+      '#title' => $this->t('List position'),
       '#delta' => 20,
       '#default_value' => 0,
     );
@@ -63,10 +63,10 @@ class OrderStatusAddForm extends FormBase {
     $form['actions'] = array('#type' => 'actions');
     $form['actions']['create'] = array(
       '#type' => 'submit',
-      '#value' => t('Create'),
+      '#value' => $this->t('Create'),
     );
     $form['actions']['cancel'] = array(
-      '#markup' => \Drupal::l(t('Cancel'), new Url('uc_order.status_add')),
+      '#markup' => $this->l($this->t('Cancel'), new Url('uc_order.status_add')),
     );
 
     return $form;
@@ -78,11 +78,11 @@ class OrderStatusAddForm extends FormBase {
   public function validateForm(array &$form, FormStateInterface $form_state) {
     $id = strtolower(trim($form_state->getValue('id')));
     if (strpos($id, ' ') !== FALSE || $id == 'all') {
-      $form_state->setErrorByName('id', t('You have entered an invalid status ID.'));
+      $form_state->setErrorByName('id', $this->t('You have entered an invalid status ID.'));
     }
 
     if (\Drupal\uc_order\Entity\OrderStatus::load($id)) {
-      $form_state->setErrorByName('id', t('This ID is already in use.  Please specify a unique ID.'));
+      $form_state->setErrorByName('id', $this->t('This ID is already in use.  Please specify a unique ID.'));
     }
   }
 
@@ -97,7 +97,7 @@ class OrderStatusAddForm extends FormBase {
       'weight' => (int) $form_state->getValue('weight'),
     ))->save();
 
-    drupal_set_message(t('Custom order status created.'));
+    drupal_set_message($this->t('Custom order status created.'));
 
     $form_state->setRedirect('uc_order.workflow');
   }
diff --git a/uc_store/src/Controller/StoreController.php b/uc_store/src/Controller/StoreController.php
index 550144d..f85d4f5 100644
--- a/uc_store/src/Controller/StoreController.php
+++ b/uc_store/src/Controller/StoreController.php
@@ -21,7 +21,7 @@ class StoreController extends SystemController {
   public function overview($link_id = 'uc_store.admin.store') {
     $build['blocks'] = parent::overview($link_id);
 
-    if ($results = \Drupal::moduleHandler()->invokeAll('uc_store_status')) {
+    if ($results = $this->moduleHandler()->invokeAll('uc_store_status')) {
       foreach ($results as $message) {
         switch ($message['status']) {
           case 'warning': $icon = 'alert.gif'; break;
@@ -41,7 +41,7 @@ class StoreController extends SystemController {
 
       $build['status'] = array(
         '#theme' => 'table',
-        '#caption' => SafeMarkup::format('<h2>' . t('Store status') . '</h2>'),
+        '#caption' => SafeMarkup::format('<h2>' . $this->t('Store status') . '</h2>'),
         '#rows' => $rows,
         '#attributes' => array('class' => array('system-status-report')),
       );
diff --git a/uc_store/src/Form/StoreSettingsForm.php b/uc_store/src/Form/StoreSettingsForm.php
index b611e0f..2396a2e 100644
--- a/uc_store/src/Form/StoreSettingsForm.php
+++ b/uc_store/src/Form/StoreSettingsForm.php
@@ -42,49 +42,49 @@ class StoreSettingsForm extends ConfigFormBase {
 
     $form['basic'] = array(
       '#type' => 'details',
-      '#title' => t('Basic information'),
+      '#title' => $this->t('Basic information'),
       '#group' => 'store',
     );
     $form['basic']['uc_store_name'] = array(
       '#type' => 'textfield',
-      '#title' => t('Store name'),
+      '#title' => $this->t('Store name'),
       '#default_value' => uc_store_name(),
     );
     $form['basic']['uc_store_email'] = array(
       '#type' => 'email',
-      '#title' => t('E-mail address'),
+      '#title' => $this->t('E-mail address'),
       '#size' => 32,
       '#required' => TRUE,
       '#default_value' => uc_store_email(),
     );
     $form['basic']['uc_store_email_include_name'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Include the store name in the "From" line of store e-mails.'),
-      '#description' => t('May not be available on all server configurations. Turn off if this causes problems.'),
+      '#title' => $this->t('Include the store name in the "From" line of store e-mails.'),
+      '#description' => $this->t('May not be available on all server configurations. Turn off if this causes problems.'),
       '#default_value' => $config->get('mail_include_name'),
     );
     $form['basic']['uc_store_phone'] = array(
       '#type' => 'tel',
-      '#title' => t('Phone number'),
+      '#title' => $this->t('Phone number'),
       '#default_value' => $config->get('phone'),
     );
     $form['basic']['uc_store_fax'] = array(
       '#type' => 'tel',
-      '#title' => t('Fax number'),
+      '#title' => $this->t('Fax number'),
       '#default_value' => $config->get('fax'),
     );
     $form['basic']['uc_store_help_page'] = array(
       '#type' => 'textfield',
-      '#title' => t('Store help page'),
-      '#description' => t('The Drupal page for the store help link.'),
+      '#title' => $this->t('Store help page'),
+      '#description' => $this->t('The Drupal page for the store help link.'),
       '#default_value' => $config->get('help_page'),
       '#size' => 32,
-      '#field_prefix' => \Drupal::url('<front>', [], ['absolute' => TRUE]),
+      '#field_prefix' => $this->url('<front>', [], ['absolute' => TRUE]),
     );
 
     $form['address'] = array(
       '#type' => 'details',
-      '#title' => t('Store address'),
+      '#title' => $this->t('Store address'),
       '#group' => 'store',
     );
     $form['address']['address'] = array(
@@ -103,149 +103,149 @@ class StoreSettingsForm extends ConfigFormBase {
 
     $form['currency'] = array(
       '#type' => 'details',
-      '#title' => t('Currency format'),
+      '#title' => $this->t('Currency format'),
       '#group' => 'store',
     );
     $form['currency']['uc_currency_code'] = array(
       '#type' => 'textfield',
-      '#title' => t('Currency code'),
-      '#description' => t('While not used directly in formatting, the currency code is used by other modules as the primary currency for your site.  Enter here your three character <a href="!url">ISO 4217</a> currency code.', ['!url' => Url::fromUri('http://en.wikipedia.org/wiki/ISO_4217#Active_codes')->toString()]),
+      '#title' => $this->t('Currency code'),
+      '#description' => $this->t('While not used directly in formatting, the currency code is used by other modules as the primary currency for your site.  Enter here your three character <a href="!url">ISO 4217</a> currency code.', ['!url' => Url::fromUri('http://en.wikipedia.org/wiki/ISO_4217#Active_codes')->toString()]),
       '#default_value' => $config->get('currency.code'),
       '#maxlength' => 3,
       '#size' => 5,
     );
     $form['currency']['example'] = array(
       '#type' => 'textfield',
-      '#title' => t('Current format'),
+      '#title' => $this->t('Current format'),
       '#value' => uc_currency_format(1000.1234),
       '#disabled' => TRUE,
       '#size' => 10,
     );
     $form['currency']['uc_currency_sign'] = array(
       '#type' => 'textfield',
-      '#title' => t('Currency sign'),
+      '#title' => $this->t('Currency sign'),
       '#default_value' => $config->get('currency.symbol'),
       '#size' => 10,
       '#maxlength' => 10,
     );
     $form['currency']['uc_sign_after_amount'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Display currency sign after amount.'),
+      '#title' => $this->t('Display currency sign after amount.'),
       '#default_value' => $config->get('currency.symbol_after'),
     );
     $form['currency']['uc_currency_thou'] = array(
       '#type' => 'textfield',
-      '#title' => t('Thousands marker'),
+      '#title' => $this->t('Thousands marker'),
       '#default_value' => $config->get('currency.thousands_marker'),
       '#size' => 10,
       '#maxlength' => 10,
     );
     $form['currency']['uc_currency_dec'] = array(
       '#type' => 'textfield',
-      '#title' => t('Decimal marker'),
+      '#title' => $this->t('Decimal marker'),
       '#default_value' => $config->get('currency.decimal_marker'),
       '#size' => 10,
       '#maxlength' => 10,
     );
     $form['currency']['uc_currency_prec'] = array(
       '#type' => 'select',
-      '#title' => t('Number of decimal places'),
+      '#title' => $this->t('Number of decimal places'),
       '#options' => array(0 => 0, 1 => 1, 2 => 2),
       '#default_value' => $config->get('currency.precision'),
     );
 
     $form['weight'] = array(
       '#type' => 'details',
-      '#title' => t('Weight format'),
+      '#title' => $this->t('Weight format'),
       '#group' => 'store',
     );
     $form['weight']['uc_weight_unit'] = array(
       '#type' => 'select',
-      '#title' => t('Default weight units'),
+      '#title' => $this->t('Default weight units'),
       '#default_value' => $config->get('weight.units'),
       '#options' => array(
-        'lb' => t('Pounds'),
-        'oz' => t('Ounces'),
-        'kg' => t('Kilograms'),
-        'g' => t('Grams'),
+        'lb' => $this->t('Pounds'),
+        'oz' => $this->t('Ounces'),
+        'kg' => $this->t('Kilograms'),
+        'g' => $this->t('Grams'),
       ),
     );
     $form['weight']['uc_weight_thou'] = array(
       '#type' => 'textfield',
-      '#title' => t('Thousands marker'),
+      '#title' => $this->t('Thousands marker'),
       '#default_value' => $config->get('weight.thousands_marker'),
       '#size' => 10,
       '#maxlength' => 10,
     );
     $form['weight']['uc_weight_dec'] = array(
       '#type' => 'textfield',
-      '#title' => t('Decimal marker'),
+      '#title' => $this->t('Decimal marker'),
       '#default_value' => $config->get('weight.decimal_marker'),
       '#size' => 10,
       '#maxlength' => 10,
     );
     $form['weight']['uc_weight_prec'] = array(
       '#type' => 'select',
-      '#title' => t('Number of decimal places'),
+      '#title' => $this->t('Number of decimal places'),
       '#options' => array(0 => 0, 1 => 1, 2 => 2),
       '#default_value' => $config->get('weight.precision'),
     );
 
     $form['length'] = array(
       '#type' => 'details',
-      '#title' => t('Length format'),
+      '#title' => $this->t('Length format'),
       '#group' => 'store',
     );
     $form['length']['uc_length_unit'] = array(
       '#type' => 'select',
-      '#title' => t('Default length units'),
+      '#title' => $this->t('Default length units'),
       '#default_value' => $config->get('length.units'),
       '#options' => array(
-        'in' => t('Inches'),
-        'ft' => t('Feet'),
-        'cm' => t('Centimeters'),
-        'mm' => t('Millimeters'),
+        'in' => $this->t('Inches'),
+        'ft' => $this->t('Feet'),
+        'cm' => $this->t('Centimeters'),
+        'mm' => $this->t('Millimeters'),
       ),
     );
     $form['length']['uc_length_thou'] = array(
       '#type' => 'textfield',
-      '#title' => t('Thousands marker'),
+      '#title' => $this->t('Thousands marker'),
       '#default_value' => $config->get('length.thousands_marker'),
       '#size' => 10,
       '#maxlength' => 10,
     );
     $form['length']['uc_length_dec'] = array(
       '#type' => 'textfield',
-      '#title' => t('Decimal marker'),
+      '#title' => $this->t('Decimal marker'),
       '#default_value' => $config->get('length.decimal_marker'),
       '#size' => 10,
       '#maxlength' => 10,
     );
     $form['length']['uc_length_prec'] = array(
       '#type' => 'select',
-      '#title' => t('Number of decimal places'),
+      '#title' => $this->t('Number of decimal places'),
       '#options' => array(0 => 0, 1 => 1, 2 => 2),
       '#default_value' => $config->get('length.precision'),
     );
 
     $form['display'] = array(
       '#type' => 'details',
-      '#title' => t('Display settings'),
+      '#title' => $this->t('Display settings'),
       '#group' => 'store',
     );
     $form['display']['uc_customer_list_address'] = array(
       '#type' => 'radios',
-      '#title' => t('Primary customer address'),
-      '#description' => t('Select the address to be used on customer lists and summaries.'),
+      '#title' => $this->t('Primary customer address'),
+      '#description' => $this->t('Select the address to be used on customer lists and summaries.'),
       '#options' => array(
-        'billing' => t('Billing address'),
-        'shipping' => t('Shipping address'),
+        'billing' => $this->t('Billing address'),
+        'shipping' => $this->t('Shipping address'),
       ),
       '#default_value' => $config->get('customer_address'),
     );
     $form['display']['uc_order_capitalize_addresses'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Capitalize address on order screens'),
+      '#title' => $this->t('Capitalize address on order screens'),
       '#default_value' => $config->get('capitalize_address'),
     );
 
