mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 08:14:25 +02:00
Replace $this->l10n->t() with $this->t() for Modules
This commit is contained in:
parent
207662251d
commit
dab9e13c69
23 changed files with 246 additions and 226 deletions
|
@ -53,7 +53,7 @@ class FriendSuggest extends BaseModule
|
|||
parent::__construct($l10n, $parameters);
|
||||
|
||||
if (!local_user()) {
|
||||
throw new ForbiddenException($this->l10n->t('Permission denied.'));
|
||||
throw new ForbiddenException($this->t('Permission denied.'));
|
||||
}
|
||||
|
||||
$this->baseUrl = $baseUrl;
|
||||
|
@ -68,7 +68,7 @@ class FriendSuggest extends BaseModule
|
|||
|
||||
// We do query the "uid" as well to ensure that it is our contact
|
||||
if (!$this->dba->exists('contact', ['id' => $cid, 'uid' => local_user()])) {
|
||||
throw new NotFoundException($this->l10n->t('Contact not found.'));
|
||||
throw new NotFoundException($this->t('Contact not found.'));
|
||||
}
|
||||
|
||||
$suggest_contact_id = intval($_POST['suggest']);
|
||||
|
@ -79,7 +79,7 @@ class FriendSuggest extends BaseModule
|
|||
// We do query the "uid" as well to ensure that it is our contact
|
||||
$contact = $this->dba->selectFirst('contact', ['name', 'url', 'request', 'avatar'], ['id' => $suggest_contact_id, 'uid' => local_user()]);
|
||||
if (empty($contact)) {
|
||||
notice($this->l10n->t('Suggested contact not found.'));
|
||||
notice($this->t('Suggested contact not found.'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ class FriendSuggest extends BaseModule
|
|||
|
||||
Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::SUGGESTION, $suggest->id);
|
||||
|
||||
info($this->l10n->t('Friend suggestion sent.'));
|
||||
info($this->t('Friend suggestion sent.'));
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
|
@ -106,7 +106,7 @@ class FriendSuggest extends BaseModule
|
|||
|
||||
$contact = $this->dba->selectFirst('contact', [], ['id' => $cid, 'uid' => local_user()]);
|
||||
if (empty($contact)) {
|
||||
notice($this->l10n->t('Contact not found.'));
|
||||
notice($this->t('Contact not found.'));
|
||||
$this->baseUrl->redirect();
|
||||
}
|
||||
|
||||
|
@ -134,15 +134,15 @@ class FriendSuggest extends BaseModule
|
|||
$tpl = Renderer::getMarkupTemplate('fsuggest.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$contact_id' => $cid,
|
||||
'$fsuggest_title' => $this->l10n->t('Suggest Friends'),
|
||||
'$fsuggest_title' => $this->t('Suggest Friends'),
|
||||
'$fsuggest_select' => [
|
||||
'suggest',
|
||||
$this->l10n->t('Suggest a friend for %s', $contact['name']),
|
||||
$this->t('Suggest a friend for %s', $contact['name']),
|
||||
'',
|
||||
'',
|
||||
$formattedContacts,
|
||||
],
|
||||
'$submit' => $this->l10n->t('Submit'),
|
||||
'$submit' => $this->t('Submit'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue