Commit 373b1aca authored by Liam Morland's avatar Liam Morland
Browse files

Coding standards: Use StringTranslationTrait for translation

parent a34ff16a
......@@ -101,7 +101,7 @@ class ContentListBlock extends BlockBase {
// Get the rendered title for the view.
$the_title_render_array = [
'#markup' => t('@title', ['@title' => $title]),
'#markup' => $this->t('@title', ['@title' => $title]),
'#allowed_tags' => ['h2'],
];
......@@ -163,11 +163,11 @@ class ContentListBlock extends BlockBase {
'#type' => 'select',
'#title' => $this->t('Sort by'),
'#options' => [
'title' => 'Title',
'type' => 'Content type',
'uid' => 'Author',
'revision_uid' => 'Last update by',
'changed' => 'Last updated',
'title' => $this->t('Title'),
'type' => $this->t('Content type'),
'uid' => $this->t('Author'),
'revision_uid' => $this->t('Last update by'),
'changed' => $this->t('Last updated'),
],
'#default_value' => isset($this->configuration['sort_by']) ? $this->configuration['sort_by'] : 'last_updated',
];
......@@ -177,8 +177,8 @@ class ContentListBlock extends BlockBase {
'#type' => 'select',
'#title' => $this->t('Sort order'),
'#options' => [
'asc' => 'Ascending',
'desc' => 'Descending',
'asc' => $this->t('Ascending'),
'desc' => $this->t('Descending'),
],
'#default_value' => isset($this->configuration['sort_order']) ? $this->configuration['sort_order'] : 'asc',
];
......
......@@ -93,7 +93,7 @@ class ContentManagementMenuBlock extends BlockBase implements ContainerFactoryPl
];
$build[$id]['table'][$sec_id]['operations']['#links']['add'] = [
'title' => t('Add'),
'title' => $this->t('Add'),
'url' => $item->link->getUrlObject(),
];
......
......@@ -55,7 +55,7 @@ class FormsListBlock extends BlockBase {
// Get the rendered title for the view.
$the_title_render_array = [
'#markup' => t('@title', ['@title' => $title]),
'#markup' => $this->t('@title', ['@title' => $title]),
'#allowed_tags' => ['h2'],
];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment