Commit e6d260c6 authored by git's avatar git Committed by anon

Issue #2792099 by Pradnya Pingat, anon: Replace usage of t() in plugins with $this->t()

parent 8f2ca67b
......@@ -57,14 +57,14 @@ class LinkitDrupalLink extends DrupalLink implements CKEditorPluginConfigurableI
$form['linkit_enabled'] = [
'#type' => 'checkbox',
'#title' => t('Linkit enabled'),
'#title' => $this->t('Linkit enabled'),
'#default_value' => isset($settings['plugins']['drupallink']['linkit_enabled']) ? $settings['plugins']['drupallink']['linkit_enabled'] : '',
'#description' => $this->t('Enable Linkit for this text format.'),
];
$form['linkit_profile'] = [
'#type' => 'select',
'#title' => t('Linkit profile'),
'#title' => $this->t('Linkit profile'),
'#options' => $options,
'#default_value' => isset($settings['plugins']['drupallink']['linkit_profile']) ? $settings['plugins']['drupallink']['linkit_profile'] : '',
'#empty_option' => $this->t('- Select -'),
......@@ -104,7 +104,7 @@ class LinkitDrupalLink extends DrupalLink implements CKEditorPluginConfigurableI
]);
$enabled = isset($values['linkit_enabled']) && $values['linkit_enabled'] === 1;
if ($enabled && empty(trim($values['linkit_profile']))) {
$form_state->setError($element, t('Please select the Linkit profile you wish to use.'));
$form_state->setError($element, $this->t('Please select the Linkit profile you wish to use.'));
}
}
......
......@@ -183,7 +183,7 @@ class EntityMatcher extends ConfigurableMatcherBase {
$form['metadata'] = array(
'#type' => 'details',
'#title' => t('Suggestion metadata'),
'#title' => $this->t('Suggestion metadata'),
'#open' => TRUE,
'#weight' => -100,
);
......@@ -209,7 +209,7 @@ class EntityMatcher extends ConfigurableMatcherBase {
$form['bundle_restrictions'] = array(
'#type' => 'details',
'#title' => t('Bundle restrictions'),
'#title' => $this->t('Bundle restrictions'),
'#open' => TRUE,
'#weight' => -90,
);
......@@ -225,7 +225,7 @@ class EntityMatcher extends ConfigurableMatcherBase {
$form['bundle_grouping'] = array(
'#type' => 'details',
'#title' => t('Bundle grouping'),
'#title' => $this->t('Bundle grouping'),
'#open' => TRUE,
);
......@@ -241,7 +241,7 @@ class EntityMatcher extends ConfigurableMatcherBase {
$substitution_options = $this->substitutionManager->getApplicablePluginsOptionList($this->targetType);
$form['substitution'] = array(
'#type' => 'details',
'#title' => t('URL substitution'),
'#title' => $this->t('URL substitution'),
'#open' => TRUE,
'#weight' => 100,
'#access' => count($substitution_options) !== 1,
......
......@@ -90,7 +90,7 @@ class FileMatcher extends EntityMatcher {
$form['extensions'] = array(
'#type' => 'details',
'#title' => t('File extensions'),
'#title' => $this->t('File extensions'),
'#open' => TRUE,
'#weight' => -100,
);
......@@ -107,27 +107,27 @@ class FileMatcher extends EntityMatcher {
$form['images'] = [
'#type' => 'details',
'#title' => t('Image file settings'),
'#description' => t('Extra settings for image files in the result.'),
'#title' => $this->t('Image file settings'),
'#description' => $this->t('Extra settings for image files in the result.'),
'#open' => TRUE,
'#tree' => TRUE,
];
$form['images']['show_dimensions'] = [
'#title' => t('Show pixel dimensions'),
'#title' => $this->t('Show pixel dimensions'),
'#type' => 'checkbox',
'#default_value' => $this->configuration['images']['show_dimensions'],
];
if ($this->moduleHandler->moduleExists('image')) {
$form['images']['show_thumbnail'] = [
'#title' => t('Show thumbnail'),
'#title' => $this->t('Show thumbnail'),
'#type' => 'checkbox',
'#default_value' => $this->configuration['images']['show_thumbnail'],
];
$form['images']['thumbnail_image_style'] = [
'#title' => t('Thumbnail image style'),
'#title' => $this->t('Thumbnail image style'),
'#type' => 'select',
'#default_value' => $this->configuration['images']['thumbnail_image_style'],
'#options' => image_style_options(FALSE),
......
......@@ -55,15 +55,15 @@ class NodeMatcher extends EntityMatcher {
$form['unpublished_nodes'] = array(
'#type' => 'details',
'#title' => t('Unpublished nodes'),
'#title' => $this->t('Unpublished nodes'),
'#open' => TRUE,
);
$form['unpublished_nodes']['include_unpublished'] = [
'#title' => t('Include unpublished nodes'),
'#title' => $this->t('Include unpublished nodes'),
'#type' => 'checkbox',
'#default_value' => $this->configuration['include_unpublished'],
'#description' => t('In order to see unpublished nodes, users must also have permissions to do so.'),
'#description' => $this->t('In order to see unpublished nodes, users must also have permissions to do so.'),
];
return $form;
......
......@@ -62,7 +62,7 @@ class UserMatcher extends EntityMatcher {
$form['role_restrictions'] = array(
'#type' => 'details',
'#title' => t('Role restrictions'),
'#title' => $this->t('Role restrictions'),
'#open' => TRUE,
'#weight' => -90,
);
......@@ -78,15 +78,15 @@ class UserMatcher extends EntityMatcher {
$form['blocked_users'] = array(
'#type' => 'details',
'#title' => t('Blocked users'),
'#title' => $this->t('Blocked users'),
'#open' => TRUE,
);
$form['blocked_users']['include_blocked'] = [
'#title' => t('Include blocked user'),
'#title' => $this->t('Include blocked user'),
'#type' => 'checkbox',
'#default_value' => $this->configuration['include_blocked'],
'#description' => t('In order to see blocked users, users must have permissions to do so.'),
'#description' => $this->t('In order to see blocked users, users must have permissions to do so.'),
];
return $form;
......
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