namespace Friendica;
use Friendica\Capabilities\ICanHandleRequests;
+use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Model\User;
/** @var array */
protected $parameters = [];
- public function __construct(array $parameters = [])
+ /** @var L10n */
+ protected $l10n;
+
+ public function __construct(L10n $l10n, array $parameters = [])
{
$this->parameters = $parameters;
+ $this->l10n = $l10n;
}
/**
- * {@inheritDoc}
+ * Wraps the L10n::t() function for Modules
+ *
+ * @see L10n::t()
+ */
+ protected function t(string $s, ...$args): string
+ {
+ return $this->l10n->t($s, $args);
+ }
+
+ /**
+ * Wraps the L10n::tt() function for Modules
+ *
+ * @see L10n::tt()
*/
- public function init()
+ protected function tt(string $singular, string $plurarl, int $count): string
{
+ return $this->l10n->tt($singular, $plurarl, $count);
}
/**