Update more t() calls
This commit is contained in:
Adam Magness 2018-01-22 07:29:50 -05:00
parent 3b0f69599e
commit ead9d86236
25 changed files with 367 additions and 346 deletions

View file

@ -39,13 +39,13 @@ function editpost_content(App $a) {
}
$o .= replace_macros(get_markup_template("section_title.tpl"),[
'$title' => t('Edit post')
'$title' => L10n::t('Edit post')
]);
$tpl = get_markup_template('jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, [
'$baseurl' => System::baseUrl(),
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
'$ispublic' => '&nbsp;', // L10n::t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
'$nickname' => $a->user['nickname']
]);
@ -53,7 +53,7 @@ function editpost_content(App $a) {
$tpl = get_markup_template('jot-end.tpl');
$a->page['end'] .= replace_macros($tpl, [
'$baseurl' => System::baseUrl(),
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
'$ispublic' => '&nbsp;', // L10n::t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
'$nickname' => $a->user['nickname']
]);
@ -91,7 +91,7 @@ function editpost_content(App $a) {
/* if($mail_enabled) {
$selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
$jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> '
. t("Post to Email") . '</div>';
. L10n::t("Post to Email") . '</div>';
}*/
@ -106,23 +106,23 @@ function editpost_content(App $a) {
'$is_edit' => true,
'$return_path' => $_SESSION['return_url'],
'$action' => 'item',
'$share' => t('Save'),
'$upload' => t('Upload photo'),
'$shortupload' => t('upload photo'),
'$attach' => t('Attach file'),
'$shortattach' => t('attach file'),
'$weblink' => t('Insert web link'),
'$shortweblink' => t('web link'),
'$video' => t('Insert video link'),
'$shortvideo' => t('video link'),
'$audio' => t('Insert audio link'),
'$shortaudio' => t('audio link'),
'$setloc' => t('Set your location'),
'$shortsetloc' => t('set location'),
'$noloc' => t('Clear browser location'),
'$shortnoloc' => t('clear location'),
'$wait' => t('Please wait'),
'$permset' => t('Permission settings'),
'$share' => L10n::t('Save'),
'$upload' => L10n::t('Upload photo'),
'$shortupload' => L10n::t('upload photo'),
'$attach' => L10n::t('Attach file'),
'$shortattach' => L10n::t('attach file'),
'$weblink' => L10n::t('Insert web link'),
'$shortweblink' => L10n::t('web link'),
'$video' => L10n::t('Insert video link'),
'$shortvideo' => L10n::t('video link'),
'$audio' => L10n::t('Insert audio link'),
'$shortaudio' => L10n::t('audio link'),
'$setloc' => L10n::t('Set your location'),
'$shortsetloc' => L10n::t('set location'),
'$noloc' => L10n::t('Clear browser location'),
'$shortnoloc' => L10n::t('clear location'),
'$wait' => L10n::t('Please wait'),
'$permset' => L10n::t('Permission settings'),
'$ptyp' => $itm[0]['type'],
'$content' => undo_post_tagging($itm[0]['body']),
'$post_id' => $post_id,
@ -130,32 +130,29 @@ function editpost_content(App $a) {
'$defloc' => $a->user['default-location'],
'$visitor' => 'none',
'$pvisit' => 'none',
'$emailcc' => t('CC: email addresses'),
'$public' => t('Public post'),
'$emailcc' => L10n::t('CC: email addresses'),
'$public' => L10n::t('Public post'),
'$jotnets' => $jotnets,
'$title' => htmlspecialchars($itm[0]['title']),
'$placeholdertitle' => t('Set title'),
'$placeholdertitle' => L10n::t('Set title'),
'$category' => file_tag_file_to_list($itm[0]['file'], 'category'),
'$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''),
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
'$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? L10n::t('Categories (comma-separated list)') : ''),
'$emtitle' => L10n::t('Example: bob@example.com, mary@example.com'),
'$lockstate' => $lockstate,
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user)),
'$bang' => (($group) ? '!' : ''),
'$profile_uid' => $_SESSION['uid'],
'$preview' => t('Preview'),
'$preview' => L10n::t('Preview'),
'$jotplugins' => $jotplugins,
'$sourceapp' => t($a->sourcename),
'$cancel' => t('Cancel'),
'$sourceapp' => L10n::t($a->sourcename),
'$cancel' => L10n::t('Cancel'),
'$rand_num' => random_digits(12),
//jot nav tab (used in some themes)
'$message' => t('Message'),
'$browser' => t('Browser'),
'$shortpermset' => t('permissions'),
'$message' => L10n::t('Message'),
'$browser' => L10n::t('Browser'),
'$shortpermset' => L10n::t('permissions'),
]);
return $o;
}

View file

