X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fostatus_subscribe.php;h=e5a3f1e9b44c12fbb019f2bfff71be0a2ebac540;hb=7072e213444a8a23da83b16cfeba37c807a54674;hp=f6d826e85a5b406cd785008018e326996ec8110a;hpb=c58dc357d4fb97fc7d22e5c2db03a4f22719185c;p=friendica.git
diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php
index f6d826e85a..e5a3f1e9b4 100644
--- a/mod/ostatus_subscribe.php
+++ b/mod/ostatus_subscribe.php
@@ -4,7 +4,6 @@
*/
use Friendica\App;
-use Friendica\Core\L10n;
use Friendica\Core\Protocol;
use Friendica\DI;
use Friendica\Model\Contact;
@@ -14,12 +13,12 @@ use Friendica\Util\Network;
function ostatus_subscribe_content(App $a)
{
if (!local_user()) {
- notice(L10n::t('Permission denied.') . EOL);
+ notice(DI::l10n()->t('Permission denied.') . EOL);
DI::baseUrl()->redirect('ostatus_subscribe');
// NOTREACHED
}
- $o = '
' . L10n::t('Subscribing to OStatus contacts') . '
';
+ $o = '' . DI::l10n()->t('Subscribing to OStatus contacts') . '
';
$uid = local_user();
@@ -29,14 +28,14 @@ function ostatus_subscribe_content(App $a)
if ($_REQUEST['url'] == '') {
DI::pConfig()->delete($uid, 'ostatus', 'legacy_contact');
- return $o . L10n::t('No contact provided.');
+ return $o . DI::l10n()->t('No contact provided.');
}
$contact = Probe::uri($_REQUEST['url']);
if (!$contact) {
DI::pConfig()->delete($uid, 'ostatus', 'legacy_contact');
- return $o . L10n::t('Couldn\'t fetch information for contact.');
+ return $o . DI::l10n()->t('Couldn\'t fetch information for contact.');
}
$api = $contact['baseurl'] . '/api/';
@@ -46,7 +45,7 @@ function ostatus_subscribe_content(App $a)
if (!$curlResult->isSuccess()) {
DI::pConfig()->delete($uid, 'ostatus', 'legacy_contact');
- return $o . L10n::t('Couldn\'t fetch friends for contact.');
+ return $o . DI::l10n()->t('Couldn\'t fetch friends for contact.');
}
DI::pConfig()->set($uid, 'ostatus', 'legacy_friends', $curlResult->getBody());
@@ -64,7 +63,7 @@ function ostatus_subscribe_content(App $a)
DI::page()['htmlhead'] = '';
DI::pConfig()->delete($uid, 'ostatus', 'legacy_friends');
DI::pConfig()->delete($uid, 'ostatus', 'legacy_contact');
- $o .= L10n::t('Done');
+ $o .= DI::l10n()->t('Done');
return $o;
}
@@ -78,17 +77,17 @@ function ostatus_subscribe_content(App $a)
if ($probed['network'] == Protocol::OSTATUS) {
$result = Contact::createFromProbe($uid, $url, true, Protocol::OSTATUS);
if ($result['success']) {
- $o .= ' - ' . L10n::t('success');
+ $o .= ' - ' . DI::l10n()->t('success');
} else {
- $o .= ' - ' . L10n::t('failed');
+ $o .= ' - ' . DI::l10n()->t('failed');
}
} else {
- $o .= ' - ' . L10n::t('ignored');
+ $o .= ' - ' . DI::l10n()->t('ignored');
}
$o .= '';
- $o .= '' . L10n::t('Keep this window open until done.') . '
';
+ $o .= '' . DI::l10n()->t('Keep this window open until done.') . '
';
DI::page()['htmlhead'] = '';