From f0725ae3845ea133a145a3fcc2599fa21c888bae Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Mon, 22 Jan 2018 16:59:31 -0500 Subject: [PATCH] Hopefully all t() hopefully the last of the t() --- boot.php | 4 +- include/dba.php | 2 +- include/enotify.php | 98 +++++++++++++++++++------------------- mod/dfrn_confirm.php | 2 +- mod/dfrn_poll.php | 4 +- mod/dfrn_request.php | 18 +++---- mod/directory.php | 2 +- mod/dirfind.php | 4 +- mod/events.php | 2 +- mod/fetch.php | 7 +-- mod/follow.php | 4 +- mod/friendica.php | 2 +- mod/fsuggest.php | 2 +- mod/group.php | 6 +-- mod/install.php | 6 +-- mod/item.php | 8 ++-- mod/ostatus_subscribe.php | 16 +++---- mod/p.php | 9 ++-- mod/regmod.php | 6 +-- mod/repair_ostatus.php | 6 +-- mod/update_community.php | 5 +- mod/update_notes.php | 3 +- mod/update_profile.php | 5 +- src/Core/UserImport.php | 8 ++-- src/Model/Photo.php | 5 +- src/Protocol/DFRN.php | 5 +- view/theme/frio/config.php | 2 +- 27 files changed, 124 insertions(+), 117 deletions(-) diff --git a/boot.php b/boot.php index 07bd618735..58c0cc6c31 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 5994e14ade..a712e439f7 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 95e2bb0c77..f0d98dab7f 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 e3d8e66862..1587947918 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 081232702a..d7d9ad8a6e 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 bf4fc7b67a..36ba714fac 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 ac5ae6a38f..8dec614606 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 040ef81c84..6892990c24 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 f0644c919c..75cb8dfdef 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 c6cfdbdcc2..6c6aa8967e 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 c866097212..f442695b0b 100644 --- a/mod/fsuggest.php +++ b/mod/fsuggest.php @@ -99,7 +99,7 @@ function fsuggest_content(App $a) $o = '

' . L10n::t('Suggest Friends') . '

'; - $o .= '
' . sprintf(t('Suggest a friend for %s'), $contact['name']) . '
'; + $o .= '
' . sprintf(L10n::t('Suggest a friend for %s'), $contact['name']) . '
'; $o .= '
'; diff --git a/mod/group.php b/mod/group.php index dc74ebc329..0473e2af9f 100644 --- a/mod/group.php +++ b/mod/group.php @@ -33,7 +33,7 @@ function group_post(App $a) { $name = notags(trim($_POST['groupname'])); $r = Group::create(local_user(), $name); if ($r) { - info(t('Group created.') . EOL); + info(L10n::t('Group created.') . EOL); $r = Group::getIdByName(local_user(), $name); if ($r) { goaway(System::baseUrl() . '/group/' . $r); @@ -67,7 +67,7 @@ function group_post(App $a) { ); if ($r) { - info(t('Group name changed.') . EOL); + info(L10n::t('Group name changed.') . EOL); } } @@ -124,7 +124,7 @@ function group_content(App $a) { } if ($result) { - info(t('Group removed.') . EOL); + info(L10n::t('Group removed.') . EOL); } else { notice(L10n::t('Unable to remove group.') . EOL); } diff --git a/mod/install.php b/mod/install.php index 075c91e12a..3255bc6d0e 100644 --- a/mod/install.php +++ b/mod/install.php @@ -546,9 +546,9 @@ function what_next() { $baseurl = System::baseUrl(); return t('

What next

') - ."

".t('IMPORTANT: You will need to [manually] setup a scheduled task for the worker.') - .t('Please see the file "INSTALL.txt".') + ."

".L10n::t('IMPORTANT: You will need to [manually] setup a scheduled task for the worker.') + .L10n::t('Please see the file "INSTALL.txt".') ."

" - .t("Go to your new Friendica node registration page and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.") + .L10n::t("Go to your new Friendica node registration page and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.") ."

