]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Debug/Babel.php
Remove DI dependency from Module\Contact\Profile
[friendica.git] / src / Module / Debug / Babel.php
index ff8bc874110820494fce2bb908abeb0f5a239d44..a914f4fe908705e5abe7dec8c1aeafb84bee6550 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -35,7 +35,7 @@ use Friendica\Util\XML;
  */
 class Babel extends BaseModule
 {
-       public static function content(array $parameters = [])
+       protected function content(array $request = []): string
        {
                function visible_whitespace($s)
                {
@@ -58,7 +58,7 @@ class Babel extends BaseModule
                                                'content' => visible_whitespace($plain)
                                        ];
 
-                                       $html = Text\BBCode::convert($bbcode);
+                                       $html = Text\BBCode::convertForUriId(0, $bbcode);
                                        $results[] = [
                                                'title'   => DI::l10n()->t('BBCode::convert (raw HTML)'),
                                                'content' => visible_whitespace($html)
@@ -125,7 +125,7 @@ class Babel extends BaseModule
                                                'title'   => DI::l10n()->t('PageInfo::appendToBody'),
                                                'content' => visible_whitespace($body2)
                                        ];
-                                       $html3 = Text\BBCode::convert($body2);
+                                       $html3 = Text\BBCode::convertForUriId(0, $body2);
                                        $results[] = [
                                                'title'   => DI::l10n()->t('PageInfo::appendToBody => BBCode::convert (raw HTML)'),
                                                'content' => visible_whitespace($html3)
@@ -203,7 +203,7 @@ class Babel extends BaseModule
                                                'content' => visible_whitespace($bbcode)
                                        ];
 
-                                       $html2 = Text\BBCode::convert($bbcode);
+                                       $html2 = Text\BBCode::convertForUriId(0, $bbcode);
                                        $results[] = [
                                                'title'   => DI::l10n()->t('HTML::toBBCode => BBCode::convert'),
                                                'content' => $html2
@@ -290,7 +290,7 @@ class Babel extends BaseModule
                                                ];
                                        } else {
                                                $results[] = [
-                                                       'title'   => DI::l10n()->t('Error'),
+                                                       'title'   => DI::l10n()->tt('Error', 'Errors', 1),
                                                        'content' => DI::l10n()->t('Twitter addon is absent from the addon/ folder.'),
                                                ];
                                        }