@ -102,7 +102,7 @@ function events_post(App $a) {
if (strcmp($finish, $start) < 0 && !$nofinish) {
notice(L10n::t('Event can not end before it has started.') . EOL);
if (intval($_REQUEST['preview'])) {
echo t('Event can not end before it has started.');
echo L10n::t('Event can not end before it has started.');
killme();
}
goaway($onerror_url);
@ -111,7 +111,7 @@ function events_post(App $a) {
if ((! $summary) || ($start === NULL_DATE)) {
notice(L10n::t('Event title and start time are required.') . EOL);
if (intval($_REQUEST['preview'])) {
echo t('Event title and start time are required.');
echo L10n::t('Event title and start time are required.');
killme();
}
goaway($onerror_url);
@ -389,20 +389,20 @@ function events_content(App $a) {
$o = replace_macros($tpl, [
'$baseurl' => System::baseUrl(),
'$tabs' => $tabs,
'$title' => t('Events'),
'$view' => t('View'),
'$new_event' => [System::baseUrl() . '/events/new', t('Create New Event'), '', ''],
'$previous' => [System::baseUrl() . '/events/$prevyear/$prevmonth', t('Previous'), '', ''],
'$next' => [System::baseUrl() . '/events/$nextyear/$nextmonth', t('Next'), '', ''],
'$title' => L10n::t('Events'),
'$view' => L10n::t('View'),
'$new_event' => [System::baseUrl() . '/events/new', L10n::t('Create New Event'), '', ''],
'$previous' => [System::baseUrl() . '/events/$prevyear/$prevmonth', L10n::t('Previous'), '', ''],
'$next' => [System::baseUrl() . '/events/$nextyear/$nextmonth', L10n::t('Next'), '', ''],
'$calendar' => cal($y, $m, $links, ' eventcal'),
'$events' => $events,
'$today' => t('today'),
'$month' => t('month'),
'$week' => t('week'),
'$day' => t('day'),
'$list' => t('list'),
'$today' => L10n::t('today'),
'$month' => L10n::t('month'),
'$week' => L10n::t('week'),
'$day' => L10n::t('day'),
'$list' => L10n::t('list'),
]);
if (x($_GET, 'id')) {
@ -506,34 +506,34 @@ function events_content(App $a) {
'$deny_cid' => json_encode($perms['deny_cid']),
'$deny_gid' => json_encode($perms['deny_gid']),
'$title' => t('Event details'),
'$desc' => t('Starting date and Title are required.'),
'$s_text' => t('Event Starts:') . ' <span class="required" title="' . t('Required') . '">*</span>',
'$s_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $syear+5), DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"), t('Event Starts:'), 'start_text', true, true, '', '', true),
'$n_text' => t('Finish date/time is not known or not relevant'),
'$title' => L10n::t('Event details'),
'$desc' => L10n::t('Starting date and Title are required.'),
'$s_text' => L10n::t('Event Starts:') . ' <span class="required" title="' . L10n::t('Required') . '">*</span>',
'$s_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $syear+5), DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"), L10n::t('Event Starts:'), 'start_text', true, true, '', '', true),
'$n_text' => L10n::t('Finish date/time is not known or not relevant'),
'$n_checked' => $n_checked,
'$f_text' => t('Event Finishes:'),
'$f_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $fyear+5), DateTime::createFromFormat('Y-m-d H:i', "$fyear-$fmonth-$fday $fhour:$fminute"), t('Event Finishes:'), 'finish_text', true, true, 'start_text'),
'$a_text' => t('Adjust for viewer timezone'),
'$f_text' => L10n::t('Event Finishes:'),
'$f_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $fyear+5), DateTime::createFromFormat('Y-m-d H:i', "$fyear-$fmonth-$fday $fhour:$fminute"), L10n::t('Event Finishes:'), 'finish_text', true, true, 'start_text'),
'$a_text' => L10n::t('Adjust for viewer timezone'),
'$a_checked' => $a_checked,
'$d_text' => t('Description:'),
'$d_text' => L10n::t('Description:'),
'$d_orig' => $d_orig,
'$l_text' => t('Location:'),
'$l_text' => L10n::t('Location:'),
'$l_orig' => $l_orig,
'$t_text' => t('Title:') . ' <span class="required" title="' . t('Required') . '">*</span>',
'$t_text' => L10n::t('Title:') . ' <span class="required" title="' . L10n::t('Required') . '">*</span>',
'$t_orig' => $t_orig,
'$summary' => ['summary', t('Title:'), $t_orig, '', '*'],
'$sh_text' => t('Share this event'),
'$share' => ['share', t('Share this event'), $sh_checked, '', $sh_disabled],
'$summary' => ['summary', L10n::t('Title:'), $t_orig, '', '*'],
'$sh_text' => L10n::t('Share this event'),
'$share' => ['share', L10n::t('Share this event'), $sh_checked, '', $sh_disabled],
'$sh_checked' => $sh_checked,
'$nofinish' => ['nofinish', t('Finish date/time is not known or not relevant'), $n_checked],
'$adjust' => ['adjust', t('Adjust for viewer timezone'), $a_checked],
'$preview' => t('Preview'),
'$nofinish' => ['nofinish', L10n::t('Finish date/time is not known or not relevant'), $n_checked],
'$adjust' => ['adjust', L10n::t('Adjust for viewer timezone'), $a_checked],
'$preview' => L10n::t('Preview'),
'$acl' => $acl,
'$submit' => t('Submit'),
'$basic' => t('Basic'),
'$advanced' => t('Advanced'),
'$permissions' => t('Permissions'),
'$submit' => L10n::t('Submit'),
'$basic' => L10n::t('Basic'),
'$advanced' => L10n::t('Advanced'),
'$permissions' => L10n::t('Permissions'),
]);

View file

@ -6,6 +6,7 @@
*/
use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Object\Image;
@ -30,7 +31,7 @@ function fbrowser_content(App $a) {
switch ($a->argv[1]) {
case "image":
$path = [["", t("Photos")]];
$path = [["", L10n::t("Photos")]];
$albums = false;
$sql_extra = "";
$sql_extra2 = " ORDER BY created DESC LIMIT 0, 10";
@ -39,7 +40,7 @@ function fbrowser_content(App $a) {
$albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' ",
intval(local_user()),
dbesc('Contact Photos'),
dbesc( t('Contact Photos'))
dbesc(L10n::t('Contact Photos'))
);
function _map_folder1($el){return [bin2hex($el['album']),$el['album']];};
@ -61,7 +62,7 @@ function fbrowser_content(App $a) {
GROUP BY `resource-id` $sql_extra2",
intval(local_user()),
dbesc('Contact Photos'),
dbesc( t('Contact Photos'))
dbesc(L10n::t('Contact Photos'))
);
function _map_files1($rr){
@ -94,7 +95,7 @@ function fbrowser_content(App $a) {
'$path' => $path,
'$folders' => $albums,
'$files' => $files,
'$cancel' => t('Cancel'),
'$cancel' => L10n::t('Cancel'),
'$nickname' => $a->user['nickname'],
]);
@ -121,10 +122,10 @@ function fbrowser_content(App $a) {
$o = replace_macros($tpl, [
'$type' => 'file',
'$baseurl' => System::baseUrl(),
'$path' => [ [ "", t("Files")] ],
'$path' => [ [ "", L10n::t("Files")] ],
'$folders' => false,
'$files' =>$files,
'$cancel' => t('Cancel'),
'$cancel' => L10n::t('Cancel'),
'$nickname' => $a->user['nickname'],
]);

View file

@ -1,14 +1,17 @@
<?php
/**
* @file mod/filer.php
*/
use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
require_once('include/security.php');
require_once('include/bbcode.php');
require_once('include/items.php');
function filer_content(App $a) {
require_once 'include/security.php';
require_once 'include/bbcode.php';
require_once 'include/items.php';
function filer_content(App $a)
{
if (! local_user()) {
killme();
}
@ -18,19 +21,19 @@ function filer_content(App $a) {
logger('filer: tag ' . $term . ' item ' . $item_id);
if($item_id && strlen($term)){
if ($item_id && strlen($term)) {
// file item
file_tag_save_file(local_user(),$item_id,$term);
file_tag_save_file(local_user(), $item_id, $term);
} else {
// return filer dialog
$filetags = PConfig::get(local_user(),'system','filetags');
$filetags = file_tag_file_to_list($filetags,'file');
$filetags = explode(",", $filetags);
$filetags = PConfig::get(local_user(), 'system', 'filetags');
$filetags = file_tag_file_to_list($filetags, 'file');
$filetags = explode(",", $filetags);
$tpl = get_markup_template("filer_dialog.tpl");
$o = replace_macros($tpl, [
'$field' => ['term', t("Save to Folder:"), '', '', $filetags, t('- select -')],
'$submit' => t('Save'),
'$field' => ['term', L10n::t("Save to Folder:"), '', '', $filetags, L10n::t('- select -')],
'$submit' => L10n::t('Save'),
]);
echo $o;

View file

@ -62,7 +62,7 @@ function follow_content(App $a) {
$uid = local_user();
$url = notags(trim($_REQUEST['url']));
$submit = t('Submit Request');
$submit = L10n::t('Submit Request');
// There is a current issue. It seems as if you can't start following a Friendica that is following you
// With Diaspora this works - but Friendica is special, it seems ...
@ -142,38 +142,38 @@ function follow_content(App $a) {
$r[0]["about"] = "";
}
$header = t("Connect/Follow");
$header = L10n::t("Connect/Follow");
$o = replace_macros($tpl,[
'$header' => htmlentities($header),
//'$photo' => proxy_url($ret["photo"], false, PROXY_SIZE_SMALL),
'$desc' => "",
'$pls_answer' => t('Please answer the following:'),
'$does_know_you' => ['knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', [t('No'), t('Yes')]],
'$add_note' => t('Add a personal note:'),
'$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')]],
'$add_note' => L10n::t('Add a personal note:'),
'$page_desc' => "",
'$friendica' => "",
'$statusnet' => "",
'$diaspora' => "",
'$diasnote' => "",
'$your_address' => t('Your Identity Address:'),
'$your_address' => L10n::t('Your Identity Address:'),
'$invite_desc' => "",
'$emailnet' => "",
'$submit' => $submit,
'$cancel' => t('Cancel'),
'$cancel' => L10n::t('Cancel'),
'$nickname' => "",
'$name' => $ret["name"],
'$url' => $ret["url"],
'$zrl' => Profile::zrl($ret["url"]),
'$url_label' => t("Profile URL"),
'$url_label' => L10n::t("Profile URL"),
'$myaddr' => $myaddr,
'$request' => $request,
/*'$location' => bbcode($r[0]["location"]),
'$location_label' => t("Location:"),
'$location_label' => L10n::t("Location:"),
'$about' => bbcode($r[0]["about"], false, false),
'$about_label' => t("About:"), */
'$about_label' => L10n::t("About:"), */
'$keywords' => $r[0]["keywords"],
'$keywords_label' => t("Tags:")
'$keywords_label' => L10n::t("Tags:")
]);
$a->page['aside'] = "";
@ -182,7 +182,7 @@ function follow_content(App $a) {
if ($gcontact_id <> 0) {
$o .= replace_macros(get_markup_template('section_title.tpl'),
['$title' => t('Status Messages and Posts')
['$title' => L10n::t('Status Messages and Posts')
]);
// Show last public posts

View file

@ -1,17 +1,21 @@
<?php
/**
* @file mod/friendica.php
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Database\DBM;
function friendica_init(App $a) {
if ($a->argv[1] == "json"){
function friendica_init(App $a)
{
if ($a->argv[1] == "json") {
$register_policy = ['REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN'];
$sql_extra = '';
if (x($a->config,'admin_nickname')) {
if (x($a->config, 'admin_nickname')) {
$sql_extra = sprintf(" AND `nickname` = '%s' ", dbesc($a->config['admin_nickname']));
}
if (isset($a->config['admin_email']) && $a->config['admin_email']!='') {
@ -30,7 +34,7 @@ function friendica_init(App $a) {
if (is_array($a->addons) && count($a->addons)) {
$r = q("SELECT * FROM `addon` WHERE `hidden` = 0");
if (DBM::is_result($r)) {
foreach($r as $rr) {
foreach ($r as $rr) {
$visible_addons[] = $rr['name'];
}
}
@ -57,7 +61,7 @@ function friendica_init(App $a) {
'admin' => $admin,
'site_name' => $a->config['sitename'],
'platform' => FRIENDICA_PLATFORM,
'info' => ((x($a->config,'info')) ? $a->config['info'] : ''),
'info' => ((x($a->config, 'info')) ? $a->config['info'] : ''),
'no_scrape_url' => System::baseUrl().'/noscrape'
];
@ -66,36 +70,37 @@ function friendica_init(App $a) {
}
}
function friendica_content(App $a) {
function friendica_content(App $a)
{
$o = '<h1>Friendica</h1>' . PHP_EOL;
$o .= '<p>';
$o .= t('This is Friendica, version') . ' <strong>' . FRIENDICA_VERSION . '</strong> ';
$o .= t('running at web location') . ' ' . System::baseUrl();
$o .= L10n::t('This is Friendica, version') . ' <strong>' . FRIENDICA_VERSION . '</strong> ';
$o .= L10n::t('running at web location') . ' ' . System::baseUrl();
$o .= '</p>' . PHP_EOL;
$o .= '<p>';
$o .= t('Please visit <a href="https://friendi.ca">Friendi.ca</a> to learn more about the Friendica project.') . PHP_EOL;
$o .= L10n::t('Please visit <a href="https://friendi.ca">Friendi.ca</a> to learn more about the Friendica project.') . PHP_EOL;
$o .= '</p>' . PHP_EOL;
$o .= '<p>';
$o .= t('Bug reports and issues: please visit') . ' ' . '<a href="https://github.com/friendica/friendica/issues?state=open">'.t('the bugtracker at github').'</a>';
$o .= L10n::t('Bug reports and issues: please visit') . ' ' . '<a href="https://github.com/friendica/friendica/issues?state=open">'.t('the bugtracker at github').'</a>';
$o .= '</p>' . PHP_EOL;
$o .= '<p>';
$o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com');
$o .= L10n::t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com');
$o .= '</p>' . PHP_EOL;
$visible_addons = [];
if (is_array($a->addons) && count($a->addons)) {
$r = q("SELECT * FROM `addon` WHERE `hidden` = 0");
if (DBM::is_result($r)) {
foreach($r as $rr) {
foreach ($r as $rr) {
$visible_addons[] = $rr['name'];
}
}
}
if (count($visible_addons)) {
$o .= '<p>' . t('Installed addons/addons/apps:') . '</p>' . PHP_EOL;
$o .= '<p>' . L10n::t('Installed addons/addons/apps:') . '</p>' . PHP_EOL;
$sorted = $visible_addons;
$s = '';
sort($sorted);
@ -109,13 +114,13 @@ function friendica_content(App $a) {
}
$o .= '<div style="margin-left: 25px; margin-right: 25px;">' . $s . '</div>' . PHP_EOL;
} else {
$o .= '<p>' . t('No installed addons/addons/apps') . '</p>' . PHP_EOL;
$o .= '<p>' . L10n::t('No installed addons/addons/apps') . '</p>' . PHP_EOL;
}
$blocklist = Config::get('system', 'blocklist');
if (count($blocklist)) {
$o .= '<div id="about_blocklist"><p>' . t('On this server the following remote servers are blocked.') . '</p>' . PHP_EOL;
$o .= '<table class="table"><thead><tr><th>' . t('Blocked domain') . '</th><th>' . t('Reason for the block') . '</th></thead><tbody>' . PHP_EOL;
$o .= '<div id="about_blocklist"><p>' . L10n::t('On this server the following remote servers are blocked.') . '</p>' . PHP_EOL;
$o .= '<table class="table"><thead><tr><th>' . L10n::t('Blocked domain') . '</th><th>' . L10n::t('Reason for the block') . '</th></thead><tbody>' . PHP_EOL;
foreach ($blocklist as $b) {
$o .= '<tr><td>' . $b['domain'] .'</td><td>' . $b['reason'] . '</td></tr>' . PHP_EOL;
}

View file

@ -7,8 +7,8 @@ use Friendica\Core\L10n;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
function fsuggest_post(App $a) {
function fsuggest_post(App $a)
{
if (! local_user()) {
return;
}
@ -35,13 +35,12 @@ function fsuggest_post(App $a) {
$note = escape_tags(trim($_POST['note']));
if($new_contact) {
if ($new_contact) {
$r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($new_contact),
intval(local_user())
);
if (DBM::is_result($r)) {
$x = q("INSERT INTO `fsuggest` ( `uid`,`cid`,`name`,`url`,`request`,`photo`,`note`,`created`)
VALUES ( %d, %d, '%s','%s','%s','%s','%s','%s')",
intval(local_user()),
@ -69,14 +68,9 @@ function fsuggest_post(App $a) {
info(L10n::t('Friend suggestion sent.') . EOL);
}
}
}
function fsuggest_content(App $a)
{
require_once 'include/acl_selectors.php';
@ -103,7 +97,7 @@ function fsuggest_content(App $a)
}
$contact = $r[0];
$o = '<h3>' . t('Suggest Friends') . '</h3>';
$o = '<h3>' . L10n::t('Suggest Friends') . '</h3>';
$o .= '<div id="fsuggest-desc" >' . sprintf(t('Suggest a friend for %s'), $contact['name']) . '</div>';
@ -117,7 +111,7 @@ function fsuggest_content(App $a)
);
$o .= '<div id="fsuggest-submit-wrapper"><input id="fsuggest-submit" type="submit" name="submit" value="' . t('Submit') . '" /></div>';
$o .= '<div id="fsuggest-submit-wrapper"><input id="fsuggest-submit" type="submit" name="submit" value="' . L10n::t('Submit') . '" /></div>';
$o .= '</form>';
return $o;

View file

@ -94,13 +94,13 @@ function group_content(App $a) {
$tpl = get_markup_template('group_edit.tpl');
$context = [
'$submit' => t('Save Group'),
'$submit' => L10n::t('Save Group'),
];
if (($a->argc == 2) && ($a->argv[1] === 'new')) {
return replace_macros($tpl, $context + [
'$title' => t('Create a group of contacts/friends.'),
'$gname' => ['groupname', t('Group Name: '), '', ''],
'$title' => L10n::t('Create a group of contacts/friends.'),
'$gname' => ['groupname', L10n::t('Group Name: '), '', ''],
'$gid' => 'new',
'$form_security_token' => get_form_security_token("group_edit"),
]);
@ -190,18 +190,18 @@ function group_content(App $a) {
$drop_tpl = get_markup_template('group_drop.tpl');
$drop_txt = replace_macros($drop_tpl, [
'$id' => $group['id'],
'$delete' => t('Delete Group'),
'$delete' => L10n::t('Delete Group'),
'$form_security_token' => get_form_security_token("group_drop"),
]);
$context = $context + [
'$title' => t('Group Editor'),
'$gname' => ['groupname', t('Group Name: '), $group['name'], ''],
'$title' => L10n::t('Group Editor'),
'$gname' => ['groupname', L10n::t('Group Name: '), $group['name'], ''],
'$gid' => $group['id'],
'$drop' => $drop_txt,
'$form_security_token' => get_form_security_token('group_edit'),
'$edit_name' => t('Edit Group Name')
'$edit_name' => L10n::t('Edit Group Name')
];
}
@ -211,10 +211,10 @@ function group_content(App $a) {
}
$groupeditor = [
'label_members' => t('Members'),
'label_members' => L10n::t('Members'),
'members' => [],
'label_contacts' => t('All Contacts'),
'group_is_empty' => t('Group is empty'),
'label_contacts' => L10n::t('All Contacts'),
'group_is_empty' => L10n::t('Group is empty'),
'contacts' => [],
];
@ -227,7 +227,7 @@ function group_content(App $a) {
$entry['label'] = 'members';
$entry['photo_menu'] = '';
$entry['change_member'] = [
'title' => t("Remove Contact"),
'title' => L10n::t("Remove Contact"),
'gid' => $group['id'],
'cid' => $member['id'],
'sec_token' => $sec_token
@ -251,7 +251,7 @@ function group_content(App $a) {
$entry['label'] = 'contacts';
$entry['photo_menu'] = '';
$entry['change_member'] = [
'title' => t("Add Contact"),
'title' => L10n::t("Add Contact"),
'gid' => $group['id'],
'cid' => $member['id'],
'sec_token' => $sec_token
@ -263,7 +263,7 @@ function group_content(App $a) {
}
$context['$groupeditor'] = $groupeditor;
$context['$desc'] = t('Click on a contact to add or remove.');
$context['$desc'] = L10n::t('Click on a contact to add or remove.');
// If there are to many contacts we could provide an alternative view mode
$total = count($groupeditor['members']) + count($groupeditor['contacts']);

View file

@ -5,6 +5,7 @@
use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Content\Text\Markdown;
use Friendica\Core\L10n;
use Friendica\Core\System;
if (!function_exists('load_doc_file')) {
@ -44,22 +45,22 @@ function help_content(App $a) {
$title = basename($path);
$filename = $path;
$text = load_doc_file('doc/' . $path . '.md');
$a->page['title'] = t('Help:') . ' ' . str_replace('-', ' ', notags($title));
$a->page['title'] = L10n::t('Help:') . ' ' . str_replace('-', ' ', notags($title));
}
$home = load_doc_file('doc/Home.md');
if (!$text) {
$text = $home;
$filename = "Home";
$a->page['title'] = t('Help');
$a->page['title'] = L10n::t('Help');
} else {
$a->page['aside'] = Markdown::convert($home, false);
}
if (!strlen($text)) {
header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . t('Not Found'));
header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . L10n::t('Not Found'));
$tpl = get_markup_template("404.tpl");
return replace_macros($tpl, [
'$message' => t('Page not found.')
'$message' => L10n::t('Page not found.')
]);
}

View file

@ -108,29 +108,29 @@ function install_content(App $a) {
global $install_wizard_pass;
$o = '';
$wizard_status = "";
$install_title = t('Friendica Communications Server - Setup');
$install_title = L10n::t('Friendica Communications Server - Setup');
if (x($a->data, 'db_conn_failed')) {
$install_wizard_pass = 2;
$wizard_status = t('Could not connect to database.');
$wizard_status = L10n::t('Could not connect to database.');
}
if (x($a->data, 'db_create_failed')) {
$install_wizard_pass = 2;
$wizard_status = t('Could not create table.');
$wizard_status = L10n::t('Could not create table.');
}
$db_return_text = "";
if (x($a->data, 'db_installed')) {
$txt = '<p style="font-size: 130%;">';
$txt .= t('Your Friendica site database has been installed.') . EOL;
$txt .= L10n::t('Your Friendica site database has been installed.') . EOL;
$db_return_text .= $txt;
}
if (x($a->data, 'db_failed')) {
$txt = t('You may need to import the file "database.sql" manually using phpmyadmin or mysql.') . EOL;
$txt .= t('Please see the file "INSTALL.txt".') . EOL ."<hr>";
$txt = L10n::t('You may need to import the file "database.sql" manually using phpmyadmin or mysql.') . EOL;
$txt .= L10n::t('Please see the file "INSTALL.txt".') . EOL ."<hr>";
$txt .= "<pre>".$a->data['db_failed'] . "</pre>". EOL;
$db_return_text .= $txt;
}
@ -142,7 +142,7 @@ function install_content(App $a) {
return replace_macros($tpl, [
'$title' => $install_title,
'$pass' => '',
'$status' => t('Database already in use.'),
'$status' => L10n::t('Database already in use.'),
'$text' => '',
]);
}
@ -199,12 +199,12 @@ function install_content(App $a) {
$tpl = get_markup_template('install_checks.tpl');
$o .= replace_macros($tpl, [
'$title' => $install_title,
'$pass' => t('System check'),
'$pass' => L10n::t('System check'),
'$checks' => $checks,
'$passed' => $checkspassed,
'$see_install' => t('Please see the file "INSTALL.txt".'),
'$next' => t('Next'),
'$reload' => t('Check again'),
'$see_install' => L10n::t('Please see the file "INSTALL.txt".'),
'$next' => L10n::t('Next'),
'$reload' => L10n::t('Check again'),
'$phpath' => $phpath,
'$baseurl' => System::baseUrl(),
]);
@ -223,28 +223,28 @@ function install_content(App $a) {
$tpl = get_markup_template('install_db.tpl');
$o .= replace_macros($tpl, [
'$title' => $install_title,
'$pass' => t('Database connection'),
'$info_01' => t('In order to install Friendica we need to know how to connect to your database.'),
'$info_02' => t('Please contact your hosting provider or site administrator if you have questions about these settings.'),
'$info_03' => t('The database you specify below should already exist. If it does not, please create it before continuing.'),
'$pass' => L10n::t('Database connection'),
'$info_01' => L10n::t('In order to install Friendica we need to know how to connect to your database.'),
'$info_02' => L10n::t('Please contact your hosting provider or site administrator if you have questions about these settings.'),
'$info_03' => L10n::t('The database you specify below should already exist. If it does not, please create it before continuing.'),
'$status' => $wizard_status,
'$dbhost' => ['dbhost', t('Database Server Name'), $dbhost, '', 'required'],
'$dbuser' => ['dbuser', t('Database Login Name'), $dbuser, '', 'required', 'autofocus'],
'$dbpass' => ['dbpass', t('Database Login Password'), $dbpass, t("For security reasons the password must not be empty"), 'required'],
'$dbdata' => ['dbdata', t('Database Name'), $dbdata, '', 'required'],
'$adminmail' => ['adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
'$dbhost' => ['dbhost', L10n::t('Database Server Name'), $dbhost, '', 'required'],
'$dbuser' => ['dbuser', L10n::t('Database Login Name'), $dbuser, '', 'required', 'autofocus'],
'$dbpass' => ['dbpass', L10n::t('Database Login Password'), $dbpass, L10n::t("For security reasons the password must not be empty"), 'required'],
'$dbdata' => ['dbdata', L10n::t('Database Name'), $dbdata, '', 'required'],
'$adminmail' => ['adminmail', L10n::t('Site administrator email address'), $adminmail, L10n::t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
'$lbl_10' => t('Please select a default timezone for your website'),
'$lbl_10' => L10n::t('Please select a default timezone for your website'),
'$baseurl' => System::baseUrl(),
'$phpath' => $phpath,
'$submit' => t('Submit'),
'$submit' => L10n::t('Submit'),
]);
return $o;
@ -265,7 +265,7 @@ function install_content(App $a) {
$tpl = get_markup_template('install_settings.tpl');
$o .= replace_macros($tpl, [
'$title' => $install_title,
'$pass' => t('Site settings'),
'$pass' => L10n::t('Site settings'),
'$status' => $wizard_status,
@ -275,16 +275,16 @@ function install_content(App $a) {
'$dbdata' => $dbdata,
'$phpath' => $phpath,
'$adminmail' => ['adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
'$adminmail' => ['adminmail', L10n::t('Site administrator email address'), $adminmail, L10n::t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
'$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''),
'$language' => ['language', t('System Language:'), 'en', t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices],
'$timezone' => field_timezone('timezone', L10n::t('Please select a default timezone for your website'), $timezone, ''),
'$language' => ['language', L10n::t('System Language:'), 'en', L10n::t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices],
'$baseurl' => System::baseUrl(),
'$submit' => t('Submit'),
'$submit' => L10n::t('Submit'),
]);
return $o;
@ -319,17 +319,17 @@ function check_php(&$phpath, &$checks) {
}
$help = "";
if (!$passed) {
$help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL;
$help .= t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See <a href='https://github.com/friendica/friendica/blob/master/doc/Install.md#set-up-the-worker'>'Setup the worker'</a>") . EOL;
$help .= L10n::t('Could not find a command line version of PHP in the web server PATH.'). EOL;
$help .= L10n::t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See <a href='https://github.com/friendica/friendica/blob/master/doc/Install.md#set-up-the-worker'>'Setup the worker'</a>") . EOL;
$help .= EOL . EOL;
$tpl = get_markup_template('field_input.tpl');
$help .= replace_macros($tpl, [
'$field' => ['phpath', t('PHP executable path'), $phpath, t('Enter full path to php executable. You can leave this blank to continue the installation.')],
'$field' => ['phpath', L10n::t('PHP executable path'), $phpath, L10n::t('Enter full path to php executable. You can leave this blank to continue the installation.')],
]);
$phpath = "";
}
check_add($checks, t('Command line PHP').($passed?" (<tt>$phpath</tt>)":""), $passed, false, $help);
check_add($checks, L10n::t('Command line PHP').($passed?" (<tt>$phpath</tt>)":""), $passed, false, $help);
if ($passed) {
$cmd = "$phpath -v";
@ -338,10 +338,10 @@ function check_php(&$phpath, &$checks) {
list($result) = explode("\n", $result);
$help = "";
if (!$passed2) {
$help .= t('PHP executable is not the php cli binary (could be cgi-fgci version)'). EOL;
$help .= t('Found PHP version: ')."<tt>$result</tt>";
$help .= L10n::t('PHP executable is not the php cli binary (could be cgi-fgci version)'). EOL;
$help .= L10n::t('Found PHP version: ')."<tt>$result</tt>";
}
check_add($checks, t('PHP cli binary'), $passed2, true, $help);
check_add($checks, L10n::t('PHP cli binary'), $passed2, true, $help);
}
@ -352,10 +352,10 @@ function check_php(&$phpath, &$checks) {
$passed3 = $result == $str;
$help = "";
if (!$passed3) {
$help .= t('The command line version of PHP on your system does not have "register_argc_argv" enabled.'). EOL;
$help .= t('This is required for message delivery to work.');
$help .= L10n::t('The command line version of PHP on your system does not have "register_argc_argv" enabled.'). EOL;
$help .= L10n::t('This is required for message delivery to work.');
}
check_add($checks, t('PHP register_argc_argv'), $passed3, true, $help);
check_add($checks, L10n::t('PHP register_argc_argv'), $passed3, true, $help);
}
@ -378,59 +378,59 @@ function check_keys(&$checks) {
// Get private key
if (! $res) {
$help .= t('Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys'). EOL;
$help .= t('If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".');
$help .= L10n::t('Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys'). EOL;
$help .= L10n::t('If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".');
}
check_add($checks, t('Generate encryption keys'), $res, true, $help);
check_add($checks, L10n::t('Generate encryption keys'), $res, true, $help);
}
function check_funcs(&$checks) {
$ck_funcs = [];
check_add($ck_funcs, t('libCurl PHP module'), true, true, "");
check_add($ck_funcs, t('GD graphics PHP module'), true, true, "");
check_add($ck_funcs, t('OpenSSL PHP module'), true, true, "");
check_add($ck_funcs, t('PDO or MySQLi PHP module'), true, true, "");
check_add($ck_funcs, t('mb_string PHP module'), true, true, "");
check_add($ck_funcs, t('XML PHP module'), true, true, "");
check_add($ck_funcs, t('iconv module'), true, true, "");
check_add($ck_funcs, L10n::t('libCurl PHP module'), true, true, "");
check_add($ck_funcs, L10n::t('GD graphics PHP module'), true, true, "");
check_add($ck_funcs, L10n::t('OpenSSL PHP module'), true, true, "");
check_add($ck_funcs, L10n::t('PDO or MySQLi PHP module'), true, true, "");
check_add($ck_funcs, L10n::t('mb_string PHP module'), true, true, "");
check_add($ck_funcs, L10n::t('XML PHP module'), true, true, "");
check_add($ck_funcs, L10n::t('iconv module'), true, true, "");
if (function_exists('apache_get_modules')) {
if (! in_array('mod_rewrite',apache_get_modules())) {
check_add($ck_funcs, t('Apache mod_rewrite module'), false, true, t('Error: Apache webserver mod-rewrite module is required but not installed.'));
check_add($ck_funcs, L10n::t('Apache mod_rewrite module'), false, true, L10n::t('Error: Apache webserver mod-rewrite module is required but not installed.'));
} else {
check_add($ck_funcs, t('Apache mod_rewrite module'), true, true, "");
check_add($ck_funcs, L10n::t('Apache mod_rewrite module'), true, true, "");
}
}
if (! function_exists('curl_init')) {
$ck_funcs[0]['status'] = false;
$ck_funcs[0]['help'] = t('Error: libCURL PHP module required but not installed.');
$ck_funcs[0]['help'] = L10n::t('Error: libCURL PHP module required but not installed.');
}
if (! function_exists('imagecreatefromjpeg')) {
$ck_funcs[1]['status'] = false;
$ck_funcs[1]['help'] = t('Error: GD graphics PHP module with JPEG support required but not installed.');
$ck_funcs[1]['help'] = L10n::t('Error: GD graphics PHP module with JPEG support required but not installed.');
}
if (! function_exists('openssl_public_encrypt')) {
$ck_funcs[2]['status'] = false;
$ck_funcs[2]['help'] = t('Error: openssl PHP module required but not installed.');
$ck_funcs[2]['help'] = L10n::t('Error: openssl PHP module required but not installed.');
}
if (! function_exists('mysqli_connect') && !class_exists('pdo')) {
$ck_funcs[3]['status'] = false;
$ck_funcs[3]['help'] = t('Error: PDO or MySQLi PHP module required but not installed.');
$ck_funcs[3]['help'] = L10n::t('Error: PDO or MySQLi PHP module required but not installed.');
}
if (!function_exists('mysqli_connect') && class_exists('pdo') && !in_array('mysql', PDO::getAvailableDrivers())) {
$ck_funcs[3]['status'] = false;
$ck_funcs[3]['help'] = t('Error: The MySQL driver for PDO is not installed.');
$ck_funcs[3]['help'] = L10n::t('Error: The MySQL driver for PDO is not installed.');
}
if (! function_exists('mb_strlen')) {
$ck_funcs[4]['status'] = false;
$ck_funcs[4]['help'] = t('Error: mb_string PHP module required but not installed.');
$ck_funcs[4]['help'] = L10n::t('Error: mb_string PHP module required but not installed.');
}
if (! function_exists('iconv_strlen')) {
$ck_funcs[7]['status'] = false;
$ck_funcs[7]['help'] = t('Error: iconv PHP module required but not installed.');
$ck_funcs[7]['help'] = L10n::t('Error: iconv PHP module required but not installed.');
}
$checks = array_merge($checks, $ck_funcs);
@ -440,7 +440,7 @@ function check_funcs(&$checks) {
$xml = new DOMDocument();
} catch (Exception $e) {
$ck_funcs[6]['status'] = false;
$ck_funcs[6]['help'] = t('Error, XML PHP module required but not installed.');
$ck_funcs[6]['help'] = L10n::t('Error, XML PHP module required but not installed.');
}
}
@ -452,13 +452,13 @@ function check_htconfig(&$checks) {
(!file_exists('.htconfig.php') && !is_writable('.'))) {
$status = false;
$help = t('The web installer needs to be able to create a file called ".htconfig.php" in the top folder of your web server and it is unable to do so.') .EOL;
$help .= t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.').EOL;
$help .= t('At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Friendica top folder.').EOL;
$help .= t('You can alternatively skip this procedure and perform a manual installation. Please see the file "INSTALL.txt" for instructions.').EOL;
$help = L10n::t('The web installer needs to be able to create a file called ".htconfig.php" in the top folder of your web server and it is unable to do so.') .EOL;
$help .= L10n::t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.').EOL;
$help .= L10n::t('At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Friendica top folder.').EOL;
$help .= L10n::t('You can alternatively skip this procedure and perform a manual installation. Please see the file "INSTALL.txt" for instructions.').EOL;
}
check_add($checks, t('.htconfig.php is writable'), $status, false, $help);
check_add($checks, L10n::t('.htconfig.php is writable'), $status, false, $help);
}
@ -468,13 +468,13 @@ function check_smarty3(&$checks) {
if (!is_writable('view/smarty3')) {
$status = false;
$help = t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL;
$help .= t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.').EOL;
$help .= t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL;
$help .= t('Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains.').EOL;
$help = L10n::t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL;
$help .= L10n::t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.').EOL;
$help .= L10n::t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL;
$help .= L10n::t('Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains.').EOL;
}
check_add($checks, t('view/smarty3 is writable'), $status, true, $help);
check_add($checks, L10n::t('view/smarty3 is writable'), $status, true, $help);
}
@ -490,9 +490,9 @@ function check_htaccess(&$checks) {
if ($test != "ok") {
$status = false;
$help = t('Url rewrite in .htaccess is not working. Check your server configuration.');
$help = L10n::t('Url rewrite in .htaccess is not working. Check your server configuration.');
}
check_add($checks, t('Url rewrite is working'), $status, true, $help);
check_add($checks, L10n::t('Url rewrite is working'), $status, true, $help);
} else {
// cannot check modrewrite if libcurl is not installed
/// @TODO Maybe issue warning here?
@ -511,18 +511,18 @@ function check_imagik(&$checks) {
}
}
if ($imagick == false) {
check_add($checks, t('ImageMagick PHP extension is not installed'), $imagick, false, "");
check_add($checks, L10n::t('ImageMagick PHP extension is not installed'), $imagick, false, "");
} else {
check_add($checks, t('ImageMagick PHP extension is installed'), $imagick, false, "");
check_add($checks, L10n::t('ImageMagick PHP extension is installed'), $imagick, false, "");
if ($imagick) {
check_add($checks, t('ImageMagick supports GIF'), $gif, false, "");
check_add($checks, L10n::t('ImageMagick supports GIF'), $gif, false, "");
}
}
}
function manual_config(App $a) {
$data = htmlentities($a->data['txt'],ENT_COMPAT, 'UTF-8');
$o = t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.');
$o = L10n::t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.');
$o .= "<textarea rows=\"24\" cols=\"80\" >$data</textarea>";
return $o;
}

View file

@ -469,7 +469,7 @@ function item_post(App $a) {
$fields = ['allow_cid' => $str_contact_allow, 'allow_gid' => $str_group_allow,
'deny_cid' => $str_contact_deny, 'deny_gid' => $str_group_deny];
$condition = ['resource-id' => $image_uri, 'uid' => $profile_uid, 'album' => t('Wall Photos')];
$condition = ['resource-id' => $image_uri, 'uid' => $profile_uid, 'album' => L10n::t('Wall Photos')];
dba::update('photo', $fields, $condition);
}
}
@ -803,7 +803,7 @@ function item_post(App $a) {
$disclaimer = '<hr />' . sprintf(t('This message was sent to you by %s, a member of the Friendica social network.'), $a->user['username'])
. '<br />';
$disclaimer .= sprintf(t('You may visit them online at %s'), System::baseUrl() . '/profile/' . $a->user['nickname']) . EOL;
$disclaimer .= t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . 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 {

View file

@ -1,10 +1,13 @@
<?php
/**
* @file mod/maintenance.php
*/
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\L10n;
function maintenance_content(App $a) {
function maintenance_content(App $a)
{
$reason = Config::get('system', 'maintenance_reason');
if (substr(normalise_link($reason), 0, 7) == 'http://') {
@ -18,7 +21,7 @@ function maintenance_content(App $a) {
header('Retry-After: 600');
return replace_macros(get_markup_template('maintenance.tpl'), [
'$sysdown' => t('System down for maintenance'),
'$sysdown' => L10n::t('System down for maintenance'),
'$reason' => $reason
]);
}

View file

@ -27,7 +27,7 @@ function openid_content(App $a) {
$authid = $_REQUEST['openid_identity'];
if(! strlen($authid)) {
logger( t('OpenID protocol error. No ID returned.') . EOL);
logger(L10n::t('OpenID protocol error. No ID returned.') . EOL);
goaway(System::baseUrl());
}

View file

@ -57,7 +57,7 @@ function ostatus_subscribe_content(App $a) {
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.System::baseUrl().'/settings/connectors">';
PConfig::delete($uid, "ostatus", "legacy_friends");
PConfig::delete($uid, "ostatus", "legacy_contact");
$o .= t("Done");
$o .= L10n::t("Done");
return $o;
}

View file

@ -45,7 +45,7 @@ function repair_ostatus_content(App $a) {
intval(CONTACT_IS_SHARING), $counter++);
if (!$r) {
$o .= t("Done");
$o .= L10n::t("Done");
return $o;
}
@ -53,7 +53,7 @@ function repair_ostatus_content(App $a) {
$o .= "<p>".t("Keep this window open until done.")."</p>";
$result = Contact::createFromProbe($uid,$r[0]["url"],true);
$result = Contact::createFromProbe($uid, $r[0]["url"], true);
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="1; URL='.System::baseUrl().'/repair_ostatus?counter='.$counter.'">';

View file

@ -1,8 +1,11 @@
<?php
// See update_profile.php for documentation
/**
* @file mod/update_display.php
* See update_profile.php for documentation
*/
use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
require_once "mod/display.php";
@ -21,7 +24,7 @@ function update_display_content(App $a)
$text = preg_replace($pattern, $replace, $text);
if (PConfig::get(local_user(), "system", "bandwith_saver")) {
$replace = "<br />" . t("[Embedded content - reload page to view]") . "<br />";
$replace = "<br />" . L10n::t("[Embedded content - reload page to view]") . "<br />";
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
$text = preg_replace($pattern, $replace, $text);
$pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";

View file

@ -1,8 +1,11 @@
<?php
// See update_profile.php for documentation
/**
* @file mod/update_network
* See update_profile.php for documentation
*/
use Friendica\App;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
require_once "mod/network.php";
@ -26,7 +29,7 @@ function update_network_content(App $a)
$text = preg_replace($pattern, $replace, $text);
if (PConfig::get(local_user(), "system", "bandwith_saver")) {
$replace = "<br />" . t("[Embedded content - reload page to view]") . "<br />";
$replace = "<br />" . L10n::t("[Embedded content - reload page to view]") . "<br />";
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
$text = preg_replace($pattern, $replace, $text);
$pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";