"; } diff --git a/mod/item.php b/mod/item.php index 226f310569..ac796a24ae 100644 --- a/mod/item.php +++ b/mod/item.php @@ -272,7 +272,7 @@ function item_post(App $a) { if ($preview) { killme(); } - info(t('Empty post discarded.') . EOL); + info(L10n::t('Empty post discarded.') . EOL); if (x($_REQUEST, 'return')) { goaway($return_path); } @@ -800,14 +800,14 @@ function item_post(App $a) { if (!strlen($addr)) { continue; } - $disclaimer = '
' . sprintf(t('This message was sent to you by %s, a member of the Friendica social network.'), $a->user['username']) + $disclaimer = '
' . sprintf(L10n::t('This message was sent to you by %s, a member of the Friendica social network.'), $a->user['username']) . '
'; - $disclaimer .= sprintf(t('You may visit them online at %s'), System::baseUrl() . '/profile/' . $a->user['nickname']) . EOL; + $disclaimer .= sprintf(L10n::t('You may visit them online at %s'), System::baseUrl() . '/profile/' . $a->user['nickname']) . EOL; $disclaimer .= L10n::t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL; if (!$datarray['title']=='') { $subject = Email::encodeHeader($datarray['title'], 'UTF-8'); } else { - $subject = Email::encodeHeader('[Friendica]' . ' ' . sprintf(t('%s posted an update.'), $a->user['username']), 'UTF-8'); + $subject = Email::encodeHeader('[Friendica]' . ' ' . sprintf(L10n::t('%s posted an update.'), $a->user['username']), 'UTF-8'); } $link = '' . $a->user['username'] . '

'; $html = prepare_body($datarray); diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php index bef50c2db3..295ccfee61 100644 --- a/mod/ostatus_subscribe.php +++ b/mod/ostatus_subscribe.php @@ -17,7 +17,7 @@ function ostatus_subscribe_content(App $a) { // NOTREACHED } - $o = "

".t("Subscribing to OStatus contacts")."

"; + $o = "

".L10n::t("Subscribing to OStatus contacts")."

"; $uid = local_user(); @@ -28,13 +28,13 @@ function ostatus_subscribe_content(App $a) { if (PConfig::get($uid, "ostatus", "legacy_friends") == "") { if ($_REQUEST["url"] == "") { - return $o.t("No contact provided."); + return $o.L10n::t("No contact provided."); } $contact = Probe::uri($_REQUEST["url"]); if (!$contact) { - return $o.t("Couldn't fetch information for contact."); + return $o.L10n::t("Couldn't fetch information for contact."); } $api = $contact["baseurl"]."/api/"; @@ -43,7 +43,7 @@ function ostatus_subscribe_content(App $a) { $data = z_fetch_url($api."statuses/friends.json?screen_name=".$contact["nick"]); if (!$data["success"]) { - return $o.t("Couldn't fetch friends for contact."); + return $o.L10n::t("Couldn't fetch friends for contact."); } PConfig::set($uid, "ostatus", "legacy_friends", $data["body"]); @@ -71,17 +71,17 @@ function ostatus_subscribe_content(App $a) { if ($data["network"] == NETWORK_OSTATUS) { $result = Contact::createFromProbe($uid, $url, true, NETWORK_OSTATUS); if ($result["success"]) { - $o .= " - ".t("success"); + $o .= " - ".L10n::t("success"); } else { - $o .= " - ".t("failed"); + $o .= " - ".L10n::t("failed"); } } else { - $o .= " - ".t("ignored"); + $o .= " - ".L10n::t("ignored"); } $o .= "

"; - $o .= "

".t("Keep this window open until done.")."

"; + $o .= "

".L10n::t("Keep this window open until done.")."

