modify many t() calls.
*/
function timezone_cmp($a, $b) {
if (strstr($a, '/') && strstr($b, '/')) {
- if ( t($a) == t($b)) {
+ if (L10n::t($a) == L10n::t($b)) {
return 0;
}
- return ( t($a) < t($b)) ? -1 : 1;
+ return (L10n::t($a) < L10n::t($b)) ? -1 : 1;
}
if (strstr($a, '/')) {
return -1;
} elseif (strstr($b, '/')) {
return 1;
- } elseif ( t($a) == t($b)) {
+ } elseif (L10n::t($a) == L10n::t($b)) {
return 0;
}
- return ( t($a) < t($b)) ? -1 : 1;
+ return (L10n::t($a) < L10n::t($b)) ? -1 : 1;
}
/**
$o .= '</optgroup>';
}
$continent = $ex[0];
- $o .= '<optgroup label="' . t($continent) . '">';
+ $o .= '<optgroup label="' . L10n::t($continent) . '">';
}
if (count($ex) > 2) {
$city = substr($value,strpos($value,'/')+1);
}
} else {
$city = $ex[0];
- if ($continent != t('Miscellaneous')) {
+ if ($continent != L10n::t('Miscellaneous')) {
$o .= '</optgroup>';
- $continent = t('Miscellaneous');
- $o .= '<optgroup label="' . t($continent) . '">';
+ $continent = L10n::t('Miscellaneous');
+ $o .= '<optgroup label="' . L10n::t($continent) . '">';
}
}
- $city = str_replace('_', ' ', t($city));
+ $city = str_replace('_', ' ', L10n::t($city));
$selected = (($value == $current) ? " selected=\"selected\" " : "");
$o .= "<option value=\"$value\" $selected >$city</option>";
}
'dob',
t('Birthday:'),
$value,
- (((intval($age)) > 0 ) ? t('Age: ') . $age : ""),
+ (((intval($age)) > 0 ) ? L10n::t('Age: ') . $age : ""),
'',
- 'placeholder="' . t('YYYY-MM-DD or MM-DD') . '"'
+ 'placeholder="' . L10n::t('YYYY-MM-DD or MM-DD') . '"'
]
]);
/// @TODO Old-lost code?
-// if ($dob && $dob > '0001-01-01')
-// $o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),mktime(0,0,0,$month,$day,$year), 'dob');
-// else
-// $o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),false,'dob');
+ // if ($dob && $dob > '0001-01-01')
+ // $o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),mktime(0,0,0,$month,$day,$year), 'dob');
+ // else
+ // $o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),false,'dob');
return $o;
}
$abs = strtotime($localtime);
- if (is_null($posted_date) || $posted_date <= NULL_DATE || $abs === False) {
- return t('never');
+ if (is_null($posted_date) || $posted_date <= NULL_DATE || $abs === false) {
+ return L10n::t('never');
}
$etime = time() - $abs;
if ($etime < 1) {
- return t('less than a second ago');
+ return L10n::t('less than a second ago');
}
- $a = [ 12 * 30 * 24 * 60 * 60 => [ t('year'), t('years')],
- 30 * 24 * 60 * 60 => [ t('month'), t('months')],
- 7 * 24 * 60 * 60 => [ t('week'), t('weeks')],
- 24 * 60 * 60 => [ t('day'), t('days')],
- 60 * 60 => [ t('hour'), t('hours')],
- 60 => [ t('minute'), t('minutes')],
- 1 => [ t('second'), t('seconds')]
+ $a = [ 12 * 30 * 24 * 60 * 60 => [L10n::t('year'), L10n::t('years')],
+ 30 * 24 * 60 * 60 => [L10n::t('month'), L10n::t('months')],
+ 7 * 24 * 60 * 60 => [L10n::t('week'), L10n::t('weeks')],
+ 24 * 60 * 60 => [L10n::t('day'), L10n::t('days')],
+ 60 * 60 => [L10n::t('hour'), L10n::t('hours')],
+ 60 => [L10n::t('minute'), L10n::t('minutes')],
+ 1 => [L10n::t('second'), L10n::t('seconds')]
];
foreach ($a as $secs => $str) {
$r = round($d);
// translators - e.g. 22 hours ago, 1 minute ago
if (!$format) {
- $format = t('%1$d %2$s ago');
+ $format = L10n::t('%1$d %2$s ago');
}
return sprintf($format, $r, (($r == 1) ? $str[0] : $str[1]));
continue;
}
- $bdtext = sprintf( t('%s\'s birthday'), $rr['name']);
- $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]') ;
+ $bdtext = sprintf(L10n::t('%s\'s birthday'), $rr['name']);
+ $bdtext2 = sprintf(L10n::t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]') ;
q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`,`adjust`)
VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d' ) ",
// from here on everything is in the recipients language
L10n::pushLang($params['language']);
- $banner = t('Friendica Notification');
+ $banner = L10n::t('Friendica Notification');
$product = FRIENDICA_PLATFORM;
$siteurl = System::baseUrl(true);
- $thanks = t('Thank You,');
+ $thanks = L10n::t('Thank You,');
$sitename = $a->config['sitename'];
if (!x($a->config['admin_name'])) {
$site_admin = sprintf(t('%s Administrator'), $sitename);
$sender_email = $a->config['sender_email'];
if (empty($sender_email)) {
- $sender_email = t('noreply').'@'.$hostname;
+ $sender_email = L10n::t('noreply').'@'.$hostname;
}
if ($params['type'] != SYSTEM_EMAIL) {
$preamble = sprintf(t('%1$s sent you a new private message at %2$s.'), $params['source_name'], $sitename);
$epreamble = sprintf(t('%1$s sent you %2$s.'), '[url='.$params['source_link'].']'.$params['source_name'].'[/url]', '[url=$itemlink]'.t('a private message').'[/url]');
- $sitelink = t('Please visit %s to view and/or reply to your private messages.');
+ $sitelink = L10n::t('Please visit %s to view and/or reply to your private messages.');
$tsitelink = sprintf($sitelink, $siteurl.'/message/'.$params['item']['id']);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'/message/'.$params['item']['id'].'">'.$sitename.'</a>');
$itemlink = $siteurl.'/message/'.$params['item']['id'];
$preamble = sprintf(t('%s commented on an item/conversation you have been following.'), $params['source_name']);
$epreamble = $dest_str;
- $sitelink = t('Please visit %s to view and/or reply to the conversation.');
+ $sitelink = L10n::t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf($sitelink, $siteurl);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
$itemlink = $params['link'];
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
$params['link']);
- $sitelink = t('Please visit %s to view and/or reply to the conversation.');
+ $sitelink = L10n::t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf($sitelink, $siteurl);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
$itemlink = $params['link'];
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
$params['link']);
- $sitelink = t('Please visit %s to view and/or reply to the conversation.');
+ $sitelink = L10n::t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf($sitelink, $siteurl);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
$itemlink = $params['link'];
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
$params['link']);
- $sitelink = t('Please visit %s to view and/or reply to the conversation.');
+ $sitelink = L10n::t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf($sitelink, $siteurl);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
$itemlink = $params['link'];
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
$params['link']);
- $subject = str_replace('poked', t($params['activity']), $subject);
- $preamble = str_replace('poked', t($params['activity']), $preamble);
- $epreamble = str_replace('poked', t($params['activity']), $epreamble);
+ $subject = str_replace('poked', L10n::t($params['activity']), $subject);
+ $preamble = str_replace('poked', L10n::t($params['activity']), $preamble);
+ $epreamble = str_replace('poked', L10n::t($params['activity']), $epreamble);
- $sitelink = t('Please visit %s to view and/or reply to the conversation.');
+ $sitelink = L10n::t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf($sitelink, $siteurl);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
$itemlink = $params['link'];
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
$itemlink);
- $sitelink = t('Please visit %s to view and/or reply to the conversation.');
+ $sitelink = L10n::t('Please visit %s to view and/or reply to the conversation.');
$tsitelink = sprintf($sitelink, $siteurl);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
$itemlink = $params['link'];
$body = sprintf(t('You may visit their profile at %s'), $params['source_link']);
- $sitelink = t('Please visit %s to approve or reject the introduction.');
+ $sitelink = L10n::t('Please visit %s to approve or reject the introduction.');
$tsitelink = sprintf($sitelink, $siteurl);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
$itemlink = $params['link'];
'[url='.$params['item']['url'].']'.$params['item']['name'].'[/url]',
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]');
- $body = t('Name:').' '.$params['item']['name']."\n";
- $body .= t('Photo:').' '.$params['item']['photo']."\n";
+ $body = L10n::t('Name:').' '.$params['item']['name']."\n";
+ $body .= L10n::t('Photo:').' '.$params['item']['photo']."\n";
$body .= sprintf(t('You may visit their profile at %s'), $params['item']['url']);
- $sitelink = t('Please visit %s to approve or reject the suggestion.');
+ $sitelink = L10n::t('Please visit %s to approve or reject the suggestion.');
$tsitelink = sprintf($sitelink, $siteurl);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
$itemlink = $params['link'];
$itemlink,
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]');
- $body = t('You are now mutual friends and may exchange status updates, photos, and email without restriction.');
+ $body = L10n::t('You are now mutual friends and may exchange status updates, photos, and email without restriction.');
- $sitelink = t('Please visit %s if you wish to make any changes to this relationship.');
+ $sitelink = L10n::t('Please visit %s if you wish to make any changes to this relationship.');
$tsitelink = sprintf($sitelink, $siteurl);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
$itemlink = $params['link'];
$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']);
- $sitelink = t('Please visit %s if you wish to make any changes to this relationship.');
+ $sitelink = L10n::t('Please visit %s if you wish to make any changes to this relationship.');
$tsitelink = sprintf($sitelink, $siteurl);
$hsitelink = sprintf($sitelink, '<a href="'.$siteurl.'">'.$sitename.'</a>');
$itemlink = $params['link'];
$body = sprintf(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 = t('Please visit %s to approve or reject the request.');
+ $sitelink = L10n::t('Please visit %s to approve or reject the request.');
$tsitelink = sprintf($sitelink, $params['link']);
$hsitelink = sprintf($sitelink, '<a href="'.$params['link'].'">'.$sitename.'</a><br><br>');
$itemlink = $params['link'];
use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
return '';
}
- $bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8 AM.
+ $bd_format = L10n::t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8 AM.
$event_start = (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(),
$ev['start'] , $bd_format ))
$o .= "<div>" . bbcode($ev['desc']) . "</div>";
- $o .= "<h4>" . t('Starts:') . "</h4><p>" . $event_start . "</p>";
+ $o .= "<h4>" . L10n::t('Starts:') . "</h4><p>" . $event_start . "</p>";
if (! $ev['nofinish']) {
- $o .= "<h4>" . t('Finishes:') . "</h4><p>" . $event_end ."</p>";
+ $o .= "<h4>" . L10n::t('Finishes:') . "</h4><p>" . $event_end ."</p>";
}
if (strlen($ev['location'])) {
- $o .= "<h4>" . t('Location:') . "</h4><p>" . $ev['location'] . "</p>";
+ $o .= "<h4>" . L10n::t('Location:') . "</h4><p>" . $ev['location'] . "</p>";
}
return $o;
$o .= '<div class="summary event-summary">' . bbcode($ev['summary']) . '</div>' . "\r\n";
- $o .= '<div class="event-start"><span class="event-label">' . t('Starts:') . '</span> <span class="dtstart" title="'
+ $o .= '<div class="event-start"><span class="event-label">' . L10n::t('Starts:') . '</span> <span class="dtstart" title="'
. datetime_convert('UTC', 'UTC', $ev['start'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' ))
. '" >'.$event_start
. '</span></div>' . "\r\n";
if (! $ev['nofinish']) {
- $o .= '<div class="event-end" ><span class="event-label">' . t('Finishes:') . '</span> <span class="dtend" title="'
+ $o .= '<div class="event-end" ><span class="event-label">' . L10n::t('Finishes:') . '</span> <span class="dtend" title="'
. datetime_convert('UTC', 'UTC', $ev['finish'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' ))
. '" >'.$event_end
. '</span></div>' . "\r\n";
$o .= '<div class="description event-description">' . bbcode($ev['desc']) . '</div>' . "\r\n";
if (strlen($ev['location'])) {
- $o .= '<div class="event-location"><span class="event-label">' . t('Location:') . '</span> <span class="location">'
+ $o .= '<div class="event-location"><span class="event-label">' . L10n::t('Location:') . '</span> <span class="location">'
. bbcode($ev['location'])
. '</span></div>' . "\r\n";
$i18n = [
"firstDay" => $firstDay,
- "allday" => t("all-day"),
-
- "Sun" => t("Sun"),
- "Mon" => t("Mon"),
- "Tue" => t("Tue"),
- "Wed" => t("Wed"),
- "Thu" => t("Thu"),
- "Fri" => t("Fri"),
- "Sat" => t("Sat"),
-
- "Sunday" => t("Sunday"),
- "Monday" => t("Monday"),
- "Tuesday" => t("Tuesday"),
- "Wednesday" => t("Wednesday"),
- "Thursday" => t("Thursday"),
- "Friday" => t("Friday"),
- "Saturday" => t("Saturday"),
-
- "Jan" => t("Jan"),
- "Feb" => t("Feb"),
- "Mar" => t("Mar"),
- "Apr" => t("Apr"),
- "May" => t("May"),
- "Jun" => t("Jun"),
- "Jul" => t("Jul"),
- "Aug" => t("Aug"),
- "Sep" => t("Sept"),
- "Oct" => t("Oct"),
- "Nov" => t("Nov"),
- "Dec" => t("Dec"),
-
- "January" => t("January"),
- "February" => t("February"),
- "March" => t("March"),
- "April" => t("April"),
- "May" => t("May"),
- "June" => t("June"),
- "July" => t("July"),
- "August" => t("August"),
- "September" => t("September"),
- "October" => t("October"),
- "November" => t("November"),
- "December" => t("December"),
-
- "today" => t("today"),
- "month" => t("month"),
- "week" => t("week"),
- "day" => t("day"),
-
- "noevent" => t("No events to display"),
-
- "dtstart_label" => t("Starts:"),
- "dtend_label" => t("Finishes:"),
- "location_label" => t("Location:")
+ "allday" => L10n::t("all-day"),
+
+ "Sun" => L10n::t("Sun"),
+ "Mon" => L10n::t("Mon"),
+ "Tue" => L10n::t("Tue"),
+ "Wed" => L10n::t("Wed"),
+ "Thu" => L10n::t("Thu"),
+ "Fri" => L10n::t("Fri"),
+ "Sat" => L10n::t("Sat"),
+
+ "Sunday" => L10n::t("Sunday"),
+ "Monday" => L10n::t("Monday"),
+ "Tuesday" => L10n::t("Tuesday"),
+ "Wednesday" => L10n::t("Wednesday"),
+ "Thursday" => L10n::t("Thursday"),
+ "Friday" => L10n::t("Friday"),
+ "Saturday" => L10n::t("Saturday"),
+
+ "Jan" => L10n::t("Jan"),
+ "Feb" => L10n::t("Feb"),
+ "Mar" => L10n::t("Mar"),
+ "Apr" => L10n::t("Apr"),
+ "May" => L10n::t("May"),
+ "Jun" => L10n::t("Jun"),
+ "Jul" => L10n::t("Jul"),
+ "Aug" => L10n::t("Aug"),
+ "Sep" => L10n::t("Sept"),
+ "Oct" => L10n::t("Oct"),
+ "Nov" => L10n::t("Nov"),
+ "Dec" => L10n::t("Dec"),
+
+ "January" => L10n::t("January"),
+ "February" => L10n::t("February"),
+ "March" => L10n::t("March"),
+ "April" => L10n::t("April"),
+ "May" => L10n::t("May"),
+ "June" => L10n::t("June"),
+ "July" => L10n::t("July"),
+ "August" => L10n::t("August"),
+ "September" => L10n::t("September"),
+ "October" => L10n::t("October"),
+ "November" => L10n::t("November"),
+ "December" => L10n::t("December"),
+
+ "today" => L10n::t("today"),
+ "month" => L10n::t("month"),
+ "week" => L10n::t("week"),
+ "day" => L10n::t("day"),
+
+ "noevent" => L10n::t("No events to display"),
+
+ "dtstart_label" => L10n::t("Starts:"),
+ "dtend_label" => L10n::t("Finishes:"),
+ "location_label" => L10n::t("Location:")
];
return $i18n;
$events=[];
$last_date = '';
- $fmt = t('l, F j');
+ $fmt = L10n::t('l, F j');
if (count($arr)) {
foreach ($arr as $rr) {
$j = (($rr['adjust']) ? datetime_convert('UTC', date_default_timezone_get(), $rr['start'], 'j') : datetime_convert('UTC', 'UTC', $rr['start'], 'j'));
$copy = null;
$drop = null;
if (local_user() && local_user() == $rr['uid'] && $rr['type'] == 'event') {
- $edit = ((! $rr['cid']) ? [System::baseUrl() . '/events/event/' . $rr['id'], t('Edit event'), '', ''] : null);
- $copy = ((! $rr['cid']) ? [System::baseUrl() . '/events/copy/' . $rr['id'], t('Duplicate event'), '', ''] : null);
- $drop = [System::baseUrl() . '/events/drop/' . $rr['id'], t('Delete event'), '', ''];
+ $edit = ((! $rr['cid']) ? [System::baseUrl() . '/events/event/' . $rr['id'], L10n::t('Edit event'), '', ''] : null);
+ $copy = ((! $rr['cid']) ? [System::baseUrl() . '/events/copy/' . $rr['id'], L10n::t('Duplicate event'), '', ''] : null);
+ $drop = [System::baseUrl() . '/events/drop/' . $rr['id'], L10n::t('Delete event'), '', ''];
}
$title = strip_tags(html_entity_decode(bbcode($rr['summary']), ENT_QUOTES, 'UTF-8'));
'is_first' => $is_first,
'item' => $rr,
'html' => $html,
- 'plink' => [$rr['plink'], t('link to source'), '', ''],
+ 'plink' => [$rr['plink'], L10n::t('link to source'), '', ''],
];
}
}
}
return replace_macros(get_markup_template("events_aside.tpl"), [
- '$etitle' => t("Export"),
- '$export_ical' => t("Export calendar as ical"),
- '$export_csv' => t("Export calendar as csv"),
+ '$etitle' => L10n::t("Export"),
+ '$export_ical' => L10n::t("Export calendar as ical"),
+ '$export_csv' => L10n::t("Export calendar as csv"),
'$user' => $user
]);
}
$finish = false;
// Set the different time formats.
- $dformat = t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8:01 AM.
- $dformat_short = t('D g:i A'); // Fri 8:01 AM.
- $tformat = t('g:i A'); // 8:01 AM.
+ $dformat = L10n::t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8:01 AM.
+ $dformat_short = L10n::t('D g:i A'); // Fri 8:01 AM.
+ $tformat = L10n::t('g:i A'); // 8:01 AM.
// Convert the time to different formats.
$dtstart_dt = (($item['event-adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $item['event-start'], $dformat)) : day_translate(datetime_convert('UTC', 'UTC', $item['event-start'], $dformat)));
$event = replace_macros(get_markup_template('event_stream_item.tpl'), [
'$id' => $item['event-id'],
'$title' => prepare_text($item['event-summary']),
- '$dtstart_label' => t('Starts:'),
+ '$dtstart_label' => L10n::t('Starts:'),
'$dtstart_title' => $dtstart_title,
'$dtstart_dt' => $dtstart_dt,
'$finish' => $finish,
- '$dtend_label' => t('Finishes:'),
+ '$dtend_label' => L10n::t('Finishes:'),
'$dtend_title' => $dtend_title,
'$dtend_dt' => $dtend_dt,
'$month_short' => $month_short,
'$author_link' => $profile_link,
'$author_avatar' => $item['author-avatar'],
'$description' => prepare_text($item['event-desc']),
- '$location_label' => t('Location:'),
- '$show_map_label' => t('Show map'),
- '$hide_map_label' => t('Hide map'),
- '$map_btn_label' => t('Show map'),
+ '$location_label' => L10n::t('Location:'),
+ '$show_map_label' => L10n::t('Show map'),
+ '$hide_map_label' => L10n::t('Hide map'),
+ '$map_btn_label' => L10n::t('Show map'),
'$location' => $location
]);
use Friendica\Content\Feature;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Core\System;
'to_email' => $r[0]['email'],
'uid' => $r[0]['uid'],
'link' => System::baseUrl() . '/notifications/intro',
- 'source_name' => ((strlen(stripslashes($contact_record['name']))) ? stripslashes($contact_record['name']) : t('[Name Withheld]')),
+ 'source_name' => ((strlen(stripslashes($contact_record['name']))) ? stripslashes($contact_record['name']) : L10n::t('[Name Withheld]')),
'source_link' => $contact_record['url'],
'source_photo' => $contact_record['photo'],
'verb' => ($sharing ? ACTIVITY_FRIEND : ACTIVITY_FOLLOW),
);
if (!DBM::is_result($r)) {
- notice(t('Item not found.') . EOL);
+ notice(L10n::t('Item not found.') . EOL);
goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
}
return replace_macros(get_markup_template('confirm.tpl'), [
'$method' => 'get',
- '$message' => t('Do you really want to delete this item?'),
+ '$message' => L10n::t('Do you really want to delete this item?'),
'$extra_inputs' => $inputs,
- '$confirm' => t('Yes'),
+ '$confirm' => L10n::t('Yes'),
'$confirm_url' => $query['base'],
'$confirm_name' => 'confirmed',
- '$cancel' => t('Cancel'),
+ '$cancel' => L10n::t('Cancel'),
]);
}
// Now check how the user responded to the confirmation query
goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
//NOTREACHED
} else {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
//NOTREACHED
}
$cutoff = ((array_key_exists($cutoff_year, $ret))? true : false);
$o = replace_macros(get_markup_template('posted_date_widget.tpl'),[
- '$title' => t('Archives'),
+ '$title' => L10n::t('Archives'),
'$size' => $visible_years,
'$cutoff_year' => $cutoff_year,
'$cutoff' => $cutoff,
'$url' => $url,
'$dates' => $ret,
- '$showmore' => t('show more')
+ '$showmore' => L10n::t('show more')
]);
return $o;
<?php
-
+/**
+ * @file include/like.php
+ */
use Friendica\App;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
switch ($verb) {
case 'like':
- $bodyverb = t('%1$s likes %2$s\'s %3$s');
+ $bodyverb = L10n::t('%1$s likes %2$s\'s %3$s');
$activity = ACTIVITY_LIKE;
break;
case 'unlike':
- $bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s');
+ $bodyverb = L10n::t('%1$s doesn\'t like %2$s\'s %3$s');
$activity = ACTIVITY_LIKE;
break;
case 'dislike':
case 'undislike':
- $bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s');
+ $bodyverb = L10n::t('%1$s doesn\'t like %2$s\'s %3$s');
$activity = ACTIVITY_DISLIKE;
break;
case 'attendyes':
case 'unattendyes':
- $bodyverb = t('%1$s is attending %2$s\'s %3$s');
+ $bodyverb = L10n::t('%1$s is attending %2$s\'s %3$s');
$activity = ACTIVITY_ATTEND;
break;
case 'attendno':
case 'unattendno':
- $bodyverb = t('%1$s is not attending %2$s\'s %3$s');
+ $bodyverb = L10n::t('%1$s is not attending %2$s\'s %3$s');
$activity = ACTIVITY_ATTENDNO;
break;
case 'attendmaybe':
case 'unattendmaybe':
- $bodyverb = t('%1$s may attend %2$s\'s %3$s');
+ $bodyverb = L10n::t('%1$s may attend %2$s\'s %3$s');
$activity = ACTIVITY_ATTENDMAYBE;
break;
default:
}
// Else or if event verb different from existing row, create a new item row
- $post_type = (($item['resource-id']) ? t('photo') : t('status'));
+ $post_type = (($item['resource-id']) ? L10n::t('photo') : L10n::t('status'));
if ($item['object-type'] === ACTIVITY_OBJ_EVENT) {
- $post_type = t('event');
+ $post_type = L10n::t('event');
}
$objtype = $item['resource-id'] ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ;
$link = xmlify('<link rel="alternate" type="text/html" href="' . System::baseUrl() . '/display/' . $owner_self_contact['nick'] . '/' . $item['id'] . '" />' . "\n") ;
*/
use Friendica\App;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Network\Probe;
$mtch[0],
'[img=' . $new_width . 'x' . $new_height. ']' . $scaled . '[/img]'
. "\n" . (($include_link)
- ? '[url=' . $mtch[1] . ']' . t('view full size') . '[/url]' . "\n"
+ ? '[url=' . $mtch[1] . ']' . L10n::t('view full size') . '[/url]' . "\n"
: ''),
$s
);
<?php
-
+/**
+ * @file include/security.php
+ */
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
function check_form_security_std_err_msg()
{
- return t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before submitting it.') . EOL;
+ return L10n::t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before submitting it.') . EOL;
}
function check_form_security_token_redirectOnErr($err_redirect, $typename = '', $formname = 'form_security_token')
<?php
-
/**
* @file include/tags.php
*/
use Friendica\App;
use Friendica\Content\Feature;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
$tpl = get_markup_template('tagblock_widget.tpl');
$o = replace_macros($tpl, [
- '$title' => t('Tags'),
+ '$title' => L10n::t('Tags'),
'$tags' => $tags
]);
}
use Friendica\Content\Smilies;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
if (!is_null($count)) {
// minimal pager (newer / older)
$data['class'] = 'pager';
- _l($data, 'prev', $url . '&page=' . ($a->pager['page'] - 1), t('newer'), 'previous' . ($a->pager['page'] == 1 ? ' disabled' : ''));
- _l($data, 'next', $url . '&page=' . ($a->pager['page'] + 1), t('older'), 'next' . ($count <= 0 ? ' disabled' : ''));
+ _l($data, 'prev', $url . '&page=' . ($a->pager['page'] - 1), L10n::t('newer'), 'previous' . ($a->pager['page'] == 1 ? ' disabled' : ''));
+ _l($data, 'next', $url . '&page=' . ($a->pager['page'] + 1), L10n::t('older'), 'next' . ($count <= 0 ? ' disabled' : ''));
} else {
// full pager (first / prev / 1 / 2 / ... / 14 / 15 / next / last)
$data['class'] = 'pagination';
if ($a->pager['total'] > $a->pager['itemspage']) {
- _l($data, 'first', $url . '&page=1', t('first'), $a->pager['page'] == 1 ? 'disabled' : '');
- _l($data, 'prev', $url . '&page=' . ($a->pager['page'] - 1), t('prev'), $a->pager['page'] == 1 ? 'disabled' : '');
+ _l($data, 'first', $url . '&page=1', L10n::t('first'), $a->pager['page'] == 1 ? 'disabled' : '');
+ _l($data, 'prev', $url . '&page=' . ($a->pager['page'] - 1), L10n::t('prev'), $a->pager['page'] == 1 ? 'disabled' : '');
$numpages = $a->pager['total'] / $a->pager['itemspage'];
$data['pages'] = $pages;
$lastpage = (($numpages > intval($numpages)) ? intval($numpages)+1 : $numpages);
- _l($data, 'next', $url . '&page=' . ($a->pager['page'] + 1), t('next'), $a->pager['page'] == $lastpage ? 'disabled' : '');
- _l($data, 'last', $url . '&page=' . $lastpage, t('last'), $a->pager['page'] == $lastpage ? 'disabled' : '');
+ _l($data, 'next', $url . '&page=' . ($a->pager['page'] + 1), L10n::t('next'), $a->pager['page'] == $lastpage ? 'disabled' : '');
+ _l($data, 'last', $url . '&page=' . $lastpage, L10n::t('last'), $a->pager['page'] == $lastpage ? 'disabled' : '');
}
}
function scroll_loader() {
$tpl = get_markup_template("scroll_loader.tpl");
return replace_macros($tpl, [
- 'wait' => t('Loading more entries...'),
- 'end' => t('The end')
+ 'wait' => L10n::t('Loading more entries...'),
+ 'end' => L10n::t('The end')
]);
}
$total = intval($r[0]['total']);
}
if (!$total) {
- $contacts = t('No contacts');
+ $contacts = L10n::t('No contacts');
$micropro = null;
} else {
// Splitting the query in two parts makes it much faster
$o = replace_macros($tpl, [
'$contacts' => $contacts,
'$nickname' => $a->profile['nickname'],
- '$viewcontacts' => t('View Contacts'),
+ '$viewcontacts' => L10n::t('View Contacts'),
'$micropro' => $micropro,
]);
if (strpos($s, '#') === 0) {
$mode = 'tag';
}
- $save_label = $mode === 'text' ? t('Save') : t('Follow');
+ $save_label = $mode === 'text' ? L10n::t('Save') : L10n::t('Follow');
$values = [
'$s' => htmlspecialchars($s),
'$id' => $id,
'$action_url' => $url,
- '$search_label' => t('Search'),
+ '$search_label' => L10n::t('Search'),
'$save_label' => $save_label,
'$savedsearch' => Feature::isEnabled(local_user(),'savedsearch'),
- '$search_hint' => t('@name, !forum, #tags, content'),
+ '$search_hint' => L10n::t('@name, !forum, #tags, content'),
'$mode' => $mode
];
t("Contacts")];
if (Config::get('system','poco_local_search')) {
- $values['$searchoption'][] = t("Forums");
+ $values['$searchoption'][] = L10n::t("Forums");
}
}
// value is array containing past tense verb, translation of present, translation of past
$arr = [
- 'poke' => ['poked', t('poke'), t('poked')],
- 'ping' => ['pinged', t('ping'), t('pinged')],
- 'prod' => ['prodded', t('prod'), t('prodded')],
- 'slap' => ['slapped', t('slap'), t('slapped')],
- 'finger' => ['fingered', t('finger'), t('fingered')],
- 'rebuff' => ['rebuffed', t('rebuff'), t('rebuffed')],
+ 'poke' => ['poked', L10n::t('poke'), L10n::t('poked')],
+ 'ping' => ['pinged', L10n::t('ping'), L10n::t('pinged')],
+ 'prod' => ['prodded', L10n::t('prod'), L10n::t('prodded')],
+ 'slap' => ['slapped', L10n::t('slap'), L10n::t('slapped')],
+ 'finger' => ['fingered', L10n::t('finger'), L10n::t('fingered')],
+ 'rebuff' => ['rebuffed', L10n::t('rebuff'), L10n::t('rebuffed')],
];
Addon::callHooks('poke_verbs', $arr);
return $arr;
*/
function day_translate($s) {
$ret = str_replace(['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
- [t('Monday'), t('Tuesday'), t('Wednesday'), t('Thursday'), t('Friday'), t('Saturday'), t('Sunday')],
+ [L10n::t('Monday'), L10n::t('Tuesday'), L10n::t('Wednesday'), L10n::t('Thursday'), L10n::t('Friday'), L10n::t('Saturday'), L10n::t('Sunday')],
$s);
$ret = str_replace(['January','February','March','April','May','June','July','August','September','October','November','December'],
- [t('January'), t('February'), t('March'), t('April'), t('May'), t('June'), t('July'), t('August'), t('September'), t('October'), t('November'), t('December')],
+ [L10n::t('January'), L10n::t('February'), L10n::t('March'), L10n::t('April'), L10n::t('May'), L10n::t('June'), L10n::t('July'), L10n::t('August'), L10n::t('September'), L10n::t('October'), L10n::t('November'), L10n::t('December')],
$ret);
return $ret;
*/
function day_short_translate($s) {
$ret = str_replace(['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
- [t('Mon'), t('Tue'), t('Wed'), t('Thu'), t('Fri'), t('Sat'), t('Sun')],
+ [L10n::t('Mon'), L10n::t('Tue'), L10n::t('Wed'), L10n::t('Thu'), L10n::t('Fri'), L10n::t('Sat'), L10n::t('Sun')],
$s);
$ret = str_replace(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov','Dec'],
- [t('Jan'), t('Feb'), t('Mar'), t('Apr'), t('May'), ('Jun'), t('Jul'), t('Aug'), t('Sep'), t('Oct'), t('Nov'), t('Dec')],
+ [L10n::t('Jan'), L10n::t('Feb'), L10n::t('Mar'), L10n::t('Apr'), L10n::t('May'), ('Jun'), L10n::t('Jul'), L10n::t('Aug'), L10n::t('Sep'), L10n::t('Oct'), L10n::t('Nov'), L10n::t('Dec')],
$ret);
return $ret;
}
$as .= replace_macros(get_markup_template('video_top.tpl'), [
'$video' => [
'id' => $id,
- 'title' => t('View Video'),
+ 'title' => L10n::t('View Video'),
'src' => $the_url,
'mime' => $mime,
],
}
$title = ((strlen(trim($mtch[4]))) ? escape_tags(trim($mtch[4])) : escape_tags($mtch[1]));
- $title .= ' ' . $mtch[2] . ' ' . t('bytes');
+ $title .= ' ' . $mtch[2] . ' ' . L10n::t('bytes');
$icon = '<div class="attachtype icon s22 type-' . $filetype . ' subtype-' . $filesubtype . '"></div>';
$as .= '<a href="' . strip_tags($the_url) . '" title="' . $title . '" class="attachlink" target="_blank" >' . $icon . '</a>';
while ((strpos($s, $spoilersearch) !== false)) {
$pos = strpos($s, $spoilersearch);
$rnd = random_string(8);
- $spoilerreplace = '<br /> <span id="spoiler-wrap-' . $rnd . '" class="spoiler-wrap fakelink" onclick="openClose(\'spoiler-' . $rnd . '\');">' . sprintf(t('Click to open/close')) . '</span>'.
+ $spoilerreplace = '<br /> <span id="spoiler-wrap-' . $rnd . '" class="spoiler-wrap fakelink" onclick="openClose(\'spoiler-' . $rnd . '\');">' . sprintf(L10n::t('Click to open/close')) . '</span>'.
'<blockquote class="spoiler" id="spoiler-' . $rnd . '" style="display: none;">';
$s = substr($s, 0, $pos) . $spoilerreplace . substr($s, $pos + strlen($spoilersearch));
}
while ((strpos($s, $authorsearch) !== false)) {
$pos = strpos($s, $authorsearch);
$rnd = random_string(8);
- $authorreplace = '<br /> <span id="author-wrap-' . $rnd . '" class="author-wrap fakelink" onclick="openClose(\'author-' . $rnd . '\');">' . sprintf(t('Click to open/close')) . '</span>'.
+ $authorreplace = '<br /> <span id="author-wrap-' . $rnd . '" class="author-wrap fakelink" onclick="openClose(\'author-' . $rnd . '\');">' . sprintf(L10n::t('Click to open/close')) . '</span>'.
'<blockquote class="author" id="author-' . $rnd . '" style="display: block;">';
$s = substr($s, 0, $pos) . $authorreplace . substr($s, $pos + strlen($authorsearch));
}
//'href' => "display/" . $a->user['nickname'] . "/" . $item['id'],
'href' => "display/" . $item['guid'],
'orig' => "display/" . $item['guid'],
- 'title' => t('View on separate page'),
- 'orig_title' => t('view on separate page'),
+ 'title' => L10n::t('View on separate page'),
+ 'orig_title' => L10n::t('view on separate page'),
];
if (x($item, 'plink')) {
$ret["href"] = $a->remove_baseurl($item['plink']);
- $ret["title"] = t('link to source');
+ $ret["title"] = L10n::t('link to source');
}
} elseif (x($item, 'plink') && ($item['private'] != 1)) {
$ret = [
'href' => $item['plink'],
'orig' => $item['plink'],
- 'title' => t('link to source'),
+ 'title' => L10n::t('link to source'),
];
} else {
$ret = [];
*/
function item_post_type($item) {
if (intval($item['event-id'])) {
- return t('event');
+ return L10n::t('event');
} elseif (strlen($item['resource-id'])) {
- return t('photo');
+ return L10n::t('photo');
} elseif (strlen($item['verb']) && $item['verb'] !== ACTIVITY_POST) {
- return t('activity');
+ return L10n::t('activity');
} elseif ($item['id'] != $item['parent']) {
- return t('comment');
+ return L10n::t('comment');
}
- return t('post');
+ return L10n::t('post');
}
// post categories and "save to file" use the same item.file table for storage.
if (!strlen($saved) || !stristr($saved, '[' . file_tag_encode($file) . ']')) {
PConfig::set($uid, 'system', 'filetags', $saved . '[' . file_tag_encode($file) . ']');
}
- info(t('Item filed'));
+ info(L10n::t('Item filed'));
}
return true;
}
if (is_array($a->addons) && in_array($a->module, $a->addons) && file_exists("addon/{$a->module}/{$a->module}.php")) {
//Check if module is an app and if public access to apps is allowed or not
if ((!local_user()) && Addon::isApp($a->module) && $privateapps === "1") {
- info(t("You must be logged in to use addons. "));
+ info(L10n::t("You must be logged in to use addons. "));
} else {
include_once "addon/{$a->module}/{$a->module}.php";
if (function_exists($a->module . '_module')) {
}
logger('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], LOGGER_DEBUG);
- header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . t('Not Found'));
+ header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . L10n::t('Not Found'));
$tpl = get_markup_template("404.tpl");
$a->page['content'] = replace_macros(
$tpl,
[
- '$message' => t('Page not found.')]
+ '$message' => L10n::t('Page not found.')]
);
}
}
* now that we've been through the module content, see if the page reported
* a permission problem and if so, a 403 response would seem to be in order.
*/
-if (stristr(implode("", $_SESSION['sysmsg']), t('Permission denied'))) {
- header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.'));
+if (stristr(implode("", $_SESSION['sysmsg']), L10n::t('Permission denied'))) {
+ header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . L10n::t('Permission denied.'));
}
/*
get_markup_template("toggle_mobile_footer.tpl"),
[
'$toggle_link' => $link,
- '$toggle_text' => t('toggle mobile')]
+ '$toggle_text' => L10n::t('toggle mobile')]
);
}
$a->page = $orig_page;
}
- info(t('Theme settings updated.'));
+ info(L10n::t('Theme settings updated.'));
if (is_ajax()) {
return;
}
// array(url, name, extra css classes)
// not part of $aside to make the template more adjustable
$aside_sub = [
- 'site' => ["admin/site/" , t("Site") , "site"],
- 'users' => ["admin/users/" , t("Users") , "users"],
- 'addons' => ["admin/addons/" , t("Addons") , "addons"],
- 'themes' => ["admin/themes/" , t("Themes") , "themes"],
- 'features' => ["admin/features/" , t("Additional features") , "features"],
- 'dbsync' => ["admin/dbsync/" , t('DB updates') , "dbsync"],
- 'queue' => ["admin/queue/" , t('Inspect Queue') , "queue"],
- 'contactblock' => ["admin/contactblock/", t('Contact Blocklist') , "contactblock"],
- 'blocklist' => ["admin/blocklist/" , t('Server Blocklist') , "blocklist"],
- 'federation' => ["admin/federation/" , t('Federation Statistics'), "federation"],
- 'deleteitem' => ["admin/deleteitem/" , t('Delete Item') , 'deleteitem'],
+ 'site' => ["admin/site/" , L10n::t("Site") , "site"],
+ 'users' => ["admin/users/" , L10n::t("Users") , "users"],
+ 'addons' => ["admin/addons/" , L10n::t("Addons") , "addons"],
+ 'themes' => ["admin/themes/" , L10n::t("Themes") , "themes"],
+ 'features' => ["admin/features/" , L10n::t("Additional features") , "features"],
+ 'dbsync' => ["admin/dbsync/" , L10n::t('DB updates') , "dbsync"],
+ 'queue' => ["admin/queue/" , L10n::t('Inspect Queue') , "queue"],
+ 'contactblock' => ["admin/contactblock/", L10n::t('Contact Blocklist') , "contactblock"],
+ 'blocklist' => ["admin/blocklist/" , L10n::t('Server Blocklist') , "blocklist"],
+ 'federation' => ["admin/federation/" , L10n::t('Federation Statistics'), "federation"],
+ 'deleteitem' => ["admin/deleteitem/" , L10n::t('Delete Item') , 'deleteitem'],
];
/* get addons admin page */
$a->addons_admin[] = $addon;
}
- $aside_tools['logs'] = ["admin/logs/", t("Logs"), "logs"];
- $aside_tools['viewlogs'] = ["admin/viewlogs/", t("View Logs"), 'viewlogs'];
- $aside_tools['diagnostics_probe'] = ['probe/', t('probe address'), 'probe'];
- $aside_tools['diagnostics_webfinger'] = ['webfinger/', t('check webfinger'), 'webfinger'];
+ $aside_tools['logs'] = ["admin/logs/", L10n::t("Logs"), "logs"];
+ $aside_tools['viewlogs'] = ["admin/viewlogs/", L10n::t("View Logs"), 'viewlogs'];
+ $aside_tools['diagnostics_probe'] = ['probe/', L10n::t('probe address'), 'probe'];
+ $aside_tools['diagnostics_webfinger'] = ['webfinger/', L10n::t('check webfinger'), 'webfinger'];
$t = get_markup_template('admin/aside.tpl');
$a->page['aside'] .= replace_macros($t, [
'$admin' => $aside_tools,
'$subpages' => $aside_sub,
- '$admtxt' => t('Admin'),
- '$plugadmtxt' => t('Addon Features'),
- '$logtxt' => t('Logs'),
- '$diagnosticstxt' => t('diagnostics'),
- '$h_pending' => t('User registrations waiting for confirmation'),
+ '$admtxt' => L10n::t('Admin'),
+ '$plugadmtxt' => L10n::t('Addon Features'),
+ '$logtxt' => L10n::t('Logs'),
+ '$diagnosticstxt' => L10n::t('diagnostics'),
+ '$h_pending' => L10n::t('User registrations waiting for confirmation'),
'$admurl' => "admin/"
]);
$o = admin_page_deleteitem($a);
break;
default:
- notice(t("Item not found."));
+ notice(L10n::t("Item not found."));
}
} else {
$o = admin_page_summary($a);
if (is_array($blocklist)) {
foreach ($blocklist as $id => $b) {
$blocklistform[] = [
- 'domain' => ["domain[$id]", t('Blocked domain'), $b['domain'], '', t('The blocked domain'), 'required', '', ''],
- 'reason' => ["reason[$id]", t("Reason for the block"), $b['reason'], t('The reason why you blocked this domain.') . '(' . $b['domain'] . ')', 'required', '', ''],
- 'delete' => ["delete[$id]", t("Delete domain") . ' (' . $b['domain'] . ')', False, t("Check to delete this entry from the blocklist")]
+ 'domain' => ["domain[$id]", L10n::t('Blocked domain'), $b['domain'], '', L10n::t('The blocked domain'), 'required', '', ''],
+ 'reason' => ["reason[$id]", L10n::t("Reason for the block"), $b['reason'], L10n::t('The reason why you blocked this domain.') . '(' . $b['domain'] . ')', 'required', '', ''],
+ 'delete' => ["delete[$id]", L10n::t("Delete domain") . ' (' . $b['domain'] . ')', false, L10n::t("Check to delete this entry from the blocklist")]
];
}
}
$t = get_markup_template('admin/blocklist.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Server Blocklist'),
- '$intro' => t('This page can be used to define a black list of servers from the federated network that are not allowed to interact with your node. For all entered domains you should also give a reason why you have blocked the remote server.'),
- '$public' => t('The list of blocked servers will be made publically available on the /friendica page so that your users and people investigating communication problems can find the reason easily.'),
- '$addtitle' => t('Add new entry to block list'),
- '$newdomain' => ['newentry_domain', t('Server Domain'), '', t('The domain of the new server to add to the block list. Do not include the protocol.'), 'required', '', ''],
- '$newreason' => ['newentry_reason', t('Block reason'), '', t('The reason why you blocked this domain.'), 'required', '', ''],
- '$submit' => t('Add Entry'),
- '$savechanges' => t('Save changes to the blocklist'),
- '$currenttitle' => t('Current Entries in the Blocklist'),
- '$thurl' => t('Blocked domain'),
- '$threason' => t('Reason for the block'),
- '$delentry' => t('Delete entry from blocklist'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Server Blocklist'),
+ '$intro' => L10n::t('This page can be used to define a black list of servers from the federated network that are not allowed to interact with your node. For all entered domains you should also give a reason why you have blocked the remote server.'),
+ '$public' => L10n::t('The list of blocked servers will be made publically available on the /friendica page so that your users and people investigating communication problems can find the reason easily.'),
+ '$addtitle' => L10n::t('Add new entry to block list'),
+ '$newdomain' => ['newentry_domain', L10n::t('Server Domain'), '', L10n::t('The domain of the new server to add to the block list. Do not include the protocol.'), 'required', '', ''],
+ '$newreason' => ['newentry_reason', L10n::t('Block reason'), '', L10n::t('The reason why you blocked this domain.'), 'required', '', ''],
+ '$submit' => L10n::t('Add Entry'),
+ '$savechanges' => L10n::t('Save changes to the blocklist'),
+ '$currenttitle' => L10n::t('Current Entries in the Blocklist'),
+ '$thurl' => L10n::t('Blocked domain'),
+ '$threason' => L10n::t('Reason for the block'),
+ '$delentry' => L10n::t('Delete entry from blocklist'),
'$entries' => $blocklistform,
'$baseurl' => System::baseUrl(true),
- '$confirm_delete' => t('Delete entry from blocklist?'),
+ '$confirm_delete' => L10n::t('Delete entry from blocklist?'),
'$form_security_token' => get_form_security_token("admin_blocklist")
]);
}
'reason' => notags(trim($_POST['newentry_reason']))
];
Config::set('system', 'blocklist', $blocklist);
- info(t('Server added to blocklist.') . EOL);
+ info(L10n::t('Server added to blocklist.') . EOL);
} else {
// Edit the entries from blocklist
$blocklist = [];
}
}
Config::set('system', 'blocklist', $blocklist);
- info(t('Site blocklist updated.') . EOL);
+ info(L10n::t('Site blocklist updated.') . EOL);
}
goaway('admin/blocklist');
$contact_id = Contact::getIdForURL($contact_url, 0);
if ($contact_id) {
Contact::block($contact_id);
- notice(t('The contact has been blocked from the node'));
+ notice(L10n::t('The contact has been blocked from the node'));
} else {
- notice(t('Could not find any contact entry for this URL (%s)', $contact_url));
+ notice(L10n::t('Could not find any contact entry for this URL (%s)', $contact_url));
}
}
if (x($_POST, 'page_contactblock_unblock')) {
$t = get_markup_template('admin/contactblock.tpl');
$o = replace_macros($t, [
// strings //
- '$title' => t('Administration'),
- '$page' => t('Remote Contact Blocklist'),
- '$description' => t('This page allows you to prevent any message from a remote contact to reach your node.'),
- '$submit' => t('Block Remote Contact'),
- '$select_all' => t('select all'),
- '$select_none' => t('select none'),
- '$block' => t('Block'),
- '$unblock' => t('Unblock'),
- '$no_data' => t('No remote contact is blocked from this node.'),
-
- '$h_contacts' => t('Blocked Remote Contacts'),
- '$h_newblock' => t('Block New Remote Contact'),
- '$th_contacts' => [t('Photo'), t('Name'), t('Address'), t('Profile URL')],
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Remote Contact Blocklist'),
+ '$description' => L10n::t('This page allows you to prevent any message from a remote contact to reach your node.'),
+ '$submit' => L10n::t('Block Remote Contact'),
+ '$select_all' => L10n::t('select all'),
+ '$select_none' => L10n::t('select none'),
+ '$block' => L10n::t('Block'),
+ '$unblock' => L10n::t('Unblock'),
+ '$no_data' => L10n::t('No remote contact is blocked from this node.'),
+
+ '$h_contacts' => L10n::t('Blocked Remote Contacts'),
+ '$h_newblock' => L10n::t('Block New Remote Contact'),
+ '$th_contacts' => [L10n::t('Photo'), L10n::t('Name'), L10n::t('Address'), L10n::t('Profile URL')],
'$form_security_token' => get_form_security_token("admin_contactblock"),
'$contacts' => $contacts,
'$total_contacts' => tt('%s total blocked contact', '%s total blocked contacts', $total),
'$paginate' => paginate($a),
- '$contacturl' => ['contact_url', t("Profile URL"), '', t("URL of the remote contact to block.")],
+ '$contacturl' => ['contact_url', L10n::t("Profile URL"), '', L10n::t("URL of the remote contact to block.")],
]);
return $o;
}
$t = get_markup_template('admin/deleteitem.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Delete Item'),
- '$submit' => t('Delete this Item'),
- '$intro1' => t('On this page you can delete an item from your node. If the item is a top level posting, the entire thread will be deleted.'),
- '$intro2' => t('You need to know the GUID of the item. You can find it e.g. by looking at the display URL. The last part of http://example.com/display/123456 is the GUID, here 123456.'),
- '$deleteitemguid' => ['deleteitemguid', t("GUID"), '', t("The GUID of the item you want to delete."), 'required', 'autofocus'],
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Delete Item'),
+ '$submit' => L10n::t('Delete this Item'),
+ '$intro1' => L10n::t('On this page you can delete an item from your node. If the item is a top level posting, the entire thread will be deleted.'),
+ '$intro2' => L10n::t('You need to know the GUID of the item. You can find it e.g. by looking at the display URL. The last part of http://example.com/display/123456 is the GUID, here 123456.'),
+ '$deleteitemguid' => ['deleteitemguid', L10n::t("GUID"), '', L10n::t("The GUID of the item you want to delete."), 'required', 'autofocus'],
'$baseurl' => System::baseUrl(),
'$form_security_token' => get_form_security_token("admin_deleteitem")
]);
dba::close($r);
}
- info(t('Item marked for deletion.') . EOL);
+ info(L10n::t('Item marked for deletion.') . EOL);
goaway('admin/deleteitem');
return; // NOTREACHED
}
// to the version string for the displayed list.
foreach ($v as $key => $value) {
if ($v[$key]['version'] == '') {
- $v[$key] = ['total' => $v[$key]['total'], 'version' => t('unknown')];
+ $v[$key] = ['total' => $v[$key]['total'], 'version' => L10n::t('unknown')];
}
}
// in the DB the Diaspora versions have the format x.x.x.x-xx the last
}
// some helpful text
- $intro = t('This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of.');
- $hint = t('The <em>Auto Discovered Contact Directory</em> feature is not enabled, it will improve the data displayed here.');
+ $intro = L10n::t('This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of.');
+ $hint = L10n::t('The <em>Auto Discovered Contact Directory</em> feature is not enabled, it will improve the data displayed here.');
// load the template, replace the macros and return the page content
$t = get_markup_template('admin/federation.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Federation Statistics'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Federation Statistics'),
'$intro' => $intro,
'$hint' => $hint,
'$autoactive' => Config::get('system', 'poco_completion'),
'$counts' => $counts,
'$version' => FRIENDICA_VERSION,
- '$legendtext' => t('Currently this node is aware of %d nodes with %d registered users from the following platforms:', $total, $users),
+ '$legendtext' => L10n::t('Currently this node is aware of %d nodes with %d registered users from the following platforms:', $total, $users),
'$baseurl' => System::baseUrl(),
]);
}
$t = get_markup_template('admin/queue.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Inspect Queue'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Inspect Queue'),
'$count' => count($r),
- 'id_header' => t('ID'),
- '$to_header' => t('Recipient Name'),
- '$url_header' => t('Recipient Profile'),
- '$network_header' => t('Network'),
- '$created_header' => t('Created'),
- '$last_header' => t('Last Tried'),
- '$info' => t('This page lists the content of the queue for outgoing postings. These are postings the initial delivery failed for. They will be resend later and eventually deleted if the delivery fails permanently.'),
+ 'id_header' => L10n::t('ID'),
+ '$to_header' => L10n::t('Recipient Name'),
+ '$url_header' => L10n::t('Recipient Profile'),
+ '$network_header' => L10n::t('Network'),
+ '$created_header' => L10n::t('Created'),
+ '$last_header' => L10n::t('Last Tried'),
+ '$info' => L10n::t('This page lists the content of the queue for outgoing postings. These are postings the initial delivery failed for. They will be resend later and eventually deleted if the delivery fails permanently.'),
'$entries' => $r,
]);
}
$warningtext = [];
if (DBM::is_result($r)) {
$showwarning = true;
- $warningtext[] = t('Your DB still runs with MyISAM tables. You should change the engine type to InnoDB. As Friendica will use InnoDB only features in the future, you should change this! See <a href="%s">here</a> for a guide that may be helpful converting the table engines. You may also use the command <tt>php scripts/dbstructure.php toinnodb</tt> of your Friendica installation for an automatic conversion.<br />', 'https://dev.mysql.com/doc/refman/5.7/en/converting-tables-to-innodb.html');
+ $warningtext[] = L10n::t('Your DB still runs with MyISAM tables. You should change the engine type to InnoDB. As Friendica will use InnoDB only features in the future, you should change this! See <a href="%s">here</a> for a guide that may be helpful converting the table engines. You may also use the command <tt>php scripts/dbstructure.php toinnodb</tt> of your Friendica installation for an automatic conversion.<br />', 'https://dev.mysql.com/doc/refman/5.7/en/converting-tables-to-innodb.html');
}
// Check if github.com/friendica/master/VERSION is higher then
// the local version of Friendica. Check is opt-in, source may be master or devel branch
if (Config::get('system', 'check_new_version_url', 'none') != 'none') {
$gitversion = Config::get('system', 'git_friendica_version');
if (version_compare(FRIENDICA_VERSION, $gitversion) < 0) {
- $warningtext[] = t('There is a new version of Friendica available for download. Your current version is %1$s, upstream version is %2$s', FRIENDICA_VERSION, $gitversion);
+ $warningtext[] = L10n::t('There is a new version of Friendica available for download. Your current version is %1$s, upstream version is %2$s', FRIENDICA_VERSION, $gitversion);
$showwarning = true;
}
}
}
if (Config::get('system', 'dbupdate') == DB_UPDATE_FAILED) {
$showwarning = true;
- $warningtext[] = t('The database update failed. Please run "php scripts/dbstructure.php update" from the command line and have a look at the errors that might appear.');
+ $warningtext[] = L10n::t('The database update failed. Please run "php scripts/dbstructure.php update" from the command line and have a look at the errors that might appear.');
}
$last_worker_call = Config::get('system', 'last_poller_execution', false);
if (!$last_worker_call) {
$showwarning = true;
- $warningtext[] = t('The worker was never executed. Please check your database structure!');
+ $warningtext[] = L10n::t('The worker was never executed. Please check your database structure!');
} elseif ((strtotime(datetime_convert()) - strtotime($last_worker_call)) > 60 * 60) {
$showwarning = true;
- $warningtext[] = t('The last worker execution was on %s UTC. This is older than one hour. Please check your crontab settings.', $last_worker_call);
+ $warningtext[] = L10n::t('The last worker execution was on %s UTC. This is older than one hour. Please check your crontab settings.', $last_worker_call);
}
$r = q("SELECT `page-flags`, COUNT(`uid`) AS `count` FROM `user` GROUP BY `page-flags`");
$accounts = [
- [t('Normal Account'), 0],
- [t('Automatic Follower Account'), 0],
- [t('Public Forum Account'), 0],
- [t('Automatic Friend Account'), 0],
- [t('Blog Account'), 0],
- [t('Private Forum Account'), 0]
+ [L10n::t('Normal Account'), 0],
+ [L10n::t('Automatic Follower Account'), 0],
+ [L10n::t('Public Forum Account'), 0],
+ [L10n::t('Automatic Friend Account'), 0],
+ [L10n::t('Blog Account'), 0],
+ [L10n::t('Private Forum Account'), 0]
];
$users = 0;
// We can do better, but this is a quick queue status
- $queues = ['label' => t('Message queues'), 'queue' => $queue, 'workerq' => $workerqueue];
+ $queues = ['label' => L10n::t('Message queues'), 'queue' => $queue, 'workerq' => $workerqueue];
$t = get_markup_template('admin/summary.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Summary'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Summary'),
'$queues' => $queues,
- '$users' => [t('Registered users'), $users],
+ '$users' => [L10n::t('Registered users'), $users],
'$accounts' => $accounts,
- '$pending' => [t('Pending registrations'), $pending],
- '$version' => [t('Version'), FRIENDICA_VERSION],
+ '$pending' => [L10n::t('Pending registrations'), $pending],
+ '$version' => [L10n::t('Version'), FRIENDICA_VERSION],
'$baseurl' => System::baseUrl(),
'$platform' => FRIENDICA_PLATFORM,
'$codename' => FRIENDICA_CODENAME,
'$build' => Config::get('system', 'build'),
- '$addons' => [t('Active addons'), $a->addons],
+ '$addons' => [L10n::t('Active addons'), $a->addons],
'$showwarning' => $showwarning,
'$warningtext' => $warningtext
]);
$parsed = @parse_url($new_url);
if (!is_array($parsed) || !x($parsed, 'host') || !x($parsed, 'scheme')) {
- notice(t("Can not parse base url. Must have at least <scheme>://<domain>"));
+ notice(L10n::t("Can not parse base url. Must have at least <scheme>://<domain>"));
goaway('admin/site');
}
Config::set('system', 'frontend_worker', $worker_frontend);
Config::set('system', 'rino_encrypt', $rino);
- info(t('Site settings updated.') . EOL);
+ info(L10n::t('Site settings updated.') . EOL);
goaway('admin/site');
return; // NOTREACHED
}
/* Installed themes */
$theme_choices = [];
$theme_choices_mobile = [];
- $theme_choices_mobile["---"] = t("No special theme for mobile devices");
+ $theme_choices_mobile["---"] = L10n::t("No special theme for mobile devices");
$files = glob('view/theme/*');
if (is_array($files)) {
$allowed_theme_list = Config::get('system', 'allowed_themes');
/* Community page style */
$community_page_style_choices = [
- CP_NO_COMMUNITY_PAGE => t("No community page"),
- CP_USERS_ON_SERVER => t("Public postings from users of this site"),
- CP_GLOBAL_COMMUNITY => t("Public postings from the federated network"),
- CP_USERS_AND_GLOBAL => t("Public postings from local users and the federated network")
+ CP_NO_COMMUNITY_PAGE => L10n::t("No community page"),
+ CP_USERS_ON_SERVER => L10n::t("Public postings from users of this site"),
+ CP_GLOBAL_COMMUNITY => L10n::t("Public postings from the federated network"),
+ CP_USERS_AND_GLOBAL => L10n::t("Public postings from local users and the federated network")
];
$poco_discovery_choices = [
- "0" => t("Disabled"),
- "1" => t("Users"),
- "2" => t("Users, Global Contacts"),
- "3" => t("Users, Global Contacts/fallback"),
+ "0" => L10n::t("Disabled"),
+ "1" => L10n::t("Users"),
+ "2" => L10n::t("Users, Global Contacts"),
+ "3" => L10n::t("Users, Global Contacts/fallback"),
];
$poco_discovery_since_choices = [
- "30" => t("One month"),
- "91" => t("Three months"),
- "182" => t("Half a year"),
- "365" => t("One year"),
+ "30" => L10n::t("One month"),
+ "91" => L10n::t("Three months"),
+ "182" => L10n::t("Half a year"),
+ "365" => L10n::t("One year"),
];
/* get user names to make the install a personal install of X */
$user_names = [];
- $user_names['---'] = t('Multi user instance');
+ $user_names['---'] = L10n::t('Multi user instance');
$users = q("SELECT `username`, `nickname` FROM `user`");
foreach ($users as $user) {
$user_names[$user['nickname']] = $user['username'];
/* Register policy */
$register_choices = [
- REGISTER_CLOSED => t("Closed"),
- REGISTER_APPROVE => t("Requires approval"),
- REGISTER_OPEN => t("Open")
+ REGISTER_CLOSED => L10n::t("Closed"),
+ REGISTER_APPROVE => L10n::t("Requires approval"),
+ REGISTER_OPEN => L10n::t("Open")
];
$ssl_choices = [
- SSL_POLICY_NONE => t("No SSL policy, links will track page SSL state"),
- SSL_POLICY_FULL => t("Force all links to use SSL"),
- SSL_POLICY_SELFSIGN => t("Self-signed certificate, use SSL for local links only (discouraged)")
+ SSL_POLICY_NONE => L10n::t("No SSL policy, links will track page SSL state"),
+ SSL_POLICY_FULL => L10n::t("Force all links to use SSL"),
+ SSL_POLICY_SELFSIGN => L10n::t("Self-signed certificate, use SSL for local links only (discouraged)")
];
$check_git_version_choices = [
- "none" => t("Don't check"),
- "master" => t("check the stable version"),
- "develop" => t("check the development version")
+ "none" => L10n::t("Don't check"),
+ "master" => L10n::t("check the stable version"),
+ "develop" => L10n::t("check the development version")
];
if ($a->config['hostname'] == "") {
$t = get_markup_template('admin/site.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Site'),
- '$submit' => t('Save Settings'),
- '$republish' => t('Republish users to directory'),
- '$registration' => t('Registration'),
- '$upload' => t('File upload'),
- '$corporate' => t('Policies'),
- '$advanced' => t('Advanced'),
- '$portable_contacts' => t('Auto Discovered Contact Directory'),
- '$performance' => t('Performance'),
- '$worker_title' => t('Worker'),
- '$relocate' => t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Site'),
+ '$submit' => L10n::t('Save Settings'),
+ '$republish' => L10n::t('Republish users to directory'),
+ '$registration' => L10n::t('Registration'),
+ '$upload' => L10n::t('File upload'),
+ '$corporate' => L10n::t('Policies'),
+ '$advanced' => L10n::t('Advanced'),
+ '$portable_contacts' => L10n::t('Auto Discovered Contact Directory'),
+ '$performance' => L10n::t('Performance'),
+ '$worker_title' => L10n::t('Worker'),
+ '$relocate' => L10n::t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
'$baseurl' => System::baseUrl(true),
// name, label, value, help string, extra data...
- '$sitename' => ['sitename', t("Site name"), $a->config['sitename'],''],
- '$hostname' => ['hostname', t("Host name"), $a->config['hostname'], ""],
- '$sender_email' => ['sender_email', t("Sender Email"), $a->config['sender_email'], t("The email address your server shall use to send notification emails from."), "", "", "email"],
- '$banner' => ['banner', t("Banner/Logo"), $banner, ""],
- '$shortcut_icon' => ['shortcut_icon', t("Shortcut icon"), Config::get('system','shortcut_icon'), t("Link to an icon that will be used for browsers.")],
- '$touch_icon' => ['touch_icon', t("Touch icon"), Config::get('system','touch_icon'), t("Link to an icon that will be used for tablets and mobiles.")],
- '$info' => ['info', t('Additional Info'), $info, t('For public servers: you can add additional information here that will be listed at %s/servers.', get_server())],
- '$language' => ['language', t("System language"), Config::get('system','language'), "", $lang_choices],
- '$theme' => ['theme', t("System theme"), Config::get('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices],
- '$theme_mobile' => ['theme_mobile', t("Mobile system theme"), Config::get('system', 'mobile-theme', '---'), t("Theme for mobile devices"), $theme_choices_mobile],
- '$ssl_policy' => ['ssl_policy', t("SSL link policy"), (string) intval(Config::get('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices],
- '$force_ssl' => ['force_ssl', t("Force SSL"), Config::get('system','force_ssl'), t("Force all Non-SSL requests to SSL - Attention: on some systems it could lead to endless loops.")],
- '$hide_help' => ['hide_help', t("Hide help entry from navigation menu"), Config::get('system','hide_help'), t("Hides the menu entry for the Help pages from the navigation menu. You can still access it calling /help directly.")],
- '$singleuser' => ['singleuser', t("Single user instance"), Config::get('system', 'singleuser', '---'), t("Make this instance multi-user or single-user for the named user"), $user_names],
- '$maximagesize' => ['maximagesize', t("Maximum image size"), Config::get('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")],
- '$maximagelength' => ['maximagelength', t("Maximum image length"), Config::get('system','max_image_length'), t("Maximum length in pixels of the longest side of uploaded images. Default is -1, which means no limits.")],
- '$jpegimagequality' => ['jpegimagequality', t("JPEG image quality"), Config::get('system','jpeg_quality'), t("Uploaded JPEGS will be saved at this quality setting [0-100]. Default is 100, which is full quality.")],
-
- '$register_policy' => ['register_policy', t("Register policy"), $a->config['register_policy'], "", $register_choices],
- '$daily_registrations' => ['max_daily_registrations', t("Maximum Daily Registrations"), Config::get('system', 'max_daily_registrations'), t("If registration is permitted above, this sets the maximum number of new user registrations to accept per day. If register is set to closed, this setting has no effect.")],
- '$register_text' => ['register_text', t("Register text"), $a->config['register_text'], t("Will be displayed prominently on the registration page.")],
- '$abandon_days' => ['abandon_days', t('Accounts abandoned after x days'), Config::get('system','account_abandon_days'), t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')],
- '$allowed_sites' => ['allowed_sites', t("Allowed friend domains"), Config::get('system','allowed_sites'), t("Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains")],
- '$allowed_email' => ['allowed_email', t("Allowed email domains"), Config::get('system','allowed_email'), t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")],
- '$no_oembed_rich_content' => ['no_oembed_rich_content', t("No OEmbed rich content"), Config::get('system','no_oembed_rich_content'), t("Don't show the rich content (e.g. embedded PDF), except from the domains listed below.")],
- '$allowed_oembed' => ['allowed_oembed', t("Allowed OEmbed domains"), Config::get('system','allowed_oembed'), t("Comma separated list of domains which oembed content is allowed to be displayed. Wildcards are accepted.")],
- '$block_public' => ['block_public', t("Block public"), Config::get('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")],
- '$force_publish' => ['publish_all', t("Force publish"), Config::get('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")],
- '$global_directory' => ['directory', t("Global directory URL"), Config::get('system','directory'), t("URL to the global directory. If this is not set, the global directory is completely unavailable to the application.")],
- '$newuser_private' => ['newuser_private', t("Private posts by default for new users"), Config::get('system','newuser_private'), t("Set default post permissions for all new members to the default privacy group rather than public.")],
- '$enotify_no_content' => ['enotify_no_content', t("Don't include post content in email notifications"), Config::get('system','enotify_no_content'), t("Don't include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure.")],
- '$private_addons' => ['private_addons', t("Disallow public access to addons listed in the apps menu."), Config::get('config','private_addons'), t("Checking this box will restrict addons listed in the apps menu to members only.")],
- '$disable_embedded' => ['disable_embedded', t("Don't embed private images in posts"), Config::get('system','disable_embedded'), t("Don't replace locally-hosted private photos in posts with an embedded copy of the image. This means that contacts who receive posts containing private photos will have to authenticate and load each image, which may take a while.")],
- '$allow_users_remote_self' => ['allow_users_remote_self', t('Allow Users to set remote_self'), Config::get('system','allow_users_remote_self'), t('With checking this, every user is allowed to mark every contact as a remote_self in the repair contact dialog. Setting this flag on a contact causes mirroring every posting of that contact in the users stream.')],
- '$no_multi_reg' => ['no_multi_reg', t("Block multiple registrations"), Config::get('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")],
- '$no_openid' => ['no_openid', t("OpenID support"), !Config::get('system','no_openid'), t("OpenID support for registration and logins.")],
- '$no_regfullname' => ['no_regfullname', t("Fullname check"), !Config::get('system','no_regfullname'), t("Force users to register with a space between firstname and lastname in Full name, as an antispam measure")],
- '$community_page_style' => ['community_page_style', t("Community pages for visitors"), Config::get('system','community_page_style'), t("Which community pages should be available for visitors. Local users always see both pages."), $community_page_style_choices],
- '$max_author_posts_community_page' => ['max_author_posts_community_page', t("Posts per user on community page"), Config::get('system','max_author_posts_community_page'), t("The maximum number of posts per user on the community page. (Not valid for 'Global Community')")],
- '$ostatus_disabled' => ['ostatus_disabled', t("Enable OStatus support"), !Config::get('system','ostatus_disabled'), t("Provide built-in OStatus \x28StatusNet, GNU Social etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.")],
- '$ostatus_full_threads' => ['ostatus_full_threads', t("Only import OStatus threads from our contacts"), Config::get('system','ostatus_full_threads'), t("Normally we import every content from our OStatus contacts. With this option we only store threads that are started by a contact that is known on our system.")],
- '$ostatus_not_able' => t("OStatus support can only be enabled if threading is enabled."),
+ '$sitename' => ['sitename', L10n::t("Site name"), $a->config['sitename'],''],
+ '$hostname' => ['hostname', L10n::t("Host name"), $a->config['hostname'], ""],
+ '$sender_email' => ['sender_email', L10n::t("Sender Email"), $a->config['sender_email'], L10n::t("The email address your server shall use to send notification emails from."), "", "", "email"],
+ '$banner' => ['banner', L10n::t("Banner/Logo"), $banner, ""],
+ '$shortcut_icon' => ['shortcut_icon', L10n::t("Shortcut icon"), Config::get('system','shortcut_icon'), L10n::t("Link to an icon that will be used for browsers.")],
+ '$touch_icon' => ['touch_icon', L10n::t("Touch icon"), Config::get('system','touch_icon'), L10n::t("Link to an icon that will be used for tablets and mobiles.")],
+ '$info' => ['info', L10n::t('Additional Info'), $info, L10n::t('For public servers: you can add additional information here that will be listed at %s/servers.', get_server())],
+ '$language' => ['language', L10n::t("System language"), Config::get('system','language'), "", $lang_choices],
+ '$theme' => ['theme', L10n::t("System theme"), Config::get('system','theme'), L10n::t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices],
+ '$theme_mobile' => ['theme_mobile', L10n::t("Mobile system theme"), Config::get('system', 'mobile-theme', '---'), L10n::t("Theme for mobile devices"), $theme_choices_mobile],
+ '$ssl_policy' => ['ssl_policy', L10n::t("SSL link policy"), (string) intval(Config::get('system','ssl_policy')), L10n::t("Determines whether generated links should be forced to use SSL"), $ssl_choices],
+ '$force_ssl' => ['force_ssl', L10n::t("Force SSL"), Config::get('system','force_ssl'), L10n::t("Force all Non-SSL requests to SSL - Attention: on some systems it could lead to endless loops.")],
+ '$hide_help' => ['hide_help', L10n::t("Hide help entry from navigation menu"), Config::get('system','hide_help'), L10n::t("Hides the menu entry for the Help pages from the navigation menu. You can still access it calling /help directly.")],
+ '$singleuser' => ['singleuser', L10n::t("Single user instance"), Config::get('system', 'singleuser', '---'), L10n::t("Make this instance multi-user or single-user for the named user"), $user_names],
+ '$maximagesize' => ['maximagesize', L10n::t("Maximum image size"), Config::get('system','maximagesize'), L10n::t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")],
+ '$maximagelength' => ['maximagelength', L10n::t("Maximum image length"), Config::get('system','max_image_length'), L10n::t("Maximum length in pixels of the longest side of uploaded images. Default is -1, which means no limits.")],
+ '$jpegimagequality' => ['jpegimagequality', L10n::t("JPEG image quality"), Config::get('system','jpeg_quality'), L10n::t("Uploaded JPEGS will be saved at this quality setting [0-100]. Default is 100, which is full quality.")],
+
+ '$register_policy' => ['register_policy', L10n::t("Register policy"), $a->config['register_policy'], "", $register_choices],
+ '$daily_registrations' => ['max_daily_registrations', L10n::t("Maximum Daily Registrations"), Config::get('system', 'max_daily_registrations'), L10n::t("If registration is permitted above, this sets the maximum number of new user registrations to accept per day. If register is set to closed, this setting has no effect.")],
+ '$register_text' => ['register_text', L10n::t("Register text"), $a->config['register_text'], L10n::t("Will be displayed prominently on the registration page.")],
+ '$abandon_days' => ['abandon_days', L10n::t('Accounts abandoned after x days'), Config::get('system','account_abandon_days'), L10n::t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')],
+ '$allowed_sites' => ['allowed_sites', L10n::t("Allowed friend domains"), Config::get('system','allowed_sites'), L10n::t("Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains")],
+ '$allowed_email' => ['allowed_email', L10n::t("Allowed email domains"), Config::get('system','allowed_email'), L10n::t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")],
+ '$no_oembed_rich_content' => ['no_oembed_rich_content', L10n::t("No OEmbed rich content"), Config::get('system','no_oembed_rich_content'), L10n::t("Don't show the rich content (e.g. embedded PDF), except from the domains listed below.")],
+ '$allowed_oembed' => ['allowed_oembed', L10n::t("Allowed OEmbed domains"), Config::get('system','allowed_oembed'), L10n::t("Comma separated list of domains which oembed content is allowed to be displayed. Wildcards are accepted.")],
+ '$block_public' => ['block_public', L10n::t("Block public"), Config::get('system','block_public'), L10n::t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")],
+ '$force_publish' => ['publish_all', L10n::t("Force publish"), Config::get('system','publish_all'), L10n::t("Check to force all profiles on this site to be listed in the site directory.")],
+ '$global_directory' => ['directory', L10n::t("Global directory URL"), Config::get('system','directory'), L10n::t("URL to the global directory. If this is not set, the global directory is completely unavailable to the application.")],
+ '$newuser_private' => ['newuser_private', L10n::t("Private posts by default for new users"), Config::get('system','newuser_private'), L10n::t("Set default post permissions for all new members to the default privacy group rather than public.")],
+ '$enotify_no_content' => ['enotify_no_content', L10n::t("Don't include post content in email notifications"), Config::get('system','enotify_no_content'), L10n::t("Don't include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure.")],
+ '$private_addons' => ['private_addons', L10n::t("Disallow public access to addons listed in the apps menu."), Config::get('config','private_addons'), L10n::t("Checking this box will restrict addons listed in the apps menu to members only.")],
+ '$disable_embedded' => ['disable_embedded', L10n::t("Don't embed private images in posts"), Config::get('system','disable_embedded'), L10n::t("Don't replace locally-hosted private photos in posts with an embedded copy of the image. This means that contacts who receive posts containing private photos will have to authenticate and load each image, which may take a while.")],
+ '$allow_users_remote_self' => ['allow_users_remote_self', L10n::t('Allow Users to set remote_self'), Config::get('system','allow_users_remote_self'), L10n::t('With checking this, every user is allowed to mark every contact as a remote_self in the repair contact dialog. Setting this flag on a contact causes mirroring every posting of that contact in the users stream.')],
+ '$no_multi_reg' => ['no_multi_reg', L10n::t("Block multiple registrations"), Config::get('system','block_extended_register'), L10n::t("Disallow users to register additional accounts for use as pages.")],
+ '$no_openid' => ['no_openid', L10n::t("OpenID support"), !Config::get('system','no_openid'), L10n::t("OpenID support for registration and logins.")],
+ '$no_regfullname' => ['no_regfullname', L10n::t("Fullname check"), !Config::get('system','no_regfullname'), L10n::t("Force users to register with a space between firstname and lastname in Full name, as an antispam measure")],
+ '$community_page_style' => ['community_page_style', L10n::t("Community pages for visitors"), Config::get('system','community_page_style'), L10n::t("Which community pages should be available for visitors. Local users always see both pages."), $community_page_style_choices],
+ '$max_author_posts_community_page' => ['max_author_posts_community_page', L10n::t("Posts per user on community page"), Config::get('system','max_author_posts_community_page'), L10n::t("The maximum number of posts per user on the community page. (Not valid for 'Global Community')")],
+ '$ostatus_disabled' => ['ostatus_disabled', L10n::t("Enable OStatus support"), !Config::get('system','ostatus_disabled'), L10n::t("Provide built-in OStatus \x28StatusNet, GNU Social etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.")],
+ '$ostatus_full_threads' => ['ostatus_full_threads', L10n::t("Only import OStatus threads from our contacts"), Config::get('system','ostatus_full_threads'), L10n::t("Normally we import every content from our OStatus contacts. With this option we only store threads that are started by a contact that is known on our system.")],
+ '$ostatus_not_able' => L10n::t("OStatus support can only be enabled if threading is enabled."),
'$diaspora_able' => $diaspora_able,
- '$diaspora_not_able' => t("Diaspora support can't be enabled because Friendica was installed into a sub directory."),
- '$diaspora_enabled' => ['diaspora_enabled', t("Enable Diaspora support"), Config::get('system','diaspora_enabled'), t("Provide built-in Diaspora network compatibility.")],
- '$dfrn_only' => ['dfrn_only', t('Only allow Friendica contacts'), Config::get('system','dfrn_only'), t("All contacts must use Friendica protocols. All other built-in communication protocols disabled.")],
- '$verifyssl' => ['verifyssl', t("Verify SSL"), Config::get('system','verifyssl'), t("If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites.")],
- '$proxyuser' => ['proxyuser', t("Proxy user"), Config::get('system','proxyuser'), ""],
- '$proxy' => ['proxy', t("Proxy URL"), Config::get('system','proxy'), ""],
- '$timeout' => ['timeout', t("Network timeout"), (x(Config::get('system','curl_timeout'))?Config::get('system','curl_timeout'):60), t("Value is in seconds. Set to 0 for unlimited (not recommended).")],
- '$maxloadavg' => ['maxloadavg', t("Maximum Load Average"), ((intval(Config::get('system','maxloadavg')) > 0)?Config::get('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")],
- '$maxloadavg_frontend' => ['maxloadavg_frontend', t("Maximum Load Average (Frontend)"), ((intval(Config::get('system','maxloadavg_frontend')) > 0)?Config::get('system','maxloadavg_frontend'):50), t("Maximum system load before the frontend quits service - default 50.")],
- '$min_memory' => ['min_memory', t("Minimal Memory"), ((intval(Config::get('system','min_memory')) > 0)?Config::get('system','min_memory'):0), t("Minimal free memory in MB for the worker. Needs access to /proc/meminfo - default 0 (deactivated).")],
- '$optimize_max_tablesize'=> ['optimize_max_tablesize', t("Maximum table size for optimization"), $optimize_max_tablesize, t("Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it.")],
- '$optimize_fragmentation'=> ['optimize_fragmentation', t("Minimum level of fragmentation"), ((intval(Config::get('system','optimize_fragmentation')) > 0)?Config::get('system','optimize_fragmentation'):30), t("Minimum fragmenation level to start the automatic optimization - default value is 30%.")],
-
- '$poco_completion' => ['poco_completion', t("Periodical check of global contacts"), Config::get('system','poco_completion'), t("If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers.")],
- '$poco_requery_days' => ['poco_requery_days', t("Days between requery"), Config::get('system','poco_requery_days'), t("Number of days after which a server is requeried for his contacts.")],
- '$poco_discovery' => ['poco_discovery', t("Discover contacts from other servers"), (string) intval(Config::get('system','poco_discovery')), t("Periodically query other servers for contacts. You can choose between 'users': the users on the remote system, 'Global Contacts': active contacts that are known on the system. The fallback is meant for Redmatrix servers and older friendica servers, where global contacts weren't available. The fallback increases the server load, so the recommened setting is 'Users, Global Contacts'."), $poco_discovery_choices],
- '$poco_discovery_since' => ['poco_discovery_since', t("Timeframe for fetching global contacts"), (string) intval(Config::get('system','poco_discovery_since')), t("When the discovery is activated, this value defines the timeframe for the activity of the global contacts that are fetched from other servers."), $poco_discovery_since_choices],
- '$poco_local_search' => ['poco_local_search', t("Search the local directory"), Config::get('system','poco_local_search'), t("Search the local directory instead of the global directory. When searching locally, every search will be executed on the global directory in the background. This improves the search results when the search is repeated.")],
-
- '$nodeinfo' => ['nodeinfo', t("Publish server information"), Config::get('system','nodeinfo'), t("If enabled, general server and usage data will be published. The data contains the name and version of the server, number of users with public profiles, number of posts and the activated protocols and connectors. See <a href='http://the-federation.info/'>the-federation.info</a> for details.")],
-
- '$check_new_version_url' => ['check_new_version_url', t("Check upstream version"), Config::get('system', 'check_new_version_url'), t("Enables checking for new Friendica versions at github. If there is a new version, you will be informed in the admin panel overview."), $check_git_version_choices],
- '$suppress_tags' => ['suppress_tags', t("Suppress Tags"), Config::get('system','suppress_tags'), t("Suppress showing a list of hashtags at the end of the posting.")],
- '$itemcache' => ['itemcache', t("Path to item cache"), Config::get('system','itemcache'), t("The item caches buffers generated bbcode and external images.")],
- '$itemcache_duration' => ['itemcache_duration', t("Cache duration in seconds"), Config::get('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day). To disable the item cache, set the value to -1.")],
- '$max_comments' => ['max_comments', t("Maximum numbers of comments per post"), Config::get('system','max_comments'), t("How much comments should be shown for each post? Default value is 100.")],
- '$temppath' => ['temppath', t("Temp path"), Config::get('system','temppath'), t("If you have a restricted system where the webserver can't access the system temp path, enter another path here.")],
- '$basepath' => ['basepath', t("Base path to installation"), Config::get('system','basepath'), t("If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot.")],
- '$proxy_disabled' => ['proxy_disabled', t("Disable picture proxy"), Config::get('system','proxy_disabled'), t("The picture proxy increases performance and privacy. It shouldn't be used on systems with very low bandwith.")],
- '$only_tag_search' => ['only_tag_search', t("Only search in tags"), Config::get('system','only_tag_search'), t("On large systems the text search can slow down the system extremely.")],
-
- '$relocate_url' => ['relocate_url', t("New base url"), System::baseUrl(), t("Change base url for this server. Sends relocate message to all Friendica and Diaspora* contacts of all users.")],
-
- '$rino' => ['rino', t("RINO Encryption"), intval(Config::get('system','rino_encrypt')), t("Encryption layer between nodes."), [0 => "Disabled", 1 => "Enabled"]],
-
- '$worker_queues' => ['worker_queues', t("Maximum number of parallel workers"), Config::get('system','worker_queues'), t("On shared hosters set this to 2. On larger systems, values of 10 are great. Default value is 4.")],
- '$worker_dont_fork' => ['worker_dont_fork', t("Don't use 'proc_open' with the worker"), Config::get('system','worker_dont_fork'), t("Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of worker calls in your crontab.")],
- '$worker_fastlane' => ['worker_fastlane', t("Enable fastlane"), Config::get('system','worker_fastlane'), t("When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.")],
- '$worker_frontend' => ['worker_frontend', t('Enable frontend worker'), Config::get('system','frontend_worker'), t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.', System::baseUrl())],
+ '$diaspora_not_able' => L10n::t("Diaspora support can't be enabled because Friendica was installed into a sub directory."),
+ '$diaspora_enabled' => ['diaspora_enabled', L10n::t("Enable Diaspora support"), Config::get('system','diaspora_enabled'), L10n::t("Provide built-in Diaspora network compatibility.")],
+ '$dfrn_only' => ['dfrn_only', L10n::t('Only allow Friendica contacts'), Config::get('system','dfrn_only'), L10n::t("All contacts must use Friendica protocols. All other built-in communication protocols disabled.")],
+ '$verifyssl' => ['verifyssl', L10n::t("Verify SSL"), Config::get('system','verifyssl'), L10n::t("If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites.")],
+ '$proxyuser' => ['proxyuser', L10n::t("Proxy user"), Config::get('system','proxyuser'), ""],
+ '$proxy' => ['proxy', L10n::t("Proxy URL"), Config::get('system','proxy'), ""],
+ '$timeout' => ['timeout', L10n::t("Network timeout"), (x(Config::get('system','curl_timeout'))?Config::get('system','curl_timeout'):60), L10n::t("Value is in seconds. Set to 0 for unlimited (not recommended).")],
+ '$maxloadavg' => ['maxloadavg', L10n::t("Maximum Load Average"), ((intval(Config::get('system','maxloadavg')) > 0)?Config::get('system','maxloadavg'):50), L10n::t("Maximum system load before delivery and poll processes are deferred - default 50.")],
+ '$maxloadavg_frontend' => ['maxloadavg_frontend', L10n::t("Maximum Load Average (Frontend)"), ((intval(Config::get('system','maxloadavg_frontend')) > 0)?Config::get('system','maxloadavg_frontend'):50), L10n::t("Maximum system load before the frontend quits service - default 50.")],
+ '$min_memory' => ['min_memory', L10n::t("Minimal Memory"), ((intval(Config::get('system','min_memory')) > 0)?Config::get('system','min_memory'):0), L10n::t("Minimal free memory in MB for the worker. Needs access to /proc/meminfo - default 0 (deactivated).")],
+ '$optimize_max_tablesize'=> ['optimize_max_tablesize', L10n::t("Maximum table size for optimization"), $optimize_max_tablesize, L10n::t("Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it.")],
+ '$optimize_fragmentation'=> ['optimize_fragmentation', L10n::t("Minimum level of fragmentation"), ((intval(Config::get('system','optimize_fragmentation')) > 0)?Config::get('system','optimize_fragmentation'):30), L10n::t("Minimum fragmenation level to start the automatic optimization - default value is 30%.")],
+
+ '$poco_completion' => ['poco_completion', L10n::t("Periodical check of global contacts"), Config::get('system','poco_completion'), L10n::t("If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers.")],
+ '$poco_requery_days' => ['poco_requery_days', L10n::t("Days between requery"), Config::get('system','poco_requery_days'), L10n::t("Number of days after which a server is requeried for his contacts.")],
+ '$poco_discovery' => ['poco_discovery', L10n::t("Discover contacts from other servers"), (string) intval(Config::get('system','poco_discovery')), L10n::t("Periodically query other servers for contacts. You can choose between 'users': the users on the remote system, 'Global Contacts': active contacts that are known on the system. The fallback is meant for Redmatrix servers and older friendica servers, where global contacts weren't available. The fallback increases the server load, so the recommened setting is 'Users, Global Contacts'."), $poco_discovery_choices],
+ '$poco_discovery_since' => ['poco_discovery_since', L10n::t("Timeframe for fetching global contacts"), (string) intval(Config::get('system','poco_discovery_since')), L10n::t("When the discovery is activated, this value defines the timeframe for the activity of the global contacts that are fetched from other servers."), $poco_discovery_since_choices],
+ '$poco_local_search' => ['poco_local_search', L10n::t("Search the local directory"), Config::get('system','poco_local_search'), L10n::t("Search the local directory instead of the global directory. When searching locally, every search will be executed on the global directory in the background. This improves the search results when the search is repeated.")],
+
+ '$nodeinfo' => ['nodeinfo', L10n::t("Publish server information"), Config::get('system','nodeinfo'), L10n::t("If enabled, general server and usage data will be published. The data contains the name and version of the server, number of users with public profiles, number of posts and the activated protocols and connectors. See <a href='http://the-federation.info/'>the-federation.info</a> for details.")],
+
+ '$check_new_version_url' => ['check_new_version_url', L10n::t("Check upstream version"), Config::get('system', 'check_new_version_url'), L10n::t("Enables checking for new Friendica versions at github. If there is a new version, you will be informed in the admin panel overview."), $check_git_version_choices],
+ '$suppress_tags' => ['suppress_tags', L10n::t("Suppress Tags"), Config::get('system','suppress_tags'), L10n::t("Suppress showing a list of hashtags at the end of the posting.")],
+ '$itemcache' => ['itemcache', L10n::t("Path to item cache"), Config::get('system','itemcache'), L10n::t("The item caches buffers generated bbcode and external images.")],
+ '$itemcache_duration' => ['itemcache_duration', L10n::t("Cache duration in seconds"), Config::get('system','itemcache_duration'), L10n::t("How long should the cache files be hold? Default value is 86400 seconds (One day). To disable the item cache, set the value to -1.")],
+ '$max_comments' => ['max_comments', L10n::t("Maximum numbers of comments per post"), Config::get('system','max_comments'), L10n::t("How much comments should be shown for each post? Default value is 100.")],
+ '$temppath' => ['temppath', L10n::t("Temp path"), Config::get('system','temppath'), L10n::t("If you have a restricted system where the webserver can't access the system temp path, enter another path here.")],
+ '$basepath' => ['basepath', L10n::t("Base path to installation"), Config::get('system','basepath'), L10n::t("If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot.")],
+ '$proxy_disabled' => ['proxy_disabled', L10n::t("Disable picture proxy"), Config::get('system','proxy_disabled'), L10n::t("The picture proxy increases performance and privacy. It shouldn't be used on systems with very low bandwith.")],
+ '$only_tag_search' => ['only_tag_search', L10n::t("Only search in tags"), Config::get('system','only_tag_search'), L10n::t("On large systems the text search can slow down the system extremely.")],
+
+ '$relocate_url' => ['relocate_url', L10n::t("New base url"), System::baseUrl(), L10n::t("Change base url for this server. Sends relocate message to all Friendica and Diaspora* contacts of all users.")],
+
+ '$rino' => ['rino', L10n::t("RINO Encryption"), intval(Config::get('system','rino_encrypt')), L10n::t("Encryption layer between nodes."), [0 => "Disabled", 1 => "Enabled"]],
+
+ '$worker_queues' => ['worker_queues', L10n::t("Maximum number of parallel workers"), Config::get('system','worker_queues'), L10n::t("On shared hosters set this to 2. On larger systems, values of 10 are great. Default value is 4.")],
+ '$worker_dont_fork' => ['worker_dont_fork', L10n::t("Don't use 'proc_open' with the worker"), Config::get('system','worker_dont_fork'), L10n::t("Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of worker calls in your crontab.")],
+ '$worker_fastlane' => ['worker_fastlane', L10n::t("Enable fastlane"), Config::get('system','worker_fastlane'), L10n::t("When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.")],
+ '$worker_frontend' => ['worker_frontend', L10n::t('Enable frontend worker'), Config::get('system','frontend_worker'), L10n::t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.', System::baseUrl())],
'$form_security_token' => get_form_security_token("admin_site")
]);
if (intval($curr) == intval($a->argv[3])) {
Config::set('system', 'build', intval($curr) + 1);
}
- info(t('Update has been marked successful') . EOL);
+ info(L10n::t('Update has been marked successful') . EOL);
goaway('admin/dbsync');
}
if (($a->argc > 2) && (intval($a->argv[2]) || ($a->argv[2] === 'check'))) {
$retval = DBStructure::update(false, true);
if ($retval === '') {
- $o .= t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "<br />";
+ $o .= L10n::t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "<br />";
Config::set('database', 'dbupdate_' . DB_UPDATE_VERSION, 'success');
} else {
- $o .= t("Executing of database structure update %s failed with error: %s", DB_UPDATE_VERSION, $retval) . "<br />";
+ $o .= L10n::t("Executing of database structure update %s failed with error: %s", DB_UPDATE_VERSION, $retval) . "<br />";
}
if ($a->argv[2] === 'check') {
return $o;
if (function_exists($func)) {
$retval = $func();
if ($retval === UPDATE_FAILED) {
- $o .= t("Executing %s failed with error: %s", $func, $retval);
+ $o .= L10n::t("Executing %s failed with error: %s", $func, $retval);
} elseif ($retval === UPDATE_SUCCESS) {
- $o .= t('Update %s was successfully applied.', $func);
+ $o .= L10n::t('Update %s was successfully applied.', $func);
Config::set('database', $func, 'success');
} else {
- $o .= t('Update %s did not return a status. Unknown if it succeeded.', $func);
+ $o .= L10n::t('Update %s did not return a status. Unknown if it succeeded.', $func);
}
} else {
- $o .= t('There was no additional update function %s that needed to be called.', $func) . "<br />";
+ $o .= L10n::t('There was no additional update function %s that needed to be called.', $func) . "<br />";
Config::set('database', $func, 'success');
}
return $o;
if (!count($failed)) {
$o = replace_macros(get_markup_template('structure_check.tpl'), [
'$base' => System::baseUrl(true),
- '$banner' => t('No failed updates.'),
- '$check' => t('Check database structure'),
+ '$banner' => L10n::t('No failed updates.'),
+ '$check' => L10n::t('Check database structure'),
]);
} else {
$o = replace_macros(get_markup_template('failed_updates.tpl'), [
'$base' => System::baseUrl(true),
- '$banner' => t('Failed Updates'),
- '$desc' => t('This does not include updates prior to 1139, which did not return a status.'),
- '$mark' => t('Mark success (if update was manually applied)'),
- '$apply' => t('Attempt to execute this update step automatically'),
+ '$banner' => L10n::t('Failed Updates'),
+ '$desc' => L10n::t('This does not include updates prior to 1139, which did not return a status.'),
+ '$mark' => L10n::t('Mark success (if update was manually applied)'),
+ '$apply' => L10n::t('Attempt to execute this update step automatically'),
'$failed' => $failed
]);
}
}
$user = $result['user'];
- $preamble = deindent(t('
+ $preamble = deindent(L10n::t('
Dear %1$s,
the administrator of %2$s has set up an account for you.'));
- $body = deindent(t('
+ $body = deindent(L10n::t('
The login details are as follows:
Site Location: %1$s
notification([
'type' => SYSTEM_EMAIL,
'to_email' => $user['email'],
- 'subject' => t('Registration details for %s', $a->config['sitename']),
+ 'subject' => L10n::t('Registration details for %s', $a->config['sitename']),
'preamble' => $preamble,
'body' => $body]);
}
// delete user
User::remove($uid);
- notice(t("User '%s' deleted", $user['username']) . EOL);
+ notice(L10n::t("User '%s' deleted", $user['username']) . EOL);
break;
case "block":
check_form_security_token_redirectOnErr('/admin/users', 'admin_users', 't');
intval(1 - $user['blocked']),
intval($uid)
);
- notice(sprintf(($user['blocked'] ? t("User '%s' unblocked") : t("User '%s' blocked")), $user['username']) . EOL);
+ notice(sprintf(($user['blocked'] ? L10n::t("User '%s' unblocked") : L10n::t("User '%s' blocked")), $user['username']) . EOL);
break;
}
goaway('admin/users');
array_push($users, array_pop($tmp_users));
}
- $th_users = array_map(null, [t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account')], $valid_orders
+ $th_users = array_map(null, [L10n::t('Name'), L10n::t('Email'), L10n::t('Register date'), L10n::t('Last login'), L10n::t('Last item'), L10n::t('Account')], $valid_orders
);
$t = get_markup_template('admin/users.tpl');
$o = replace_macros($t, [
// strings //
- '$title' => t('Administration'),
- '$page' => t('Users'),
- '$submit' => t('Add User'),
- '$select_all' => t('select all'),
- '$h_pending' => t('User registrations waiting for confirm'),
- '$h_deleted' => t('User waiting for permanent deletion'),
- '$th_pending' => [t('Request date'), t('Name'), t('Email')],
- '$no_pending' => t('No registrations.'),
- '$pendingnotetext' => t('Note from the user'),
- '$approve' => t('Approve'),
- '$deny' => t('Deny'),
- '$delete' => t('Delete'),
- '$block' => t('Block'),
- '$unblock' => t('Unblock'),
- '$siteadmin' => t('Site admin'),
- '$accountexpired' => t('Account expired'),
-
- '$h_users' => t('Users'),
- '$h_newuser' => t('New User'),
- '$th_deleted' => [t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Deleted since')],
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Users'),
+ '$submit' => L10n::t('Add User'),
+ '$select_all' => L10n::t('select all'),
+ '$h_pending' => L10n::t('User registrations waiting for confirm'),
+ '$h_deleted' => L10n::t('User waiting for permanent deletion'),
+ '$th_pending' => [L10n::t('Request date'), L10n::t('Name'), L10n::t('Email')],
+ '$no_pending' => L10n::t('No registrations.'),
+ '$pendingnotetext' => L10n::t('Note from the user'),
+ '$approve' => L10n::t('Approve'),
+ '$deny' => L10n::t('Deny'),
+ '$delete' => L10n::t('Delete'),
+ '$block' => L10n::t('Block'),
+ '$unblock' => L10n::t('Unblock'),
+ '$siteadmin' => L10n::t('Site admin'),
+ '$accountexpired' => L10n::t('Account expired'),
+
+ '$h_users' => L10n::t('Users'),
+ '$h_newuser' => L10n::t('New User'),
+ '$th_deleted' => [L10n::t('Name'), L10n::t('Email'), L10n::t('Register date'), L10n::t('Last login'), L10n::t('Last item'), L10n::t('Deleted since')],
'$th_users' => $th_users,
'$order_users' => $order,
'$order_direction_users' => $order_direction,
- '$confirm_delete_multi' => t('Selected users will be deleted!\n\nEverything these users had posted on this site will be permanently deleted!\n\nAre you sure?'),
- '$confirm_delete' => t('The user {0} will be deleted!\n\nEverything this user has posted on this site will be permanently deleted!\n\nAre you sure?'),
+ '$confirm_delete_multi' => L10n::t('Selected users will be deleted!\n\nEverything these users had posted on this site will be permanently deleted!\n\nAre you sure?'),
+ '$confirm_delete' => L10n::t('The user {0} will be deleted!\n\nEverything this user has posted on this site will be permanently deleted!\n\nAre you sure?'),
'$form_security_token' => get_form_security_token("admin_users"),
'$pending' => $pending,
'deleted' => $deleted,
'$users' => $users,
- '$newusername' => ['new_user_name', t("Name"), '', t("Name of the new user.")],
- '$newusernickname' => ['new_user_nickname', t("Nickname"), '', t("Nickname of the new user.")],
- '$newuseremail' => ['new_user_email', t("Email"), '', t("Email address of the new user."), '', '', 'email'],
+ '$newusername' => ['new_user_name', L10n::t("Name"), '', L10n::t("Name of the new user.")],
+ '$newusernickname' => ['new_user_nickname', L10n::t("Nickname"), '', L10n::t("Nickname of the new user.")],
+ '$newuseremail' => ['new_user_email', L10n::t("Email"), '', L10n::t("Email address of the new user."), '', '', 'email'],
]);
$o .= paginate($a);
return $o;
if ($a->argc == 3) {
$addon = $a->argv[2];
if (!is_file("addon/$addon/$addon.php")) {
- notice(t("Item not found."));
+ notice(L10n::t("Item not found."));
return '';
}
if ($idx !== false) {
unset($a->addons[$idx]);
Addon::uninstall($addon);
- info(t("Addon %s disabled.", $addon));
+ info(L10n::t("Addon %s disabled.", $addon));
} else {
$a->addons[] = $addon;
Addon::install($addon);
- info(t("Addon %s enabled.", $addon));
+ info(L10n::t("Addon %s enabled.", $addon));
}
Config::set("system", "addon", implode(", ", $a->addons));
goaway('admin/addons');
// display addon details
if (in_array($addon, $a->addons)) {
$status = "on";
- $action = t("Disable");
+ $action = L10n::t("Disable");
} else {
$status = "off";
- $action = t("Enable");
+ $action = L10n::t("Enable");
}
- $readme = Null;
+ $readme = null;
if (is_file("addon/$addon/README.md")) {
$readme = Markdown::convert(file_get_contents("addon/$addon/README.md"), false);
} elseif (is_file("addon/$addon/README")) {
$t = get_markup_template('admin/plugins_details.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Addons'),
- '$toggle' => t('Toggle'),
- '$settings' => t('Settings'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Addons'),
+ '$toggle' => L10n::t('Toggle'),
+ '$settings' => L10n::t('Settings'),
'$baseurl' => System::baseUrl(true),
'$addon' => $addon,
'$status' => $status,
'$action' => $action,
'$info' => Addon::getInfo($addon),
- '$str_author' => t('Author: '),
- '$str_maintainer' => t('Maintainer: '),
+ '$str_author' => L10n::t('Author: '),
+ '$str_maintainer' => L10n::t('Maintainer: '),
'$admin_form' => $admin_form,
'$function' => 'addons',
$t = get_markup_template('admin/addons.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Addons'),
- '$submit' => t('Save Settings'),
- '$reload' => t('Reload active addons'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Addons'),
+ '$submit' => L10n::t('Save Settings'),
+ '$reload' => L10n::t('Reload active addons'),
'$baseurl' => System::baseUrl(true),
'$function' => 'addons',
'$addons' => $addons,
'$pcount' => count($addons),
- '$noplugshint' => t('There are currently no addons available on your node. You can find the official addon repository at %1$s and might find other interesting addons in the open addon registry at %2$s', 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'),
+ '$noplugshint' => L10n::t('There are currently no addons available on your node. You can find the official addon repository at %1$s and might find other interesting addons in the open addon registry at %2$s', 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'),
'$form_security_token' => get_form_security_token("admin_themes"),
]);
}
}
if (!count($themes)) {
- notice(t('No themes found.'));
+ notice(L10n::t('No themes found.'));
return '';
}
if ($a->argc == 3) {
$theme = $a->argv[2];
if (!is_dir("view/theme/$theme")) {
- notice(t("Item not found."));
+ notice(L10n::t("Item not found."));
return '';
}
// display theme details
if (theme_status($themes, $theme)) {
$status = "on";
- $action = t("Disable");
+ $action = L10n::t("Disable");
} else {
$status = "off";
- $action = t("Enable");
+ $action = L10n::t("Enable");
}
$readme = null;
$a->page = $orig_page;
}
- $screenshot = [Theme::getScreenshot($theme), t('Screenshot')];
+ $screenshot = [Theme::getScreenshot($theme), L10n::t('Screenshot')];
if (!stristr($screenshot[0], $theme)) {
$screenshot = null;
}
$t = get_markup_template('admin/plugins_details.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Themes'),
- '$toggle' => t('Toggle'),
- '$settings' => t('Settings'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Themes'),
+ '$toggle' => L10n::t('Toggle'),
+ '$settings' => L10n::t('Settings'),
'$baseurl' => System::baseUrl(true),
'$addon' => $theme,
'$status' => $status,
'$info' => Theme::getInfo($theme),
'$function' => 'themes',
'$admin_form' => $admin_form,
- '$str_author' => t('Author: '),
- '$str_maintainer' => t('Maintainer: '),
+ '$str_author' => L10n::t('Author: '),
+ '$str_maintainer' => L10n::t('Maintainer: '),
'$screenshot' => $screenshot,
'$readme' => $readme,
$t = get_markup_template('admin/addons.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Themes'),
- '$submit' => t('Save Settings'),
- '$reload' => t('Reload active themes'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Themes'),
+ '$submit' => L10n::t('Save Settings'),
+ '$reload' => L10n::t('Reload active themes'),
'$baseurl' => System::baseUrl(true),
'$function' => 'themes',
'$addons' => $addons,
'$pcount' => count($themes),
- '$noplugshint' => t('No themes found on the system. They should be placed in %1$s', '<code>/view/themes</code>'),
- '$experimental' => t('[Experimental]'),
- '$unsupported' => t('[Unsupported]'),
+ '$noplugshint' => L10n::t('No themes found on the system. They should be placed in %1$s', '<code>/view/themes</code>'),
+ '$experimental' => L10n::t('[Experimental]'),
+ '$unsupported' => L10n::t('[Unsupported]'),
'$form_security_token' => get_form_security_token("admin_themes"),
]);
}
Config::set('system', 'loglevel', $loglevel);
}
- info(t("Log settings updated."));
+ info(L10n::t("Log settings updated."));
goaway('admin/logs');
return; // NOTREACHED
}
];
if (ini_get('log_errors')) {
- $phplogenabled = t('PHP log currently enabled.');
+ $phplogenabled = L10n::t('PHP log currently enabled.');
} else {
- $phplogenabled = t('PHP log currently disabled.');
+ $phplogenabled = L10n::t('PHP log currently disabled.');
}
$t = get_markup_template('admin/logs.tpl');
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('Logs'),
- '$submit' => t('Save Settings'),
- '$clear' => t('Clear'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Logs'),
+ '$submit' => L10n::t('Save Settings'),
+ '$clear' => L10n::t('Clear'),
'$baseurl' => System::baseUrl(true),
'$logname' => Config::get('system', 'logfile'),
// name, label, value, help string, extra data...
- '$debugging' => ['debugging', t("Enable Debugging"), Config::get('system', 'debugging'), ""],
- '$logfile' => ['logfile', t("Log file"), Config::get('system', 'logfile'), t("Must be writable by web server. Relative to your Friendica top-level directory.")],
- '$loglevel' => ['loglevel', t("Log level"), Config::get('system', 'loglevel'), "", $log_choices],
+ '$debugging' => ['debugging', L10n::t("Enable Debugging"), Config::get('system', 'debugging'), ""],
+ '$logfile' => ['logfile', L10n::t("Log file"), Config::get('system', 'logfile'), L10n::t("Must be writable by web server. Relative to your Friendica top-level directory.")],
+ '$loglevel' => ['loglevel', L10n::t("Log level"), Config::get('system', 'loglevel'), "", $log_choices],
'$form_security_token' => get_form_security_token("admin_logs"),
- '$phpheader' => t("PHP logging"),
- '$phphint' => t("To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."),
+ '$phpheader' => L10n::t("PHP logging"),
+ '$phphint' => L10n::t("To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."),
'$phplogcode' => "error_reporting(E_ERROR | E_WARNING | E_PARSE);\nini_set('error_log','php.out');\nini_set('log_errors','1');\nini_set('display_errors', '1');",
'$phplogenabled' => $phplogenabled,
]);
$data = '';
if (!file_exists($f)) {
- $data = t("Error trying to open <strong>$f</strong> log file.\r\n<br/>Check to see if file $f exist and is readable.");
+ $data = L10n::t("Error trying to open <strong>$f</strong> log file.\r\n<br/>Check to see if file $f exist and is readable.");
} else {
$fp = fopen($f, 'r');
if (!$fp) {
- $data = t("Couldn't open <strong>$f</strong> log file.\r\n<br/>Check to see if file $f is readable.");
+ $data = L10n::t("Couldn't open <strong>$f</strong> log file.\r\n<br/>Check to see if file $f is readable.");
} else {
$fstat = fstat($fp);
$size = $fstat['size'];
}
}
return replace_macros($t, [
- '$title' => t('Administration'),
- '$page' => t('View Logs'),
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('View Logs'),
'$data' => $data,
'$logname' => Config::get('system', 'logfile')
]);
foreach (array_slice($fdata, 1) as $f) {
$set = Config::get('feature', $f[0], $f[3]);
$arr[$fname][1][] = [
- ['feature_' . $f[0], $f[1], $set, $f[2], [t('Off'), t('On')]],
- ['featurelock_' . $f[0], t('Lock feature %s', $f[1]), (($f[4] !== false) ? "1" : ''), '', [t('Off'), t('On')]]
+ ['feature_' . $f[0], $f[1], $set, $f[2], [L10n::t('Off'), L10n::t('On')]],
+ ['featurelock_' . $f[0], L10n::t('Lock feature %s', $f[1]), (($f[4] !== false) ? "1" : ''), '', [L10n::t('Off'), L10n::t('On')]]
];
}
}
$tpl = get_markup_template('admin/settings_features.tpl');
$o = replace_macros($tpl, [
'$form_security_token' => get_form_security_token("admin_manage_features"),
- '$title' => t('Manage Additional Features'),
+ '$title' => L10n::t('Manage Additional Features'),
'$features' => $arr,
- '$submit' => t('Save Settings'),
+ '$submit' => L10n::t('Save Settings'),
]);
return $o;
*/
use Friendica\App;
use Friendica\Content\ContactSelector;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\Profile;
-use dba;
require_once 'include/dba.php';
require_once 'mod/contacts.php';
{
$o = '';
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$r = GContact::allFriends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']);
if (!DBM::is_result($r)) {
- $o .= t('No friends to display.');
+ $o .= L10n::t('No friends to display.');
return $o;
}
} else {
$connlnk = System::baseUrl() . '/follow/?url=' . $rr['url'];
$photo_menu = [
- 'profile' => [t("View Profile"), Profile::zrl($rr['url'])],
- 'follow' => [t("Connect/Follow"), $connlnk]
+ 'profile' => [L10n::t("View Profile"), Profile::zrl($rr['url'])],
+ 'follow' => [L10n::t("Connect/Follow"), $connlnk]
];
}
'account_type' => Contact::getAccountType($contact_details),
'network' => ContactSelector::networkToName($contact_details['network'], $contact_details['url']),
'photo_menu' => $photo_menu,
- 'conntxt' => t('Connect'),
+ 'conntxt' => L10n::t('Connect'),
'connlnk' => $connlnk,
'id' => ++$id,
];
$tpl = get_markup_template('viewcontact_template.tpl');
$o .= replace_macros($tpl, [
- //'$title' => sprintf( t('Friends of %s'), htmlentities($c[0]['name'])),
+ //'$title' => sprintf(L10n::t('Friends of %s'), htmlentities($c[0]['name'])),
'$tab_str' => $tab_str,
'$contacts' => $entries,
'$paginate' => paginate($a),
<?php
-
+/**
+ * @file mod/api.php
+ */
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
use Friendica\Module\Login;
-require_once('include/api.php');
+require_once 'include/api.php';
function oauth_get_client($request)
{
WHERE `clients`.`client_id`=`tokens`.`client_id`
AND `tokens`.`id`='%s' AND `tokens`.`scope`='request'", dbesc($token));
- if (!DBM::is_result($r))
+ if (!DBM::is_result($r)) {
return null;
+ }
return $r[0];
}
function api_post(App $a)
{
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
if (count($a->user) && x($a->user, 'uid') && $a->user['uid'] != local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
}
$tpl = get_markup_template("oauth_authorize_done.tpl");
$o = replace_macros($tpl, [
- '$title' => t('Authorize application connection'),
- '$info' => t('Return to your app and insert this Securty Code:'),
+ '$title' => L10n::t('Authorize application connection'),
+ '$info' => L10n::t('Return to your app and insert this Securty Code:'),
'$code' => $verifier,
]);
if (!local_user()) {
/// @TODO We need login form to redirect to this page
- notice(t('Please login to continue.') . EOL);
+ notice(L10n::t('Please login to continue.') . EOL);
return Login::form($a->query_string, false, $request->get_parameters());
}
//FKOAuth1::loginUser(4);
$tpl = get_markup_template('oauth_authorize.tpl');
$o = replace_macros($tpl, [
- '$title' => t('Authorize application connection'),
+ '$title' => L10n::t('Authorize application connection'),
'$app' => $app,
- '$authorize' => t('Do you want to authorize this application to access your posts and contacts, and/or create new posts for you?'),
- '$yes' => t('Yes'),
- '$no' => t('No'),
+ '$authorize' => L10n::t('Do you want to authorize this application to access your posts and contacts, and/or create new posts for you?'),
+ '$yes' => L10n::t('Yes'),
+ '$no' => L10n::t('No'),
]);
return $o;
<?php
-
+/**
+ * @file mod/apps.php
+ */
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
-function apps_content(App $a) {
+function apps_content(App $a)
+{
$privateaddons = Config::get('config', 'private_addons');
if ($privateaddons === "1") {
if (! local_user()) {
- info(t('You must be logged in to use addons. '));
+ info(L10n::t('You must be logged in to use addons. '));
return;
};
}
- $title = t('Applications');
+ $title = L10n::t('Applications');
if (count($a->apps) == 0) {
- notice(t('No installed applications.') . EOL);
+ notice(L10n::t('No installed applications.') . EOL);
}
$tpl = get_markup_template('apps.tpl');
<?php
-
+/**
+ * @file mod/attach.php
+ */
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
-require_once('include/security.php');
-
-function attach_init(App $a) {
+require_once 'include/dba.php';
+require_once 'include/security.php';
- if($a->argc != 2) {
- notice( t('Item not available.') . EOL);
+function attach_init(App $a)
+{
+ if ($a->argc != 2) {
+ notice(L10n::t('Item not available.') . EOL);
return;
}
// Check for existence, which will also provide us the owner uid
- $r = q("SELECT * FROM `attach` WHERE `id` = %d LIMIT 1",
- intval($item_id)
- );
- if (! DBM::is_result($r)) {
- notice( t('Item was not found.'). EOL);
+ $r = dba::selectFirst('attach', [], ['id' => $item_id]);
+ if (!DBM::is_result($r)) {
+ notice(L10n::t('Item was not found.'). EOL);
return;
}
- $sql_extra = permissions_sql($r[0]['uid']);
+ $sql_extra = permissions_sql($r['uid']);
// Now we'll see if we can access the attachment
dbesc($item_id)
);
- if (! DBM::is_result($r)) {
- notice( t('Permission denied.') . EOL);
+ if (!DBM::is_result($r)) {
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
// error in Chrome for filenames with commas in them
header('Content-type: ' . $r[0]['filetype']);
header('Content-length: ' . $r[0]['filesize']);
- if(isset($_GET['attachment']) && $_GET['attachment'] === '0')
+ if (isset($_GET['attachment']) && $_GET['attachment'] === '0') {
header('Content-disposition: filename="' . $r[0]['filename'] . '"');
- else
+ } else {
header('Content-disposition: attachment; filename="' . $r[0]['filename'] . '"');
+ }
echo $r[0]['data'];
killme();
<?php
-
+/**
+ * @file mod/babel.php
+ */
use Friendica\Content\Text\Markdown;
+use Friendica\Core\L10n;
require_once 'include/bbcode.php';
require_once 'include/bb2diaspora.php';
$o = '<h1>Babel Diagnostic</h1>';
$o .= '<form action="babel" method="post">';
- $o .= t('Source (bbcode) text:') . EOL;
+ $o .= L10n::t('Source (bbcode) text:') . EOL;
$o .= '<textarea name="text" cols="80" rows="10">' . htmlspecialchars($_REQUEST['text']) . '</textarea>' . EOL;
$o .= '<input type="submit" name="submit" value="Submit" /></form>';
$o .= '<br /><br />';
$o .= '<form action="babel" method="post">';
- $o .= t('Source (Diaspora) text to convert to BBcode:') . EOL;
+ $o .= L10n::t('Source (Diaspora) text to convert to BBcode:') . EOL;
$o .= '<textarea name="d2bbtext" cols="80" rows="10">' . htmlspecialchars($_REQUEST['d2bbtext']) . '</textarea>' . EOL;
$o .= '<input type="submit" name="submit" value="Submit" /></form>';
if (x($_REQUEST, 'text')) {
$text = trim($_REQUEST['text']);
- $o .= '<h2>' . t('Source input: ') . '</h2>' . EOL . EOL;
+ $o .= '<h2>' . L10n::t('Source input: ') . '</h2>' . EOL . EOL;
$o .= visible_lf($text) . EOL . EOL;
$html = bbcode($text);
- $o .= '<h2>' . t('bbcode (raw HTML): ') . '</h2>' . EOL . EOL;
+ $o .= '<h2>' . L10n::t('bbcode (raw HTML): ') . '</h2>' . EOL . EOL;
$o .= htmlspecialchars($html) . EOL . EOL;
//$html = bbcode($text);
- $o .= '<h2>' . t('bbcode: ') . '</h2>' . EOL . EOL;
+ $o .= '<h2>' . L10n::t('bbcode: ') . '</h2>' . EOL . EOL;
$o .= $html . EOL . EOL;
$bbcode = html2bbcode($html);
- $o .= '<h2>' . t('bbcode => html2bbcode: ') . '</h2>' . EOL . EOL;
+ $o .= '<h2>' . L10n::t('bbcode => html2bbcode: ') . '</h2>' . EOL . EOL;
$o .= visible_lf($bbcode) . EOL . EOL;
$diaspora = bb2diaspora($text);
- $o .= '<h2>' . t('bb2diaspora: ') . '</h2>' . EOL . EOL;
+ $o .= '<h2>' . L10n::t('bb2diaspora: ') . '</h2>' . EOL . EOL;
$o .= visible_lf($diaspora) . EOL . EOL;
$html = Markdown::convert($diaspora);
- $o .= '<h2>' . t('bb2diaspora => Markdown: ') . '</h2>' . EOL . EOL;
+ $o .= '<h2>' . L10n::t('bb2diaspora => Markdown: ') . '</h2>' . EOL . EOL;
$o .= $html . EOL . EOL;
$bbcode = diaspora2bb($diaspora);
- $o .= '<h2>' . t('bb2diaspora => diaspora2bb: ') . '</h2>' . EOL . EOL;
+ $o .= '<h2>' . L10n::t('bb2diaspora => diaspora2bb: ') . '</h2>' . EOL . EOL;
$o .= visible_lf($bbcode) . EOL . EOL;
$bbcode = html2bbcode($html);
- $o .= '<h2>' . t('bbcode => html2bbcode: ') . '</h2>' . EOL . EOL;
+ $o .= '<h2>' . L10n::t('bbcode => html2bbcode: ') . '</h2>' . EOL . EOL;
$o .= visible_lf($bbcode) . EOL . EOL;
}
if (x($_REQUEST, 'd2bbtext')) {
$d2bbtext = trim($_REQUEST['d2bbtext']);
- $o .= '<h2>' . t('Source input (Diaspora format): ') . '</h2>' . EOL . EOL;
+ $o .= '<h2>' . L10n::t('Source input (Diaspora format): ') . '</h2>' . EOL . EOL;
$o .= '<pre>' . $d2bbtext . '</pre>' . EOL . EOL;
$bb = diaspora2bb($d2bbtext);
- $o .= '<h2>' . t('diaspora2bb: ') . '</h2>' . EOL . EOL;
+ $o .= '<h2>' . L10n::t('diaspora2bb: ') . '</h2>' . EOL . EOL;
$o .= '<pre>' . $bb . '</pre>' . EOL . EOL;
}
<?php
-
+/**
+ * @file mod/bookmarklet.php
+ */
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Module\Login;
-require_once('include/conversation.php');
-require_once('include/items.php');
+require_once 'include/conversation.php';
+require_once 'include/items.php';
function bookmarklet_init()
{
function bookmarklet_content(App $a)
{
if (!local_user()) {
- $o = '<h2>' . t('Login') . '</h2>';
+ $o = '<h2>' . L10n::t('Login') . '</h2>';
$o .= Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? false : true);
return $o;
}
$o = status_editor($a, $x, 0, false);
$o .= "<script>window.resizeTo(800,550);</script>";
} else {
- $o = '<h2>' . t('The post was created') . '</h2>';
+ $o = '<h2>' . L10n::t('The post was created') . '</h2>';
$o .= "<script>window.close()</script>";
}
use Friendica\Content\Feature;
use Friendica\Content\Nav;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
$is_owner = local_user() == $a->profile['profile_uid'];
if ($a->profile['hidewall'] && (!$is_owner) && (!$remote_contact)) {
- notice(t('Access to this profile has been restricted.') . EOL);
+ notice(L10n::t('Access to this profile has been restricted.') . EOL);
return;
}
$o = replace_macros($tpl, [
'$baseurl' => System::baseUrl(),
'$tabs' => $tabs,
- '$title' => t('Events'),
- '$view' => t('View'),
- '$previous' => [System::baseUrl() . "/events/$prevyear/$prevmonth", t('Previous'), '', ''],
- '$next' => [System::baseUrl() . "/events/$nextyear/$nextmonth", t('Next'), '', ''],
+ '$title' => L10n::t('Events'),
+ '$view' => L10n::t('View'),
+ '$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')) {
if ($mode == 'export') {
if (!(intval($owner_uid))) {
- notice(t('User not found'));
+ notice(L10n::t('User not found'));
return;
}
// Test permissions
// Respect the export feature setting for all other /cal pages if it's not the own profile
if (((local_user() !== intval($owner_uid))) && !Feature::isEnabled($owner_uid, "export_calendar")) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
goaway('cal/' . $nick);
}
if (!$evexport["success"]) {
if ($evexport["content"]) {
- notice(t('This calendar format is not supported'));
+ notice(L10n::t('This calendar format is not supported'));
} else {
- notice(t('No exportable data found'));
+ notice(L10n::t('No exportable data found'));
}
// If it the own calendar return to the events page
// If nothing went wrong we can echo the export content
if ($evexport["success"]) {
header('Content-type: text/calendar');
- header('content-disposition: attachment; filename="' . t('calendar') . '-' . $nick . '.' . $evexport["extension"] . '"');
+ header('content-disposition: attachment; filename="' . L10n::t('calendar') . '-' . $nick . '.' . $evexport["extension"] . '"');
echo $evexport["content"];
killme();
}
*/
use Friendica\App;
use Friendica\Content\ContactSelector;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\Profile;
-use dba;
require_once 'include/dba.php';
require_once 'mod/contacts.php';
$zcid = 0;
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
if ($t > 0) {
$a->set_pager_total($t);
} else {
- notice(t('No contacts in common.') . EOL);
+ notice(L10n::t('No contacts in common.') . EOL);
return $o;
}
if ($cmd === 'loc' && $cid && local_user() == $uid) {
$tab_str = contacts_tab($a, $cid, 4);
} else {
- $title = t('Common Friends');
+ $title = L10n::t('Common Friends');
}
$tpl = get_markup_template('viewcontact_template.tpl');
use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
$o = '';
if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
- notice(t('Public access denied.') . EOL);
+ notice(L10n::t('Public access denied.') . EOL);
return;
}
if ($a->argc > 1) {
$content = $a->argv[1];
} else {
- if (!empty(Config::get('system','singleuser'))) {
+ if (!empty(Config::get('system', 'singleuser'))) {
// On single user systems only the global page does make sense
$content = 'global';
} else {
}
if (!in_array($content, ['local', 'global'])) {
- notice(t('Community option not available.') . EOL);
+ notice(L10n::t('Community option not available.') . EOL);
return;
}
}
if (!$available) {
- notice(t('Not available.') . EOL);
+ notice(L10n::t('Not available.') . EOL);
return;
}
}
if (!$update) {
$tabs = [];
- if ((local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_USERS_ON_SERVER])) && empty(Config::get('system','singleuser'))) {
+ if ((local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_USERS_ON_SERVER])) && empty(Config::get('system', 'singleuser'))) {
$tabs[] = [
- 'label' => t('Community'),
+ 'label' => L10n::t('Community'),
'url' => 'community/local',
'sel' => $content == 'local' ? 'active' : '',
- 'title' => t('Posts from local users on this server'),
+ 'title' => L10n::t('Posts from local users on this server'),
'id' => 'community-local-tab',
'accesskey' => 'l'
];
if (local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_GLOBAL_COMMUNITY])) {
$tabs[] = [
- 'label' => t('Global Timeline'),
+ 'label' => L10n::t('Global Timeline'),
'url' => 'community/global',
'sel' => $content == 'global' ? 'active' : '',
- 'title' => t('Posts from users of the federated network'),
+ 'title' => L10n::t('Posts from users of the federated network'),
'id' => 'community-global-tab',
'accesskey' => 'g'
];
$r = community_getitems($a->pager['start'], $a->pager['itemspage'], $content);
if (!DBM::is_result($r)) {
- info(t('No results.') . EOL);
+ info(L10n::t('No results.') . EOL);
return $o;
}
'$content' => $o,
'$header' => '',
'$show_global_community_hint' => ($content == 'global') && Config::get('system', 'show_global_community_hint'),
- '$global_community_hint' => t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.")
+ '$global_community_hint' => L10n::t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.")
]);
}
use Friendica\Content\Nav;
use Friendica\Content\Widget;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
'$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? "redir/" . $a->data['contact']['id'] : $a->data['contact']['url'],
'$addr' => (($a->data['contact']['addr'] != "") ? ($a->data['contact']['addr']) : ""),
'$network_name' => $networkname,
- '$network' => t('Network:'),
+ '$network' => L10n::t('Network:'),
'$account_type' => Contact::getAccountType($a->data['contact'])
]);
}
if (!dba::exists('contact', ['id' => $contact_id, 'uid' => local_user()])) {
- notice(t('Could not access contact record.') . EOL);
+ notice(L10n::t('Could not access contact record.') . EOL);
goaway('contacts');
return; // NOTREACHED
}
$profile_id = intval($_POST['profile-assign']);
if ($profile_id) {
if (!dba::exists('profile', ['id' => $profile_id, 'uid' => local_user()])) {
- notice(t('Could not locate selected profile.') . EOL);
+ notice(L10n::t('Could not locate selected profile.') . EOL);
return;
}
}
intval(local_user())
);
if (DBM::is_result($r)) {
- info(t('Contact updated.') . EOL);
+ info(L10n::t('Contact updated.') . EOL);
} else {
- notice(t('Failed to update contact record.') . EOL);
+ notice(L10n::t('Failed to update contact record.') . EOL);
}
$contact = dba::selectFirst('contact', [], ['id' => $contact_id, 'uid' => local_user()]);
Nav::setSelected('contacts');
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$orig_record = dba::selectFirst('contact', [], ['id' => $contact_id, 'uid' => local_user(), 'self' => false]);
if (!DBM::is_result($orig_record)) {
- notice(t('Could not access contact record.') . EOL);
+ notice(L10n::t('Could not access contact record.') . EOL);
goaway('contacts');
return; // NOTREACHED
}
$r = _contact_block($contact_id, $orig_record);
if ($r) {
$blocked = (($orig_record['blocked']) ? 0 : 1);
- info((($blocked) ? t('Contact has been blocked') : t('Contact has been unblocked')) . EOL);
+ info((($blocked) ? L10n::t('Contact has been blocked') : L10n::t('Contact has been unblocked')) . EOL);
}
goaway('contacts/' . $contact_id);
$r = _contact_ignore($contact_id, $orig_record);
if ($r) {
$readonly = (($orig_record['readonly']) ? 0 : 1);
- info((($readonly) ? t('Contact has been ignored') : t('Contact has been unignored')) . EOL);
+ info((($readonly) ? L10n::t('Contact has been ignored') : L10n::t('Contact has been unignored')) . EOL);
}
goaway('contacts/' . $contact_id);
$r = _contact_archive($contact_id, $orig_record);
if ($r) {
$archived = (($orig_record['archive']) ? 0 : 1);
- info((($archived) ? t('Contact has been archived') : t('Contact has been unarchived')) . EOL);
+ info((($archived) ? L10n::t('Contact has been archived') : L10n::t('Contact has been unarchived')) . EOL);
}
goaway('contacts/' . $contact_id);
$a->page['aside'] = '';
return replace_macros(get_markup_template('contact_drop_confirm.tpl'), [
- '$header' => t('Drop contact'),
+ '$header' => L10n::t('Drop contact'),
'$contact' => _contact_detail_for_template($orig_record),
'$method' => 'get',
- '$message' => t('Do you really want to delete this contact?'),
+ '$message' => L10n::t('Do you really want to delete this contact?'),
'$extra_inputs' => $inputs,
- '$confirm' => t('Yes'),
+ '$confirm' => L10n::t('Yes'),
'$confirm_url' => $query['base'],
'$confirm_name' => 'confirmed',
- '$cancel' => t('Cancel'),
+ '$cancel' => L10n::t('Cancel'),
]);
}
// Now check how the user responded to the confirmation query
}
_contact_drop($orig_record);
- info(t('Contact has been removed.') . EOL);
+ info(L10n::t('Contact has been removed.') . EOL);
if (x($_SESSION, 'return_url')) {
goaway('' . $_SESSION['return_url']);
} else {
switch ($contact['rel']) {
case CONTACT_IS_FRIEND:
$dir_icon = 'images/lrarrow.gif';
- $relation_text = t('You are mutual friends with %s');
+ $relation_text = L10n::t('You are mutual friends with %s');
break;
case CONTACT_IS_FOLLOWER;
$dir_icon = 'images/larrow.gif';
- $relation_text = t('You are sharing with %s');
+ $relation_text = L10n::t('You are sharing with %s');
break;
case CONTACT_IS_SHARING;
$dir_icon = 'images/rarrow.gif';
- $relation_text = t('%s is sharing with you');
+ $relation_text = L10n::t('%s is sharing with you');
break;
default:
break;
$sparkle = '';
}
- $insecure = t('Private communications are not available for this contact.');
+ $insecure = L10n::t('Private communications are not available for this contact.');
- $last_update = (($contact['last-update'] <= NULL_DATE) ? t('Never') : datetime_convert('UTC', date_default_timezone_get(), $contact['last-update'], 'D, j M Y, g:i A'));
+ $last_update = (($contact['last-update'] <= NULL_DATE) ? L10n::t('Never') : datetime_convert('UTC', date_default_timezone_get(), $contact['last-update'], 'D, j M Y, g:i A'));
if ($contact['last-update'] > NULL_DATE) {
- $last_update .= ' ' . (($contact['last-update'] <= $contact['success_update']) ? t("\x28Update was successful\x29") : t("\x28Update was not successful\x29"));
+ $last_update .= ' ' . (($contact['last-update'] <= $contact['success_update']) ? L10n::t("\x28Update was successful\x29") : L10n::t("\x28Update was not successful\x29"));
}
- $lblsuggest = (($contact['network'] === NETWORK_DFRN) ? t('Suggest friends') : '');
+ $lblsuggest = (($contact['network'] === NETWORK_DFRN) ? L10n::t('Suggest friends') : '');
$poll_enabled = in_array($contact['network'], [NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_FEED, NETWORK_MAIL]);
- $nettype = t('Network type: %s', ContactSelector::networkToName($contact['network'], $contact["url"]));
+ $nettype = L10n::t('Network type: %s', ContactSelector::networkToName($contact['network'], $contact["url"]));
// tabs
$tab_str = contacts_tab($a, $contact_id, 2);
- $lost_contact = (($contact['archive'] && $contact['term-date'] > NULL_DATE && $contact['term-date'] < datetime_convert('', '', 'now')) ? t('Communications lost with this contact!') : '');
+ $lost_contact = (($contact['archive'] && $contact['term-date'] > NULL_DATE && $contact['term-date'] < datetime_converL10n::t('', '', 'now')) ? L10n::t('Communications lost with this contact!') : '');
$fetch_further_information = null;
if ($contact['network'] == NETWORK_FEED) {
$fetch_further_information = [
'fetch_further_information',
- t('Fetch further information for feeds'),
+ L10n::t('Fetch further information for feeds'),
$contact['fetch_further_information'],
- t("Fetch information like preview pictures, title and teaser from the feed item. You can activate this if the feed doesn't contain much text. Keywords are taken from the meta header in the feed item and are posted as hash tags."),
- ['0' => t('Disabled'),
- '1' => t('Fetch information'),
- '3' => t('Fetch keywords'),
- '2' => t('Fetch information and keywords')
+ L10n::t("Fetch information like preview pictures, title and teaser from the feed item. You can activate this if the feed doesn't contain much text. Keywords are taken from the meta header in the feed item and are posted as hash tags."),
+ ['0' => L10n::t('Disabled'),
+ '1' => L10n::t('Fetch information'),
+ '3' => L10n::t('Fetch keywords'),
+ '2' => L10n::t('Fetch information and keywords')
]
];
}
if (in_array($contact['network'], [NETWORK_DIASPORA, NETWORK_OSTATUS])) {
if ($contact['rel'] == CONTACT_IS_FOLLOWER) {
$follow = System::baseUrl(true) . "/follow?url=" . urlencode($contact["url"]);
- $follow_text = t("Connect/Follow");
+ $follow_text = L10n::t("Connect/Follow");
} elseif ($contact['rel'] == CONTACT_IS_FRIEND) {
$follow = System::baseUrl(true) . "/unfollow?url=" . urlencode($contact["url"]);
- $follow_text = t("Disconnect/Unfollow");
+ $follow_text = L10n::t("Disconnect/Unfollow");
}
}
$tpl = get_markup_template("contact_edit.tpl");
$o .= replace_macros($tpl, [
- '$header' => t("Contact"),
+ '$header' => L10n::t("Contact"),
'$tab_str' => $tab_str,
- '$submit' => t('Submit'),
- '$lbl_vis1' => t('Profile Visibility'),
- '$lbl_vis2' => t('Please choose the profile you would like to display to %s when viewing your profile securely.', $contact['name']),
- '$lbl_info1' => t('Contact Information / Notes'),
- '$lbl_info2' => t('Their personal note'),
+ '$submit' => L10n::t('Submit'),
+ '$lbl_vis1' => L10n::t('Profile Visibility'),
+ '$lbl_vis2' => L10n::t('Please choose the profile you would like to display to %s when viewing your profile securely.', $contact['name']),
+ '$lbl_info1' => L10n::t('Contact Information / Notes'),
+ '$lbl_info2' => L10n::t('Their personal note'),
'$reason' => trim(notags($contact['reason'])),
- '$infedit' => t('Edit contact notes'),
+ '$infedit' => L10n::t('Edit contact notes'),
'$common_link' => 'common/loc/' . local_user() . '/' . $contact['id'],
'$relation_text' => $relation_text,
- '$visit' => t('Visit %s\'s profile [%s]', $contact['name'], $contact['url']),
- '$blockunblock' => t('Block/Unblock contact'),
- '$ignorecont' => t('Ignore contact'),
- '$lblcrepair' => t("Repair URL settings"),
- '$lblrecent' => t('View conversations'),
+ '$visit' => L10n::t('Visit %s\'s profile [%s]', $contact['name'], $contact['url']),
+ '$blockunblock' => L10n::t('Block/Unblock contact'),
+ '$ignorecont' => L10n::t('Ignore contact'),
+ '$lblcrepair' => L10n::t("Repair URL settings"),
+ '$lblrecent' => L10n::t('View conversations'),
'$lblsuggest' => $lblsuggest,
'$nettype' => $nettype,
'$poll_interval' => $poll_interval,
'$poll_enabled' => $poll_enabled,
- '$lastupdtext' => t('Last update:'),
+ '$lastupdtext' => L10n::t('Last update:'),
'$lost_contact' => $lost_contact,
- '$updpub' => t('Update public posts'),
+ '$updpub' => L10n::t('Update public posts'),
'$last_update' => $last_update,
- '$udnow' => t('Update now'),
+ '$udnow' => L10n::t('Update now'),
'$follow' => $follow,
'$follow_text' => $follow_text,
'$profile_select' => $profile_select,
'$contact_id' => $contact['id'],
- '$block_text' => (($contact['blocked']) ? t('Unblock') : t('Block') ),
- '$ignore_text' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ),
+ '$block_text' => (($contact['blocked']) ? L10n::t('Unblock') : L10n::t('Block') ),
+ '$ignore_text' => (($contact['readonly']) ? L10n::t('Unignore') : L10n::t('Ignore') ),
'$insecure' => (($contact['network'] !== NETWORK_DFRN && $contact['network'] !== NETWORK_MAIL && $contact['network'] !== NETWORK_FACEBOOK && $contact['network'] !== NETWORK_DIASPORA) ? $insecure : ''),
'$info' => $contact['info'],
'$cinfo' => ['info', '', $contact['info'], ''],
- '$blocked' => (($contact['blocked']) ? t('Currently blocked') : ''),
- '$ignored' => (($contact['readonly']) ? t('Currently ignored') : ''),
- '$archived' => (($contact['archive']) ? t('Currently archived') : ''),
- '$pending' => (($contact['pending']) ? t('Awaiting connection acknowledge') : ''),
- '$hidden' => ['hidden', t('Hide this contact from others'), ($contact['hidden'] == 1), t('Replies/likes to your public posts <strong>may</strong> still be visible')],
- '$notify' => ['notify', t('Notification for new posts'), ($contact['notify_new_posts'] == 1), t('Send a notification of every new post of this contact')],
+ '$blocked' => (($contact['blocked']) ? L10n::t('Currently blocked') : ''),
+ '$ignored' => (($contact['readonly']) ? L10n::t('Currently ignored') : ''),
+ '$archived' => (($contact['archive']) ? L10n::t('Currently archived') : ''),
+ '$pending' => (($contact['pending']) ? L10n::t('Awaiting connection acknowledge') : ''),
+ '$hidden' => ['hidden', L10n::t('Hide this contact from others'), ($contact['hidden'] == 1), L10n::t('Replies/likes to your public posts <strong>may</strong> still be visible')],
+ '$notify' => ['notify', L10n::t('Notification for new posts'), ($contact['notify_new_posts'] == 1), L10n::t('Send a notification of every new post of this contact')],
'$fetch_further_information' => $fetch_further_information,
'$ffi_keyword_blacklist' => $contact['ffi_keyword_blacklist'],
- '$ffi_keyword_blacklist' => ['ffi_keyword_blacklist', t('Blacklisted keywords'), $contact['ffi_keyword_blacklist'], t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')],
+ '$ffi_keyword_blacklist' => ['ffi_keyword_blacklist', L10n::t('Blacklisted keywords'), $contact['ffi_keyword_blacklist'], L10n::t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')],
'$photo' => $contact['photo'],
'$name' => htmlentities($contact['name']),
'$dir_icon' => $dir_icon,
'$sparkle' => $sparkle,
'$url' => $url,
- '$profileurllabel' => t('Profile URL'),
+ '$profileurllabel' => L10n::t('Profile URL'),
'$profileurl' => $contact['url'],
'$account_type' => Contact::getAccountType($contact),
'$location' => bbcode($contact["location"]),
- '$location_label' => t("Location:"),
+ '$location_label' => L10n::t("Location:"),
'$xmpp' => bbcode($contact["xmpp"]),
- '$xmpp_label' => t("XMPP:"),
+ '$xmpp_label' => L10n::t("XMPP:"),
'$about' => bbcode($contact["about"], false, false),
- '$about_label' => t("About:"),
+ '$about_label' => L10n::t("About:"),
'$keywords' => $contact["keywords"],
- '$keywords_label' => t("Tags:"),
- '$contact_action_button' => t("Actions"),
+ '$keywords_label' => L10n::t("Tags:"),
+ '$contact_action_button' => L10n::t("Actions"),
'$contact_actions' => $contact_actions,
- '$contact_status' => t("Status"),
- '$contact_settings_label' => t('Contact Settings'),
- '$contact_profile_label' => t("Profile"),
+ '$contact_status' => L10n::t("Status"),
+ '$contact_settings_label' => L10n::t('Contact Settings'),
+ '$contact_profile_label' => L10n::t("Profile"),
]);
$arr = ['contact' => $contact, 'output' => $o];
$tabs = [
[
- 'label' => t('Suggestions'),
+ 'label' => L10n::t('Suggestions'),
'url' => 'suggest',
'sel' => '',
- 'title' => t('Suggest potential friends'),
+ 'title' => L10n::t('Suggest potential friends'),
'id' => 'suggestions-tab',
'accesskey' => 'g',
],
[
- 'label' => t('All Contacts'),
+ 'label' => L10n::t('All Contacts'),
'url' => 'contacts/all',
'sel' => ($all) ? 'active' : '',
- 'title' => t('Show all contacts'),
+ 'title' => L10n::t('Show all contacts'),
'id' => 'showall-tab',
'accesskey' => 'l',
],
[
- 'label' => t('Unblocked'),
+ 'label' => L10n::t('Unblocked'),
'url' => 'contacts',
'sel' => ((!$all) && (!$blocked) && (!$hidden) && (!$search) && (!$nets) && (!$ignored) && (!$archived)) ? 'active' : '',
- 'title' => t('Only show unblocked contacts'),
+ 'title' => L10n::t('Only show unblocked contacts'),
'id' => 'showunblocked-tab',
'accesskey' => 'o',
],
[
- 'label' => t('Blocked'),
+ 'label' => L10n::t('Blocked'),
'url' => 'contacts/blocked',
'sel' => ($blocked) ? 'active' : '',
- 'title' => t('Only show blocked contacts'),
+ 'title' => L10n::t('Only show blocked contacts'),
'id' => 'showblocked-tab',
'accesskey' => 'b',
],
[
- 'label' => t('Ignored'),
+ 'label' => L10n::t('Ignored'),
'url' => 'contacts/ignored',
'sel' => ($ignored) ? 'active' : '',
- 'title' => t('Only show ignored contacts'),
+ 'title' => L10n::t('Only show ignored contacts'),
'id' => 'showignored-tab',
'accesskey' => 'i',
],
[
- 'label' => t('Archived'),
+ 'label' => L10n::t('Archived'),
'url' => 'contacts/archived',
'sel' => ($archived) ? 'active' : '',
- 'title' => t('Only show archived contacts'),
+ 'title' => L10n::t('Only show archived contacts'),
'id' => 'showarchived-tab',
'accesskey' => 'y',
],
[
- 'label' => t('Hidden'),
+ 'label' => L10n::t('Hidden'),
'url' => 'contacts/hidden',
'sel' => ($hidden) ? 'active' : '',
- 'title' => t('Only show hidden contacts'),
+ 'title' => L10n::t('Only show hidden contacts'),
'id' => 'showhidden-tab',
'accesskey' => 'h',
],
$tpl = get_markup_template("contacts-template.tpl");
$o .= replace_macros($tpl, [
'$baseurl' => System::baseUrl(),
- '$header' => t('Contacts') . (($nets) ? ' - ' . ContactSelector::networkToName($nets) : ''),
+ '$header' => L10n::t('Contacts') . (($nets) ? ' - ' . ContactSelector::networkToName($nets) : ''),
'$tabs' => $t,
'$total' => $total,
'$search' => $search_hdr,
- '$desc' => t('Search your contacts'),
- '$finding' => $searching ? t('Results for: %s', $search) : "",
- '$submit' => t('Find'),
+ '$desc' => L10n::t('Search your contacts'),
+ '$finding' => $searching ? L10n::t('Results for: %s', $search) : "",
+ '$submit' => L10n::t('Find'),
'$cmd' => $a->cmd,
'$contacts' => $contacts,
- '$contact_drop_confirm' => t('Do you really want to delete this contact?'),
+ '$contact_drop_confirm' => L10n::t('Do you really want to delete this contact?'),
'multiselect' => 1,
'$batch_actions' => [
- 'contacts_batch_update' => t('Update'),
- 'contacts_batch_block' => t('Block') . "/" . t("Unblock"),
- "contacts_batch_ignore" => t('Ignore') . "/" . t("Unignore"),
- "contacts_batch_archive" => t('Archive') . "/" . t("Unarchive"),
- "contacts_batch_drop" => t('Delete'),
+ 'contacts_batch_update' => L10n::t('Update'),
+ 'contacts_batch_block' => L10n::t('Block') . "/" . L10n::t("Unblock"),
+ "contacts_batch_ignore" => L10n::t('Ignore') . "/" . L10n::t("Unignore"),
+ "contacts_batch_archive" => L10n::t('Archive') . "/" . L10n::t("Unarchive"),
+ "contacts_batch_drop" => L10n::t('Delete'),
],
- '$h_batch_actions' => t('Batch Actions'),
+ '$h_batch_actions' => L10n::t('Batch Actions'),
'$paginate' => paginate($a),
]);
// tabs
$tabs = [
[
- 'label' => t('Status'),
+ 'label' => L10n::t('Status'),
'url' => "contacts/" . $contact_id . "/posts",
'sel' => (($active_tab == 1) ? 'active' : ''),
- 'title' => t('Status Messages and Posts'),
+ 'title' => L10n::t('Status Messages and Posts'),
'id' => 'status-tab',
'accesskey' => 'm',
],
[
- 'label' => t('Profile'),
+ 'label' => L10n::t('Profile'),
'url' => "contacts/" . $contact_id,
'sel' => (($active_tab == 2) ? 'active' : ''),
- 'title' => t('Profile Details'),
+ 'title' => L10n::t('Profile Details'),
'id' => 'profile-tab',
'accesskey' => 'o',
]
// Show this tab only if there is visible friend list
$x = GContact::countAllFriends(local_user(), $contact_id);
if ($x) {
- $tabs[] = ['label' => t('Contacts'),
+ $tabs[] = ['label' => L10n::t('Contacts'),
'url' => "allfriends/" . $contact_id,
'sel' => (($active_tab == 3) ? 'active' : ''),
- 'title' => t('View all contacts'),
+ 'title' => L10n::t('View all contacts'),
'id' => 'allfriends-tab',
'accesskey' => 't'];
}
// Show this tab only if there is visible common friend list
$common = GContact::countCommonFriends(local_user(), $contact_id);
if ($common) {
- $tabs[] = ['label' => t('Common Friends'),
+ $tabs[] = ['label' => L10n::t('Common Friends'),
'url' => "common/loc/" . local_user() . "/" . $contact_id,
'sel' => (($active_tab == 4) ? 'active' : ''),
- 'title' => t('View all common friends'),
+ 'title' => L10n::t('View all common friends'),
'id' => 'common-loc-tab',
'accesskey' => 'd'
];
}
- $tabs[] = ['label' => t('Advanced'),
+ $tabs[] = ['label' => L10n::t('Advanced'),
'url' => 'crepair/' . $contact_id,
'sel' => (($active_tab == 5) ? 'active' : ''),
- 'title' => t('Advanced Contact Settings'),
+ 'title' => L10n::t('Advanced Contact Settings'),
'id' => 'advanced-tab',
'accesskey' => 'r'
];
switch ($rr['rel']) {
case CONTACT_IS_FRIEND:
$dir_icon = 'images/lrarrow.gif';
- $alt_text = t('Mutual Friendship');
+ $alt_text = L10n::t('Mutual Friendship');
break;
case CONTACT_IS_FOLLOWER;
$dir_icon = 'images/larrow.gif';
- $alt_text = t('is a fan of yours');
+ $alt_text = L10n::t('is a fan of yours');
break;
case CONTACT_IS_SHARING;
$dir_icon = 'images/rarrow.gif';
- $alt_text = t('you are a fan of');
+ $alt_text = L10n::t('you are a fan of');
break;
default:
break;
}
return [
- 'img_hover' => t('Visit %s\'s profile [%s]', $rr['name'], $rr['url']),
- 'edit_hover' => t('Edit contact'),
+ 'img_hover' => L10n::t('Visit %s\'s profile [%s]', $rr['name'], $rr['url']),
+ 'edit_hover' => L10n::t('Edit contact'),
'photo_menu' => Contact::photoMenu($rr),
'id' => $rr['id'],
'alt_text' => $alt_text,
// Provide friend suggestion only for Friendica contacts
if ($contact['network'] === NETWORK_DFRN) {
$contact_actions['suggest'] = [
- 'label' => t('Suggest friends'),
+ 'label' => L10n::t('Suggest friends'),
'url' => 'fsuggest/' . $contact['id'],
'title' => '',
'sel' => '',
if ($poll_enabled) {
$contact_actions['update'] = [
- 'label' => t('Update now'),
+ 'label' => L10n::t('Update now'),
'url' => 'contacts/' . $contact['id'] . '/update',
'title' => '',
'sel' => '',
}
$contact_actions['block'] = [
- 'label' => (intval($contact['blocked']) ? t('Unblock') : t('Block') ),
+ 'label' => (intval($contact['blocked']) ? L10n::t('Unblock') : L10n::t('Block') ),
'url' => 'contacts/' . $contact['id'] . '/block',
- 'title' => t('Toggle Blocked status'),
+ 'title' => L10n::t('Toggle Blocked status'),
'sel' => (intval($contact['blocked']) ? 'active' : ''),
'id' => 'toggle-block',
];
$contact_actions['ignore'] = [
- 'label' => (intval($contact['readonly']) ? t('Unignore') : t('Ignore') ),
+ 'label' => (intval($contact['readonly']) ? L10n::t('Unignore') : L10n::t('Ignore') ),
'url' => 'contacts/' . $contact['id'] . '/ignore',
- 'title' => t('Toggle Ignored status'),
+ 'title' => L10n::t('Toggle Ignored status'),
'sel' => (intval($contact['readonly']) ? 'active' : ''),
'id' => 'toggle-ignore',
];
$contact_actions['archive'] = [
- 'label' => (intval($contact['archive']) ? t('Unarchive') : t('Archive') ),
+ 'label' => (intval($contact['archive']) ? L10n::t('Unarchive') : L10n::t('Archive') ),
'url' => 'contacts/' . $contact['id'] . '/archive',
- 'title' => t('Toggle Archive status'),
+ 'title' => L10n::t('Toggle Archive status'),
'sel' => (intval($contact['archive']) ? 'active' : ''),
'id' => 'toggle-archive',
];
$contact_actions['delete'] = [
- 'label' => t('Delete'),
+ 'label' => L10n::t('Delete'),
'url' => 'contacts/' . $contact['id'] . '/drop',
- 'title' => t('Delete contact'),
+ 'title' => L10n::t('Delete contact'),
'sel' => '',
'id' => 'delete',
];
<?php
-
/**
+ * @file mod/credits.php
* Show a credits page for all the developers who helped with the project
* (only contributors to the git repositories for friendica core and the
* addons repository will be listed though ATM)
*/
use Friendica\App;
+use Friendica\Core\L10n;
function credits_content()
{
$names = explode("\n", htmlspecialchars($credits_string));
$tpl = get_markup_template('credits.tpl');
return replace_macros($tpl, [
- '$title' => t('Credits'),
- '$thanks' => t('Friendica is a community project, that would not be possible without the help of many people. Here is a list of those who have contributed to the code or the translation of Friendica. Thank you all!'),
+ '$title' => L10n::t('Credits'),
+ '$thanks' => L10n::t('Friendica is a community project, that would not be possible without the help of many people. Here is a list of those who have contributed to the code or the translation of Friendica. Thank you all!'),
'$names' => $names,
]);
}
*/
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
}
if ($r) {
- info(t('Contact settings applied.') . EOL);
+ info(L10n::t('Contact settings applied.') . EOL);
} else {
- notice(t('Contact update failed.') . EOL);
+ notice(L10n::t('Contact update failed.') . EOL);
}
return;
function crepair_content(App $a)
{
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
}
if (!DBM::is_result($contact)) {
- notice(t('Contact not found.') . EOL);
+ notice(L10n::t('Contact not found.') . EOL);
return;
}
- $warning = t('<strong>WARNING: This is highly advanced</strong> and if you enter incorrect information your communications with this contact may stop working.');
- $info = t('Please use your browser \'Back\' button <strong>now</strong> if you are uncertain what to do on this page.');
+ $warning = L10n::t('<strong>WARNING: This is highly advanced</strong> and if you enter incorrect information your communications with this contact may stop working.');
+ $info = L10n::t('Please use your browser \'Back\' button <strong>now</strong> if you are uncertain what to do on this page.');
$returnaddr = "contacts/$cid";
}
if ($contact['network'] == NETWORK_FEED) {
- $remote_self_options = ['0' => t('No mirroring'), '1' => t('Mirror as forwarded posting'), '2' => t('Mirror as my own posting')];
+ $remote_self_options = ['0' => L10n::t('No mirroring'), '1' => L10n::t('Mirror as forwarded posting'), '2' => L10n::t('Mirror as my own posting')];
} else {
- $remote_self_options = ['0' => t('No mirroring'), '2' => t('Mirror as my own posting')];
+ $remote_self_options = ['0' => L10n::t('No mirroring'), '2' => L10n::t('Mirror as my own posting')];
}
$update_profile = in_array($contact['network'], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS]);
'$warning' => $warning,
'$info' => $info,
'$returnaddr' => $returnaddr,
- '$return' => t('Return to contact editor'),
+ '$return' => L10n::t('Return to contact editor'),
'$update_profile' => $update_profile,
- '$udprofilenow' => t('Refetch contact data'),
+ '$udprofilenow' => L10n::t('Refetch contact data'),
'$contact_id' => $contact['id'],
- '$lbl_submit' => t('Submit'),
- '$label_remote_self' => t('Remote Self'),
+ '$lbl_submit' => L10n::t('Submit'),
+ '$label_remote_self' => L10n::t('Remote Self'),
'$allow_remote_self' => $allow_remote_self,
'$remote_self' => ['remote_self',
- t('Mirror postings from this contact'),
+ L10n::t('Mirror postings from this contact'),
$contact['remote_self'],
- t('Mark this contact as remote_self, this will cause friendica to repost new entries from this contact.'),
+ L10n::t('Mark this contact as remote_self, this will cause friendica to repost new entries from this contact.'),
$remote_self_options
],
- '$name' => ['name', t('Name') , htmlentities($contact['name'])],
- '$nick' => ['nick', t('Account Nickname'), htmlentities($contact['nick'])],
- '$attag' => ['attag', t('@Tagname - overrides Name/Nickname'), $contact['attag']],
- '$url' => ['url', t('Account URL'), $contact['url']],
- '$request' => ['request', t('Friend Request URL'), $contact['request']],
- 'confirm' => ['confirm', t('Friend Confirm URL'), $contact['confirm']],
- 'notify' => ['notify', t('Notification Endpoint URL'), $contact['notify']],
- 'poll' => ['poll', t('Poll/Feed URL'), $contact['poll']],
- 'photo' => ['photo', t('New photo from this URL'), ''],
+ '$name' => ['name', L10n::t('Name') , htmlentities($contact['name'])],
+ '$nick' => ['nick', L10n::t('Account Nickname'), htmlentities($contact['nick'])],
+ '$attag' => ['attag', L10n::t('@Tagname - overrides Name/Nickname'), $contact['attag']],
+ '$url' => ['url', L10n::t('Account URL'), $contact['url']],
+ '$request' => ['request', L10n::t('Friend Request URL'), $contact['request']],
+ 'confirm' => ['confirm', L10n::t('Friend Confirm URL'), $contact['confirm']],
+ 'notify' => ['notify', L10n::t('Notification Endpoint URL'), $contact['notify']],
+ 'poll' => ['poll', L10n::t('Poll/Feed URL'), $contact['poll']],
+ 'photo' => ['photo', L10n::t('New photo from this URL'), ''],
]);
return $o;
<?php
-
+/**
+ * @file mod/delegate.php
+ */
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
function delegate_content(App $a)
{
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
dbesc(NETWORK_DFRN)
);
if (!DBM::is_result($r)) {
- notice(t('No potential page delegates located.') . EOL);
+ notice(L10n::t('No potential page delegates located.') . EOL);
return;
}
settings_init($a);
$o = replace_macros(get_markup_template('delegate.tpl'), [
- '$header' => t('Delegate Page Management'),
+ '$header' => L10n::t('Delegate Page Management'),
'$base' => System::baseUrl(),
- '$desc' => t('Delegates are able to manage all aspects of this account/page except for basic account settings. Please do not delegate your personal account to anybody that you do not trust completely.'),
- '$head_managers' => t('Existing Page Managers'),
+ '$desc' => L10n::t('Delegates are able to manage all aspects of this account/page except for basic account settings. Please do not delegate your personal account to anybody that you do not trust completely.'),
+ '$head_managers' => L10n::t('Existing Page Managers'),
'$managers' => $full_managers,
- '$head_delegates' => t('Existing Page Delegates'),
+ '$head_delegates' => L10n::t('Existing Page Delegates'),
'$delegates' => $delegates,
- '$head_potentials' => t('Potential Delegates'),
+ '$head_potentials' => L10n::t('Potential Delegates'),
'$potentials' => $potentials,
- '$remove' => t('Remove'),
- '$add' => t('Add'),
- '$none' => t('No entries.')
+ '$remove' => L10n::t('Remove'),
+ '$add' => L10n::t('Add'),
+ '$none' => L10n::t('No entries.')
]);
<?php
-
/**
* @file mod/dfrn_confirm.php
* @brief Module: dfrn_confirm
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
if (!x($_POST, 'source_url')) {
$uid = defaults($handsfree, 'uid', local_user());
if (!$uid) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$user = dba::selectFirst('user', [], ['uid' => $uid]);
if (!DBM::is_result($user)) {
- notice(t('Profile not found.') . EOL);
+ notice(L10n::t('Profile not found.') . EOL);
return;
}
);
if (!DBM::is_result($r)) {
logger('Contact not found in DB.');
- notice(t('Contact not found.') . EOL);
- notice(t('This may occasionally happen if contact was requested by both persons and it has already been approved.') . EOL);
+ notice(L10n::t('Contact not found.') . EOL);
+ notice(L10n::t('This may occasionally happen if contact was requested by both persons and it has already been approved.') . EOL);
return;
}
// We shouldn't proceed, because the xml parser might choke,
// and $status is going to be zero, which indicates success.
// We can hardly call this a success.
- notice(t('Response from remote site was not understood.') . EOL);
+ notice(L10n::t('Response from remote site was not understood.') . EOL);
return;
}
if (strlen($leading_junk) && Config::get('system', 'debugging')) {
// This might be more common. Mixed error text and some XML.
// If we're configured for debugging, show the text. Proceed in either case.
- notice(t('Unexpected response from remote site: ') . EOL . $leading_junk . EOL);
+ notice(L10n::t('Unexpected response from remote site: ') . EOL . $leading_junk . EOL);
}
if (stristr($res, "<status") === false) {
// wrong xml! stop here!
- notice(t('Unexpected response from remote site: ') . EOL . htmlspecialchars($res) . EOL);
+ notice(L10n::t('Unexpected response from remote site: ') . EOL . htmlspecialchars($res) . EOL);
return;
}
);
case 2:
- notice(t("Temporary failure. Please wait and try again.") . EOL);
+ notice(L10n::t("Temporary failure. Please wait and try again.") . EOL);
break;
case 3:
- notice(t("Introduction failed or was revoked.") . EOL);
+ notice(L10n::t("Introduction failed or was revoked.") . EOL);
break;
}
if (strlen($message)) {
- notice(t('Remote site reported: ') . $message . EOL);
+ notice(L10n::t('Remote site reported: ') . $message . EOL);
}
if (($status == 0) && ($intro_id)) {
/// @TODO is DBM::is_result() working here?
if (!DBM::is_result($r)) {
- notice(t('Unable to set contact photo.') . EOL);
+ notice(L10n::t('Unable to set contact photo.') . EOL);
}
// reload contact info
$arr['verb'] = ACTIVITY_FRIEND;
$arr['object-type'] = ACTIVITY_OBJ_PERSON;
- $arr['body'] = t('%1$s is now friends with %2$s', $A, $B) . "\n\n\n" . $BPhoto;
+ $arr['body'] = L10n::t('%1$s is now friends with %2$s', $A, $B) . "\n\n\n" . $BPhoto;
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $contact['name'] . '</title>'
. '<id>' . $contact['url'] . '/' . $contact['name'] . '</id>';
// Find our user's account
$user = dba::selectFirst('user', [], ['nickname' => $node]);
if (!DBM::is_result($user)) {
- $message = t('No user record found for \'%s\' ', $node);
+ $message = L10n::t('No user record found for \'%s\' ', $node);
xml_status(3, $message); // failure
// NOTREACHED
}
if (!strstr($my_prvkey, 'PRIVATE KEY')) {
- $message = t('Our site encryption key is apparently messed up.');
+ $message = L10n::t('Our site encryption key is apparently messed up.');
xml_status(3, $message);
}
if (!strlen($decrypted_source_url)) {
- $message = t('Empty site URL was provided or URL could not be decrypted by us.');
+ $message = L10n::t('Empty site URL was provided or URL could not be decrypted by us.');
xml_status(3, $message);
// NOTREACHED
}
$contact = dba::selectFirst('contact', [], ['url' => $newurl, 'uid' => $local_uid]);
if (!DBM::is_result($contact)) {
// this is either a bogus confirmation (?) or we deleted the original introduction.
- $message = t('Contact record was not found for you on our site.');
+ $message = L10n::t('Contact record was not found for you on our site.');
xml_status(3, $message);
return; // NOTREACHED
}
$dfrn_record = $contact['id'];
if (!$foreign_pubkey) {
- $message = t('Site public key not available in contact record for URL %s.', $decrypted_source_url);
+ $message = L10n::t('Site public key not available in contact record for URL %s.', $decrypted_source_url);
xml_status(3, $message);
}
}
if (dba::exists('contact', ['dfrn-id' => $decrypted_dfrn_id])) {
- $message = t('The ID provided by your system is a duplicate on our system. It should work if you try again.');
+ $message = L10n::t('The ID provided by your system is a duplicate on our system. It should work if you try again.');
xml_status(1, $message); // Birthday paradox - duplicate dfrn-id
// NOTREACHED
}
intval($dfrn_record)
);
if (!DBM::is_result($r)) {
- $message = t('Unable to set your contact credentials on our system.');
+ $message = L10n::t('Unable to set your contact credentials on our system.');
xml_status(3, $message);
}
intval($dfrn_record)
);
if (!DBM::is_result($r)) { // indicates schema is messed up or total db failure
- $message = t('Unable to update your contact profile details on our system');
+ $message = L10n::t('Unable to update your contact profile details on our system');
xml_status(3, $message);
}
'to_email' => $combined['email'],
'uid' => $combined['uid'],
'link' => System::baseUrl() . '/contacts/' . $dfrn_record,
- 'source_name' => ((strlen(stripslashes($combined['name']))) ? stripslashes($combined['name']) : t('[Name Withheld]')),
+ 'source_name' => ((strlen(stripslashes($combined['name']))) ? stripslashes($combined['name']) : L10n::t('[Name Withheld]')),
'source_link' => $combined['url'],
'source_photo' => $combined['photo'],
'verb' => ($mutual?ACTIVITY_FRIEND:ACTIVITY_FOLLOW),
$arr['verb'] = ACTIVITY_JOIN;
$arr['object-type'] = ACTIVITY_OBJ_GROUP;
- $arr['body'] = t('%1$s has joined %2$s', $A, $B) . "\n\n\n" . $BPhoto;
+ $arr['body'] = L10n::t('%1$s has joined %2$s', $A, $B) . "\n\n\n" . $BPhoto;
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_GROUP . '</type><title>' . $combined['name'] . '</title>'
. '<id>' . $combined['url'] . '/' . $combined['name'] . '</id>';
$arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $combined['url'] . '" />' . "\n");
*/
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
if (DBM::is_result($r)) {
if (strlen($r[0]['dfrn-id'])) {
// We don't need to be here. It has already happened.
- notice(t("This introduction has already been accepted.") . EOL);
+ notice(L10n::t("This introduction has already been accepted.") . EOL);
return;
} else {
$contact_record = $r[0];
$parms = Probe::profile($dfrn_url);
if (!count($parms)) {
- notice(t('Profile location is not valid or does not contain profile information.') . EOL);
+ notice(L10n::t('Profile location is not valid or does not contain profile information.') . EOL);
return;
} else {
if (!x($parms, 'fn')) {
- notice(t('Warning: profile location has no identifiable owner name.') . EOL);
+ notice(L10n::t('Warning: profile location has no identifiable owner name.') . EOL);
}
if (!x($parms, 'photo')) {
- notice(t('Warning: profile location has no profile photo.') . EOL);
+ notice(L10n::t('Warning: profile location has no profile photo.') . EOL);
}
$invalid = Probe::validDfrn($parms);
if ($invalid) {
}
// invalid/bogus request
- notice(t('Unrecoverable protocol error.') . EOL);
+ notice(L10n::t('Unrecoverable protocol error.') . EOL);
goaway(System::baseUrl());
return; // NOTREACHED
}
*
*/
if (!(is_array($a->profile) && count($a->profile))) {
- notice(t('Profile unavailable.') . EOL);
+ notice(L10n::t('Profile unavailable.') . EOL);
return;
}
);
if (DBM::is_result($r) && count($r) > $maxreq) {
notice(sprintf(t('%s has received too many connection requests today.'), $a->profile['name']) . EOL);
- notice(t('Spam protection measures have been invoked.') . EOL);
- notice(t('Friends are advised to please try again in 24 hours.') . 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;
}
}
$url = trim($_POST['dfrn_url']);
if (!strlen($url)) {
- notice(t("Invalid locator") . EOL);
+ notice(L10n::t("Invalid locator") . EOL);
return;
}
if (DBM::is_result($ret)) {
if (strlen($ret[0]['issued-id'])) {
- notice(t('You have already introduced yourself here.') . EOL);
+ 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);
} else {
$url = validate_url($url);
if (!$url) {
- notice(t('Invalid profile URL.') . EOL);
+ notice(L10n::t('Invalid profile URL.') . EOL);
goaway(System::baseUrl() . '/' . $a->cmd);
return; // NOTREACHED
}
if (!allowed_url($url)) {
- notice(t('Disallowed profile URL.') . EOL);
+ notice(L10n::t('Disallowed profile URL.') . EOL);
goaway(System::baseUrl() . '/' . $a->cmd);
return; // NOTREACHED
}
if (blocked_url($url)) {
- notice(t('Blocked domain') . EOL);
+ notice(L10n::t('Blocked domain') . EOL);
goaway(System::baseUrl() . '/' . $a->cmd);
return; // NOTREACHED
}
$parms = Probe::profile(($hcard) ? $hcard : $url);
if (!count($parms)) {
- notice(t('Profile location is not valid or does not contain profile information.') . EOL);
+ notice(L10n::t('Profile location is not valid or does not contain profile information.') . EOL);
goaway(System::baseUrl() . '/' . $a->cmd);
} else {
if (!x($parms, 'fn')) {
- notice(t('Warning: profile location has no identifiable owner name.') . EOL);
+ notice(L10n::t('Warning: profile location has no identifiable owner name.') . EOL);
}
if (!x($parms, 'photo')) {
- notice(t('Warning: profile location has no profile photo.') . EOL);
+ notice(L10n::t('Warning: profile location has no profile photo.') . EOL);
}
$invalid = Probe::validDfrn($parms);
if ($invalid) {
}
}
if ($r === false) {
- notice(t('Failed to update contact record.') . EOL);
+ notice(L10n::t('Failed to update contact record.') . EOL);
return;
}
// NOTREACHED
// END $network != NETWORK_PHANTOM
} else {
- notice(t("Remote subscription can't be done for your network. Please subscribe directly on your system.") . EOL);
+ notice(L10n::t("Remote subscription can't be done for your network. Please subscribe directly on your system.") . EOL);
return;
}
} return;
// Edge case, but can easily happen in the wild. This person is authenticated,
// but not as the person who needs to deal with this request.
if ($a->user['nickname'] != $a->argv[1]) {
- notice(t("Incorrect identity currently logged in. Please login to <strong>this</strong> profile.") . EOL);
+ notice(L10n::t("Incorrect identity currently logged in. Please login to <strong>this</strong> profile.") . EOL);
return Login::form();
}
$_POST["confirm_key"] = $confirm_key;
$_POST["localconfirm"] = 1;
$_POST["hidden-contact"] = 0;
- $_POST["submit"] = t('Confirm');
+ $_POST["submit"] = L10n::t('Confirm');
dfrn_request_post($a);
$o = replace_macros($tpl, [
'$dfrn_url' => $dfrn_url,
'$aes_allow' => (($aes_allow) ? '<input type="hidden" name="aes_allow" value="1" />' : "" ),
- '$hidethem' => t('Hide this contact'),
+ '$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),
- '$submit' => t('Confirm'),
+ '$submit' => L10n::t('Confirm'),
'$uid' => $_SESSION['uid'],
'$nickname' => $a->user['nickname'],
'dfrn_rawurl' => $_GET['dfrn_url']
'to_email' => $r[0]['email'],
'uid' => $r[0]['uid'],
'link' => System::baseUrl() . '/notifications/intros',
- 'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
+ 'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : L10n::t('[Name Withheld]')),
'source_link' => $r[0]['url'],
'source_photo' => $r[0]['photo'],
'verb' => ACTIVITY_REQ_FRIEND,
// Normal web request. Display our user's introduction form.
if ((Config::get('system', 'block_public')) && (!local_user()) && (!remote_user())) {
if (!Config::get('system', 'local_block')) {
- notice(t('Public access denied.') . EOL);
+ notice(L10n::t('Public access denied.') . EOL);
return;
}
}
$tpl = get_markup_template('auto_request.tpl');
}
- $page_desc = t("Please enter your 'Identity Address' from one of the following supported communications networks:");
+ $page_desc = L10n::t("Please enter your 'Identity Address' from one of the following supported communications networks:");
$invite_desc = sprintf(
t('If you are not yet a member of the free social web, <a href="%s">follow this link to find a public Friendica site and join us today</a>.'),
);
$o = replace_macros($tpl, [
- '$header' => t('Friend/Connection Request'),
- '$desc' => t('Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@gnusocial.de'),
- '$pls_answer' => t('Please answer the following:'),
- '$does_know_you' => ['knowyou', sprintf(t('Does %s know you?'), $a->profile['name']), false, '', [t('No'), t('Yes')]],
- '$add_note' => t('Add a personal note:'),
+ '$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')]],
+ '$add_note' => L10n::t('Add a personal note:'),
'$page_desc' => $page_desc,
- '$friendica' => t('Friendica'),
- '$statusnet' => t('GNU Social (Pleroma, Mastodon)'),
- '$diaspora' => t('Diaspora (Socialhome, Hubzilla)'),
+ '$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),
- '$your_address' => t('Your Identity Address:'),
+ '$your_address' => L10n::t('Your Identity Address:'),
'$invite_desc' => $invite_desc,
- '$submit' => t('Submit Request'),
- '$cancel' => t('Cancel'),
+ '$submit' => L10n::t('Submit Request'),
+ '$cancel' => L10n::t('Cancel'),
'$nickname' => $a->argv[1],
'$name' => $a->profile['name'],
'$myaddr' => $myaddr
use Friendica\Content\Widget;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
if((Config::get('system','block_public')) && (! local_user()) && (! remote_user()) ||
(Config::get('system','block_local_dir')) && (! local_user()) && (! remote_user())) {
- notice( t('Public access denied.') . EOL);
+ notice(L10n::t('Public access denied.') . EOL);
return;
}
}
// if(strlen($rr['dob'])) {
// if(($years = age($rr['dob'],$rr['timezone'],'')) != 0)
-// $details .= '<br />' . t('Age: ') . $years ;
+// $details .= '<br />' . L10n::t('Age: ') . $years ;
// }
// if(strlen($rr['gender']))
-// $details .= '<br />' . t('Gender: ') . $rr['gender'];
+// $details .= '<br />' . L10n::t('Gender: ') . $rr['gender'];
$profile = $rr;
|| (x($profile,'region') == 1)
|| (x($profile,'postal-code') == 1)
|| (x($profile,'country-name') == 1))
- $location = t('Location:');
+ $location = L10n::t('Location:');
- $gender = ((x($profile,'gender') == 1) ? t('Gender:') : False);
+ $gender = ((x($profile,'gender') == 1) ? L10n::t('Gender:') : False);
- $marital = ((x($profile,'marital') == 1) ? t('Status:') : False);
+ $marital = ((x($profile,'marital') == 1) ? L10n::t('Status:') : False);
- $homepage = ((x($profile,'homepage') == 1) ? t('Homepage:') : False);
+ $homepage = ((x($profile,'homepage') == 1) ? L10n::t('Homepage:') : False);
- $about = ((x($profile,'about') == 1) ? t('About:') : False);
+ $about = ((x($profile,'about') == 1) ? L10n::t('About:') : False);
$location_e = $location;
unset($profile);
unset($location);
- if(! $arr['entry'])
+ if (!$arr['entry']) {
continue;
+ }
$entries[] = $arr['entry'];
-
}
$tpl = get_markup_template('directory_header.tpl');
$o .= replace_macros($tpl, [
'$search' => $search,
- '$globaldir' => t('Global Directory'),
+ '$globaldir' => L10n::t('Global Directory'),
'$gdirpath' => $gdirpath,
- '$desc' => t('Find on this site'),
+ '$desc' => L10n::t('Find on this site'),
'$contacts' => $entries,
- '$finding' => t('Results for:'),
+ '$finding' => L10n::t('Results for:'),
'$findterm' => (strlen($search) ? $search : ""),
- '$title' => t('Site Directory'),
- '$submit' => t('Find'),
+ '$title' => L10n::t('Site Directory'),
+ '$submit' => L10n::t('Find'),
'$paginate' => paginate($a),
]);
-
+ } else {
+ info(L10n::t("No entries \x28some entries may be hidden\x29.") . EOL);
}
- else
- info( t("No entries \x28some entries may be hidden\x29.") . EOL);
return $o;
}
use Friendica\Content\ContactSelector;
use Friendica\Content\Widget;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Model\Contact;
function dirfind_init(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL );
+ notice(L10n::t('Permission denied.') . EOL );
return;
}
if (strpos($search,'@') === 0) {
$search = substr($search,1);
- $header = sprintf( t('People Search - %s'), $search);
+ $header = sprintf(L10n::t('People Search - %s'), $search);
if ((valid_email($search) && validate_email($search)) ||
(substr(normalise_link($search), 0, 7) == "http://")) {
$user_data = Probe::uri($search);
if (strpos($search,'!') === 0) {
$search = substr($search,1);
$community = true;
- $header = sprintf( t('Forum Search - %s'), $search);
+ $header = sprintf(L10n::t('Forum Search - %s'), $search);
}
$o = '';
}
} else {
$connlnk = System::baseUrl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
- $conntxt = t('Connect');
+ $conntxt = L10n::t('Connect');
$photo_menu = [
'profile' => [t("View Profile"), Profile::zrl($jj->url)],
'follow' => [t("Connect/Follow"), $connlnk]
]);
} else {
- info( t('No matches') . EOL);
+ info(L10n::t('No matches') . EOL);
}
}
*/
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
if (!DBM::is_result($r)) {
$a->error = 404;
- notice(t('Item not found.') . EOL);
+ notice(L10n::t('Item not found.') . EOL);
return;
}
} elseif (($a->argc == 3) && ($nick == 'feed-item')) {
function display_content(App $a, $update = false, $update_uid = 0) {
if (Config::get('system','block_public') && !local_user() && !remote_user()) {
- notice(t('Public access denied.') . EOL);
+ notice(L10n::t('Public access denied.') . EOL);
return;
}
if (!$item_id) {
$a->error = 404;
- notice(t('Item not found.').EOL);
+ notice(L10n::t('Item not found.').EOL);
return;
}
$is_owner = (local_user() && (in_array($a->profile['profile_uid'], [local_user(), 0])) ? true : false);
if (x($a->profile, 'hidewall') && !$is_owner && !$remote_contact) {
- notice(t('Access to this profile has been restricted.') . EOL);
+ notice(L10n::t('Access to this profile has been restricted.') . EOL);
return;
}
);
if (!DBM::is_result($r)) {
- notice(t('Item not found.') . EOL);
+ notice(L10n::t('Item not found.') . EOL);
return $o;
}
use Friendica\Content\Feature;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
-require_once('include/acl_selectors.php');
+require_once 'include/acl_selectors.php';
function editpost_content(App $a) {
$o = '';
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
if (! $post_id) {
- notice( t('Item not found') . EOL);
+ notice(L10n::t('Item not found') . EOL);
return;
}
);
if (! DBM::is_result($itm)) {
- notice( t('Item not found') . EOL);
+ notice(L10n::t('Item not found') . EOL);
return;
}
use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
$onerror_url = System::baseUrl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish";
if (strcmp($finish, $start) < 0 && !$nofinish) {
- notice(t('Event can not end before it has started.') . EOL);
+ 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.');
killme();
}
if ((! $summary) || ($start === NULL_DATE)) {
- notice(t('Event title and start time are required.') . EOL);
+ notice(L10n::t('Event title and start time are required.') . EOL);
if (intval($_REQUEST['preview'])) {
echo t('Event title and start time are required.');
killme();
function events_content(App $a) {
if (! local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
}
if ($del == 0) {
- notice(t('Failed to remove event' ) . EOL);
+ notice(L10n::t('Failed to remove event') . EOL);
} else {
info(t('Event removed') . EOL);
}
*/
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
function follow_post(App $a) {
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
goaway($_SESSION['return_url']);
// NOTREACHED
}
info(t('Contact added').EOL);
- if (strstr($return_url,'contacts')) {
+ if (strstr($return_url, 'contacts')) {
goaway(System::baseUrl().'/contacts/'.$contact_id);
}
function follow_content(App $a) {
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
goaway($_SESSION['return_url']);
// NOTREACHED
}
dbesc(normalise_link($url)), dbesc($url), dbesc(NETWORK_STATUSNET));
if ($r) {
- notice(t('You already added this contact.').EOL);
+ notice(L10n::t('You already added this contact.').EOL);
$submit = "";
//goaway($_SESSION['return_url']);
// NOTREACHED
$ret = Probe::uri($url);
- if (($ret["network"] == NETWORK_DIASPORA) && !Config::get('system','diaspora_enabled')) {
- notice(t("Diaspora support isn't enabled. Contact can't be added.") . EOL);
+ if (($ret["network"] == NETWORK_DIASPORA) && !Config::get('system', 'diaspora_enabled')) {
+ notice(L10n::t("Diaspora support isn't enabled. Contact can't be added.") . EOL);
$submit = "";
//goaway($_SESSION['return_url']);
// NOTREACHED
}
- if (($ret["network"] == NETWORK_OSTATUS) && Config::get('system','ostatus_disabled')) {
- notice(t("OStatus support is disabled. Contact can't be added.") . EOL);
+ if (($ret["network"] == NETWORK_OSTATUS) && Config::get('system', 'ostatus_disabled')) {
+ notice(L10n::t("OStatus support is disabled. Contact can't be added.") . EOL);
$submit = "";
//goaway($_SESSION['return_url']);
// NOTREACHED
}
if ($ret["network"] == NETWORK_PHANTOM) {
- notice(t("The network type couldn't be detected. Contact can't be added.") . EOL);
+ notice(L10n::t("The network type couldn't be detected. Contact can't be added.") . EOL);
$submit = "";
//goaway($_SESSION['return_url']);
// NOTREACHED
$r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND `self` LIMIT 1", intval($uid));
if (!$r) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
goaway($_SESSION['return_url']);
// NOTREACHED
}
* @file mod/fsuggest.php
*/
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
intval(local_user())
);
if (! DBM::is_result($r)) {
- notice( t('Contact not found.') . EOL);
+ notice(L10n::t('Contact not found.') . EOL);
return;
}
$contact = $r[0];
Worker::add(PRIORITY_HIGH, 'Notifier', 'suggest', $fsuggest_id);
}
- info( t('Friend suggestion sent.') . EOL);
+ info(L10n::t('Friend suggestion sent.') . EOL);
}
}
require_once 'include/acl_selectors.php';
if (! local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
intval(local_user())
);
if (! DBM::is_result($r)) {
- notice(t('Contact not found.') . EOL);
+ notice(L10n::t('Contact not found.') . EOL);
return;
}
$contact = $r[0];
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
function group_post(App $a) {
if (! local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
goaway(System::baseUrl() . '/group/' . $r);
}
} else {
- notice(t('Could not create group.') . EOL);
+ notice(L10n::t('Could not create group.') . EOL);
}
goaway(System::baseUrl() . '/group');
return; // NOTREACHED
intval(local_user())
);
if (! DBM::is_result($r)) {
- notice(t('Group not found.') . EOL);
+ notice(L10n::t('Group not found.') . EOL);
goaway(System::baseUrl() . '/contacts');
return; // NOTREACHED
}
$change = false;
if (! local_user()) {
- notice(t('Permission denied') . EOL);
+ notice(L10n::t('Permission denied') . EOL);
return;
}
if ($result) {
info(t('Group removed.') . EOL);
} else {
- notice(t('Unable to remove group.') . EOL);
+ notice(L10n::t('Unable to remove group.') . EOL);
}
}
goaway(System::baseUrl() . '/group');
);
if (! DBM::is_result($r)) {
- notice(t('Group not found.') . EOL);
+ notice(L10n::t('Group not found.') . EOL);
goaway(System::baseUrl() . '/contacts');
}
*/
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Model\Profile;
if ($a->argc > 1) {
$which = $a->argv[1];
} else {
- notice(t('No profile') . EOL);
+ notice(L10n::t('No profile') . EOL);
$a->error = 404;
return;
}
*/
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Protocol\Email;
function invite_post(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$current_invites = intval(PConfig::get(local_user(),'system','sent_invites'));
if ($current_invites > $max_invites) {
- notice( t('Total invitation limit exceeded.') . EOL);
+ notice(L10n::t('Total invitation limit exceeded.') . EOL);
return;
}
$current_invites ++;
PConfig::set(local_user(),'system','sent_invites',$current_invites);
if($current_invites > $max_invites) {
- notice( t('Invitation limit exceeded. Please contact your site administrator.') . EOL);
+ notice(L10n::t('Invitation limit exceeded. Please contact your site administrator.') . EOL);
return;
}
} else {
function invite_content(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$invonly = true;
$x = PConfig::get(local_user(),'system','invites_remaining');
if ((! $x) && (! is_site_admin())) {
- notice( t('You have no more invitations available') . EOL);
+ notice(L10n::t('You have no more invitations available') . EOL);
return '';
}
}
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
}
if (!DBM::is_result($parent_item)) {
- notice(t('Unable to locate original post.') . EOL);
+ notice(L10n::t('Unable to locate original post.') . EOL);
if (x($_REQUEST, 'return')) {
goaway($return_path);
}
// Now check that valid personal details have been provided
if (!can_write_wall($profile_uid) && !$allow_comment) {
- notice(t('Permission denied.') . EOL) ;
+ notice(L10n::t('Permission denied.') . EOL) ;
if (x($_REQUEST, 'return')) {
goaway($return_path);
}
<?php
-
/**
* @file mod/lostpass.php
*/
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\User;
$condition = ['(`email` = ? OR `nickname` = ?) AND `verified` = 1 AND `blocked` = 0', $loginame, $loginame];
$user = dba::selectFirst('user', ['uid', 'username', 'email'], $condition);
if (!DBM::is_result($user)) {
- notice(t('No valid account found.') . EOL);
+ notice(L10n::t('No valid account found.') . EOL);
goaway(System::baseUrl());
}
$user = dba::selectFirst('user', ['uid', 'username', 'email', 'pwdreset_time'], ['pwdreset' => $pwdreset_token]);
if (!DBM::is_result($user)) {
- notice(t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed."));
+ notice(L10n::t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed."));
return lostpass_form();
}
];
dba::update('user', $fields, ['uid' => $user['uid']]);
- notice(t('Request has expired, please make a new one.'));
+ notice(L10n::t('Request has expired, please make a new one.'));
return lostpass_form();
}
<?php
-
+/**
+ * @file mod/manage.php
+ */
use Friendica\App;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
-require_once("include/text.php");
+require_once "include/text.php";
function manage_post(App $a) {
function manage_content(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
use Friendica\App;
use Friendica\Content\Widget;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
return;
}
if (! $r[0]['pub_keywords'] && (! $r[0]['prv_keywords'])) {
- notice(t('No keywords to match. Please add keywords to your default profile.') . EOL);
+ notice(L10n::t('No keywords to match. Please add keywords to your default profile.') . EOL);
return;
}
use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Content\Smilies;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
function message_post(App $a)
{
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
switch ($ret) {
case -1:
- notice(t('No recipient selected.') . EOL);
+ notice(L10n::t('No recipient selected.') . EOL);
$norecip = true;
break;
case -2:
- notice(t('Unable to locate contact information.') . EOL);
+ notice(L10n::t('Unable to locate contact information.') . EOL);
break;
case -3:
- notice(t('Message could not be sent.') . EOL);
+ notice(L10n::t('Message could not be sent.') . EOL);
break;
case -4:
- notice(t('Message collection failure.') . EOL);
+ notice(L10n::t('Message collection failure.') . EOL);
break;
default:
info(t('Message sent.') . EOL);
Nav::setSelected('messages');
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
);
}
if (!count($messages)) {
- notice(t('Message not available.') . EOL);
+ notice(L10n::t('Message not available.') . EOL);
return $o;
}
use Friendica\Content\Nav;
use Friendica\Content\Widget;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
function network_init(App $a)
{
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
if ($gid) {
if (($t = Contact::getOStatusCountByGroupId($gid)) && !PConfig::get(local_user(), 'system', 'nowarn_insecure')) {
notice(tt("Warning: This group contains %s member from a network that doesn't allow non public messages.",
- "Warning: This group contains %s members from a network that doesn't allow non public messages.", $t) . EOL);
- notice(t("Messages in this group won't be send to these receivers.") . EOL);
+ "Warning: This group contains %s members from a network that doesn't allow non public messages.",
+ $t) . EOL);
+ notice(L10n::t("Messages in this group won't be send to these receivers.").EOL);
}
}
if ($update) {
killme();
}
- notice(t('No such group') . EOL);
+ notice(L10n::t('No such group') . EOL);
goaway('network/0');
// NOTREACHED
}
'id' => 'network',
]) . $o;
- if ($contact['network'] === NETWORK_OSTATUS && $contact['writable'] && !PConfig::get(local_user(), 'system',
- 'nowarn_insecure')) {
- notice(t('Private messages to this person are at risk of public disclosure.') . EOL);
+ if ($contact['network'] === NETWORK_OSTATUS && $contact['writable'] && !PConfig::get(local_user(),'system','nowarn_insecure')) {
+ notice(L10n::t('Private messages to this person are at risk of public disclosure.') . EOL);
}
} else {
- notice(t('Invalid contact.') . EOL);
+ notice(L10n::t('Invalid contact.') . EOL);
goaway('network');
// NOTREACHED
}
*/
use Friendica\App;
use Friendica\Content\ContactSelector;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Group;
function nogroup_content(App $a)
{
if (! local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return '';
}
*/
use Friendica\App;
use Friendica\Content\Nav;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
use Friendica\Model\Profile;
function notes_content(App $a, $update = false) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
<?php
-
-/* GNU Social -> friendica items permanent-url compatibility */
+/**
+ * @file mod/notice.php
+ * GNU Social -> friendica items permanent-url compatibility
+ */
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
-function notice_init(App $a) {
-
+function notice_init(App $a)
+{
$id = $a->argv[1];
$r = q("SELECT `user`.`nickname` FROM `user` LEFT JOIN `item` ON `item`.`uid` = `user`.`uid` WHERE `item`.`id` = %d", intval($id));
if (DBM::is_result($r)) {
goaway($url);
} else {
$a->error = 404;
- notice(t('Item not found.') . EOL);
+ notice(L10n::t('Item not found.') . EOL);
}
return;
use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Nav;
+use Friendica\Core\L10n;
use Friendica\Core\NotificationsManager;
use Friendica\Core\System;
use Friendica\Database\DBM;
$contact_id = $r[0]['contact-id'];
}
else {
- notice( t('Invalid request identifier.') . EOL);
+ notice(L10n::t('Invalid request identifier.') . EOL);
return;
}
function notifications_content(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
}
if($notifs['total'] == 0)
- info( t('No introductions.') . EOL);
+ info(L10n::t('No introductions.') . EOL);
// Normal notifications (no introductions)
} else {
<?php
-
+/**
+ * @file mod/oexchange.php
+ */
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Module\Login;
}
if (($a->argc > 1) && $a->argv[1] === 'done') {
- info( t('Post successful.') . EOL);
+ info(L10n::t('Post successful.') . EOL);
return;
}
<?php
-
+/**
+ * @file mod/openid.php
+ */
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
// New registration?
if ($a->config['register_policy'] == REGISTER_CLOSED) {
- notice( t('Account not found and OpenID registration is not permitted on this site.') . EOL);
+ notice(L10n::t('Account not found and OpenID registration is not permitted on this site.') . EOL);
goaway(System::baseUrl());
}
// NOTREACHED
}
}
- notice( t('Login failed.') . EOL);
+ notice(L10n::t('Login failed.') . EOL);
goaway(System::baseUrl());
// NOTREACHED
}
* @file mod/ostatus_subscribe.php
*/
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Model\Contact;
function ostatus_subscribe_content(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
goaway($_SESSION['return_url']);
// NOTREACHED
}
use Friendica\Content\Feature;
use Friendica\Content\Nav;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\Worker;
}
if (!$can_post) {
- notice( t('Permission denied.') . EOL );
+ notice(L10n::t('Permission denied.') . EOL );
killme();
}
);
if (!DBM::is_result($r)) {
- notice( t('Contact information unavailable') . EOL);
+ notice(L10n::t('Contact information unavailable') . EOL);
logger('photos_post: unable to locate contact record for page owner. uid=' . $page_owner_uid);
killme();
}
intval($page_owner_uid)
);
if (!DBM::is_result($r)) {
- notice( t('Album not found.') . EOL);
+ notice(L10n::t('Album not found.') . EOL);
goaway($_SESSION['photo_return']);
return; // NOTREACHED
}
if ($error !== UPLOAD_ERR_OK) {
switch ($error) {
case UPLOAD_ERR_INI_SIZE:
- notice(t('Image exceeds size limit of %s', ini_get('upload_max_filesize')) . EOL);
+ notice(L10n::t('Image exceeds size limit of %s', ini_get('upload_max_filesize')) . EOL);
break;
case UPLOAD_ERR_FORM_SIZE:
- notice(t('Image exceeds size limit of %s', formatBytes(defaults($_REQUEST, 'MAX_FILE_SIZE', 0))) . EOL);
+ notice(L10n::t('Image exceeds size limit of %s', formatBytes(defaults($_REQUEST, 'MAX_FILE_SIZE', 0))) . EOL);
break;
case UPLOAD_ERR_PARTIAL:
- notice(t('Image upload didn\'t complete, please try again') . EOL);
+ notice(L10n::t('Image upload didn\'t complete, please try again') . EOL);
break;
case UPLOAD_ERR_NO_FILE:
- notice(t('Image file is missing') . EOL);
+ notice(L10n::t('Image file is missing') . EOL);
break;
case UPLOAD_ERR_NO_TMP_DIR:
case UPLOAD_ERR_CANT_WRITE:
case UPLOAD_ERR_EXTENSION:
- notice(t('Server can\'t accept new file upload at this time, please contact your administrator') . EOL);
+ notice(L10n::t('Server can\'t accept new file upload at this time, please contact your administrator') . EOL);
break;
}
@unlink($src);
$maximagesize = Config::get('system', 'maximagesize');
if ($maximagesize && ($filesize > $maximagesize)) {
- notice(t('Image exceeds size limit of %s', formatBytes($maximagesize)) . EOL);
+ notice(L10n::t('Image exceeds size limit of %s', formatBytes($maximagesize)) . EOL);
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end', $foo);
}
if (!$filesize) {
- notice(t('Image file is empty.') . EOL);
+ notice(L10n::t('Image file is empty.') . EOL);
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end', $foo);
if (!$Image->isValid()) {
logger('mod/photos.php: photos_post(): unable to process image' , LOGGER_DEBUG);
- notice(t('Unable to process image.') . EOL);
+ notice(L10n::t('Unable to process image.') . EOL);
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end',$foo);
if (!$r) {
logger('mod/photos.php: photos_post(): image store failed' , LOGGER_DEBUG);
- notice(t('Image upload failed.') . EOL);
+ notice(L10n::t('Image upload failed.') . EOL);
killme();
}
// photos/name/image/xxxxx/edit
if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
- notice( t('Public access denied.') . EOL);
+ notice(L10n::t('Public access denied.') . EOL);
return;
}
require_once 'include/conversation.php';
if (!x($a->data,'user')) {
- notice( t('No photos selected') . EOL );
+ notice(L10n::t('No photos selected') . EOL );
return;
}
}
if ($a->data['user']['hidewall'] && (local_user() != $owner_uid) && !$remote_contact) {
- notice( t('Access to this item is restricted.') . EOL);
+ notice(L10n::t('Access to this item is restricted.') . EOL);
return;
}
// Display upload form
if ($datatype === 'upload') {
if (!$can_post) {
- notice(t('Permission denied.'));
+ notice(L10n::t('Permission denied.'));
return;
}
dbesc($datum)
);
if (DBM::is_result($ph)) {
- notice(t('Permission denied. Access to this item may be restricted.'));
+ notice(L10n::t('Permission denied. Access to this item may be restricted.'));
} else {
- notice(t('Photo not available') . EOL );
+ notice(L10n::t('Photo not available') . EOL );
}
return;
}
<?php
-
/**
* Poke, prod, finger, or otherwise do unspeakable things to somebody - who must be a connection in your address book
* This function can be invoked with the required arguments (verb and cid and private and possibly parent) silently via ajax or
use Friendica\App;
use Friendica\Core\Addon;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
-require_once('include/security.php');
-require_once('include/bbcode.php');
-require_once('include/items.php');
+require_once 'include/security.php';
+require_once 'include/bbcode.php';
+require_once 'include/items.php';
function poke_init(App $a) {
function poke_content(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
use Friendica\Content\Nav;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
goaway(System::baseUrl() . '/profile/' . $r[0]['nickname']);
} else {
logger('profile error: mod_profile ' . $a->query_string, LOGGER_DEBUG);
- notice(t('Requested profile is not available.') . EOL);
+ notice(L10n::t('Requested profile is not available.') . EOL);
$a->error = 404;
return;
}
$last_updated_key = "profile:" . $a->profile['profile_uid'] . ":" . local_user() . ":" . remote_user();
if (x($a->profile, 'hidewall') && !$is_owner && !$remote_contact) {
- notice(t('Access to this profile has been restricted.') . EOL);
+ notice(L10n::t('Access to this profile has been restricted.') . EOL);
return;
}
*/
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
// phase 2 - we have finished cropping
if($a->argc != 2) {
- notice( t('Image uploaded but image cropping failed.') . EOL );
+ notice(L10n::t('Image uploaded but image cropping failed.') . EOL );
return;
}
intval(local_user())
);
- info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
+ info(L10n::t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
// Update global directory in background
$url = System::baseUrl() . '/profile/' . $a->user['nickname'];
if ($url && strlen(Config::get('system','directory'))) {
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
} else {
- notice( t('Unable to process image') . EOL);
+ notice(L10n::t('Unable to process image') . EOL);
}
}
$ph = new Image($imagedata, $filetype);
if (! $ph->isValid()) {
- notice(t('Unable to process image.') . EOL);
+ notice(L10n::t('Unable to process image.') . EOL);
@unlink($src);
return;
}
function profile_photo_content(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL );
+ notice(L10n::t('Permission denied.') . EOL );
return;
}
if( $a->argv[1]=='use'){
if ($a->argc<3){
- notice( t('Permission denied.') . EOL );
+ notice(L10n::t('Permission denied.') . EOL );
return;
};
dbesc($resource_id)
);
if (!DBM::is_result($r)){
- notice( t('Permission denied.') . EOL );
+ notice(L10n::t('Permission denied.') . EOL );
return;
}
$havescale = false;
$r = Photo::store($Image, local_user(), 0 , $hash, $filename, t('Profile Photos'), 0 );
if ($r) {
- info( t('Image uploaded successfully.') . EOL );
+ info(L10n::t('Image uploaded successfully.') . EOL );
} else {
- notice( t('Image upload failed.') . EOL );
+ notice(L10n::t('Image upload failed.') . EOL );
}
if ($width > 640 || $height > 640) {
use Friendica\Content\Nav;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
intval(local_user())
);
if (! DBM::is_result($r)) {
- notice( t('Profile not found.') . EOL);
+ notice(L10n::t('Profile not found.') . EOL);
goaway('profiles');
return; // NOTREACHED
}
dbesc($name)
);
- info( t('New profile created.') . EOL);
+ info(L10n::t('New profile created.') . EOL);
if (DBM::is_result($r3) && count($r3) == 1) {
goaway('profiles/' . $r3[0]['id']);
}
intval($a->argv[2])
);
if(! DBM::is_result($r1)) {
- notice( t('Profile unavailable to clone.') . EOL);
+ notice(L10n::t('Profile unavailable to clone.') . EOL);
killme();
return;
}
intval(local_user()),
dbesc($name)
);
- info( t('New profile created.') . EOL);
+ info(L10n::t('New profile created.') . EOL);
if ((DBM::is_result($r3)) && (count($r3) == 1)) {
goaway('profiles/'.$r3[0]['id']);
}
intval(local_user())
);
if (! DBM::is_result($r)) {
- notice( t('Profile not found.') . EOL);
+ notice(L10n::t('Profile not found.') . EOL);
killme();
return;
}
function profiles_post(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
intval(local_user())
);
if (! DBM::is_result($orig)) {
- notice( t('Profile not found.') . EOL);
+ notice(L10n::t('Profile not found.') . EOL);
return;
}
$profile_name = notags(trim($_POST['profile_name']));
if (! strlen($profile_name)) {
- notice( t('Profile Name is required.') . EOL);
+ notice(L10n::t('Profile Name is required.') . EOL);
return;
}
function profiles_content(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
intval(local_user())
);
if (! DBM::is_result($r)) {
- notice( t('Profile not found.') . EOL);
+ notice(L10n::t('Profile not found.') . EOL);
return;
}
*/
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
use Friendica\Model\Profile;
function profperm_content(App $a) {
if (! local_user()) {
- notice( t('Permission denied') . EOL);
+ notice(L10n::t('Permission denied') . EOL);
return;
}
if($a->argc < 2) {
- notice( t('Invalid profile identifier.') . EOL );
+ notice(L10n::t('Invalid profile identifier.') . EOL );
return;
}
intval(local_user())
);
if (! DBM::is_result($r)) {
- notice( t('Invalid profile identifier.') . EOL );
+ notice(L10n::t('Invalid profile identifier.') . EOL );
return;
}
$profile = $r[0];
default:
case REGISTER_CLOSED:
if ((!x($_SESSION, 'authenticated') && (!x($_SESSION, 'administrator')))) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$blocked = 1;
}
} elseif ($a->config['register_policy'] == REGISTER_APPROVE) {
if (!strlen($a->config['admin_email'])) {
- notice(t('Your registration can not be processed.') . EOL);
+ notice(L10n::t('Your registration can not be processed.') . EOL);
goaway(System::baseUrl());
}
$r = q("select count(*) as total from user where register_date > UTC_TIMESTAMP - INTERVAL 1 day");
if ($r && $r[0]['total'] >= $max_dailies) {
logger('max daily registrations exceeded.');
- notice(t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.') . EOL);
+ notice(L10n::t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.') . EOL);
return;
}
}
}
if ((!is_site_admin()) || (x($_SESSION, 'submanage') && intval($_SESSION['submanage']))) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return '';
}
* @file mod/repair_ostatus.php
*/
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Model\Contact;
function repair_ostatus_content(App $a) {
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
goaway($_SESSION['return_url']);
// NOTREACHED
}
use Friendica\Content\Nav;
use Friendica\Core\Cache;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
require_once "include/bbcode.php";
function search_content(App $a) {
if (Config::get('system','block_public') && !local_user() && !remote_user()) {
- notice(t('Public access denied.') . EOL);
+ notice(L10n::t('Public access denied.') . EOL);
return;
}
["title" => t("Public access denied."),
"description" => t("Only logged in users are permitted to perform a search.")]);
killme();
- //notice(t('Public access denied.').EOL);
+ //notice(L10n::t('Public access denied.').EOL);
//return;
}
}
if (! DBM::is_result($r)) {
- info( t('No results.') . EOL);
+ info(L10n::t('No results.') . EOL);
return $o;
}
function settings_init(App $a)
{
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
}
if (count($a->user) && x($a->user, 'uid') && $a->user['uid'] != local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$icon = defaults($_POST, 'icon' , '');
if ($name == "" || $key == "" || $secret == "") {
- notice(t("Missing some important data!"));
+ notice(L10n::t("Missing some important data!"));
} else {
if ($_POST['submit']==t("Update")) {
q("UPDATE clients SET
unset($dcrpass);
if (!$mbox) {
$failed = true;
- notice(t('Failed to connect with email account using the settings provided.') . EOL);
+ notice(L10n::t('Failed to connect with email account using the settings provided.') . EOL);
}
}
}
$err = false;
if ($newpass != $confirm) {
- notice(t('Passwords do not match. Password unchanged.') . EOL);
+ notice(L10n::t('Passwords do not match. Password unchanged.') . EOL);
$err = true;
}
if (!x($newpass) || !x($confirm)) {
- notice(t('Empty passwords are not allowed. Password unchanged.') . EOL);
+ notice(L10n::t('Empty passwords are not allowed. Password unchanged.') . EOL);
$err = true;
}
// check if the old password was supplied correctly before changing it to the new value
if (!User::authenticate(intval(local_user()), $_POST['opassword'])) {
- notice(t('Wrong password.') . EOL);
+ notice(L10n::t('Wrong password.') . EOL);
$err = true;
}
if (DBM::is_result($result)) {
info(t('Password changed.') . EOL);
} else {
- notice(t('Password update failed. Please try again.') . EOL);
+ notice(L10n::t('Password update failed. Please try again.') . EOL);
}
}
}
info(t('Private forum has no privacy permissions. Using default privacy group.'). EOL);
$str_group_allow = '<' . $def_gid . '>';
} else {
- notice(t('Private forum has no privacy permissions and no default privacy group.') . EOL);
+ notice(L10n::t('Private forum has no privacy permissions and no default privacy group.') . EOL);
}
}
}
Nav::setSelected('settings');
if (!local_user()) {
- //notice(t('Permission denied.') . EOL);
+ //notice(L10n::t('Permission denied.') . EOL);
return;
}
if (x($_SESSION, 'submanage') && intval($_SESSION['submanage'])) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
local_user());
if (!DBM::is_result($r)) {
- notice(t("You can't edit this application."));
+ notice(L10n::t("You can't edit this application."));
return;
}
$app = $r[0];
$profile = dba::selectFirst('profile', [], ['is-default' => true, 'uid' => local_user()]);
if (!DBM::is_result($profile)) {
- notice(t('Unable to find your profile. Please contact your admin.') . EOL);
+ notice(L10n::t('Unable to find your profile. Please contact your admin.') . EOL);
return;
}
use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Widget;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
$o = '';
if (! local_user()) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
<?php
-
+/**
+ * @file mod/tagrm.php
+ */
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
-require_once('include/bbcode.php');
+require_once 'include/bbcode.php';
function tagrm_post(App $a) {
intval(local_user())
);
- info( t('Tag removed') . EOL );
+ info(L10n::t('Tag removed') . EOL );
goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
// NOTREACHED
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\UserImport;
function uimport_post(App $a) {
default:
case REGISTER_CLOSED:
if ((!x($_SESSION, 'authenticated') && (!x($_SESSION, 'administrator')))) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$blocked = 1;
$r = q("select count(*) as total from user where register_date > UTC_TIMESTAMP - INTERVAL 1 day");
if ($r && $r[0]['total'] >= $max_dailies) {
logger('max daily registrations exceeded.');
- notice(t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.') . EOL);
+ notice(L10n::t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.') . EOL);
return;
}
}
* @file mod/unfollow.php
*/
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
function unfollow_post(App $a)
{
if (!local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
goaway($_SESSION['return_url']);
// NOTREACHED
}
$contact = dba::selectFirst('contact', [], $condition);
if (!DBM::is_result($contact)) {
- notice(t("Contact wasn't found or can't be unfollowed."));
+ notice(L10n::t("Contact wasn't found or can't be unfollowed."));
} else {
if (in_array($contact['network'], [NETWORK_OSTATUS, NETWORK_DIASPORA])) {
$r = q("SELECT `contact`.*, `user`.* FROM `contact` INNER JOIN `user` ON `contact`.`uid` = `user`.`uid`
function unfollow_content(App $a) {
if (! local_user()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
goaway($_SESSION['return_url']);
// NOTREACHED
}
$contact = dba::selectFirst('contact', ['url', 'network', 'addr', 'name'], $condition);
if (!DBM::is_result($contact)) {
- notice(t("You aren't a friend of this contact.").EOL);
+ notice(L10n::t("You aren't a friend of this contact.").EOL);
$submit = "";
// NOTREACHED
}
if (!in_array($contact['network'], [NETWORK_DIASPORA, NETWORK_OSTATUS])) {
- notice(t("Unfollowing is currently not supported by your network.").EOL);
+ notice(L10n::t("Unfollowing is currently not supported by your network.").EOL);
$submit = "";
// NOTREACHED
}
$r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND `self` LIMIT 1", intval($uid));
if (!$r) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
goaway($_SESSION['return_url']);
// NOTREACHED
}
use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
if((Config::get('system','block_public')) && (! local_user()) && (! remote_user())) {
- notice( t('Public access denied.') . EOL);
+ notice(L10n::t('Public access denied.') . EOL);
return;
}
require_once('include/conversation.php');
if(! x($a->data,'user')) {
- notice( t('No videos selected') . EOL );
+ notice(L10n::t('No videos selected') . EOL );
return;
}
}
if($a->data['user']['hidewall'] && (local_user() != $owner_uid) && (! $remote_contact)) {
- notice( t('Access to this item is restricted.') . EOL);
+ notice(L10n::t('Access to this item is restricted.') . EOL);
return;
}
use Friendica\Content\ContactSelector;
use Friendica\Content\Nav;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
require_once("mod/proxy.php");
if((Config::get('system','block_public')) && (! local_user()) && (! remote_user())) {
- notice( t('Public access denied.') . EOL);
+ notice(L10n::t('Public access denied.') . EOL);
return;
}
$o .= Profile::getTabs($a, $is_owner, $a->data['user']['nickname']);
if(((! count($a->profile)) || ($a->profile['hide-friends']))) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return $o;
}
<?php
-
+/**
+ * @file mod/viewsrc.php
+ */
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
function viewsrc_content(App $a) {
if (! local_user()) {
- notice( t('Access denied.') . EOL);
+ notice(L10n::t('Access denied.') . EOL);
return;
}
if(! $item_id) {
$a->error = 404;
- notice( t('Item not found.') . EOL);
+ notice(L10n::t('Item not found.') . EOL);
return;
}
*/
use Friendica\App;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
use Friendica\Util\Mimetype;
echo json_encode(['error'=>t('Permission denied.')]);
killme();
}
- notice( t('Permission denied.') . EOL );
+ notice(L10n::t('Permission denied.') . EOL );
killme();
}
<?php
-
/**
* @file mod/wall_upload.php
* @brief Module for uploading a picture to the profile wall
*/
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Database\DBM;
echo json_encode(['error'=>t('Permission denied.')]);
killme();
}
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
killme();
}
echo json_encode(['error'=>t('Invalid request.')]);
killme();
}
- notice(t('Invalid request.').EOL);
+ notice(L10n::t('Invalid request.').EOL);
killme();
}
* @file mod/wallmessage.php
*/
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Mail;
$replyto = Profile::getMyURL();
if(! $replyto) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$user = $r[0];
if(! intval($user['unkmail'])) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
switch($ret){
case -1:
- notice( t('No recipient selected.') . EOL );
+ notice(L10n::t('No recipient selected.') . EOL );
break;
case -2:
- notice( t('Unable to check your home location.') . EOL );
+ notice(L10n::t('Unable to check your home location.') . EOL );
break;
case -3:
- notice( t('Message could not be sent.') . EOL );
+ notice(L10n::t('Message could not be sent.') . EOL );
break;
case -4:
- notice( t('Message collection failure.') . EOL );
+ notice(L10n::t('Message collection failure.') . EOL );
break;
default:
- info( t('Message sent.') . EOL );
+ info(L10n::t('Message sent.') . EOL );
}
goaway('profile/'.$user['nickname']);
function wallmessage_content(App $a) {
if (!Profile::getMyURL()) {
- notice(t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
$recipient = (($a->argc > 1) ? $a->argv[1] : '');
if(! $recipient) {
- notice( t('No recipient.') . EOL);
+ notice(L10n::t('No recipient.') . EOL);
return;
}
);
if (! DBM::is_result($r)) {
- notice( t('No recipient.') . EOL);
+ notice(L10n::t('No recipient.') . EOL);
logger('wallmessage: no recipient');
return;
}
$user = $r[0];
if(! intval($user['unkmail'])) {
- notice( t('Permission denied.') . EOL);
+ notice(L10n::t('Permission denied.') . EOL);
return;
}
namespace Friendica\Core;
use Friendica\App;
+use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
$account = json_decode(file_get_contents($file['tmp_name']), true);
if ($account === null) {
- notice(t("Error decoding account file"));
+ notice(L10n::t("Error decoding account file"));
return;
}
if (!x($account, 'version')) {
- notice(t("Error! No version data in file! This is not a Friendica account file?"));
+ notice(L10n::t("Error! No version data in file! This is not a Friendica account file?"));
return;
}
$r = dba::selectFirst('user', ['uid'], ['nickname' => $account['user']['nickname']]);
if ($r === false) {
logger("uimport:check nickname : ERROR : " . dba::errorMessage(), LOGGER_NORMAL);
- notice(t('Error! Cannot check nickname'));
+ notice(L10n::t('Error! Cannot check nickname'));
return;
}
$r = dba::selectFirst('userd', ['id'], ['username' => $account['user']['nickname']]);
if ($r === false) {
logger("uimport:check nickname : ERROR : " . dba::errorMessage(), LOGGER_NORMAL);
- notice(t('Error! Cannot check nickname'));
+ notice(L10n::t('Error! Cannot check nickname'));
return;
}
$r = self::dbImportAssoc('user', $account['user']);
if ($r === false) {
logger("uimport:insert user : ERROR : " . dba::errorMessage(), LOGGER_NORMAL);
- notice(t("User creation error"));
+ notice(L10n::t("User creation error"));
return;
}
$newuid = self::lastInsertId();
<?php
-
/**
* @file src/Model/Group.php
*/
namespace Friendica\Model;
+use Friendica\Core\L10n;
use Friendica\BaseObject;
use Friendica\Database\DBM;
use dba;
$group = dba::selectFirst('group', ['deleted'], ['id' => $gid]);
if (DBM::is_result($group) && $group['deleted']) {
dba::update('group', ['deleted' => 0], ['gid' => $gid]);
- notice(t('A deleted group with this name was revived. Existing item permissions <strong>may</strong> apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL);
+ notice(L10n::t('A deleted group with this name was revived. Existing item permissions <strong>may</strong> apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL);
}
return true;
}
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
if (!$user && !count($user) && !count($profiledata)) {
logger('profile error: ' . $a->query_string, LOGGER_DEBUG);
- notice(t('Requested account is not available.') . EOL);
+ notice(L10n::t('Requested account is not available.') . EOL);
$a->error = 404;
return;
}
if (empty($pdata) && empty($profiledata)) {
logger('profile error: ' . $a->query_string, LOGGER_DEBUG);
- notice(t('Requested profile is not available.') . EOL);
+ notice(L10n::t('Requested profile is not available.') . EOL);
$a->error = 404;
return;
}
<?php
-
+/**
+ * @file src/Module/Login.php
+ */
namespace Friendica\Module;
use Friendica\BaseModule;
use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Database\DBM;
use Friendica\Model\User;
use dba;
// if it's an email address or doesn't resolve to a URL, fail.
if ($noid || strpos($openid_url, '@') || !validate_url($openid_url)) {
- notice(t('Login failed.') . EOL);
+ notice(L10n::t('Login failed.') . EOL);
goaway(self::getApp()->get_baseurl());
// NOTREACHED
}
$openid->returnUrl = self::getApp()->get_baseurl(true) . '/openid';
goaway($openid->authUrl());
} catch (Exception $e) {
- notice(t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '<br /><br >' . t('The error message was:') . ' ' . $e->getMessage());
+ notice(L10n::t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '<br /><br >' . t('The error message was:') . ' ' . $e->getMessage());
}
// NOTREACHED
}
if (!$record || !count($record)) {
logger('authenticate: failed login attempt: ' . notags(trim($_POST['username'])) . ' from IP ' . $_SERVER['REMOTE_ADDR']);
- notice(t('Login failed.') . EOL);
+ notice(L10n::t('Login failed.') . EOL);
goaway(self::getApp()->get_baseurl());
}