X-Git-Url: https://git.mxchange.org/?p=friendica-addons.git;a=blobdiff_plain;f=pumpio%2Fpumpio.php;h=6ab375834bf97563a38b30d2408577b08086051d;hp=d4c45989583bcdc235dc6b5e8620141fe6c9e821;hb=f8c162cbfb777793891f885e019eb8eae319dce1;hpb=3db056fe799de8c23cd95d8f601a6373f3ff972e diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index d4c45989..6ab37583 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -7,6 +7,7 @@ */ use Friendica\Core\Addon; use Friendica\Core\Config; +use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Core\Worker; use Friendica\Model\Contact; @@ -50,7 +51,7 @@ function pumpio_module() {} function pumpio_content(&$a) { if(! local_user()) { - notice( t('Permission denied.') . EOL); + notice(L10n::t('Permission denied.') . EOL); return ''; } @@ -146,7 +147,7 @@ function pumpio_connect(&$a) { if (($consumer_key == "") || ($consumer_secret == "")) { logger("pumpio_connect: ".sprintf("Unable to register the client at the pump.io server '%s'.", $hostname)); - $o .= sprintf(t("Unable to register the client at the pump.io server '%s'."), $hostname); + $o .= sprintf(L10n::t("Unable to register the client at the pump.io server '%s'."), $hostname); return($o); } @@ -186,8 +187,8 @@ function pumpio_connect(&$a) { if($success) { logger("pumpio_connect: authenticated"); - $o .= t("You are now authenticated to pumpio."); - $o .= '
'.t("return to the connector page").''; + $o .= L10n::t("You are now authenticated to pumpio."); + $o .= '
'.L10n::t("return to the connector page").''; } else { logger("pumpio_connect: could not connect"); $o = 'Could not connect to pumpio. Refresh the page or try again later.'; @@ -205,7 +206,7 @@ function pumpio_jot_nets(&$a,&$b) { $pumpio_defpost = PConfig::get(local_user(),'pumpio','post_by_default'); $selected = ((intval($pumpio_defpost) == 1) ? ' checked="checked" ' : ''); $b .= '
' - . t('Post to pumpio') . '
'; + . L10n::t('Post to pumpio') . ''; } } @@ -243,20 +244,20 @@ function pumpio_settings(&$a,&$s) { /* Add some HTML to the existing form */ $s .= ''; - $s .= '

'. t('Pump.io Import/Export/Mirror').'

'; + $s .= '

'. L10n::t('Pump.io Import/Export/Mirror').'

'; $s .= '
'; $s .= ''; } @@ -554,7 +555,7 @@ function pumpio_send(&$a,&$b) { $s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $params]); Queue::add($a->contact, NETWORK_PUMPIO, $s); - notice(t('Pump.io post failed. Queued for retry.').EOL); + notice(L10n::t('Pump.io post failed. Queued for retry.').EOL); } } } @@ -630,7 +631,7 @@ function pumpio_action(&$a, $uid, $uri, $action, $content = "") { $s = serialize(['url' => $url, 'item' => $orig_post["id"], 'post' => $params]); Queue::add($a->contact, NETWORK_PUMPIO, $s); - notice(t('Pump.io like failed. Queued for retry.').EOL); + notice(L10n::t('Pump.io like failed. Queued for retry.').EOL); } } @@ -719,7 +720,7 @@ function pumpio_fetchtimeline(&$a, $uid) { // get the application name for the pump.io app // 1st try personal config, then system config and fallback to the // hostname of the node if neither one is set. - $application_name = PConfig::get( $uid, 'pumpio', 'application_name'); + $application_name = PConfig::get($uid, 'pumpio', 'application_name'); if ($application_name == "") $application_name = Config::get('pumpio', 'application_name'); if ($application_name == "") @@ -963,11 +964,11 @@ function pumpio_dolike(&$a, $uid, $self, $post, $own_id, $threadcompletion = tru $author = '[url=' . $likedata['author-link'] . ']' . $likedata['author-name'] . '[/url]'; $objauthor = '[url=' . $orig_post['author-link'] . ']' . $orig_post['author-name'] . '[/url]'; - $post_type = t('status'); + $post_type = L10n::t('status'); $plink = '[url=' . $orig_post['plink'] . ']' . $post_type . '[/url]'; $likedata['object-type'] = ACTIVITY_OBJ_NOTE; - $likedata['body'] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink); + $likedata['body'] = sprintf(L10n::t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink); $likedata['object'] = '' . ACTIVITY_OBJ_NOTE . '1' . '' . $orig_post['uri'] . '' . xmlify('') . '' . $orig_post['title'] . '' . $orig_post['body'] . '';