"; $a->page['htmlhead'] = ''; diff --git a/mod/p.php b/mod/p.php index f44c32b335..2f69a231ed 100644 --- a/mod/p.php +++ b/mod/p.php @@ -4,20 +4,21 @@ 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\Database\DBM; use Friendica\Protocol\Diaspora; function p_init($a){ if ($a->argc != 2) { - header($_SERVER["SERVER_PROTOCOL"].' 510 '.t('Not Extended')); + header($_SERVER["SERVER_PROTOCOL"].' 510 '.L10n::t('Not Extended')); killme(); } $guid = $a->argv[1]; if (strtolower(substr($guid, -4)) != ".xml") { - header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found')); + header($_SERVER["SERVER_PROTOCOL"].' 404 '.L10n::t('Not Found')); killme(); } @@ -44,7 +45,7 @@ function p_init($a){ } } - header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found')); + header($_SERVER["SERVER_PROTOCOL"].' 404 '.L10n::t('Not Found')); killme(); } @@ -53,7 +54,7 @@ function p_init($a){ INNER JOIN `contact` ON `contact`.`uid` = `user`.`uid` AND `contact`.`self` WHERE `user`.`uid` = %d", intval($item[0]["uid"])); if (!DBM::is_result($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/regmod.php b/mod/regmod.php index ea6932b176..0600095c9c 100644 --- a/mod/regmod.php +++ b/mod/regmod.php @@ -65,7 +65,7 @@ function user_allow($hash) L10n::popLang(); if ($res) { - info(t('Account approved.') . EOL); + info(L10n::t('Account approved.') . EOL); return true; } } @@ -90,7 +90,7 @@ function user_deny($hash) dba::delete('user', ['uid' => $register[0]['uid']]); dba::delete('register', ['hash' => $register[0]['hash']]); - notice(sprintf(t('Registration revoked for %s'), $user[0]['username']) . EOL); + notice(sprintf(L10n::t('Registration revoked for %s'), $user[0]['username']) . EOL); return true; } @@ -99,7 +99,7 @@ function regmod_content(App $a) global $lang; if (!local_user()) { - info(t('Please login.') . EOL); + info(L10n::t('Please login.') . EOL); $o .= '

' . Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? 0 : 1); return $o; } diff --git a/mod/repair_ostatus.php b/mod/repair_ostatus.php index 8315a25142..b8f6fc5232 100644 --- a/mod/repair_ostatus.php +++ b/mod/repair_ostatus.php @@ -15,7 +15,7 @@ function repair_ostatus_content(App $a) { // NOTREACHED } - $o = "

".t("Resubscribing to OStatus contacts")."

"; + $o = "

".L10n::t("Resubscribing to OStatus contacts")."

"; $uid = local_user(); @@ -31,7 +31,7 @@ function repair_ostatus_content(App $a) { intval(CONTACT_IS_SHARING)); if (!$r) - return($o.t("Error")); + return($o.L10n::t("Error")); $total = $r[0]["total"]; @@ -51,7 +51,7 @@ function repair_ostatus_content(App $a) { $o .= "

".$counter."/".$total.": ".$r[0]["url"]."

"; - $o .= "

".t("Keep this window open until done.")."

"; + $o .= "

".L10n::t("Keep this window open until done.")."

"; $result = Contact::createFromProbe($uid, $r[0]["url"], true); diff --git a/mod/update_community.php b/mod/update_community.php index 037c724891..d5f2b4cb21 100644 --- a/mod/update_community.php +++ b/mod/update_community.php @@ -3,9 +3,10 @@ // See update_profile.php for documentation use Friendica\App; +use Friendica\Core\L10n; use Friendica\Core\PConfig; -require_once("mod/community.php"); +require_once 'mod/community.php'; function update_community_content(App $a) { header("Content-type: text/html"); @@ -23,7 +24,7 @@ function update_community_content(App $a) { $text = preg_replace($pattern, $replace, $text); if (PConfig::get(local_user(), "system", "bandwith_saver")) { - $replace = "
".t("[Embedded content - reload page to view]")."
"; + $replace = "
".L10n::t("[Embedded content - reload page to view]")."
"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $text = preg_replace($pattern, $replace, $text); $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i"; diff --git a/mod/update_notes.php b/mod/update_notes.php index b81c2fbe7d..e369261128 100644 --- a/mod/update_notes.php +++ b/mod/update_notes.php @@ -6,6 +6,7 @@ */ use Friendica\App; +use Friendica\Core\L10n; use Friendica\Core\PConfig; require_once("mod/notes.php"); @@ -36,7 +37,7 @@ function update_notes_content(App $a) { $text = preg_replace($pattern, $replace, $text); if (PConfig::get(local_user(), "system", "bandwith_saver")) { - $replace = "
".t("[Embedded content - reload page to view]")."
"; + $replace = "
".L10n::t("[Embedded content - reload page to view]")."
"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $text = preg_replace($pattern, $replace, $text); $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i"; diff --git a/mod/update_profile.php b/mod/update_profile.php index f293088a96..4d1f158b39 100644 --- a/mod/update_profile.php +++ b/mod/update_profile.php @@ -6,9 +6,10 @@ */ use Friendica\App; +use Friendica\Core\L10n; use Friendica\Core\PConfig; -require_once("mod/profile.php"); +require_once 'mod/profile.php'; function update_profile_content(App $a) { @@ -35,7 +36,7 @@ function update_profile_content(App $a) { $text = preg_replace($pattern, $replace, $text); if (PConfig::get(local_user(), "system", "bandwith_saver")) { - $replace = "
".t("[Embedded content - reload page to view]")."
"; + $replace = "
".L10n::t("[Embedded content - reload page to view]")."
"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $text = preg_replace($pattern, $replace, $text); $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i"; diff --git a/src/Core/UserImport.php b/src/Core/UserImport.php index 2409b76da5..96491e27b6 100644 --- a/src/Core/UserImport.php +++ b/src/Core/UserImport.php @@ -120,7 +120,7 @@ class UserImport } if (DBM::is_result($r) > 0) { - notice(sprintf(t("User '%s' already exists on this server!"), $account['user']['nickname'])); + notice(sprintf(L10n::t("User '%s' already exists on this server!"), $account['user']['nickname'])); return; } @@ -133,7 +133,7 @@ class UserImport } if (DBM::is_result($r) > 0) { - notice(sprintf(t("User '%s' already exists on this server!"), $account['user']['nickname'])); + notice(sprintf(L10n::t("User '%s' already exists on this server!"), $account['user']['nickname'])); return; } @@ -187,7 +187,7 @@ class UserImport $r = self::dbImportAssoc('profile', $profile); if ($r === false) { logger("uimport:insert profile " . $profile['profile-name'] . " : ERROR : " . dba::errorMessage(), LOGGER_NORMAL); - info(t("User profile creation error")); + info(L10n::t("User profile creation error")); dba::delete('user', ['uid' => $newuid]); return; } @@ -296,7 +296,7 @@ class UserImport // send relocate messages Worker::add(PRIORITY_HIGH, 'Notifier', 'relocate', $newuid); - info(t("Done. You can now login with your username and password")); + info(L10n::t("Done. You can now login with your username and password")); goaway(System::baseUrl() . "/login"); } } diff --git a/src/Model/Photo.php b/src/Model/Photo.php index ef59eee7e9..94d5581bf0 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -7,6 +7,7 @@ namespace Friendica\Model; use Friendica\Core\Cache; use Friendica\Core\Config; +use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Database\DBM; @@ -235,7 +236,7 @@ class Photo GROUP BY `album` ORDER BY `created` DESC", intval($uid), dbesc('Contact Photos'), - dbesc(t('Contact Photos')) + dbesc(L10n::t('Contact Photos')) ); } else { // This query doesn't do the count and is much faster @@ -244,7 +245,7 @@ class Photo WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra", intval($uid), dbesc('Contact Photos'), - dbesc(t('Contact Photos')) + dbesc(L10n::t('Contact Photos')) ); } Cache::set($key, $albums, CACHE_DAY); diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 83084bce58..1324ff67f7 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -12,6 +12,7 @@ use Friendica\App; use Friendica\Content\OEmbed; use Friendica\Core\Addon; use Friendica\Core\Config; +use Friendica\Core\L10n; use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBM; @@ -1393,8 +1394,8 @@ class DFRN logger("updating birthday: ".$birthday." for contact ".$contact["id"]); - $bdtext = sprintf(t("%s\'s birthday"), $contact["name"]); - $bdtext2 = sprintf(t("Happy Birthday %s"), " [url=".$contact["url"]."]".$contact["name"]."[/url]"); + $bdtext = sprintf(L10n::t("%s\'s birthday"), $contact["name"]); + $bdtext2 = sprintf(L10n::t("Happy Birthday %s"), " [url=".$contact["url"]."]".$contact["name"]."[/url]"); $r = q( "INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`) diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index 444e048f0c..cff58fd5ff 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -106,7 +106,7 @@ function frio_form($arr) { } } - $background_image_help = "" . L10n::t("Note"). ": ".t("Check image permissions if all users are allowed to visit the image"); + $background_image_help = "" . L10n::t("Note"). ": ".L10n::t("Check image permissions if all users are allowed to visit the image"); $t = get_markup_template('theme_settings.tpl'); $ctx = [