Commit bd2cfd02 authored by webchick's avatar webchick

Issue #2165427 by Eric_A: Don't use t() in filter plugins anymore.

parent 37b5f2db
......@@ -32,10 +32,10 @@ public function process($text, $langcode, $cache, $cache_id) {
*/
public function tips($long = FALSE) {
if ($long) {
return t('Lines and paragraphs are automatically recognized. The <br /> line break, <p> paragraph and </p> close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple of blank lines.');
return $this->t('Lines and paragraphs are automatically recognized. The <br /> line break, <p> paragraph and </p> close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple of blank lines.');
}
else {
return t('Lines and paragraphs break automatically.');
return $this->t('Lines and paragraphs break automatically.');
}
}
......
......@@ -106,7 +106,7 @@ public function process($text, $langcode, $cache, $cache_id) {
*/
public function tips($long = FALSE) {
if ($long) {
return t('
return $this->t('
<p>You can add image captions and align images left, right or centered. Examples:</p>
<ul>
<li>Caption an image: <code>&lt;img src="" data-caption="This is a caption" /&gt;</code></li>
......@@ -115,7 +115,7 @@ public function tips($long = FALSE) {
</ul>');
}
else {
return t('You can caption (data-caption="Text") and align images (data-align="center"), but also video, blockquotes, and so on.');
return $this->t('You can caption (data-caption="Text") and align images (data-align="center"), but also video, blockquotes, and so on.');
}
}
}
......@@ -40,7 +40,7 @@ public function getHTMLRestrictions() {
* {@inheritdoc}
*/
public function tips($long = FALSE) {
return t('No HTML tags allowed.');
return $this->t('No HTML tags allowed.');
}
}
......@@ -33,7 +33,7 @@ public function process($text, $langcode, $cache, $cache_id) {
* {@inheritdoc}
*/
public function tips($long = FALSE) {
return t('Only images hosted on this site may be used in &lt;img&gt; tags.');
return $this->t('Only images hosted on this site may be used in &lt;img&gt; tags.');
}
}
......@@ -63,7 +63,7 @@ public function getHTMLRestrictions() {
* {@inheritdoc}
*/
public function tips($long = FALSE) {
return t('Missing filter. All text is removed');
return $this->t('Missing filter. All text is removed');
}
}
......@@ -29,11 +29,11 @@ class FilterUrl extends FilterBase {
public function settingsForm(array $form, array &$form_state) {
$form['filter_url_length'] = array(
'#type' => 'number',
'#title' => t('Maximum link text length'),
'#title' => $this->t('Maximum link text length'),
'#default_value' => $this->settings['filter_url_length'],
'#min' => 1,
'#field_suffix' => t('characters'),
'#description' => t('URLs longer than this number of characters will be truncated to prevent long strings that break formatting. The link itself will be retained; just the text portion of the link will be truncated.'),
'#field_suffix' => $this->t('characters'),
'#description' => $this->t('URLs longer than this number of characters will be truncated to prevent long strings that break formatting. The link itself will be retained; just the text portion of the link will be truncated.'),
);
return $form;
}
......@@ -49,7 +49,7 @@ public function process($text, $langcode, $cache, $cache_id) {
* {@inheritdoc}
*/
public function tips($long = FALSE) {
return t('Web page addresses and e-mail addresses turn into links automatically.');
return $this->t('Web page addresses and e-mail addresses turn into links automatically.');
}
}
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