diff --git a/boot.php b/boot.php index 07bd61873..58c0cc6c3 100644 --- a/boot.php +++ b/boot.php @@ -1,5 +1,4 @@ '.$sitename.''); $itemlink = $params['link']; } else { // ACTIVITY_FOLLOW - $subject = sprintf(t('[Friendica:Notify] Connection accepted')); + $subject = sprintf(L10n::t('[Friendica:Notify] Connection accepted')); - $preamble = sprintf(t('\'%1$s\' has accepted your connection request at %2$s'), $params['source_name'], $sitename); - $epreamble = sprintf(t('%2$s has accepted your [url=%1$s]connection request[/url].'), + $preamble = sprintf(L10n::t('\'%1$s\' has accepted your connection request at %2$s'), $params['source_name'], $sitename); + $epreamble = sprintf(L10n::t('%2$s has accepted your [url=%1$s]connection request[/url].'), $itemlink, '[url='.$params['source_link'].']'.$params['source_name'].'[/url]'); - $body = sprintf(t('\'%1$s\' has chosen to accept you a "fan", which restricts some forms of communication - such as private messaging and some profile interactions. If this is a celebrity or community page, these settings were applied automatically.'), $params['source_name']); + $body = sprintf(L10n::t('\'%1$s\' has chosen to accept you a "fan", which restricts some forms of communication - such as private messaging and some profile interactions. If this is a celebrity or community page, these settings were applied automatically.'), $params['source_name']); $body .= "\n\n"; - $body .= sprintf(t('\'%1$s\' may choose to extend this into a two-way or more permissive relationship in the future.'), $params['source_name']); + $body .= sprintf(L10n::t('\'%1$s\' may choose to extend this into a two-way or more permissive relationship in the future.'), $params['source_name']); $sitelink = L10n::t('Please visit %s if you wish to make any changes to this relationship.'); $tsitelink = sprintf($sitelink, $siteurl); @@ -347,14 +347,14 @@ function notification($params) if ($params['type'] == NOTIFY_SYSTEM) { switch($params['event']) { case "SYSTEM_REGISTER_REQUEST": - $subject = sprintf(t('[Friendica System:Notify] registration request')); + $subject = sprintf(L10n::t('[Friendica System:Notify] registration request')); - $preamble = sprintf(t('You\'ve received a registration request from \'%1$s\' at %2$s'), $params['source_name'], $sitename); - $epreamble = sprintf(t('You\'ve received a [url=%1$s]registration request[/url] from %2$s.'), + $preamble = sprintf(L10n::t('You\'ve received a registration request from \'%1$s\' at %2$s'), $params['source_name'], $sitename); + $epreamble = sprintf(L10n::t('You\'ve received a [url=%1$s]registration request[/url] from %2$s.'), $itemlink, '[url='.$params['source_link'].']'.$params['source_name'].'[/url]'); - $body = sprintf(t('Full Name: %1$s\nSite Location: %2$s\nLogin Name: %3$s (%4$s)'), + $body = sprintf(L10n::t('Full Name: %1$s\nSite Location: %2$s\nLogin Name: %3$s (%4$s)'), $params['source_name'], $siteurl, $params['source_mail'], $params['source_nick']); $sitelink = L10n::t('Please visit %s to approve or reject the request.'); diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 5994e14ad..a712e439f 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -256,7 +256,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) $message = unxmlify($xml->message); // human readable text of what may have gone wrong. switch ($status) { case 0: - info(t("Confirmation completed successfully.") . EOL); + info(L10n::t("Confirmation completed successfully.") . EOL); break; case 1: // birthday paradox - generate new dfrn-id and fall through. diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 95e2bb0c7..f0d98dab7 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -117,7 +117,7 @@ function dfrn_poll_init(App $a) $_SESSION['visitor_handle'] = $r[0]['addr']; $_SESSION['visitor_visiting'] = $r[0]['uid']; if (!$quiet) { - info(sprintf(t('%1$s welcomes %2$s'), $r[0]['username'], $r[0]['name']) . EOL); + info(sprintf(L10n::t('%1$s welcomes %2$s'), $r[0]['username'], $r[0]['name']) . EOL); } // Visitors get 1 day session. @@ -537,7 +537,7 @@ function dfrn_poll_content(App $a) $_SESSION['visitor_home'] = $r[0]['url']; $_SESSION['visitor_visiting'] = $r[0]['uid']; if (!$quiet) { - info(sprintf(t('%1$s welcomes %2$s'), $r[0]['username'], $r[0]['name']) . EOL); + info(sprintf(L10n::t('%1$s welcomes %2$s'), $r[0]['username'], $r[0]['name']) . EOL); } // Visitors get 1 day session. diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index e3d8e6686..158794791 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -156,7 +156,7 @@ function dfrn_request_post(App $a) } if ($r) { - info(t("Introduction complete.") . EOL); + info(L10n::t("Introduction complete.") . EOL); } $r = q("SELECT `id`, `network` FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `site-pubkey` = '%s' LIMIT 1", @@ -242,7 +242,7 @@ function dfrn_request_post(App $a) intval($uid) ); if (DBM::is_result($r) && count($r) > $maxreq) { - notice(sprintf(t('%s has received too many connection requests today.'), $a->profile['name']) . EOL); + notice(sprintf(L10n::t('%s has received too many connection requests today.'), $a->profile['name']) . EOL); notice(L10n::t('Spam protection measures have been invoked.') . EOL); notice(L10n::t('Friends are advised to please try again in 24 hours.') . EOL); return; @@ -313,7 +313,7 @@ function dfrn_request_post(App $a) notice(L10n::t('You have already introduced yourself here.') . EOL); return; } elseif ($ret[0]['rel'] == CONTACT_IS_FRIEND) { - notice(sprintf(t('Apparently you are already friends with %s.'), $a->profile['name']) . EOL); + notice(sprintf(L10n::t('Apparently you are already friends with %s.'), $a->profile['name']) . EOL); return; } else { $contact_record = $ret[0]; @@ -433,7 +433,7 @@ function dfrn_request_post(App $a) // This notice will only be seen by the requestor if the requestor and requestee are on the same server. if (!$failed) { - info(t('Your introduction has been sent.') . EOL); + info(L10n::t('Your introduction has been sent.') . EOL); } // "Homecoming" - send the requestor back to their site to record the introduction. @@ -487,7 +487,7 @@ function dfrn_request_content(App $a) // to send us to the post section to record the introduction. if (x($_GET, 'dfrn_url')) { if (!local_user()) { - info(t("Please login to confirm introduction.") . EOL); + info(L10n::t("Please login to confirm introduction.") . EOL); /* setup the return URL to come back to this page if they use openid */ return Login::form(); } @@ -524,8 +524,8 @@ function dfrn_request_content(App $a) '$hidethem' => L10n::t('Hide this contact'), '$hidechecked' => '', '$confirm_key' => $confirm_key, - '$welcome' => sprintf(t('Welcome home %s.'), $a->user['username']), - '$please' => sprintf(t('Please confirm your introduction/connection request to %s.'), $dfrn_url), + '$welcome' => sprintf(L10n::t('Welcome home %s.'), $a->user['username']), + '$please' => sprintf(L10n::t('Please confirm your introduction/connection request to %s.'), $dfrn_url), '$submit' => L10n::t('Confirm'), '$uid' => $_SESSION['uid'], '$nickname' => $a->user['nickname'], @@ -647,13 +647,13 @@ function dfrn_request_content(App $a) '$header' => L10n::t('Friend/Connection Request'), '$desc' => L10n::t('Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@gnusocial.de'), '$pls_answer' => L10n::t('Please answer the following:'), - '$does_know_you' => ['knowyou', sprintf(t('Does %s know you?'), $a->profile['name']), false, '', [t('No'), L10n::t('Yes')]], + '$does_know_you' => ['knowyou', sprintf(L10n::t('Does %s know you?'), $a->profile['name']), false, '', [L10n::t('No'), L10n::t('Yes')]], '$add_note' => L10n::t('Add a personal note:'), '$page_desc' => $page_desc, '$friendica' => L10n::t('Friendica'), '$statusnet' => L10n::t('GNU Social (Pleroma, Mastodon)'), '$diaspora' => L10n::t('Diaspora (Socialhome, Hubzilla)'), - '$diasnote' => sprintf(t(' - please do not use this form. Instead, enter %s into your Diaspora search bar.'), $target_addr), + '$diasnote' => sprintf(L10n::t(' - please do not use this form. Instead, enter %s into your Diaspora search bar.'), $target_addr), '$your_address' => L10n::t('Your Identity Address:'), '$invite_desc' => $invite_desc, '$submit' => L10n::t('Submit Request'), diff --git a/mod/directory.php b/mod/directory.php index 081232702..d7d9ad8a6 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -150,7 +150,7 @@ function directory_content(App $a) { $location_e = $location; $photo_menu = [ - 'profile' => [t("View Profile"), Profile::zrl($profile_link)] + 'profile' => [L10n::t("View Profile"), Profile::zrl($profile_link)] ]; $entry = [ diff --git a/mod/dirfind.php b/mod/dirfind.php index bf4fc7b67..36ba714fa 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -216,8 +216,8 @@ function dirfind_content(App $a, $prefix = "") { $connlnk = System::baseUrl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url); $conntxt = L10n::t('Connect'); $photo_menu = [ - 'profile' => [t("View Profile"), Profile::zrl($jj->url)], - 'follow' => [t("Connect/Follow"), $connlnk] + 'profile' => [L10n::t("View Profile"), Profile::zrl($jj->url)], + 'follow' => [L10n::t("Connect/Follow"), $connlnk] ]; } diff --git a/mod/events.php b/mod/events.php index ac5ae6a38..8dec61460 100644 --- a/mod/events.php +++ b/mod/events.php @@ -555,7 +555,7 @@ function events_content(App $a) { if ($del == 0) { notice(L10n::t('Failed to remove event') . EOL); } else { - info(t('Event removed') . EOL); + info(L10n::t('Event removed') . EOL); } goaway(System::baseUrl() . '/events'); diff --git a/mod/fetch.php b/mod/fetch.php index 040ef81c8..6892990c2 100644 --- a/mod/fetch.php +++ b/mod/fetch.php @@ -4,6 +4,7 @@ This file is part of the Diaspora protocol. It is used for fetching single publi */ use Friendica\App; +use Friendica\Core\L10n; use Friendica\Core\System; use Friendica\Protocol\Diaspora; use Friendica\Util\XML; @@ -12,7 +13,7 @@ function fetch_init(App $a) { if (($a->argc != 3) || (!in_array($a->argv[1], ["post", "status_message", "reshare"]))) { - header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found')); + header($_SERVER["SERVER_PROTOCOL"].' 404 '.L10n::t('Not Found')); killme(); } @@ -48,7 +49,7 @@ function fetch_init(App $a) } } - header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found')); + header($_SERVER["SERVER_PROTOCOL"].' 404 '.L10n::t('Not Found')); killme(); } @@ -61,7 +62,7 @@ function fetch_init(App $a) ); if (!$r) { - header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found')); + header($_SERVER["SERVER_PROTOCOL"].' 404 '.L10n::t('Not Found')); killme(); } $user = $r[0]; diff --git a/mod/follow.php b/mod/follow.php index f0644c919..75cb8dfde 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -41,7 +41,7 @@ function follow_post(App $a) { goaway(System::baseUrl().'/contacts/'.$result['cid']); } - info(t('Contact added').EOL); + info(L10n::t('Contact added').EOL); if (strstr($return_url, 'contacts')) { goaway(System::baseUrl().'/contacts/'.$contact_id); @@ -149,7 +149,7 @@ function follow_content(App $a) { //'$photo' => proxy_url($ret["photo"], false, PROXY_SIZE_SMALL), '$desc' => "", '$pls_answer' => L10n::t('Please answer the following:'), - '$does_know_you' => ['knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', [L10n::t('No'), L10n::t('Yes')]], + '$does_know_you' => ['knowyou', sprintf(L10n::t('Does %s know you?'),$ret["name"]), false, '', [L10n::t('No'), L10n::t('Yes')]], '$add_note' => L10n::t('Add a personal note:'), '$page_desc' => "", '$friendica' => "", diff --git a/mod/friendica.php b/mod/friendica.php index c6cfdbdcc..6c6aa8967 100644 --- a/mod/friendica.php +++ b/mod/friendica.php @@ -83,7 +83,7 @@ function friendica_content(App $a) $o .= '
' . PHP_EOL; $o .= ''; - $o .= L10n::t('Bug reports and issues: please visit') . ' ' . ''.t('the bugtracker at github').''; + $o .= L10n::t('Bug reports and issues: please visit') . ' ' . ''.L10n::t('the bugtracker at github').''; $o .= '
' . PHP_EOL; $o .= ''; $o .= L10n::t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com'); diff --git a/mod/fsuggest.php b/mod/fsuggest.php index c86609721..f442695b0 100644 --- a/mod/fsuggest.php +++ b/mod/fsuggest.php @@ -99,7 +99,7 @@ function fsuggest_content(App $a) $o = '