summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit2016-08-30 20:35:49 (GMT)
committerEmil Stjerneman2016-08-30 20:35:49 (GMT)
commite6d260c6eb6a4cf54feb523797a3846984c29f44 (patch)
tree534f808e2c3e025762ce5eda7227d5b1c0542d6f
parent8f2ca67bc16adb70a7965ae7a0c82169ed5cc122 (diff)
Issue #2792099 by Pradnya Pingat, anon: Replace usage of t() in plugins with $this->t()
-rw-r--r--src/Plugin/CKEditorPlugin/LinkitDrupalLink.php6
-rw-r--r--src/Plugin/Linkit/Matcher/EntityMatcher.php8
-rw-r--r--src/Plugin/Linkit/Matcher/FileMatcher.php12
-rw-r--r--src/Plugin/Linkit/Matcher/NodeMatcher.php6
-rw-r--r--src/Plugin/Linkit/Matcher/UserMatcher.php8
5 files changed, 20 insertions, 20 deletions
diff --git a/src/Plugin/CKEditorPlugin/LinkitDrupalLink.php b/src/Plugin/CKEditorPlugin/LinkitDrupalLink.php
index 22f95ed..048a03f 100644
--- a/src/Plugin/CKEditorPlugin/LinkitDrupalLink.php
+++ b/src/Plugin/CKEditorPlugin/LinkitDrupalLink.php
@@ -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.'));
}
}
diff --git a/src/Plugin/Linkit/Matcher/EntityMatcher.php b/src/Plugin/Linkit/Matcher/EntityMatcher.php
index 5bfca1e..a990a98 100644
--- a/src/Plugin/Linkit/Matcher/EntityMatcher.php
+++ b/src/Plugin/Linkit/Matcher/EntityMatcher.php
@@ -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,
diff --git a/src/Plugin/Linkit/Matcher/FileMatcher.php b/src/Plugin/Linkit/Matcher/FileMatcher.php
index 1b53e5d..061f53f 100644
--- a/src/Plugin/Linkit/Matcher/FileMatcher.php
+++ b/src/Plugin/Linkit/Matcher/FileMatcher.php
@@ -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),
diff --git a/src/Plugin/Linkit/Matcher/NodeMatcher.php b/src/Plugin/Linkit/Matcher/NodeMatcher.php
index 6a3d81a..9382aef 100644
--- a/src/Plugin/Linkit/Matcher/NodeMatcher.php
+++ b/src/Plugin/Linkit/Matcher/NodeMatcher.php
@@ -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;
diff --git a/src/Plugin/Linkit/Matcher/UserMatcher.php b/src/Plugin/Linkit/Matcher/UserMatcher.php
index ea1e746..3b31da4 100644
--- a/src/Plugin/Linkit/Matcher/UserMatcher.php
+++ b/src/Plugin/Linkit/Matcher/UserMatcher.php
@@ -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;