More t()
Update more t() calls
This commit is contained in:
parent
3b0f69599e
commit
ead9d86236
|
@ -39,13 +39,13 @@ function editpost_content(App $a) {
|
|||
}
|
||||
|
||||
$o .= replace_macros(get_markup_template("section_title.tpl"),[
|
||||
'$title' => t('Edit post')
|
||||
'$title' => L10n::t('Edit post')
|
||||
]);
|
||||
|
||||
$tpl = get_markup_template('jot-header.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||
'$ispublic' => ' ', // L10n::t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $a->user['nickname']
|
||||
]);
|
||||
|
@ -53,7 +53,7 @@ function editpost_content(App $a) {
|
|||
$tpl = get_markup_template('jot-end.tpl');
|
||||
$a->page['end'] .= replace_macros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||
'$ispublic' => ' ', // L10n::t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $a->user['nickname']
|
||||
]);
|
||||
|
@ -91,7 +91,7 @@ function editpost_content(App $a) {
|
|||
/* if($mail_enabled) {
|
||||
$selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
|
||||
$jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> '
|
||||
. t("Post to Email") . '</div>';
|
||||
. L10n::t("Post to Email") . '</div>';
|
||||
}*/
|
||||
|
||||
|
||||
|
@ -106,23 +106,23 @@ function editpost_content(App $a) {
|
|||
'$is_edit' => true,
|
||||
'$return_path' => $_SESSION['return_url'],
|
||||
'$action' => 'item',
|
||||
'$share' => t('Save'),
|
||||
'$upload' => t('Upload photo'),
|
||||
'$shortupload' => t('upload photo'),
|
||||
'$attach' => t('Attach file'),
|
||||
'$shortattach' => t('attach file'),
|
||||
'$weblink' => t('Insert web link'),
|
||||
'$shortweblink' => t('web link'),
|
||||
'$video' => t('Insert video link'),
|
||||
'$shortvideo' => t('video link'),
|
||||
'$audio' => t('Insert audio link'),
|
||||
'$shortaudio' => t('audio link'),
|
||||
'$setloc' => t('Set your location'),
|
||||
'$shortsetloc' => t('set location'),
|
||||
'$noloc' => t('Clear browser location'),
|
||||
'$shortnoloc' => t('clear location'),
|
||||
'$wait' => t('Please wait'),
|
||||
'$permset' => t('Permission settings'),
|
||||
'$share' => L10n::t('Save'),
|
||||
'$upload' => L10n::t('Upload photo'),
|
||||
'$shortupload' => L10n::t('upload photo'),
|
||||
'$attach' => L10n::t('Attach file'),
|
||||
'$shortattach' => L10n::t('attach file'),
|
||||
'$weblink' => L10n::t('Insert web link'),
|
||||
'$shortweblink' => L10n::t('web link'),
|
||||
'$video' => L10n::t('Insert video link'),
|
||||
'$shortvideo' => L10n::t('video link'),
|
||||
'$audio' => L10n::t('Insert audio link'),
|
||||
'$shortaudio' => L10n::t('audio link'),
|
||||
'$setloc' => L10n::t('Set your location'),
|
||||
'$shortsetloc' => L10n::t('set location'),
|
||||
'$noloc' => L10n::t('Clear browser location'),
|
||||
'$shortnoloc' => L10n::t('clear location'),
|
||||
'$wait' => L10n::t('Please wait'),
|
||||
'$permset' => L10n::t('Permission settings'),
|
||||
'$ptyp' => $itm[0]['type'],
|
||||
'$content' => undo_post_tagging($itm[0]['body']),
|
||||
'$post_id' => $post_id,
|
||||
|
@ -130,32 +130,29 @@ function editpost_content(App $a) {
|
|||
'$defloc' => $a->user['default-location'],
|
||||
'$visitor' => 'none',
|
||||
'$pvisit' => 'none',
|
||||
'$emailcc' => t('CC: email addresses'),
|
||||
'$public' => t('Public post'),
|
||||
'$emailcc' => L10n::t('CC: email addresses'),
|
||||
'$public' => L10n::t('Public post'),
|
||||
'$jotnets' => $jotnets,
|
||||
'$title' => htmlspecialchars($itm[0]['title']),
|
||||
'$placeholdertitle' => t('Set title'),
|
||||
'$placeholdertitle' => L10n::t('Set title'),
|
||||
'$category' => file_tag_file_to_list($itm[0]['file'], 'category'),
|
||||
'$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''),
|
||||
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
||||
'$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? L10n::t('Categories (comma-separated list)') : ''),
|
||||
'$emtitle' => L10n::t('Example: bob@example.com, mary@example.com'),
|
||||
'$lockstate' => $lockstate,
|
||||
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user)),
|
||||
'$bang' => (($group) ? '!' : ''),
|
||||
'$profile_uid' => $_SESSION['uid'],
|
||||
'$preview' => t('Preview'),
|
||||
'$preview' => L10n::t('Preview'),
|
||||
'$jotplugins' => $jotplugins,
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$cancel' => t('Cancel'),
|
||||
'$sourceapp' => L10n::t($a->sourcename),
|
||||
'$cancel' => L10n::t('Cancel'),
|
||||
'$rand_num' => random_digits(12),
|
||||
|
||||
//jot nav tab (used in some themes)
|
||||
'$message' => t('Message'),
|
||||
'$browser' => t('Browser'),
|
||||
'$shortpermset' => t('permissions'),
|
||||
'$message' => L10n::t('Message'),
|
||||
'$browser' => L10n::t('Browser'),
|
||||
'$shortpermset' => L10n::t('permissions'),
|
||||
]);
|
||||
|
||||
return $o;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ function events_post(App $a) {
|
|||
if (strcmp($finish, $start) < 0 && !$nofinish) {
|
||||
notice(L10n::t('Event can not end before it has started.') . EOL);
|
||||
if (intval($_REQUEST['preview'])) {
|
||||
echo t('Event can not end before it has started.');
|
||||
echo L10n::t('Event can not end before it has started.');
|
||||
killme();
|
||||
}
|
||||
goaway($onerror_url);
|
||||
|
@ -111,7 +111,7 @@ function events_post(App $a) {
|
|||
if ((! $summary) || ($start === NULL_DATE)) {
|
||||
notice(L10n::t('Event title and start time are required.') . EOL);
|
||||
if (intval($_REQUEST['preview'])) {
|
||||
echo t('Event title and start time are required.');
|
||||
echo L10n::t('Event title and start time are required.');
|
||||
killme();
|
||||
}
|
||||
goaway($onerror_url);
|
||||
|
@ -389,20 +389,20 @@ function events_content(App $a) {
|
|||
$o = replace_macros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$tabs' => $tabs,
|
||||
'$title' => t('Events'),
|
||||
'$view' => t('View'),
|
||||
'$new_event' => [System::baseUrl() . '/events/new', t('Create New Event'), '', ''],
|
||||
'$previous' => [System::baseUrl() . '/events/$prevyear/$prevmonth', t('Previous'), '', ''],
|
||||
'$next' => [System::baseUrl() . '/events/$nextyear/$nextmonth', t('Next'), '', ''],
|
||||
'$title' => L10n::t('Events'),
|
||||
'$view' => L10n::t('View'),
|
||||
'$new_event' => [System::baseUrl() . '/events/new', L10n::t('Create New Event'), '', ''],
|
||||
'$previous' => [System::baseUrl() . '/events/$prevyear/$prevmonth', L10n::t('Previous'), '', ''],
|
||||
'$next' => [System::baseUrl() . '/events/$nextyear/$nextmonth', L10n::t('Next'), '', ''],
|
||||
'$calendar' => cal($y, $m, $links, ' eventcal'),
|
||||
|
||||
'$events' => $events,
|
||||
|
||||
'$today' => t('today'),
|
||||
'$month' => t('month'),
|
||||
'$week' => t('week'),
|
||||
'$day' => t('day'),
|
||||
'$list' => t('list'),
|
||||
'$today' => L10n::t('today'),
|
||||
'$month' => L10n::t('month'),
|
||||
'$week' => L10n::t('week'),
|
||||
'$day' => L10n::t('day'),
|
||||
'$list' => L10n::t('list'),
|
||||
]);
|
||||
|
||||
if (x($_GET, 'id')) {
|
||||
|
@ -506,34 +506,34 @@ function events_content(App $a) {
|
|||
'$deny_cid' => json_encode($perms['deny_cid']),
|
||||
'$deny_gid' => json_encode($perms['deny_gid']),
|
||||
|
||||
'$title' => t('Event details'),
|
||||
'$desc' => t('Starting date and Title are required.'),
|
||||
'$s_text' => t('Event Starts:') . ' <span class="required" title="' . t('Required') . '">*</span>',
|
||||
'$s_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $syear+5), DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"), t('Event Starts:'), 'start_text', true, true, '', '', true),
|
||||
'$n_text' => t('Finish date/time is not known or not relevant'),
|
||||
'$title' => L10n::t('Event details'),
|
||||
'$desc' => L10n::t('Starting date and Title are required.'),
|
||||
'$s_text' => L10n::t('Event Starts:') . ' <span class="required" title="' . L10n::t('Required') . '">*</span>',
|
||||
'$s_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $syear+5), DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"), L10n::t('Event Starts:'), 'start_text', true, true, '', '', true),
|
||||
'$n_text' => L10n::t('Finish date/time is not known or not relevant'),
|
||||
'$n_checked' => $n_checked,
|
||||
'$f_text' => t('Event Finishes:'),
|
||||
'$f_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $fyear+5), DateTime::createFromFormat('Y-m-d H:i', "$fyear-$fmonth-$fday $fhour:$fminute"), t('Event Finishes:'), 'finish_text', true, true, 'start_text'),
|
||||
'$a_text' => t('Adjust for viewer timezone'),
|
||||
'$f_text' => L10n::t('Event Finishes:'),
|
||||
'$f_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $fyear+5), DateTime::createFromFormat('Y-m-d H:i', "$fyear-$fmonth-$fday $fhour:$fminute"), L10n::t('Event Finishes:'), 'finish_text', true, true, 'start_text'),
|
||||
'$a_text' => L10n::t('Adjust for viewer timezone'),
|
||||
'$a_checked' => $a_checked,
|
||||
'$d_text' => t('Description:'),
|
||||
'$d_text' => L10n::t('Description:'),
|
||||
'$d_orig' => $d_orig,
|
||||
'$l_text' => t('Location:'),
|
||||
'$l_text' => L10n::t('Location:'),
|
||||
'$l_orig' => $l_orig,
|
||||
'$t_text' => t('Title:') . ' <span class="required" title="' . t('Required') . '">*</span>',
|
||||
'$t_text' => L10n::t('Title:') . ' <span class="required" title="' . L10n::t('Required') . '">*</span>',
|
||||
'$t_orig' => $t_orig,
|
||||
'$summary' => ['summary', t('Title:'), $t_orig, '', '*'],
|
||||
'$sh_text' => t('Share this event'),
|
||||
'$share' => ['share', t('Share this event'), $sh_checked, '', $sh_disabled],
|
||||
'$summary' => ['summary', L10n::t('Title:'), $t_orig, '', '*'],
|
||||
'$sh_text' => L10n::t('Share this event'),
|
||||
'$share' => ['share', L10n::t('Share this event'), $sh_checked, '', $sh_disabled],
|
||||
'$sh_checked' => $sh_checked,
|
||||
'$nofinish' => ['nofinish', t('Finish date/time is not known or not relevant'), $n_checked],
|
||||
'$adjust' => ['adjust', t('Adjust for viewer timezone'), $a_checked],
|
||||
'$preview' => t('Preview'),
|
||||
'$nofinish' => ['nofinish', L10n::t('Finish date/time is not known or not relevant'), $n_checked],
|
||||
'$adjust' => ['adjust', L10n::t('Adjust for viewer timezone'), $a_checked],
|
||||
'$preview' => L10n::t('Preview'),
|
||||
'$acl' => $acl,
|
||||
'$submit' => t('Submit'),
|
||||
'$basic' => t('Basic'),
|
||||
'$advanced' => t('Advanced'),
|
||||
'$permissions' => t('Permissions'),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$basic' => L10n::t('Basic'),
|
||||
'$advanced' => L10n::t('Advanced'),
|
||||
'$permissions' => L10n::t('Permissions'),
|
||||
|
||||
]);
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Object\Image;
|
||||
|
||||
|
@ -30,7 +31,7 @@ function fbrowser_content(App $a) {
|
|||
|
||||
switch ($a->argv[1]) {
|
||||
case "image":
|
||||
$path = [["", t("Photos")]];
|
||||
$path = [["", L10n::t("Photos")]];
|
||||
$albums = false;
|
||||
$sql_extra = "";
|
||||
$sql_extra2 = " ORDER BY created DESC LIMIT 0, 10";
|
||||
|
@ -39,7 +40,7 @@ function fbrowser_content(App $a) {
|
|||
$albums = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' ",
|
||||
intval(local_user()),
|
||||
dbesc('Contact Photos'),
|
||||
dbesc( t('Contact Photos'))
|
||||
dbesc(L10n::t('Contact Photos'))
|
||||
);
|
||||
|
||||
function _map_folder1($el){return [bin2hex($el['album']),$el['album']];};
|
||||
|
@ -61,7 +62,7 @@ function fbrowser_content(App $a) {
|
|||
GROUP BY `resource-id` $sql_extra2",
|
||||
intval(local_user()),
|
||||
dbesc('Contact Photos'),
|
||||
dbesc( t('Contact Photos'))
|
||||
dbesc(L10n::t('Contact Photos'))
|
||||
);
|
||||
|
||||
function _map_files1($rr){
|
||||
|
@ -94,7 +95,7 @@ function fbrowser_content(App $a) {
|
|||
'$path' => $path,
|
||||
'$folders' => $albums,
|
||||
'$files' => $files,
|
||||
'$cancel' => t('Cancel'),
|
||||
'$cancel' => L10n::t('Cancel'),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
]);
|
||||
|
||||
|
@ -121,10 +122,10 @@ function fbrowser_content(App $a) {
|
|||
$o = replace_macros($tpl, [
|
||||
'$type' => 'file',
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$path' => [ [ "", t("Files")] ],
|
||||
'$path' => [ [ "", L10n::t("Files")] ],
|
||||
'$folders' => false,
|
||||
'$files' =>$files,
|
||||
'$cancel' => t('Cancel'),
|
||||
'$cancel' => L10n::t('Cancel'),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
]);
|
||||
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file mod/filer.php
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
require_once('include/security.php');
|
||||
require_once('include/bbcode.php');
|
||||
require_once('include/items.php');
|
||||
|
||||
function filer_content(App $a) {
|
||||
require_once 'include/security.php';
|
||||
require_once 'include/bbcode.php';
|
||||
require_once 'include/items.php';
|
||||
|
||||
function filer_content(App $a)
|
||||
{
|
||||
if (! local_user()) {
|
||||
killme();
|
||||
}
|
||||
|
@ -29,8 +32,8 @@ function filer_content(App $a) {
|
|||
|
||||
$tpl = get_markup_template("filer_dialog.tpl");
|
||||
$o = replace_macros($tpl, [
|
||||
'$field' => ['term', t("Save to Folder:"), '', '', $filetags, t('- select -')],
|
||||
'$submit' => t('Save'),
|
||||
'$field' => ['term', L10n::t("Save to Folder:"), '', '', $filetags, L10n::t('- select -')],
|
||||
'$submit' => L10n::t('Save'),
|
||||
]);
|
||||
|
||||
echo $o;
|
||||
|
|
|
@ -62,7 +62,7 @@ function follow_content(App $a) {
|
|||
$uid = local_user();
|
||||
$url = notags(trim($_REQUEST['url']));
|
||||
|
||||
$submit = t('Submit Request');
|
||||
$submit = L10n::t('Submit Request');
|
||||
|
||||
// There is a current issue. It seems as if you can't start following a Friendica that is following you
|
||||
// With Diaspora this works - but Friendica is special, it seems ...
|
||||
|
@ -142,38 +142,38 @@ function follow_content(App $a) {
|
|||
$r[0]["about"] = "";
|
||||
}
|
||||
|
||||
$header = t("Connect/Follow");
|
||||
$header = L10n::t("Connect/Follow");
|
||||
|
||||
$o = replace_macros($tpl,[
|
||||
'$header' => htmlentities($header),
|
||||
//'$photo' => proxy_url($ret["photo"], false, PROXY_SIZE_SMALL),
|
||||
'$desc' => "",
|
||||
'$pls_answer' => t('Please answer the following:'),
|
||||
'$does_know_you' => ['knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', [t('No'), t('Yes')]],
|
||||
'$add_note' => t('Add a personal note:'),
|
||||
'$pls_answer' => L10n::t('Please answer the following:'),
|
||||
'$does_know_you' => ['knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', [L10n::t('No'), L10n::t('Yes')]],
|
||||
'$add_note' => L10n::t('Add a personal note:'),
|
||||
'$page_desc' => "",
|
||||
'$friendica' => "",
|
||||
'$statusnet' => "",
|
||||
'$diaspora' => "",
|
||||
'$diasnote' => "",
|
||||
'$your_address' => t('Your Identity Address:'),
|
||||
'$your_address' => L10n::t('Your Identity Address:'),
|
||||
'$invite_desc' => "",
|
||||
'$emailnet' => "",
|
||||
'$submit' => $submit,
|
||||
'$cancel' => t('Cancel'),
|
||||
'$cancel' => L10n::t('Cancel'),
|
||||
'$nickname' => "",
|
||||
'$name' => $ret["name"],
|
||||
'$url' => $ret["url"],
|
||||
'$zrl' => Profile::zrl($ret["url"]),
|
||||
'$url_label' => t("Profile URL"),
|
||||
'$url_label' => L10n::t("Profile URL"),
|
||||
'$myaddr' => $myaddr,
|
||||
'$request' => $request,
|
||||
/*'$location' => bbcode($r[0]["location"]),
|
||||
'$location_label' => t("Location:"),
|
||||
'$location_label' => L10n::t("Location:"),
|
||||
'$about' => bbcode($r[0]["about"], false, false),
|
||||
'$about_label' => t("About:"), */
|
||||
'$about_label' => L10n::t("About:"), */
|
||||
'$keywords' => $r[0]["keywords"],
|
||||
'$keywords_label' => t("Tags:")
|
||||
'$keywords_label' => L10n::t("Tags:")
|
||||
]);
|
||||
|
||||
$a->page['aside'] = "";
|
||||
|
@ -182,7 +182,7 @@ function follow_content(App $a) {
|
|||
|
||||
if ($gcontact_id <> 0) {
|
||||
$o .= replace_macros(get_markup_template('section_title.tpl'),
|
||||
['$title' => t('Status Messages and Posts')
|
||||
['$title' => L10n::t('Status Messages and Posts')
|
||||
]);
|
||||
|
||||
// Show last public posts
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file mod/friendica.php
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Database\DBM;
|
||||
|
||||
function friendica_init(App $a) {
|
||||
function friendica_init(App $a)
|
||||
{
|
||||
if ($a->argv[1] == "json") {
|
||||
$register_policy = ['REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN'];
|
||||
|
||||
|
@ -66,22 +70,23 @@ function friendica_init(App $a) {
|
|||
}
|
||||
}
|
||||
|
||||
function friendica_content(App $a) {
|
||||
function friendica_content(App $a)
|
||||
{
|
||||
$o = '<h1>Friendica</h1>' . PHP_EOL;
|
||||
$o .= '<p>';
|
||||
$o .= t('This is Friendica, version') . ' <strong>' . FRIENDICA_VERSION . '</strong> ';
|
||||
$o .= t('running at web location') . ' ' . System::baseUrl();
|
||||
$o .= L10n::t('This is Friendica, version') . ' <strong>' . FRIENDICA_VERSION . '</strong> ';
|
||||
$o .= L10n::t('running at web location') . ' ' . System::baseUrl();
|
||||
$o .= '</p>' . PHP_EOL;
|
||||
|
||||
$o .= '<p>';
|
||||
$o .= t('Please visit <a href="https://friendi.ca">Friendi.ca</a> to learn more about the Friendica project.') . PHP_EOL;
|
||||
$o .= L10n::t('Please visit <a href="https://friendi.ca">Friendi.ca</a> to learn more about the Friendica project.') . PHP_EOL;
|
||||
$o .= '</p>' . PHP_EOL;
|
||||
|
||||
$o .= '<p>';
|
||||
$o .= t('Bug reports and issues: please visit') . ' ' . '<a href="https://github.com/friendica/friendica/issues?state=open">'.t('the bugtracker at github').'</a>';
|
||||
$o .= L10n::t('Bug reports and issues: please visit') . ' ' . '<a href="https://github.com/friendica/friendica/issues?state=open">'.t('the bugtracker at github').'</a>';
|
||||
$o .= '</p>' . PHP_EOL;
|
||||
$o .= '<p>';
|
||||
$o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com');
|
||||
$o .= L10n::t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com');
|
||||
$o .= '</p>' . PHP_EOL;
|
||||
|
||||
$visible_addons = [];
|
||||
|
@ -95,7 +100,7 @@ function friendica_content(App $a) {
|
|||
}
|
||||
|
||||
if (count($visible_addons)) {
|
||||
$o .= '<p>' . t('Installed addons/addons/apps:') . '</p>' . PHP_EOL;
|
||||
$o .= '<p>' . L10n::t('Installed addons/addons/apps:') . '</p>' . PHP_EOL;
|
||||
$sorted = $visible_addons;
|
||||
$s = '';
|
||||
sort($sorted);
|
||||
|
@ -109,13 +114,13 @@ function friendica_content(App $a) {
|
|||
}
|
||||
$o .= '<div style="margin-left: 25px; margin-right: 25px;">' . $s . '</div>' . PHP_EOL;
|
||||
} else {
|
||||
$o .= '<p>' . t('No installed addons/addons/apps') . '</p>' . PHP_EOL;
|
||||
$o .= '<p>' . L10n::t('No installed addons/addons/apps') . '</p>' . PHP_EOL;
|
||||
}
|
||||
|
||||
$blocklist = Config::get('system', 'blocklist');
|
||||
if (count($blocklist)) {
|
||||
$o .= '<div id="about_blocklist"><p>' . t('On this server the following remote servers are blocked.') . '</p>' . PHP_EOL;
|
||||
$o .= '<table class="table"><thead><tr><th>' . t('Blocked domain') . '</th><th>' . t('Reason for the block') . '</th></thead><tbody>' . PHP_EOL;
|
||||
$o .= '<div id="about_blocklist"><p>' . L10n::t('On this server the following remote servers are blocked.') . '</p>' . PHP_EOL;
|
||||
$o .= '<table class="table"><thead><tr><th>' . L10n::t('Blocked domain') . '</th><th>' . L10n::t('Reason for the block') . '</th></thead><tbody>' . PHP_EOL;
|
||||
foreach ($blocklist as $b) {
|
||||
$o .= '<tr><td>' . $b['domain'] .'</td><td>' . $b['reason'] . '</td></tr>' . PHP_EOL;
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ use Friendica\Core\L10n;
|
|||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
|
||||
function fsuggest_post(App $a) {
|
||||
|
||||
function fsuggest_post(App $a)
|
||||
{
|
||||
if (! local_user()) {
|
||||
return;
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ function fsuggest_post(App $a) {
|
|||
intval(local_user())
|
||||
);
|
||||
if (DBM::is_result($r)) {
|
||||
|
||||
$x = q("INSERT INTO `fsuggest` ( `uid`,`cid`,`name`,`url`,`request`,`photo`,`note`,`created`)
|
||||
VALUES ( %d, %d, '%s','%s','%s','%s','%s','%s')",
|
||||
intval(local_user()),
|
||||
|
@ -69,14 +68,9 @@ function fsuggest_post(App $a) {
|
|||
|
||||
info(L10n::t('Friend suggestion sent.') . EOL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function fsuggest_content(App $a)
|
||||
{
|
||||
require_once 'include/acl_selectors.php';
|
||||
|
@ -103,7 +97,7 @@ function fsuggest_content(App $a)
|
|||
}
|
||||
$contact = $r[0];
|
||||
|
||||
$o = '<h3>' . t('Suggest Friends') . '</h3>';
|
||||
$o = '<h3>' . L10n::t('Suggest Friends') . '</h3>';
|
||||
|
||||
$o .= '<div id="fsuggest-desc" >' . sprintf(t('Suggest a friend for %s'), $contact['name']) . '</div>';
|
||||
|
||||
|
@ -117,7 +111,7 @@ function fsuggest_content(App $a)
|
|||
);
|
||||
|
||||
|
||||
$o .= '<div id="fsuggest-submit-wrapper"><input id="fsuggest-submit" type="submit" name="submit" value="' . t('Submit') . '" /></div>';
|
||||
$o .= '<div id="fsuggest-submit-wrapper"><input id="fsuggest-submit" type="submit" name="submit" value="' . L10n::t('Submit') . '" /></div>';
|
||||
$o .= '</form>';
|
||||
|
||||
return $o;
|
||||
|
|
|
@ -94,13 +94,13 @@ function group_content(App $a) {
|
|||
$tpl = get_markup_template('group_edit.tpl');
|
||||
|
||||
$context = [
|
||||
'$submit' => t('Save Group'),
|
||||
'$submit' => L10n::t('Save Group'),
|
||||
];
|
||||
|
||||
if (($a->argc == 2) && ($a->argv[1] === 'new')) {
|
||||
return replace_macros($tpl, $context + [
|
||||
'$title' => t('Create a group of contacts/friends.'),
|
||||
'$gname' => ['groupname', t('Group Name: '), '', ''],
|
||||
'$title' => L10n::t('Create a group of contacts/friends.'),
|
||||
'$gname' => ['groupname', L10n::t('Group Name: '), '', ''],
|
||||
'$gid' => 'new',
|
||||
'$form_security_token' => get_form_security_token("group_edit"),
|
||||
]);
|
||||
|
@ -190,18 +190,18 @@ function group_content(App $a) {
|
|||
$drop_tpl = get_markup_template('group_drop.tpl');
|
||||
$drop_txt = replace_macros($drop_tpl, [
|
||||
'$id' => $group['id'],
|
||||
'$delete' => t('Delete Group'),
|
||||
'$delete' => L10n::t('Delete Group'),
|
||||
'$form_security_token' => get_form_security_token("group_drop"),
|
||||
]);
|
||||
|
||||
|
||||
$context = $context + [
|
||||
'$title' => t('Group Editor'),
|
||||
'$gname' => ['groupname', t('Group Name: '), $group['name'], ''],
|
||||
'$title' => L10n::t('Group Editor'),
|
||||
'$gname' => ['groupname', L10n::t('Group Name: '), $group['name'], ''],
|
||||
'$gid' => $group['id'],
|
||||
'$drop' => $drop_txt,
|
||||
'$form_security_token' => get_form_security_token('group_edit'),
|
||||
'$edit_name' => t('Edit Group Name')
|
||||
'$edit_name' => L10n::t('Edit Group Name')
|
||||
];
|
||||
|
||||
}
|
||||
|
@ -211,10 +211,10 @@ function group_content(App $a) {
|
|||
}
|
||||
|
||||
$groupeditor = [
|
||||
'label_members' => t('Members'),
|
||||
'label_members' => L10n::t('Members'),
|
||||
'members' => [],
|
||||
'label_contacts' => t('All Contacts'),
|
||||
'group_is_empty' => t('Group is empty'),
|
||||
'label_contacts' => L10n::t('All Contacts'),
|
||||
'group_is_empty' => L10n::t('Group is empty'),
|
||||
'contacts' => [],
|
||||
];
|
||||
|
||||
|
@ -227,7 +227,7 @@ function group_content(App $a) {
|
|||
$entry['label'] = 'members';
|
||||
$entry['photo_menu'] = '';
|
||||
$entry['change_member'] = [
|
||||
'title' => t("Remove Contact"),
|
||||
'title' => L10n::t("Remove Contact"),
|
||||
'gid' => $group['id'],
|
||||
'cid' => $member['id'],
|
||||
'sec_token' => $sec_token
|
||||
|
@ -251,7 +251,7 @@ function group_content(App $a) {
|
|||
$entry['label'] = 'contacts';
|
||||
$entry['photo_menu'] = '';
|
||||
$entry['change_member'] = [
|
||||
'title' => t("Add Contact"),
|
||||
'title' => L10n::t("Add Contact"),
|
||||
'gid' => $group['id'],
|
||||
'cid' => $member['id'],
|
||||
'sec_token' => $sec_token
|
||||
|
@ -263,7 +263,7 @@ function group_content(App $a) {
|
|||
}
|
||||
|
||||
$context['$groupeditor'] = $groupeditor;
|
||||
$context['$desc'] = t('Click on a contact to add or remove.');
|
||||
$context['$desc'] = L10n::t('Click on a contact to add or remove.');
|
||||
|
||||
// If there are to many contacts we could provide an alternative view mode
|
||||
$total = count($groupeditor['members']) + count($groupeditor['contacts']);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Text\Markdown;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
|
||||
if (!function_exists('load_doc_file')) {
|
||||
|
@ -44,22 +45,22 @@ function help_content(App $a) {
|
|||
$title = basename($path);
|
||||
$filename = $path;
|
||||
$text = load_doc_file('doc/' . $path . '.md');
|
||||
$a->page['title'] = t('Help:') . ' ' . str_replace('-', ' ', notags($title));
|
||||
$a->page['title'] = L10n::t('Help:') . ' ' . str_replace('-', ' ', notags($title));
|
||||
}
|
||||
$home = load_doc_file('doc/Home.md');
|
||||
if (!$text) {
|
||||
$text = $home;
|
||||
$filename = "Home";
|
||||
$a->page['title'] = t('Help');
|
||||
$a->page['title'] = L10n::t('Help');
|
||||
} else {
|
||||
$a->page['aside'] = Markdown::convert($home, false);
|
||||
}
|
||||
|
||||
if (!strlen($text)) {
|
||||
header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . t('Not Found'));
|
||||
header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . L10n::t('Not Found'));
|
||||
$tpl = get_markup_template("404.tpl");
|
||||
return replace_macros($tpl, [
|
||||
'$message' => t('Page not found.')
|
||||
'$message' => L10n::t('Page not found.')
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
146
mod/install.php
146
mod/install.php
|
@ -108,29 +108,29 @@ function install_content(App $a) {
|
|||
global $install_wizard_pass;
|
||||
$o = '';
|
||||
$wizard_status = "";
|
||||
$install_title = t('Friendica Communications Server - Setup');
|
||||
$install_title = L10n::t('Friendica Communications Server - Setup');
|
||||
|
||||
|
||||
|
||||
if (x($a->data, 'db_conn_failed')) {
|
||||
$install_wizard_pass = 2;
|
||||
$wizard_status = t('Could not connect to database.');
|
||||
$wizard_status = L10n::t('Could not connect to database.');
|
||||
}
|
||||
if (x($a->data, 'db_create_failed')) {
|
||||
$install_wizard_pass = 2;
|
||||
$wizard_status = t('Could not create table.');
|
||||
$wizard_status = L10n::t('Could not create table.');
|
||||
}
|
||||
|
||||
$db_return_text = "";
|
||||
if (x($a->data, 'db_installed')) {
|
||||
$txt = '<p style="font-size: 130%;">';
|
||||
$txt .= t('Your Friendica site database has been installed.') . EOL;
|
||||
$txt .= L10n::t('Your Friendica site database has been installed.') . EOL;
|
||||
$db_return_text .= $txt;
|
||||
}
|
||||
|
||||
if (x($a->data, 'db_failed')) {
|
||||
$txt = t('You may need to import the file "database.sql" manually using phpmyadmin or mysql.') . EOL;
|
||||
$txt .= t('Please see the file "INSTALL.txt".') . EOL ."<hr>";
|
||||
$txt = L10n::t('You may need to import the file "database.sql" manually using phpmyadmin or mysql.') . EOL;
|
||||
$txt .= L10n::t('Please see the file "INSTALL.txt".') . EOL ."<hr>";
|
||||
$txt .= "<pre>".$a->data['db_failed'] . "</pre>". EOL;
|
||||
$db_return_text .= $txt;
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ function install_content(App $a) {
|
|||
return replace_macros($tpl, [
|
||||
'$title' => $install_title,
|
||||
'$pass' => '',
|
||||
'$status' => t('Database already in use.'),
|
||||
'$status' => L10n::t('Database already in use.'),
|
||||
'$text' => '',
|
||||
]);
|
||||
}
|
||||
|
@ -199,12 +199,12 @@ function install_content(App $a) {
|
|||
$tpl = get_markup_template('install_checks.tpl');
|
||||
$o .= replace_macros($tpl, [
|
||||
'$title' => $install_title,
|
||||
'$pass' => t('System check'),
|
||||
'$pass' => L10n::t('System check'),
|
||||
'$checks' => $checks,
|
||||
'$passed' => $checkspassed,
|
||||
'$see_install' => t('Please see the file "INSTALL.txt".'),
|
||||
'$next' => t('Next'),
|
||||
'$reload' => t('Check again'),
|
||||
'$see_install' => L10n::t('Please see the file "INSTALL.txt".'),
|
||||
'$next' => L10n::t('Next'),
|
||||
'$reload' => L10n::t('Check again'),
|
||||
'$phpath' => $phpath,
|
||||
'$baseurl' => System::baseUrl(),
|
||||
]);
|
||||
|
@ -223,28 +223,28 @@ function install_content(App $a) {
|
|||
$tpl = get_markup_template('install_db.tpl');
|
||||
$o .= replace_macros($tpl, [
|
||||
'$title' => $install_title,
|
||||
'$pass' => t('Database connection'),
|
||||
'$info_01' => t('In order to install Friendica we need to know how to connect to your database.'),
|
||||
'$info_02' => t('Please contact your hosting provider or site administrator if you have questions about these settings.'),
|
||||
'$info_03' => t('The database you specify below should already exist. If it does not, please create it before continuing.'),
|
||||
'$pass' => L10n::t('Database connection'),
|
||||
'$info_01' => L10n::t('In order to install Friendica we need to know how to connect to your database.'),
|
||||
'$info_02' => L10n::t('Please contact your hosting provider or site administrator if you have questions about these settings.'),
|
||||
'$info_03' => L10n::t('The database you specify below should already exist. If it does not, please create it before continuing.'),
|
||||
|
||||
'$status' => $wizard_status,
|
||||
|
||||
'$dbhost' => ['dbhost', t('Database Server Name'), $dbhost, '', 'required'],
|
||||
'$dbuser' => ['dbuser', t('Database Login Name'), $dbuser, '', 'required', 'autofocus'],
|
||||
'$dbpass' => ['dbpass', t('Database Login Password'), $dbpass, t("For security reasons the password must not be empty"), 'required'],
|
||||
'$dbdata' => ['dbdata', t('Database Name'), $dbdata, '', 'required'],
|
||||
'$adminmail' => ['adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
|
||||
'$dbhost' => ['dbhost', L10n::t('Database Server Name'), $dbhost, '', 'required'],
|
||||
'$dbuser' => ['dbuser', L10n::t('Database Login Name'), $dbuser, '', 'required', 'autofocus'],
|
||||
'$dbpass' => ['dbpass', L10n::t('Database Login Password'), $dbpass, L10n::t("For security reasons the password must not be empty"), 'required'],
|
||||
'$dbdata' => ['dbdata', L10n::t('Database Name'), $dbdata, '', 'required'],
|
||||
'$adminmail' => ['adminmail', L10n::t('Site administrator email address'), $adminmail, L10n::t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
|
||||
|
||||
|
||||
|
||||
'$lbl_10' => t('Please select a default timezone for your website'),
|
||||
'$lbl_10' => L10n::t('Please select a default timezone for your website'),
|
||||
|
||||
'$baseurl' => System::baseUrl(),
|
||||
|
||||
'$phpath' => $phpath,
|
||||
|
||||
'$submit' => t('Submit'),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
|
||||
]);
|
||||
return $o;
|
||||
|
@ -265,7 +265,7 @@ function install_content(App $a) {
|
|||
$tpl = get_markup_template('install_settings.tpl');
|
||||
$o .= replace_macros($tpl, [
|
||||
'$title' => $install_title,
|
||||
'$pass' => t('Site settings'),
|
||||
'$pass' => L10n::t('Site settings'),
|
||||
|
||||
'$status' => $wizard_status,
|
||||
|
||||
|
@ -275,16 +275,16 @@ function install_content(App $a) {
|
|||
'$dbdata' => $dbdata,
|
||||
'$phpath' => $phpath,
|
||||
|
||||
'$adminmail' => ['adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
|
||||
'$adminmail' => ['adminmail', L10n::t('Site administrator email address'), $adminmail, L10n::t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
|
||||
|
||||
|
||||
'$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''),
|
||||
'$language' => ['language', t('System Language:'), 'en', t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices],
|
||||
'$timezone' => field_timezone('timezone', L10n::t('Please select a default timezone for your website'), $timezone, ''),
|
||||
'$language' => ['language', L10n::t('System Language:'), 'en', L10n::t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices],
|
||||
'$baseurl' => System::baseUrl(),
|
||||
|
||||
|
||||
|
||||
'$submit' => t('Submit'),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
|
||||
]);
|
||||
return $o;
|
||||
|
@ -319,17 +319,17 @@ function check_php(&$phpath, &$checks) {
|
|||
}
|
||||
$help = "";
|
||||
if (!$passed) {
|
||||
$help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL;
|
||||
$help .= t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See <a href='https://github.com/friendica/friendica/blob/master/doc/Install.md#set-up-the-worker'>'Setup the worker'</a>") . EOL;
|
||||
$help .= L10n::t('Could not find a command line version of PHP in the web server PATH.'). EOL;
|
||||
$help .= L10n::t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See <a href='https://github.com/friendica/friendica/blob/master/doc/Install.md#set-up-the-worker'>'Setup the worker'</a>") . EOL;
|
||||
$help .= EOL . EOL;
|
||||
$tpl = get_markup_template('field_input.tpl');
|
||||
$help .= replace_macros($tpl, [
|
||||
'$field' => ['phpath', t('PHP executable path'), $phpath, t('Enter full path to php executable. You can leave this blank to continue the installation.')],
|
||||
'$field' => ['phpath', L10n::t('PHP executable path'), $phpath, L10n::t('Enter full path to php executable. You can leave this blank to continue the installation.')],
|
||||
]);
|
||||
$phpath = "";
|
||||
}
|
||||
|
||||
check_add($checks, t('Command line PHP').($passed?" (<tt>$phpath</tt>)":""), $passed, false, $help);
|
||||
check_add($checks, L10n::t('Command line PHP').($passed?" (<tt>$phpath</tt>)":""), $passed, false, $help);
|
||||
|
||||
if ($passed) {
|
||||
$cmd = "$phpath -v";
|
||||
|
@ -338,10 +338,10 @@ function check_php(&$phpath, &$checks) {
|
|||
list($result) = explode("\n", $result);
|
||||
$help = "";
|
||||
if (!$passed2) {
|
||||
$help .= t('PHP executable is not the php cli binary (could be cgi-fgci version)'). EOL;
|
||||
$help .= t('Found PHP version: ')."<tt>$result</tt>";
|
||||
$help .= L10n::t('PHP executable is not the php cli binary (could be cgi-fgci version)'). EOL;
|
||||
$help .= L10n::t('Found PHP version: ')."<tt>$result</tt>";
|
||||
}
|
||||
check_add($checks, t('PHP cli binary'), $passed2, true, $help);
|
||||
check_add($checks, L10n::t('PHP cli binary'), $passed2, true, $help);
|
||||
}
|
||||
|
||||
|
||||
|
@ -352,10 +352,10 @@ function check_php(&$phpath, &$checks) {
|
|||
$passed3 = $result == $str;
|
||||
$help = "";
|
||||
if (!$passed3) {
|
||||
$help .= t('The command line version of PHP on your system does not have "register_argc_argv" enabled.'). EOL;
|
||||
$help .= t('This is required for message delivery to work.');
|
||||
$help .= L10n::t('The command line version of PHP on your system does not have "register_argc_argv" enabled.'). EOL;
|
||||
$help .= L10n::t('This is required for message delivery to work.');
|
||||
}
|
||||
check_add($checks, t('PHP register_argc_argv'), $passed3, true, $help);
|
||||
check_add($checks, L10n::t('PHP register_argc_argv'), $passed3, true, $help);
|
||||
}
|
||||
|
||||
|
||||
|
@ -378,59 +378,59 @@ function check_keys(&$checks) {
|
|||
// Get private key
|
||||
|
||||
if (! $res) {
|
||||
$help .= t('Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys'). EOL;
|
||||
$help .= t('If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".');
|
||||
$help .= L10n::t('Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys'). EOL;
|
||||
$help .= L10n::t('If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".');
|
||||
}
|
||||
check_add($checks, t('Generate encryption keys'), $res, true, $help);
|
||||
check_add($checks, L10n::t('Generate encryption keys'), $res, true, $help);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function check_funcs(&$checks) {
|
||||
$ck_funcs = [];
|
||||
check_add($ck_funcs, t('libCurl PHP module'), true, true, "");
|
||||
check_add($ck_funcs, t('GD graphics PHP module'), true, true, "");
|
||||
check_add($ck_funcs, t('OpenSSL PHP module'), true, true, "");
|
||||
check_add($ck_funcs, t('PDO or MySQLi PHP module'), true, true, "");
|
||||
check_add($ck_funcs, t('mb_string PHP module'), true, true, "");
|
||||
check_add($ck_funcs, t('XML PHP module'), true, true, "");
|
||||
check_add($ck_funcs, t('iconv module'), true, true, "");
|
||||
check_add($ck_funcs, L10n::t('libCurl PHP module'), true, true, "");
|
||||
check_add($ck_funcs, L10n::t('GD graphics PHP module'), true, true, "");
|
||||
check_add($ck_funcs, L10n::t('OpenSSL PHP module'), true, true, "");
|
||||
check_add($ck_funcs, L10n::t('PDO or MySQLi PHP module'), true, true, "");
|
||||
check_add($ck_funcs, L10n::t('mb_string PHP module'), true, true, "");
|
||||
check_add($ck_funcs, L10n::t('XML PHP module'), true, true, "");
|
||||
check_add($ck_funcs, L10n::t('iconv module'), true, true, "");
|
||||
|
||||
if (function_exists('apache_get_modules')) {
|
||||
if (! in_array('mod_rewrite',apache_get_modules())) {
|
||||
check_add($ck_funcs, t('Apache mod_rewrite module'), false, true, t('Error: Apache webserver mod-rewrite module is required but not installed.'));
|
||||
check_add($ck_funcs, L10n::t('Apache mod_rewrite module'), false, true, L10n::t('Error: Apache webserver mod-rewrite module is required but not installed.'));
|
||||
} else {
|
||||
check_add($ck_funcs, t('Apache mod_rewrite module'), true, true, "");
|
||||
check_add($ck_funcs, L10n::t('Apache mod_rewrite module'), true, true, "");
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('curl_init')) {
|
||||
$ck_funcs[0]['status'] = false;
|
||||
$ck_funcs[0]['help'] = t('Error: libCURL PHP module required but not installed.');
|
||||
$ck_funcs[0]['help'] = L10n::t('Error: libCURL PHP module required but not installed.');
|
||||
}
|
||||
if (! function_exists('imagecreatefromjpeg')) {
|
||||
$ck_funcs[1]['status'] = false;
|
||||
$ck_funcs[1]['help'] = t('Error: GD graphics PHP module with JPEG support required but not installed.');
|
||||
$ck_funcs[1]['help'] = L10n::t('Error: GD graphics PHP module with JPEG support required but not installed.');
|
||||
}
|
||||
if (! function_exists('openssl_public_encrypt')) {
|
||||
$ck_funcs[2]['status'] = false;
|
||||
$ck_funcs[2]['help'] = t('Error: openssl PHP module required but not installed.');
|
||||
$ck_funcs[2]['help'] = L10n::t('Error: openssl PHP module required but not installed.');
|
||||
}
|
||||
if (! function_exists('mysqli_connect') && !class_exists('pdo')) {
|
||||
$ck_funcs[3]['status'] = false;
|
||||
$ck_funcs[3]['help'] = t('Error: PDO or MySQLi PHP module required but not installed.');
|
||||
$ck_funcs[3]['help'] = L10n::t('Error: PDO or MySQLi PHP module required but not installed.');
|
||||
}
|
||||
if (!function_exists('mysqli_connect') && class_exists('pdo') && !in_array('mysql', PDO::getAvailableDrivers())) {
|
||||
$ck_funcs[3]['status'] = false;
|
||||
$ck_funcs[3]['help'] = t('Error: The MySQL driver for PDO is not installed.');
|
||||
$ck_funcs[3]['help'] = L10n::t('Error: The MySQL driver for PDO is not installed.');
|
||||
}
|
||||
if (! function_exists('mb_strlen')) {
|
||||
$ck_funcs[4]['status'] = false;
|
||||
$ck_funcs[4]['help'] = t('Error: mb_string PHP module required but not installed.');
|
||||
$ck_funcs[4]['help'] = L10n::t('Error: mb_string PHP module required but not installed.');
|
||||
}
|
||||
if (! function_exists('iconv_strlen')) {
|
||||
$ck_funcs[7]['status'] = false;
|
||||
$ck_funcs[7]['help'] = t('Error: iconv PHP module required but not installed.');
|
||||
$ck_funcs[7]['help'] = L10n::t('Error: iconv PHP module required but not installed.');
|
||||
}
|
||||
|
||||
$checks = array_merge($checks, $ck_funcs);
|
||||
|
@ -440,7 +440,7 @@ function check_funcs(&$checks) {
|
|||
$xml = new DOMDocument();
|
||||
} catch (Exception $e) {
|
||||
$ck_funcs[6]['status'] = false;
|
||||
$ck_funcs[6]['help'] = t('Error, XML PHP module required but not installed.');
|
||||
$ck_funcs[6]['help'] = L10n::t('Error, XML PHP module required but not installed.');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,13 +452,13 @@ function check_htconfig(&$checks) {
|
|||
(!file_exists('.htconfig.php') && !is_writable('.'))) {
|
||||
|
||||
$status = false;
|
||||
$help = t('The web installer needs to be able to create a file called ".htconfig.php" in the top folder of your web server and it is unable to do so.') .EOL;
|
||||
$help .= t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.').EOL;
|
||||
$help .= t('At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Friendica top folder.').EOL;
|
||||
$help .= t('You can alternatively skip this procedure and perform a manual installation. Please see the file "INSTALL.txt" for instructions.').EOL;
|
||||
$help = L10n::t('The web installer needs to be able to create a file called ".htconfig.php" in the top folder of your web server and it is unable to do so.') .EOL;
|
||||
$help .= L10n::t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.').EOL;
|
||||
$help .= L10n::t('At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Friendica top folder.').EOL;
|
||||
$help .= L10n::t('You can alternatively skip this procedure and perform a manual installation. Please see the file "INSTALL.txt" for instructions.').EOL;
|
||||
}
|
||||
|
||||
check_add($checks, t('.htconfig.php is writable'), $status, false, $help);
|
||||
check_add($checks, L10n::t('.htconfig.php is writable'), $status, false, $help);
|
||||
|
||||
}
|
||||
|
||||
|
@ -468,13 +468,13 @@ function check_smarty3(&$checks) {
|
|||
if (!is_writable('view/smarty3')) {
|
||||
|
||||
$status = false;
|
||||
$help = t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL;
|
||||
$help .= t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.').EOL;
|
||||
$help .= t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL;
|
||||
$help .= t('Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains.').EOL;
|
||||
$help = L10n::t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL;
|
||||
$help .= L10n::t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.').EOL;
|
||||
$help .= L10n::t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL;
|
||||
$help .= L10n::t('Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains.').EOL;
|
||||
}
|
||||
|
||||
check_add($checks, t('view/smarty3 is writable'), $status, true, $help);
|
||||
check_add($checks, L10n::t('view/smarty3 is writable'), $status, true, $help);
|
||||
|
||||
}
|
||||
|
||||
|
@ -490,9 +490,9 @@ function check_htaccess(&$checks) {
|
|||
|
||||
if ($test != "ok") {
|
||||
$status = false;
|
||||
$help = t('Url rewrite in .htaccess is not working. Check your server configuration.');
|
||||
$help = L10n::t('Url rewrite in .htaccess is not working. Check your server configuration.');
|
||||
}
|
||||
check_add($checks, t('Url rewrite is working'), $status, true, $help);
|
||||
check_add($checks, L10n::t('Url rewrite is working'), $status, true, $help);
|
||||
} else {
|
||||
// cannot check modrewrite if libcurl is not installed
|
||||
/// @TODO Maybe issue warning here?
|
||||
|
@ -511,18 +511,18 @@ function check_imagik(&$checks) {
|
|||
}
|
||||
}
|
||||
if ($imagick == false) {
|
||||
check_add($checks, t('ImageMagick PHP extension is not installed'), $imagick, false, "");
|
||||
check_add($checks, L10n::t('ImageMagick PHP extension is not installed'), $imagick, false, "");
|
||||
} else {
|
||||
check_add($checks, t('ImageMagick PHP extension is installed'), $imagick, false, "");
|
||||
check_add($checks, L10n::t('ImageMagick PHP extension is installed'), $imagick, false, "");
|
||||
if ($imagick) {
|
||||
check_add($checks, t('ImageMagick supports GIF'), $gif, false, "");
|
||||
check_add($checks, L10n::t('ImageMagick supports GIF'), $gif, false, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function manual_config(App $a) {
|
||||
$data = htmlentities($a->data['txt'],ENT_COMPAT, 'UTF-8');
|
||||
$o = t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.');
|
||||
$o = L10n::t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.');
|
||||
$o .= "<textarea rows=\"24\" cols=\"80\" >$data</textarea>";
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -469,7 +469,7 @@ function item_post(App $a) {
|
|||
|
||||
$fields = ['allow_cid' => $str_contact_allow, 'allow_gid' => $str_group_allow,
|
||||
'deny_cid' => $str_contact_deny, 'deny_gid' => $str_group_deny];
|
||||
$condition = ['resource-id' => $image_uri, 'uid' => $profile_uid, 'album' => t('Wall Photos')];
|
||||
$condition = ['resource-id' => $image_uri, 'uid' => $profile_uid, 'album' => L10n::t('Wall Photos')];
|
||||
dba::update('photo', $fields, $condition);
|
||||
}
|
||||
}
|
||||
|
@ -803,7 +803,7 @@ function item_post(App $a) {
|
|||
$disclaimer = '<hr />' . sprintf(t('This message was sent to you by %s, a member of the Friendica social network.'), $a->user['username'])
|
||||
. '<br />';
|
||||
$disclaimer .= sprintf(t('You may visit them online at %s'), System::baseUrl() . '/profile/' . $a->user['nickname']) . EOL;
|
||||
$disclaimer .= t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL;
|
||||
$disclaimer .= L10n::t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL;
|
||||
if (!$datarray['title']=='') {
|
||||
$subject = Email::encodeHeader($datarray['title'], 'UTF-8');
|
||||
} else {
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file mod/maintenance.php
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
|
||||
function maintenance_content(App $a) {
|
||||
|
||||
function maintenance_content(App $a)
|
||||
{
|
||||
$reason = Config::get('system', 'maintenance_reason');
|
||||
|
||||
if (substr(normalise_link($reason), 0, 7) == 'http://') {
|
||||
|
@ -18,7 +21,7 @@ function maintenance_content(App $a) {
|
|||
header('Retry-After: 600');
|
||||
|
||||
return replace_macros(get_markup_template('maintenance.tpl'), [
|
||||
'$sysdown' => t('System down for maintenance'),
|
||||
'$sysdown' => L10n::t('System down for maintenance'),
|
||||
'$reason' => $reason
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ function openid_content(App $a) {
|
|||
$authid = $_REQUEST['openid_identity'];
|
||||
|
||||
if(! strlen($authid)) {
|
||||
logger( t('OpenID protocol error. No ID returned.') . EOL);
|
||||
logger(L10n::t('OpenID protocol error. No ID returned.') . EOL);
|
||||
goaway(System::baseUrl());
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ function ostatus_subscribe_content(App $a) {
|
|||
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.System::baseUrl().'/settings/connectors">';
|
||||
PConfig::delete($uid, "ostatus", "legacy_friends");
|
||||
PConfig::delete($uid, "ostatus", "legacy_contact");
|
||||
$o .= t("Done");
|
||||
$o .= L10n::t("Done");
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ function repair_ostatus_content(App $a) {
|
|||
intval(CONTACT_IS_SHARING), $counter++);
|
||||
|
||||
if (!$r) {
|
||||
$o .= t("Done");
|
||||
$o .= L10n::t("Done");
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
<?php
|
||||
|
||||
// See update_profile.php for documentation
|
||||
/**
|
||||
* @file mod/update_display.php
|
||||
* See update_profile.php for documentation
|
||||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
require_once "mod/display.php";
|
||||
|
@ -21,7 +24,7 @@ function update_display_content(App $a)
|
|||
$text = preg_replace($pattern, $replace, $text);
|
||||
|
||||
if (PConfig::get(local_user(), "system", "bandwith_saver")) {
|
||||
$replace = "<br />" . t("[Embedded content - reload page to view]") . "<br />";
|
||||
$replace = "<br />" . L10n::t("[Embedded content - reload page to view]") . "<br />";
|
||||
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
|
||||
$text = preg_replace($pattern, $replace, $text);
|
||||
$pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
<?php
|
||||
|
||||
// See update_profile.php for documentation
|
||||
/**
|
||||
* @file mod/update_network
|
||||
* See update_profile.php for documentation
|
||||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
require_once "mod/network.php";
|
||||
|
@ -26,7 +29,7 @@ function update_network_content(App $a)
|
|||
$text = preg_replace($pattern, $replace, $text);
|
||||
|
||||
if (PConfig::get(local_user(), "system", "bandwith_saver")) {
|
||||
$replace = "<br />" . t("[Embedded content - reload page to view]") . "<br />";
|
||||
$replace = "<br />" . L10n::t("[Embedded content - reload page to view]") . "<br />";
|
||||
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
|
||||
$text = preg_replace($pattern, $replace, $text);
|
||||
$pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
|
||||
|
|
|
@ -12,7 +12,7 @@ extract.php - extracts translatable strings from our project files. It
|
|||
currently doesn't pick up strings in other libraries we might be using such as
|
||||
the HTML parsers.
|
||||
|
||||
In order for extract to do its job, every use of the t() translation function
|
||||
In order for extract to do its job, every use of the L10n::t() translation function
|
||||
must be preceded by one space. The string also can not contain parentheses. If
|
||||
parens are required in a string which requires translation, please use hex escapes.
|
||||
|
||||
|
|
|
@ -29,13 +29,14 @@ if ($argc != 2 || $argv[1] == "-h" || $argv[1] == "--help" || $argv[1] == "-?")
|
|||
}
|
||||
|
||||
use Friendica\BaseObject;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Model\Contact;
|
||||
|
||||
require_once 'boot.php';
|
||||
require_once 'include/dba.php';
|
||||
require_once 'include/text.php';
|
||||
|
||||
$a = get_app();;
|
||||
$a = get_app();
|
||||
BaseObject::setApp($a);
|
||||
|
||||
require_once '.htconfig.php';
|
||||
|
@ -44,11 +45,11 @@ unset($db_host, $db_user, $db_pass, $db_data);
|
|||
|
||||
$contact_id = Contact::getIdForURL($argv[1], 0);
|
||||
if (!$contact_id) {
|
||||
echo t('Could not find any contact entry for this URL (%s)', $nurl);
|
||||
echo L10n::t('Could not find any contact entry for this URL (%s)', $nurl);
|
||||
echo "\r\n";
|
||||
exit(1);
|
||||
}
|
||||
Contact::block($contact_id);
|
||||
echo t('The contact has been blocked from the node');
|
||||
echo L10n::t('The contact has been blocked from the node');
|
||||
echo "\r\n";
|
||||
exit(0);
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Theme settings
|
||||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a) {
|
||||
function theme_content(App $a)
|
||||
{
|
||||
if (!local_user()) {
|
||||
return;
|
||||
}
|
||||
|
@ -20,7 +21,8 @@ function theme_content(App $a) {
|
|||
return clean_form($a, $colorset, $user);
|
||||
}
|
||||
|
||||
function theme_post(App $a) {
|
||||
function theme_post(App $a)
|
||||
{
|
||||
if (! local_user()) {
|
||||
return;
|
||||
}
|
||||
|
@ -30,29 +32,32 @@ function theme_post(App $a) {
|
|||
}
|
||||
}
|
||||
|
||||
function theme_admin(App $a) {
|
||||
function theme_admin(App $a)
|
||||
{
|
||||
$colorset = Config::get('duepuntozero', 'colorset');
|
||||
$user = false;
|
||||
|
||||
return clean_form($a, $colorset, $user);
|
||||
}
|
||||
|
||||
function theme_admin_post(App $a) {
|
||||
function theme_admin_post(App $a)
|
||||
{
|
||||
if (isset($_POST['duepuntozero-settings-submit'])) {
|
||||
Config::set('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
|
||||
}
|
||||
}
|
||||
|
||||
/// @TODO $a is no longer used
|
||||
function clean_form(App $a, &$colorset, $user) {
|
||||
function clean_form(App $a, &$colorset, $user)
|
||||
{
|
||||
$colorset = [
|
||||
'default' =>t('default'),
|
||||
'greenzero' =>t('greenzero'),
|
||||
'purplezero' =>t('purplezero'),
|
||||
'easterbunny' =>t('easterbunny'),
|
||||
'darkzero' =>t('darkzero'),
|
||||
'comix' =>t('comix'),
|
||||
'slackr' =>t('slackr'),
|
||||
'default' => L10n::t('default'),
|
||||
'greenzero' => L10n::t('greenzero'),
|
||||
'purplezero' => L10n::t('purplezero'),
|
||||
'easterbunny' => L10n::t('easterbunny'),
|
||||
'darkzero' => L10n::t('darkzero'),
|
||||
'comix' => L10n::t('comix'),
|
||||
'slackr' => L10n::t('slackr'),
|
||||
];
|
||||
|
||||
if ($user) {
|
||||
|
@ -64,10 +69,10 @@ function clean_form(App $a, &$colorset, $user) {
|
|||
$t = get_markup_template("theme_settings.tpl");
|
||||
/// @TODO No need for adding string here, $o is not defined
|
||||
$o .= replace_macros($t, [
|
||||
'$submit' => t('Submit'),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$colorset' => ['duepuntozero_colorset', t('Variations'), $color, '', $colorset],
|
||||
'$title' => L10n::t("Theme settings"),
|
||||
'$colorset' => ['duepuntozero_colorset', L10n::t('Variations'), $color, '', $colorset],
|
||||
]);
|
||||
|
||||
return $o;
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
require_once('view/theme/frio/php/Image.php');
|
||||
require_once 'view/theme/frio/php/Image.php';
|
||||
|
||||
function theme_post(App $a) {
|
||||
if (!local_user()) {
|
||||
|
@ -93,7 +94,7 @@ function frio_form($arr) {
|
|||
}
|
||||
|
||||
$scheme_choices = [];
|
||||
$scheme_choices["---"] = t("Default");
|
||||
$scheme_choices["---"] = L10n::t("Default");
|
||||
$files = glob('view/theme/frio/schema/*.php');
|
||||
if ($files) {
|
||||
foreach ($files as $file) {
|
||||
|
@ -105,28 +106,28 @@ function frio_form($arr) {
|
|||
}
|
||||
}
|
||||
|
||||
$background_image_help = "<strong>" . t("Note"). ": </strong>".t("Check image permissions if all users are allowed to visit the image");
|
||||
$background_image_help = "<strong>" . L10n::t("Note"). ": </strong>".t("Check image permissions if all users are allowed to visit the image");
|
||||
|
||||
$t = get_markup_template('theme_settings.tpl');
|
||||
$ctx = [
|
||||
'$submit' => t('Submit'),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$schema' => ['frio_schema', t("Select scheme"), $arr["schema"], '', $scheme_choices],
|
||||
'$nav_bg' => array_key_exists("nav_bg", $disable) ? "" : ['frio_nav_bg', t('Navigation bar background color'), $arr['nav_bg']],
|
||||
'$nav_icon_color' => array_key_exists("nav_icon_color", $disable) ? "" : ['frio_nav_icon_color', t('Navigation bar icon color '), $arr['nav_icon_color']],
|
||||
'$link_color' => array_key_exists("link_color", $disable) ? "" : ['frio_link_color', t('Link color'), $arr['link_color'], '', $link_colors],
|
||||
'$bgcolor' => array_key_exists("bgcolor", $disable) ? "" : ['frio_background_color', t('Set the background color'), $arr['bgcolor']],
|
||||
'$contentbg_transp' => array_key_exists("contentbg_transp", $disable) ? "" : ['frio_contentbg_transp', t("Content background transparency"), ((isset($arr["contentbg_transp"]) && $arr["contentbg_transp"] != "") ? $arr["contentbg_transp"] : 100)],
|
||||
'$background_image' => array_key_exists("background_image", $disable ) ? "" : ['frio_background_image', t('Set the background image'), $arr['background_image'], $background_image_help],
|
||||
'$title' => L10n::t("Theme settings"),
|
||||
'$schema' => ['frio_schema', L10n::t("Select scheme"), $arr["schema"], '', $scheme_choices],
|
||||
'$nav_bg' => array_key_exists("nav_bg", $disable) ? "" : ['frio_nav_bg', L10n::t('Navigation bar background color'), $arr['nav_bg']],
|
||||
'$nav_icon_color' => array_key_exists("nav_icon_color", $disable) ? "" : ['frio_nav_icon_color', L10n::t('Navigation bar icon color '), $arr['nav_icon_color']],
|
||||
'$link_color' => array_key_exists("link_color", $disable) ? "" : ['frio_link_color', L10n::t('Link color'), $arr['link_color'], '', $link_colors],
|
||||
'$bgcolor' => array_key_exists("bgcolor", $disable) ? "" : ['frio_background_color', L10n::t('Set the background color'), $arr['bgcolor']],
|
||||
'$contentbg_transp' => array_key_exists("contentbg_transp", $disable) ? "" : ['frio_contentbg_transp', L10n::t("Content background transparency"), ((isset($arr["contentbg_transp"]) && $arr["contentbg_transp"] != "") ? $arr["contentbg_transp"] : 100)],
|
||||
'$background_image' => array_key_exists("background_image", $disable) ? "" : ['frio_background_image', L10n::t('Set the background image'), $arr['background_image'], $background_image_help],
|
||||
'$bg_image_options' => Image::get_options($arr),
|
||||
];
|
||||
|
||||
if (array_key_exists("login_bg_image", $arr) && !array_key_exists("login_bg_image", $disable)) {
|
||||
$ctx['$login_bg_image'] = ['frio_login_bg_image', t('Login page background image'), $arr['login_bg_image'], $background_image_help];
|
||||
$ctx['$login_bg_image'] = ['frio_login_bg_image', L10n::t('Login page background image'), $arr['login_bg_image'], $background_image_help];
|
||||
}
|
||||
if (array_key_exists("login_bg_color", $arr) && !array_key_exists("login_bg_color", $disable)) {
|
||||
$ctx['$login_bg_color'] = ['frio_login_bg_color', t('Login page background color'), $arr['login_bg_color'], t('Leave background image and color empty for theme defaults')];
|
||||
$ctx['$login_bg_color'] = ['frio_login_bg_color', L10n::t('Login page background color'), $arr['login_bg_color'], L10n::t('Leave background image and color empty for theme defaults')];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use Friendica\App;
|
|||
use Friendica\Content\Widget;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -234,12 +235,12 @@ function frio_remote_nav($a, &$nav)
|
|||
$r[0]['name'] = $a->user['username'];
|
||||
} elseif (!local_user() && remote_user()) {
|
||||
$r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user()));
|
||||
$nav['remote'] = t("Guest");
|
||||
$nav['remote'] = L10n::t("Guest");
|
||||
} elseif (Profile::getMyURL()) {
|
||||
$r = q("SELECT `name`, `nick`, `photo` FROM `gcontact`
|
||||
WHERE `addr` = '%s' AND `network` = 'dfrn'",
|
||||
dbesc($webbie));
|
||||
$nav['remote'] = t("Visitor");
|
||||
$nav['remote'] = L10n::t("Visitor");
|
||||
} else {
|
||||
$r = false;
|
||||
}
|
||||
|
@ -252,21 +253,21 @@ function frio_remote_nav($a, &$nav)
|
|||
}
|
||||
|
||||
if (!local_user() && !empty($server_url)) {
|
||||
$nav['logout'] = [$server_url . '/logout', t('Logout'), "", t('End this session')];
|
||||
$nav['logout'] = [$server_url . '/logout', L10n::t('Logout'), "", L10n::t('End this session')];
|
||||
|
||||
// user menu
|
||||
$nav['usermenu'][] = [$server_url . '/profile/' . $a->user['nickname'], t('Status'), "", t('Your posts and conversations')];
|
||||
$nav['usermenu'][] = [$server_url . '/profile/' . $a->user['nickname'] . '?tab=profile', t('Profile'), "", t('Your profile page')];
|
||||
$nav['usermenu'][] = [$server_url . '/photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos')];
|
||||
$nav['usermenu'][] = [$server_url . '/videos/' . $a->user['nickname'], t('Videos'), "", t('Your videos')];
|
||||
$nav['usermenu'][] = [$server_url . '/events/', t('Events'), "", t('Your events')];
|
||||
$nav['usermenu'][] = [$server_url . '/profile/' . $a->user['nickname'], L10n::t('Status'), "", L10n::t('Your posts and conversations')];
|
||||
$nav['usermenu'][] = [$server_url . '/profile/' . $a->user['nickname'] . '?tab=profile', L10n::t('Profile'), "", L10n::t('Your profile page')];
|
||||
$nav['usermenu'][] = [$server_url . '/photos/' . $a->user['nickname'], L10n::t('Photos'), "", L10n::t('Your photos')];
|
||||
$nav['usermenu'][] = [$server_url . '/videos/' . $a->user['nickname'], L10n::t('Videos'), "", L10n::t('Your videos')];
|
||||
$nav['usermenu'][] = [$server_url . '/events/', L10n::t('Events'), "", L10n::t('Your events')];
|
||||
|
||||
// navbar links
|
||||
$nav['network'] = [$server_url . '/network', t('Network'), "", t('Conversations from your friends')];
|
||||
$nav['events'] = [$server_url . '/events', t('Events'), "", t('Events and Calendar')];
|
||||
$nav['messages'] = [$server_url . '/message', t('Messages'), "", t('Private mail')];
|
||||
$nav['settings'] = [$server_url . '/settings', t('Settings'), "", t('Account settings')];
|
||||
$nav['contacts'] = [$server_url . '/contacts', t('Contacts'), "", t('Manage/edit friends and contacts')];
|
||||
$nav['network'] = [$server_url . '/network', L10n::t('Network'), "", L10n::t('Conversations from your friends')];
|
||||
$nav['events'] = [$server_url . '/events', L10n::t('Events'), "", L10n::t('Events and Calendar')];
|
||||
$nav['messages'] = [$server_url . '/message', L10n::t('Messages'), "", L10n::t('Private mail')];
|
||||
$nav['settings'] = [$server_url . '/settings', L10n::t('Settings'), "", L10n::t('Account settings')];
|
||||
$nav['contacts'] = [$server_url . '/contacts', L10n::t('Contacts'), "", L10n::t('Manage/edit friends and contacts')];
|
||||
$nav['sitename'] = $a->config['sitename'];
|
||||
}
|
||||
}
|
||||
|
@ -352,7 +353,7 @@ function frio_display_item(App $a, &$arr)
|
|||
if (local_user() == $arr['item']['uid'] && $arr['item']['parent'] == $arr['item']['id'] && !$arr['item']['self']) {
|
||||
$subthread = [
|
||||
'menu' => 'follow_thread',
|
||||
'title' => t('Follow Thread'),
|
||||
'title' => L10n::t('Follow Thread'),
|
||||
'action' => 'dosubthread(' . $arr['item']['id'] . '); return false;',
|
||||
'href' => '#'
|
||||
];
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Theme settings
|
||||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
|
@ -70,13 +70,13 @@ function quattro_form(App $a, $align, $color, $tfs, $pfs) {
|
|||
|
||||
$t = get_markup_template("theme_settings.tpl" );
|
||||
$o .= replace_macros($t, [
|
||||
'$submit' => t('Submit'),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$align' => ['quattro_align', t('Alignment'), $align, '', ['left'=>t('Left'), 'center'=>t('Center')]],
|
||||
'$color' => ['quattro_color', t('Color scheme'), $color, '', $colors],
|
||||
'$pfs' => ['quattro_pfs', t('Posts font size'), $pfs],
|
||||
'$tfs' => ['quattro_tfs', t('Textareas font size'), $tfs],
|
||||
'$title' => L10n::t("Theme settings"),
|
||||
'$align' => ['quattro_align', L10n::t('Alignment'), $align, '', ['left' => L10n::t('Left'), 'center' => L10n::t('Center')]],
|
||||
'$color' => ['quattro_color', L10n::t('Color scheme'), $color, '', $colors],
|
||||
'$pfs' => ['quattro_pfs', L10n::t('Posts font size'), $pfs],
|
||||
'$tfs' => ['quattro_tfs', L10n::t('Textareas font size'), $tfs],
|
||||
]);
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Theme settings
|
||||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a) {
|
||||
function theme_content(App $a)
|
||||
{
|
||||
if (!local_user()) {
|
||||
return;
|
||||
}
|
||||
|
@ -39,7 +40,8 @@ function theme_content(App $a) {
|
|||
$show_services, $show_friends, $show_lastusers);
|
||||
}
|
||||
|
||||
function theme_post(App $a) {
|
||||
function theme_post(App $a)
|
||||
{
|
||||
if (! local_user()) {
|
||||
return;
|
||||
}
|
||||
|
@ -70,7 +72,7 @@ function theme_admin(App $a) {
|
|||
|
||||
$t = get_markup_template("theme_admin_settings.tpl");
|
||||
$o .= replace_macros($t, [
|
||||
'$helperlist' => ['vier_helperlist', t('Comma separated list of helper forums'), $helperlist, '', ''],
|
||||
'$helperlist' => ['vier_helperlist', L10n::t('Comma separated list of helper forums'), $helperlist, '', ''],
|
||||
]);
|
||||
|
||||
$show_pages = get_vier_config('show_pages', true, true);
|
||||
|
@ -110,20 +112,20 @@ function vier_form(App $a, $style, $show_pages, $show_profiles, $show_helpers, $
|
|||
"shadow"=>"Shadow"
|
||||
];
|
||||
|
||||
$show_or_not = ['0'=>t("don't show"), '1'=>t("show"),];
|
||||
$show_or_not = ['0' => L10n::t("don't show"), '1' => L10n::t("show"),];
|
||||
|
||||
$t = get_markup_template("theme_settings.tpl");
|
||||
$o .= replace_macros($t, [
|
||||
'$submit' => t('Submit'),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$style' => ['vier_style',t ('Set style'),$style,'',$styles],
|
||||
'$show_pages' => ['vier_show_pages', t('Community Pages'), $show_pages, '', $show_or_not],
|
||||
'$show_profiles' => ['vier_show_profiles', t('Community Profiles'), $show_profiles, '', $show_or_not],
|
||||
'$show_helpers' => ['vier_show_helpers', t('Help or @NewHere ?'), $show_helpers, '', $show_or_not],
|
||||
'$show_services' => ['vier_show_services', t('Connect Services'), $show_services, '', $show_or_not],
|
||||
'$show_friends' => ['vier_show_friends', t('Find Friends'), $show_friends, '', $show_or_not],
|
||||
'$show_lastusers' => ['vier_show_lastusers', t('Last users'), $show_lastusers, '', $show_or_not]
|
||||
'$title' => L10n::t("Theme settings"),
|
||||
'$style' => ['vier_style', L10n::t('Set style'), $style, '', $styles],
|
||||
'$show_pages' => ['vier_show_pages', L10n::t('Community Pages'), $show_pages, '', $show_or_not],
|
||||
'$show_profiles' => ['vier_show_profiles', L10n::t('Community Profiles'), $show_profiles, '', $show_or_not],
|
||||
'$show_helpers' => ['vier_show_helpers', L10n::t('Help or @NewHere ?'), $show_helpers, '', $show_or_not],
|
||||
'$show_services' => ['vier_show_services', L10n::t('Connect Services'), $show_services, '', $show_or_not],
|
||||
'$show_friends' => ['vier_show_friends', L10n::t('Find Friends'), $show_friends, '', $show_or_not],
|
||||
'$show_lastusers' => ['vier_show_lastusers', L10n::t('Last users'), $show_lastusers, '', $show_or_not]
|
||||
]);
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Content\ForumManager;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
@ -21,8 +22,8 @@ use Friendica\Model\Profile;
|
|||
|
||||
require_once "mod/proxy.php";
|
||||
|
||||
function vier_init(App $a) {
|
||||
|
||||
function vier_init(App $a)
|
||||
{
|
||||
$a->theme_events_in_profile = false;
|
||||
|
||||
$a->set_template_engine('smarty3');
|
||||
|
@ -108,7 +109,8 @@ EOT;
|
|||
}
|
||||
}
|
||||
|
||||
function get_vier_config($key, $default = false, $admin = false) {
|
||||
function get_vier_config($key, $default = false, $admin = false)
|
||||
{
|
||||
if (local_user() && !$admin) {
|
||||
$result = PConfig::get(local_user(), "vier", $key);
|
||||
if (!is_null($result)) {
|
||||
|
@ -124,7 +126,8 @@ function get_vier_config($key, $default = false, $admin = false) {
|
|||
return $default;
|
||||
}
|
||||
|
||||
function vier_community_info() {
|
||||
function vier_community_info()
|
||||
{
|
||||
$a = get_app();
|
||||
|
||||
$show_pages = get_vier_config("show_pages", 1);
|
||||
|
@ -144,8 +147,7 @@ function vier_community_info() {
|
|||
|
||||
$tpl = get_markup_template('ch_directory_item.tpl');
|
||||
if (DBM::is_result($r)) {
|
||||
|
||||
$aside['$comunity_profiles_title'] = t('Community Profiles');
|
||||
$aside['$comunity_profiles_title'] = L10n::t('Community Profiles');
|
||||
$aside['$comunity_profiles_items'] = [];
|
||||
|
||||
foreach ($r as $rr) {
|
||||
|
@ -171,11 +173,12 @@ function vier_community_info() {
|
|||
$r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`
|
||||
FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
|
||||
WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $order LIMIT %d , %d ",
|
||||
0, 9);
|
||||
0,
|
||||
9
|
||||
);
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
|
||||
$aside['$lastusers_title'] = t('Last users');
|
||||
$aside['$lastusers_title'] = L10n::t('Last users');
|
||||
$aside['$lastusers_items'] = [];
|
||||
|
||||
foreach ($r as $rr) {
|
||||
|
@ -193,12 +196,12 @@ function vier_community_info() {
|
|||
//right_aside FIND FRIENDS
|
||||
if ($show_friends && local_user()) {
|
||||
$nv = [];
|
||||
$nv['title'] = ["", t('Find Friends'), "", ""];
|
||||
$nv['directory'] = ['directory', t('Local Directory'), "", ""];
|
||||
$nv['global_directory'] = [get_server(), t('Global Directory'), "", ""];
|
||||
$nv['match'] = ['match', t('Similar Interests'), "", ""];
|
||||
$nv['suggest'] = ['suggest', t('Friend Suggestions'), "", ""];
|
||||
$nv['invite'] = ['invite', t('Invite Friends'), "", ""];
|
||||
$nv['title'] = ["", L10n::t('Find Friends'), "", ""];
|
||||
$nv['directory'] = ['directory', L10n::t('Local Directory'), "", ""];
|
||||
$nv['global_directory'] = [get_server(), L10n::t('Global Directory'), "", ""];
|
||||
$nv['match'] = ['match', L10n::t('Similar Interests'), "", ""];
|
||||
$nv['suggest'] = ['suggest', L10n::t('Friend Suggestions'), "", ""];
|
||||
$nv['invite'] = ['invite', L10n::t('Invite Friends'), "", ""];
|
||||
|
||||
$nv['search'] = '<form name="simple_bar" method="get" action="dirfind">
|
||||
<span class="sbox_l"></span>
|
||||
|
@ -247,12 +250,12 @@ function vier_community_info() {
|
|||
$page .= replace_macros(
|
||||
$tpl,
|
||||
[
|
||||
'$title' => t('Forums'),
|
||||
'$title' => L10n::t('Forums'),
|
||||
'$forums' => $entries,
|
||||
'$link_desc' => t('External link to forum'),
|
||||
'$link_desc' => L10n::t('External link to forum'),
|
||||
'$total' => $total,
|
||||
'$visible_forums' => $visible_forums,
|
||||
'$showmore' => t('show more')]
|
||||
'$showmore' => L10n::t('show more')]
|
||||
);
|
||||
|
||||
$aside['$page'] = $page;
|
||||
|
@ -270,9 +273,10 @@ function vier_community_info() {
|
|||
|
||||
if ($helpers) {
|
||||
$query = "";
|
||||
foreach ($helpers AS $index=>$helper) {
|
||||
if ($query != "")
|
||||
foreach ($helpers as $index => $helper) {
|
||||
if ($query != "") {
|
||||
$query .= ",";
|
||||
}
|
||||
|
||||
$query .= "'".dbesc(normalise_link(trim($helper)))."'";
|
||||
}
|
||||
|
@ -280,17 +284,17 @@ function vier_community_info() {
|
|||
$r = q("SELECT `url`, `name` FROM `gcontact` WHERE `nurl` IN (%s)", $query);
|
||||
}
|
||||
|
||||
foreach ($r AS $index => $helper)
|
||||
foreach ($r as $index => $helper) {
|
||||
$r[$index]["url"] = Profile::zrl($helper["url"]);
|
||||
}
|
||||
|
||||
$r[] = ["url" => "help/Quick-Start-guide", "name" => t("Quick Start")];
|
||||
$r[] = ["url" => "help/Quick-Start-guide", "name" => L10n::t("Quick Start")];
|
||||
|
||||
$tpl = get_markup_template('ch_helpers.tpl');
|
||||
|
||||
if ($r) {
|
||||
|
||||
$helpers = [];
|
||||
$helpers['title'] = ["", t('Help'), "", ""];
|
||||
$helpers['title'] = ["", L10n::t('Help'), "", ""];
|
||||
|
||||
$aside['$helpers_items'] = [];
|
||||
|
||||
|
@ -309,7 +313,6 @@ function vier_community_info() {
|
|||
|
||||
// connectable services
|
||||
if ($show_services) {
|
||||
|
||||
/// @TODO This whole thing is hard-coded, better rewrite to Intercepting Filter Pattern (future-todo)
|
||||
$r = [];
|
||||
|
||||
|
@ -381,9 +384,8 @@ function vier_community_info() {
|
|||
$tpl = get_markup_template('ch_connectors.tpl');
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
|
||||
$con_services = [];
|
||||
$con_services['title'] = ["", t('Connect Services'), "", ""];
|
||||
$con_services['title'] = ["", L10n::t('Connect Services'), "", ""];
|
||||
$aside['$con_services'] = $con_services;
|
||||
|
||||
foreach ($r as $rr) {
|
||||
|
@ -395,7 +397,6 @@ function vier_community_info() {
|
|||
$aside['$connector_items'][] = $entry;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//end connectable services
|
||||
|
||||
|
|
Loading…
Reference in a new issue