mirror of
https://github.com/friendica/friendica
synced 2025-04-20 05:50:11 +00:00
Move L10n::t() calls to DI::l10n()->t() calls
This commit is contained in:
parent
af88c2daa3
commit
5dfee31108
175 changed files with 2841 additions and 2841 deletions
|
@ -49,7 +49,7 @@ class Details extends BaseAdminModule
|
|||
$addon = $a->argv[2];
|
||||
$addon = Strings::sanitizeFilePathItem($addon);
|
||||
if (!is_file("addon/$addon/$addon.php")) {
|
||||
notice(L10n::t('Addon not found.'));
|
||||
notice(DI::l10n()->t('Addon not found.'));
|
||||
Addon::uninstall($addon);
|
||||
DI::baseUrl()->redirect('admin/addons');
|
||||
}
|
||||
|
@ -60,10 +60,10 @@ class Details extends BaseAdminModule
|
|||
// Toggle addon status
|
||||
if (Addon::isEnabled($addon)) {
|
||||
Addon::uninstall($addon);
|
||||
info(L10n::t('Addon %s disabled.', $addon));
|
||||
info(DI::l10n()->t('Addon %s disabled.', $addon));
|
||||
} else {
|
||||
Addon::install($addon);
|
||||
info(L10n::t('Addon %s enabled.', $addon));
|
||||
info(DI::l10n()->t('Addon %s enabled.', $addon));
|
||||
}
|
||||
|
||||
Addon::saveEnabledList();
|
||||
|
@ -74,10 +74,10 @@ class Details extends BaseAdminModule
|
|||
// display addon details
|
||||
if (Addon::isEnabled($addon)) {
|
||||
$status = 'on';
|
||||
$action = L10n::t('Disable');
|
||||
$action = DI::l10n()->t('Disable');
|
||||
} else {
|
||||
$status = 'off';
|
||||
$action = L10n::t('Enable');
|
||||
$action = DI::l10n()->t('Enable');
|
||||
}
|
||||
|
||||
$readme = null;
|
||||
|
@ -97,18 +97,18 @@ class Details extends BaseAdminModule
|
|||
$t = Renderer::getMarkupTemplate('admin/addons/details.tpl');
|
||||
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$page' => L10n::t('Addons'),
|
||||
'$toggle' => L10n::t('Toggle'),
|
||||
'$settings' => L10n::t('Settings'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Addons'),
|
||||
'$toggle' => DI::l10n()->t('Toggle'),
|
||||
'$settings' => DI::l10n()->t('Settings'),
|
||||
'$baseurl' => DI::baseUrl()->get(true),
|
||||
|
||||
'$addon' => $addon,
|
||||
'$status' => $status,
|
||||
'$action' => $action,
|
||||
'$info' => Addon::getInfo($addon),
|
||||
'$str_author' => L10n::t('Author: '),
|
||||
'$str_maintainer' => L10n::t('Maintainer: '),
|
||||
'$str_author' => DI::l10n()->t('Author: '),
|
||||
'$str_maintainer' => DI::l10n()->t('Maintainer: '),
|
||||
|
||||
'$admin_form' => $admin_form,
|
||||
'$function' => 'addons',
|
||||
|
|
|
@ -28,11 +28,11 @@ class Index extends BaseAdminModule
|
|||
$addon = $_GET['addon'] ?? '';
|
||||
if (Addon::isEnabled($addon)) {
|
||||
Addon::uninstall($addon);
|
||||
info(L10n::t('Addon %s disabled.', $addon));
|
||||
info(DI::l10n()->t('Addon %s disabled.', $addon));
|
||||
} elseif (Addon::install($addon)) {
|
||||
info(L10n::t('Addon %s enabled.', $addon));
|
||||
info(DI::l10n()->t('Addon %s enabled.', $addon));
|
||||
} else {
|
||||
info(L10n::t('Addon %s failed to install.', $addon));
|
||||
info(DI::l10n()->t('Addon %s failed to install.', $addon));
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -46,15 +46,15 @@ class Index extends BaseAdminModule
|
|||
|
||||
$t = Renderer::getMarkupTemplate('admin/addons/index.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$page' => L10n::t('Addons'),
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$reload' => L10n::t('Reload active addons'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Addons'),
|
||||
'$submit' => DI::l10n()->t('Save Settings'),
|
||||
'$reload' => DI::l10n()->t('Reload active addons'),
|
||||
'$baseurl' => DI::baseUrl()->get(true),
|
||||
'$function' => 'addons',
|
||||
'$addons' => $addons,
|
||||
'$pcount' => count($addons),
|
||||
'$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'),
|
||||
'$noplugshint' => DI::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' => parent::getFormSecurityToken('admin_addons'),
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -26,9 +26,9 @@ class Contact extends BaseAdminModule
|
|||
$contact_id = Model\Contact::getIdForURL($contact_url);
|
||||
if ($contact_id) {
|
||||
Model\Contact::block($contact_id, $block_reason);
|
||||
notice(L10n::t('The contact has been blocked from the node'));
|
||||
notice(DI::l10n()->t('The contact has been blocked from the node'));
|
||||
} else {
|
||||
notice(L10n::t('Could not find any contact entry for this URL (%s)', $contact_url));
|
||||
notice(DI::l10n()->t('Could not find any contact entry for this URL (%s)', $contact_url));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,19 +57,19 @@ class Contact extends BaseAdminModule
|
|||
$t = Renderer::getMarkupTemplate('admin/blocklist/contact.tpl');
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
// strings //
|
||||
'$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.'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Remote Contact Blocklist'),
|
||||
'$description' => DI::l10n()->t('This page allows you to prevent any message from a remote contact to reach your node.'),
|
||||
'$submit' => DI::l10n()->t('Block Remote Contact'),
|
||||
'$select_all' => DI::l10n()->t('select all'),
|
||||
'$select_none' => DI::l10n()->t('select none'),
|
||||
'$block' => DI::l10n()->t('Block'),
|
||||
'$unblock' => DI::l10n()->t('Unblock'),
|
||||
'$no_data' => DI::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('Reason')],
|
||||
'$h_contacts' => DI::l10n()->t('Blocked Remote Contacts'),
|
||||
'$h_newblock' => DI::l10n()->t('Block New Remote Contact'),
|
||||
'$th_contacts' => [DI::l10n()->t('Photo'), DI::l10n()->t('Name'), DI::l10n()->t('Reason')],
|
||||
|
||||
'$form_security_token' => parent::getFormSecurityToken('admin_contactblock'),
|
||||
|
||||
|
@ -79,8 +79,8 @@ class Contact extends BaseAdminModule
|
|||
'$contacts' => $contacts,
|
||||
'$total_contacts' => L10n::tt('%s total blocked contact', '%s total blocked contacts', $total),
|
||||
'$paginate' => $pager->renderFull($total),
|
||||
'$contacturl' => ['contact_url', L10n::t('Profile URL'), '', L10n::t('URL of the remote contact to block.')],
|
||||
'$contact_block_reason' => ['contact_block_reason', L10n::t('Block Reason')],
|
||||
'$contacturl' => ['contact_url', DI::l10n()->t('Profile URL'), '', DI::l10n()->t('URL of the remote contact to block.')],
|
||||
'$contact_block_reason' => ['contact_block_reason', DI::l10n()->t('Block Reason')],
|
||||
]);
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class Server extends BaseAdminModule
|
|||
'reason' => Strings::escapeTags(trim($_POST['newentry_reason']))
|
||||
];
|
||||
Config::set('system', 'blocklist', $blocklist);
|
||||
info(L10n::t('Server domain pattern added to blocklist.') . EOL);
|
||||
info(DI::l10n()->t('Server domain pattern added to blocklist.') . EOL);
|
||||
} else {
|
||||
// Edit the entries from blocklist
|
||||
$blocklist = [];
|
||||
|
@ -45,7 +45,7 @@ class Server extends BaseAdminModule
|
|||
}
|
||||
}
|
||||
Config::set('system', 'blocklist', $blocklist);
|
||||
info(L10n::t('Site blocklist updated.') . EOL);
|
||||
info(DI::l10n()->t('Site blocklist updated.') . EOL);
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('admin/blocklist/server');
|
||||
|
@ -60,37 +60,37 @@ class Server extends BaseAdminModule
|
|||
if (is_array($blocklist)) {
|
||||
foreach ($blocklist as $id => $b) {
|
||||
$blocklistform[] = [
|
||||
'domain' => ["domain[$id]", L10n::t('Blocked server domain pattern'), $b['domain'], '', 'required', '', ''],
|
||||
'reason' => ["reason[$id]", L10n::t("Reason for the block"), $b['reason'], '', 'required', '', ''],
|
||||
'delete' => ["delete[$id]", L10n::t("Delete server domain pattern") . ' (' . $b['domain'] . ')', false, L10n::t("Check to delete this entry from the blocklist")]
|
||||
'domain' => ["domain[$id]", DI::l10n()->t('Blocked server domain pattern'), $b['domain'], '', 'required', '', ''],
|
||||
'reason' => ["reason[$id]", DI::l10n()->t("Reason for the block"), $b['reason'], '', 'required', '', ''],
|
||||
'delete' => ["delete[$id]", DI::l10n()->t("Delete server domain pattern") . ' (' . $b['domain'] . ')', false, DI::l10n()->t("Check to delete this entry from the blocklist")]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$t = Renderer::getMarkupTemplate('admin/blocklist/server.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$page' => L10n::t('Server Domain Pattern Blocklist'),
|
||||
'$intro' => L10n::t('This page can be used to define a blacklist of server domain patterns from the federated network that are not allowed to interact with your node. For each domain pattern you should also provide the reason why you block it.'),
|
||||
'$public' => L10n::t('The list of blocked server domain patterns will be made publically available on the <a href="/friendica">/friendica</a> page so that your users and people investigating communication problems can find the reason easily.'),
|
||||
'$syntax' => L10n::t('<p>The server domain pattern syntax is case-insensitive shell wildcard, comprising the following special characters:</p>
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Server Domain Pattern Blocklist'),
|
||||
'$intro' => DI::l10n()->t('This page can be used to define a blacklist of server domain patterns from the federated network that are not allowed to interact with your node. For each domain pattern you should also provide the reason why you block it.'),
|
||||
'$public' => DI::l10n()->t('The list of blocked server domain patterns will be made publically available on the <a href="/friendica">/friendica</a> page so that your users and people investigating communication problems can find the reason easily.'),
|
||||
'$syntax' => DI::l10n()->t('<p>The server domain pattern syntax is case-insensitive shell wildcard, comprising the following special characters:</p>
|
||||
<ul>
|
||||
<li><code>*</code>: Any number of characters</li>
|
||||
<li><code>?</code>: Any single character</li>
|
||||
<li><code>[<char1><char2>...]</code>: char1 or char2</li>
|
||||
</ul>'),
|
||||
'$addtitle' => L10n::t('Add new entry to block list'),
|
||||
'$newdomain' => ['newentry_domain', L10n::t('Server Domain Pattern'), '', L10n::t('The domain pattern 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 server domain pattern.'), '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 server domain pattern'),
|
||||
'$threason' => L10n::t('Reason for the block'),
|
||||
'$delentry' => L10n::t('Delete entry from blocklist'),
|
||||
'$addtitle' => DI::l10n()->t('Add new entry to block list'),
|
||||
'$newdomain' => ['newentry_domain', DI::l10n()->t('Server Domain Pattern'), '', DI::l10n()->t('The domain pattern of the new server to add to the block list. Do not include the protocol.'), 'required', '', ''],
|
||||
'$newreason' => ['newentry_reason', DI::l10n()->t('Block reason'), '', DI::l10n()->t('The reason why you blocked this server domain pattern.'), 'required', '', ''],
|
||||
'$submit' => DI::l10n()->t('Add Entry'),
|
||||
'$savechanges' => DI::l10n()->t('Save changes to the blocklist'),
|
||||
'$currenttitle' => DI::l10n()->t('Current Entries in the Blocklist'),
|
||||
'$thurl' => DI::l10n()->t('Blocked server domain pattern'),
|
||||
'$threason' => DI::l10n()->t('Reason for the block'),
|
||||
'$delentry' => DI::l10n()->t('Delete entry from blocklist'),
|
||||
'$entries' => $blocklistform,
|
||||
'$baseurl' => DI::baseUrl()->get(true),
|
||||
'$confirm_delete' => L10n::t('Delete entry from blocklist?'),
|
||||
'$confirm_delete' => DI::l10n()->t('Delete entry from blocklist?'),
|
||||
'$form_security_token' => parent::getFormSecurityToken("admin_blocklist")
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ class DBSync extends BaseAdminModule
|
|||
if (intval($curr) == $update) {
|
||||
Config::set('system', 'build', intval($curr) + 1);
|
||||
}
|
||||
info(L10n::t('Update has been marked successful') . EOL);
|
||||
info(DI::l10n()->t('Update has been marked successful') . EOL);
|
||||
}
|
||||
DI::baseUrl()->redirect('admin/dbsync');
|
||||
}
|
||||
|
@ -40,11 +40,11 @@ class DBSync extends BaseAdminModule
|
|||
// @TODO Seems like a similar logic like Update::check()
|
||||
$retval = DBStructure::update($a->getBasePath(), false, true);
|
||||
if ($retval === '') {
|
||||
$o .= L10n::t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "<br />";
|
||||
$o .= DI::l10n()->t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "<br />";
|
||||
Config::set('database', 'last_successful_update', DB_UPDATE_VERSION);
|
||||
Config::set('database', 'last_successful_update_time', time());
|
||||
} else {
|
||||
$o .= L10n::t("Executing of database structure update %s failed with error: %s", DB_UPDATE_VERSION, $retval) . "<br />";
|
||||
$o .= DI::l10n()->t("Executing of database structure update %s failed with error: %s", DB_UPDATE_VERSION, $retval) . "<br />";
|
||||
}
|
||||
if ($a->argv[2] === 'check') {
|
||||
return $o;
|
||||
|
@ -61,15 +61,15 @@ class DBSync extends BaseAdminModule
|
|||
$retval = $func();
|
||||
|
||||
if ($retval === Update::FAILED) {
|
||||
$o .= L10n::t("Executing %s failed with error: %s", $func, $retval);
|
||||
$o .= DI::l10n()->t("Executing %s failed with error: %s", $func, $retval);
|
||||
} elseif ($retval === Update::SUCCESS) {
|
||||
$o .= L10n::t('Update %s was successfully applied.', $func);
|
||||
$o .= DI::l10n()->t('Update %s was successfully applied.', $func);
|
||||
Config::set('database', $func, 'success');
|
||||
} else {
|
||||
$o .= L10n::t('Update %s did not return a status. Unknown if it succeeded.', $func);
|
||||
$o .= DI::l10n()->t('Update %s did not return a status. Unknown if it succeeded.', $func);
|
||||
}
|
||||
} else {
|
||||
$o .= L10n::t('There was no additional update function %s that needed to be called.', $func) . "<br />";
|
||||
$o .= DI::l10n()->t('There was no additional update function %s that needed to be called.', $func) . "<br />";
|
||||
Config::set('database', $func, 'success');
|
||||
}
|
||||
|
||||
|
@ -89,16 +89,16 @@ class DBSync extends BaseAdminModule
|
|||
if (!count($failed)) {
|
||||
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('admin/dbsync/structure_check.tpl'), [
|
||||
'$base' => DI::baseUrl()->get(true),
|
||||
'$banner' => L10n::t('No failed updates.'),
|
||||
'$check' => L10n::t('Check database structure'),
|
||||
'$banner' => DI::l10n()->t('No failed updates.'),
|
||||
'$check' => DI::l10n()->t('Check database structure'),
|
||||
]);
|
||||
} else {
|
||||
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('admin/dbsync/failed_updates.tpl'), [
|
||||
'$base' => DI::baseUrl()->get(true),
|
||||
'$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 \x28if update was manually applied\x29"),
|
||||
'$apply' => L10n::t('Attempt to execute this update step automatically'),
|
||||
'$banner' => DI::l10n()->t('Failed Updates'),
|
||||
'$desc' => DI::l10n()->t('This does not include updates prior to 1139, which did not return a status.'),
|
||||
'$mark' => DI::l10n()->t("Mark success \x28if update was manually applied\x29"),
|
||||
'$apply' => DI::l10n()->t('Attempt to execute this update step automatically'),
|
||||
'$failed' => $failed
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -56,8 +56,8 @@ class Features extends BaseAdminModule
|
|||
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], [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')]]
|
||||
['feature_' . $f[0], $f[1], $set, $f[2], [DI::l10n()->t('Off'), DI::l10n()->t('On')]],
|
||||
['featurelock_' . $f[0], DI::l10n()->t('Lock feature %s', $f[1]), (($f[4] !== false) ? "1" : ''), '', [DI::l10n()->t('Off'), DI::l10n()->t('On')]]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -65,9 +65,9 @@ class Features extends BaseAdminModule
|
|||
$tpl = Renderer::getMarkupTemplate('admin/features.tpl');
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$form_security_token' => parent::getFormSecurityToken("admin_manage_features"),
|
||||
'$title' => L10n::t('Manage Additional Features'),
|
||||
'$title' => DI::l10n()->t('Manage Additional Features'),
|
||||
'$features' => $arr,
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$submit' => DI::l10n()->t('Save Settings'),
|
||||
]);
|
||||
|
||||
return $o;
|
||||
|
|
|
@ -31,7 +31,7 @@ class Federation extends BaseAdminModule
|
|||
'socialhome' => ['name' => 'SocialHome', 'color' => '#52056b'], // lilac from the Django Image used at the Socialhome homepage
|
||||
'wordpress' => ['name' => 'WordPress', 'color' => '#016087'], // Background color of the homepage
|
||||
'writefreely' => ['name' => 'WriteFreely', 'color' => '#292929'], // Font color of the homepage
|
||||
'other' => ['name' => L10n::t('Other'), 'color' => '#F1007E'], // ActivityPub main color
|
||||
'other' => ['name' => DI::l10n()->t('Other'), 'color' => '#F1007E'], // ActivityPub main color
|
||||
];
|
||||
|
||||
$platforms = array_keys($systems);
|
||||
|
@ -85,7 +85,7 @@ class Federation extends BaseAdminModule
|
|||
if ($platform != $gserver['platform']) {
|
||||
if ($platform == 'other') {
|
||||
$versionCounts = $counts[$platform][1] ?? [];
|
||||
$versionCounts[] = ['version' => $gserver['platform'] ?: L10n::t('unknown'), 'total' => $gserver['total']];
|
||||
$versionCounts[] = ['version' => $gserver['platform'] ?: DI::l10n()->t('unknown'), 'total' => $gserver['total']];
|
||||
$gserver['version'] = '';
|
||||
} else {
|
||||
$versionCounts = array_merge($versionCounts, $counts[$platform][1] ?? []);
|
||||
|
@ -113,20 +113,20 @@ class Federation extends BaseAdminModule
|
|||
DBA::close($gserver);
|
||||
|
||||
// some helpful text
|
||||
$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.');
|
||||
$intro = DI::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 = DI::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 = Renderer::getMarkupTemplate('admin/federation.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$page' => L10n::t('Federation Statistics'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Federation Statistics'),
|
||||
'$intro' => $intro,
|
||||
'$hint' => $hint,
|
||||
'$autoactive' => Config::get('system', 'poco_completion'),
|
||||
'$counts' => $counts,
|
||||
'$version' => FRIENDICA_VERSION,
|
||||
'$legendtext' => L10n::t('Currently this node is aware of %d nodes with %d registered users from the following platforms:', $total, $users),
|
||||
'$legendtext' => DI::l10n()->t('Currently this node is aware of %d nodes with %d registered users from the following platforms:', $total, $users),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ class Federation extends BaseAdminModule
|
|||
// to the version string for the displayed list.
|
||||
foreach ($versionCounts as $key => $value) {
|
||||
if ($versionCounts[$key]['version'] == '') {
|
||||
$versionCounts[$key] = ['total' => $versionCounts[$key]['total'], 'version' => L10n::t('unknown')];
|
||||
$versionCounts[$key] = ['total' => $versionCounts[$key]['total'], 'version' => DI::l10n()->t('unknown')];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class Delete extends BaseAdminModule
|
|||
Item::delete(['guid' => $guid]);
|
||||
}
|
||||
|
||||
info(L10n::t('Item marked for deletion.') . EOL);
|
||||
info(DI::l10n()->t('Item marked for deletion.') . EOL);
|
||||
DI::baseUrl()->redirect('admin/item/delete');
|
||||
}
|
||||
|
||||
|
@ -44,12 +44,12 @@ class Delete extends BaseAdminModule
|
|||
$t = Renderer::getMarkupTemplate('admin/item/delete.tpl');
|
||||
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$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'],
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Delete Item'),
|
||||
'$submit' => DI::l10n()->t('Delete this Item'),
|
||||
'$intro1' => DI::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' => DI::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', DI::l10n()->t("GUID"), '', DI::l10n()->t("The GUID of the item you want to delete."), 'required', 'autofocus'],
|
||||
'$form_security_token' => parent::getFormSecurityToken("admin_deleteitem")
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class Source extends BaseAdminModule
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('admin/item/source.tpl');
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$guid' => ['guid', L10n::t('Item Guid'), $guid, ''],
|
||||
'$guid' => ['guid', DI::l10n()->t('Item Guid'), $guid, ''],
|
||||
'$source' => $source,
|
||||
'$item_uri' => $item_uri,
|
||||
'$item_id' => $item_id,
|
||||
|
|
|
@ -25,7 +25,7 @@ class Settings extends BaseAdminModule
|
|||
|
||||
if (is_file($logfile) &&
|
||||
!is_writeable($logfile)) {
|
||||
notice(L10n::t('The logfile \'%s\' is not writable. No logging possible', $logfile));
|
||||
notice(DI::l10n()->t('The logfile \'%s\' is not writable. No logging possible', $logfile));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ class Settings extends BaseAdminModule
|
|||
Config::set('system', 'loglevel', $loglevel);
|
||||
}
|
||||
|
||||
info(L10n::t("Log settings updated."));
|
||||
info(DI::l10n()->t("Log settings updated."));
|
||||
DI::baseUrl()->redirect('admin/logs');
|
||||
}
|
||||
|
||||
|
@ -51,27 +51,27 @@ class Settings extends BaseAdminModule
|
|||
];
|
||||
|
||||
if (ini_get('log_errors')) {
|
||||
$phplogenabled = L10n::t('PHP log currently enabled.');
|
||||
$phplogenabled = DI::l10n()->t('PHP log currently enabled.');
|
||||
} else {
|
||||
$phplogenabled = L10n::t('PHP log currently disabled.');
|
||||
$phplogenabled = DI::l10n()->t('PHP log currently disabled.');
|
||||
}
|
||||
|
||||
$t = Renderer::getMarkupTemplate('admin/logs/settings.tpl');
|
||||
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$page' => L10n::t('Logs'),
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$clear' => L10n::t('Clear'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Logs'),
|
||||
'$submit' => DI::l10n()->t('Save Settings'),
|
||||
'$clear' => DI::l10n()->t('Clear'),
|
||||
'$baseurl' => DI::baseUrl()->get(true),
|
||||
'$logname' => Config::get('system', 'logfile'),
|
||||
// see /help/smarty3-templates#1_1 on any Friendica node
|
||||
'$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],
|
||||
'$debugging' => ['debugging', DI::l10n()->t("Enable Debugging"), Config::get('system', 'debugging'), ""],
|
||||
'$logfile' => ['logfile', DI::l10n()->t("Log file"), Config::get('system', 'logfile'), DI::l10n()->t("Must be writable by web server. Relative to your Friendica top-level directory.")],
|
||||
'$loglevel' => ['loglevel', DI::l10n()->t("Log level"), Config::get('system', 'loglevel'), "", $log_choices],
|
||||
'$form_security_token' => parent::getFormSecurityToken("admin_logs"),
|
||||
'$phpheader' => L10n::t("PHP logging"),
|
||||
'$phphint' => L10n::t("To temporarily enable logging of PHP errors and warnings you can prepend the following to the index.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' => DI::l10n()->t("PHP logging"),
|
||||
'$phphint' => DI::l10n()->t("To temporarily enable logging of PHP errors and warnings you can prepend the following to the index.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,
|
||||
]);
|
||||
|
|
|
@ -19,11 +19,11 @@ class View extends BaseAdminModule
|
|||
$data = '';
|
||||
|
||||
if (!file_exists($f)) {
|
||||
$data = L10n::t('Error trying to open <strong>%1$s</strong> log file.\r\n<br/>Check to see if file %1$s exist and is readable.', $f);
|
||||
$data = DI::l10n()->t('Error trying to open <strong>%1$s</strong> log file.\r\n<br/>Check to see if file %1$s exist and is readable.', $f);
|
||||
} else {
|
||||
$fp = fopen($f, 'r');
|
||||
if (!$fp) {
|
||||
$data = L10n::t('Couldn\'t open <strong>%1$s</strong> log file.\r\n<br/>Check to see if file %1$s is readable.', $f);
|
||||
$data = DI::l10n()->t('Couldn\'t open <strong>%1$s</strong> log file.\r\n<br/>Check to see if file %1$s is readable.', $f);
|
||||
} else {
|
||||
$fstat = fstat($fp);
|
||||
$size = $fstat['size'];
|
||||
|
@ -43,8 +43,8 @@ class View extends BaseAdminModule
|
|||
}
|
||||
}
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$page' => L10n::t('View Logs'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('View Logs'),
|
||||
'$data' => $data,
|
||||
'$logname' => Config::get('system', 'logfile')
|
||||
]);
|
||||
|
|
|
@ -32,12 +32,12 @@ class Queue extends BaseAdminModule
|
|||
// get jobs from the workerqueue table
|
||||
if ($deferred) {
|
||||
$condition = ["NOT `done` AND `retrial` > ?", 0];
|
||||
$sub_title = L10n::t('Inspect Deferred Worker Queue');
|
||||
$info = L10n::t("This page lists the deferred worker jobs. This are jobs that couldn't be executed at the first time.");
|
||||
$sub_title = DI::l10n()->t('Inspect Deferred Worker Queue');
|
||||
$info = DI::l10n()->t("This page lists the deferred worker jobs. This are jobs that couldn't be executed at the first time.");
|
||||
} else {
|
||||
$condition = ["NOT `done` AND `retrial` = ?", 0];
|
||||
$sub_title = L10n::t('Inspect Worker Queue');
|
||||
$info = L10n::t('This page lists the currently queued worker jobs. These jobs are handled by the worker cronjob you\'ve set up during install.');
|
||||
$sub_title = DI::l10n()->t('Inspect Worker Queue');
|
||||
$info = DI::l10n()->t('This page lists the currently queued worker jobs. These jobs are handled by the worker cronjob you\'ve set up during install.');
|
||||
}
|
||||
|
||||
// @TODO Move to Model\WorkerQueue::getEntries()
|
||||
|
@ -54,13 +54,13 @@ class Queue extends BaseAdminModule
|
|||
|
||||
$t = Renderer::getMarkupTemplate('admin/queue.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => $sub_title,
|
||||
'$count' => count($r),
|
||||
'$id_header' => L10n::t('ID'),
|
||||
'$param_header' => L10n::t('Job Parameters'),
|
||||
'$created_header' => L10n::t('Created'),
|
||||
'$prio_header' => L10n::t('Priority'),
|
||||
'$id_header' => DI::l10n()->t('ID'),
|
||||
'$param_header' => DI::l10n()->t('Job Parameters'),
|
||||
'$created_header' => DI::l10n()->t('Created'),
|
||||
'$prio_header' => DI::l10n()->t('Priority'),
|
||||
'$info' => $info,
|
||||
'$entries' => $r,
|
||||
]);
|
||||
|
|
|
@ -48,7 +48,7 @@ class Site extends BaseAdminModule
|
|||
|
||||
$parsed = @parse_url($new_url);
|
||||
if (!is_array($parsed) || empty($parsed['host']) || empty($parsed['scheme'])) {
|
||||
notice(L10n::t("Can not parse base url. Must have at least <scheme>://<domain>"));
|
||||
notice(DI::l10n()->t("Can not parse base url. Must have at least <scheme>://<domain>"));
|
||||
DI::baseUrl()->redirect('admin/site');
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ class Site extends BaseAdminModule
|
|||
DI::baseUrl()->redirect('admin/site' . $active_panel);
|
||||
}
|
||||
} else {
|
||||
info(L10n::t('Invalid storage backend setting value.'));
|
||||
info(DI::l10n()->t('Invalid storage backend setting value.'));
|
||||
}
|
||||
|
||||
// Has the directory url changed? If yes, then resubmit the existing profiles there
|
||||
|
@ -404,7 +404,7 @@ class Site extends BaseAdminModule
|
|||
|
||||
Config::set('system', 'rino_encrypt' , $rino);
|
||||
|
||||
info(L10n::t('Site settings updated.') . EOL);
|
||||
info(DI::l10n()->t('Site settings updated.') . EOL);
|
||||
|
||||
DI::baseUrl()->redirect('admin/site' . $active_panel);
|
||||
}
|
||||
|
@ -425,7 +425,7 @@ class Site extends BaseAdminModule
|
|||
/* Installed themes */
|
||||
$theme_choices = [];
|
||||
$theme_choices_mobile = [];
|
||||
$theme_choices_mobile['---'] = L10n::t('No special theme for mobile devices');
|
||||
$theme_choices_mobile['---'] = DI::l10n()->t('No special theme for mobile devices');
|
||||
$files = glob('view/theme/*');
|
||||
if (is_array($files)) {
|
||||
$allowed_theme_list = Config::get('system', 'allowed_themes');
|
||||
|
@ -442,7 +442,7 @@ class Site extends BaseAdminModule
|
|||
continue;
|
||||
}
|
||||
|
||||
$theme_name = ((file_exists($file . '/experimental')) ? L10n::t('%s - (Experimental)', $f) : $f);
|
||||
$theme_name = ((file_exists($file . '/experimental')) ? DI::l10n()->t('%s - (Experimental)', $f) : $f);
|
||||
|
||||
if (file_exists($file . '/mobile')) {
|
||||
$theme_choices_mobile[$f] = $theme_name;
|
||||
|
@ -454,31 +454,31 @@ class Site extends BaseAdminModule
|
|||
|
||||
/* Community page style */
|
||||
$community_page_style_choices = [
|
||||
CP_NO_INTERNAL_COMMUNITY => L10n::t('No community page for local users'),
|
||||
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')
|
||||
CP_NO_INTERNAL_COMMUNITY => DI::l10n()->t('No community page for local users'),
|
||||
CP_NO_COMMUNITY_PAGE => DI::l10n()->t('No community page'),
|
||||
CP_USERS_ON_SERVER => DI::l10n()->t('Public postings from users of this site'),
|
||||
CP_GLOBAL_COMMUNITY => DI::l10n()->t('Public postings from the federated network'),
|
||||
CP_USERS_AND_GLOBAL => DI::l10n()->t('Public postings from local users and the federated network')
|
||||
];
|
||||
|
||||
$poco_discovery_choices = [
|
||||
PortableContact::DISABLED => L10n::t('Disabled'),
|
||||
PortableContact::USERS => L10n::t('Users'),
|
||||
PortableContact::USERS_GCONTACTS => L10n::t('Users, Global Contacts'),
|
||||
PortableContact::USERS_GCONTACTS_FALLBACK => L10n::t('Users, Global Contacts/fallback'),
|
||||
PortableContact::DISABLED => DI::l10n()->t('Disabled'),
|
||||
PortableContact::USERS => DI::l10n()->t('Users'),
|
||||
PortableContact::USERS_GCONTACTS => DI::l10n()->t('Users, Global Contacts'),
|
||||
PortableContact::USERS_GCONTACTS_FALLBACK => DI::l10n()->t('Users, Global Contacts/fallback'),
|
||||
];
|
||||
|
||||
$poco_discovery_since_choices = [
|
||||
'30' => L10n::t('One month'),
|
||||
'91' => L10n::t('Three months'),
|
||||
'182' => L10n::t('Half a year'),
|
||||
'365' => L10n::t('One year'),
|
||||
'30' => DI::l10n()->t('One month'),
|
||||
'91' => DI::l10n()->t('Three months'),
|
||||
'182' => DI::l10n()->t('Half a year'),
|
||||
'365' => DI::l10n()->t('One year'),
|
||||
];
|
||||
|
||||
/* get user names to make the install a personal install of X */
|
||||
// @TODO Move to Model\User::getNames()
|
||||
$user_names = [];
|
||||
$user_names['---'] = L10n::t('Multi user instance');
|
||||
$user_names['---'] = DI::l10n()->t('Multi user instance');
|
||||
|
||||
$usersStmt = DBA::select('user', ['username', 'nickname'], ['account_removed' => 0, 'account_expired' => 0]);
|
||||
foreach (DBA::toArray($usersStmt) as $user) {
|
||||
|
@ -500,21 +500,21 @@ class Site extends BaseAdminModule
|
|||
|
||||
/* Register policy */
|
||||
$register_choices = [
|
||||
Register::CLOSED => L10n::t('Closed'),
|
||||
Register::APPROVE => L10n::t('Requires approval'),
|
||||
Register::OPEN => L10n::t('Open')
|
||||
Register::CLOSED => DI::l10n()->t('Closed'),
|
||||
Register::APPROVE => DI::l10n()->t('Requires approval'),
|
||||
Register::OPEN => DI::l10n()->t('Open')
|
||||
];
|
||||
|
||||
$ssl_choices = [
|
||||
App\BaseURL::SSL_POLICY_NONE => L10n::t('No SSL policy, links will track page SSL state'),
|
||||
App\BaseURL::SSL_POLICY_FULL => L10n::t('Force all links to use SSL'),
|
||||
App\BaseURL::SSL_POLICY_SELFSIGN => L10n::t('Self-signed certificate, use SSL for local links only (discouraged)')
|
||||
App\BaseURL::SSL_POLICY_NONE => DI::l10n()->t('No SSL policy, links will track page SSL state'),
|
||||
App\BaseURL::SSL_POLICY_FULL => DI::l10n()->t('Force all links to use SSL'),
|
||||
App\BaseURL::SSL_POLICY_SELFSIGN => DI::l10n()->t('Self-signed certificate, use SSL for local links only (discouraged)')
|
||||
];
|
||||
|
||||
$check_git_version_choices = [
|
||||
'none' => L10n::t('Don\'t check'),
|
||||
'master' => L10n::t('check the stable version'),
|
||||
'develop' => L10n::t('check the development version')
|
||||
'none' => DI::l10n()->t('Don\'t check'),
|
||||
'master' => DI::l10n()->t('check the stable version'),
|
||||
'develop' => DI::l10n()->t('check the development version')
|
||||
];
|
||||
|
||||
$diaspora_able = (DI::baseUrl()->getUrlPath() == '');
|
||||
|
@ -531,7 +531,7 @@ class Site extends BaseAdminModule
|
|||
// show legacy option only if it is the current backend:
|
||||
// once changed can't be selected anymore
|
||||
if ($current_storage_backend == null) {
|
||||
$available_storage_backends[''] = L10n::t('Database (legacy)');
|
||||
$available_storage_backends[''] = DI::l10n()->t('Database (legacy)');
|
||||
}
|
||||
|
||||
foreach (DI::storageManager()->listBackends() as $name => $class) {
|
||||
|
@ -554,121 +554,121 @@ class Site extends BaseAdminModule
|
|||
|
||||
$t = Renderer::getMarkupTemplate('admin/site.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$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'),
|
||||
'$relay_title' => L10n::t('Message Relay'),
|
||||
'$relocate' => L10n::t('Relocate Instance'),
|
||||
'$relocate_warning' => L10n::t('Warning! Advanced function. Could make this server unreachable.'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Site'),
|
||||
'$submit' => DI::l10n()->t('Save Settings'),
|
||||
'$republish' => DI::l10n()->t('Republish users to directory'),
|
||||
'$registration' => DI::l10n()->t('Registration'),
|
||||
'$upload' => DI::l10n()->t('File upload'),
|
||||
'$corporate' => DI::l10n()->t('Policies'),
|
||||
'$advanced' => DI::l10n()->t('Advanced'),
|
||||
'$portable_contacts' => DI::l10n()->t('Auto Discovered Contact Directory'),
|
||||
'$performance' => DI::l10n()->t('Performance'),
|
||||
'$worker_title' => DI::l10n()->t('Worker'),
|
||||
'$relay_title' => DI::l10n()->t('Message Relay'),
|
||||
'$relocate' => DI::l10n()->t('Relocate Instance'),
|
||||
'$relocate_warning' => DI::l10n()->t('Warning! Advanced function. Could make this server unreachable.'),
|
||||
'$baseurl' => DI::baseUrl()->get(true),
|
||||
|
||||
// name, label, value, help string, extra data...
|
||||
'$sitename' => ['sitename', L10n::t('Site name'), Config::get('config', 'sitename'), ''],
|
||||
'$sender_email' => ['sender_email', L10n::t('Sender Email'), Config::get('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.')],
|
||||
'$additional_info' => ['additional_info', L10n::t('Additional Info'), $additional_info, L10n::t('For public servers: you can add additional information here that will be listed at %s/servers.', Search::getGlobalDirectory())],
|
||||
'$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="/admin/themes" id="cnftheme">Change default 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],
|
||||
'$sitename' => ['sitename', DI::l10n()->t('Site name'), Config::get('config', 'sitename'), ''],
|
||||
'$sender_email' => ['sender_email', DI::l10n()->t('Sender Email'), Config::get('config', 'sender_email'), DI::l10n()->t('The email address your server shall use to send notification emails from.'), '', '', 'email'],
|
||||
'$banner' => ['banner', DI::l10n()->t('Banner/Logo'), $banner, ''],
|
||||
'$shortcut_icon' => ['shortcut_icon', DI::l10n()->t('Shortcut icon'), Config::get('system', 'shortcut_icon'), DI::l10n()->t('Link to an icon that will be used for browsers.')],
|
||||
'$touch_icon' => ['touch_icon', DI::l10n()->t('Touch icon'), Config::get('system', 'touch_icon'), DI::l10n()->t('Link to an icon that will be used for tablets and mobiles.')],
|
||||
'$additional_info' => ['additional_info', DI::l10n()->t('Additional Info'), $additional_info, DI::l10n()->t('For public servers: you can add additional information here that will be listed at %s/servers.', Search::getGlobalDirectory())],
|
||||
'$language' => ['language', DI::l10n()->t('System language'), Config::get('system', 'language'), '', $lang_choices],
|
||||
'$theme' => ['theme', DI::l10n()->t('System theme'), Config::get('system', 'theme'), DI::l10n()->t('Default system theme - may be over-ridden by user profiles - <a href="/admin/themes" id="cnftheme">Change default theme settings</a>'), $theme_choices],
|
||||
'$theme_mobile' => ['theme_mobile', DI::l10n()->t('Mobile system theme'), Config::get('system', 'mobile-theme', '---'), DI::l10n()->t('Theme for mobile devices'), $theme_choices_mobile],
|
||||
'$ssl_policy' => ['ssl_policy', DI::l10n()->t('SSL link policy'), (string)intval(Config::get('system', 'ssl_policy')), DI::l10n()->t('Determines whether generated links should be forced to use SSL'), $ssl_choices],
|
||||
'$force_ssl' => ['force_ssl', DI::l10n()->t('Force SSL'), Config::get('system', 'force_ssl'), DI::l10n()->t('Force all Non-SSL requests to SSL - Attention: on some systems it could lead to endless loops.')],
|
||||
'$hide_help' => ['hide_help', DI::l10n()->t('Hide help entry from navigation menu'), Config::get('system', 'hide_help'), DI::l10n()->t('Hides the menu entry for the Help pages from the navigation menu. You can still access it calling /help directly.')],
|
||||
'$singleuser' => ['singleuser', DI::l10n()->t('Single user instance'), Config::get('system', 'singleuser', '---'), DI::l10n()->t('Make this instance multi-user or single-user for the named user'), $user_names],
|
||||
|
||||
'$storagebackend' => ['storagebackend', L10n::t('File storage backend'), $current_storage_backend, L10n::t('The backend used to store uploaded data. If you change the storage backend, you can manually move the existing files. If you do not do so, the files uploaded before the change will still be available at the old backend. Please see <a href="/help/Settings#1_2_3_1">the settings documentation</a> for more information about the choices and the moving procedure.'), $available_storage_backends],
|
||||
'$storagebackend' => ['storagebackend', DI::l10n()->t('File storage backend'), $current_storage_backend, DI::l10n()->t('The backend used to store uploaded data. If you change the storage backend, you can manually move the existing files. If you do not do so, the files uploaded before the change will still be available at the old backend. Please see <a href="/help/Settings#1_2_3_1">the settings documentation</a> for more information about the choices and the moving procedure.'), $available_storage_backends],
|
||||
'$storageform' => $storage_form,
|
||||
'$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.')],
|
||||
'$maximagesize' => ['maximagesize', DI::l10n()->t('Maximum image size'), Config::get('system', 'maximagesize'), DI::l10n()->t('Maximum size in bytes of uploaded images. Default is 0, which means no limits.')],
|
||||
'$maximagelength' => ['maximagelength', DI::l10n()->t('Maximum image length'), Config::get('system', 'max_image_length'), DI::l10n()->t('Maximum length in pixels of the longest side of uploaded images. Default is -1, which means no limits.')],
|
||||
'$jpegimagequality' => ['jpegimagequality', DI::l10n()->t('JPEG image quality'), Config::get('system', 'jpeg_quality'), DI::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'), Config::get('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'), Config::get('config', 'register_text'), L10n::t('Will be displayed prominently on the registration page. You can use BBCode here.')],
|
||||
'$forbidden_nicknames' => ['forbidden_nicknames', L10n::t('Forbidden Nicknames'), Config::get('system', 'forbidden_nicknames'), L10n::t('Comma separated list of nicknames that are forbidden from registration. Preset is a list of role names according RFC 2142.')],
|
||||
'$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.') . '<strong>' . L10n::t('Enabling this may violate privacy laws like the GDPR') . '</strong>'],
|
||||
'$global_directory' => ['directory', L10n::t('Global directory URL'), Config::get('system', 'directory', 'https://dir.friendica.social'), 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.')],
|
||||
'$explicit_content' => ['explicit_content', L10n::t('Explicit Content'), Config::get('system', 'explicit_content', false), L10n::t('Set this to announce that your node is used mostly for explicit content that might not be suited for minors. This information will be published in the node information and might be used, e.g. by the global directory, to filter your node from listings of nodes to join. Additionally a note about this will be shown at the user registration page.')],
|
||||
'$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('Disable OpenID'), Config::get('system', 'no_openid'), L10n::t('Disable OpenID support for registration and logins.')],
|
||||
'$no_regfullname' => ['no_regfullname', L10n::t('No Fullname check'), Config::get('system', 'no_regfullname'), L10n::t('Allow users to register without a space between the first name and the last name in their full name.')],
|
||||
'$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('Disable OStatus support'), Config::get('system', 'ostatus_disabled'), L10n::t('Disable built-in OStatus (StatusNet, GNU Social etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.')],
|
||||
'$ostatus_not_able' => L10n::t('OStatus support can only be enabled if threading is enabled.'),
|
||||
'$register_policy' => ['register_policy', DI::l10n()->t('Register policy'), Config::get('config', 'register_policy'), '', $register_choices],
|
||||
'$daily_registrations' => ['max_daily_registrations', DI::l10n()->t('Maximum Daily Registrations'), Config::get('system', 'max_daily_registrations'), DI::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', DI::l10n()->t('Register text'), Config::get('config', 'register_text'), DI::l10n()->t('Will be displayed prominently on the registration page. You can use BBCode here.')],
|
||||
'$forbidden_nicknames' => ['forbidden_nicknames', DI::l10n()->t('Forbidden Nicknames'), Config::get('system', 'forbidden_nicknames'), DI::l10n()->t('Comma separated list of nicknames that are forbidden from registration. Preset is a list of role names according RFC 2142.')],
|
||||
'$abandon_days' => ['abandon_days', DI::l10n()->t('Accounts abandoned after x days'), Config::get('system', 'account_abandon_days'), DI::l10n()->t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')],
|
||||
'$allowed_sites' => ['allowed_sites', DI::l10n()->t('Allowed friend domains'), Config::get('system', 'allowed_sites'), DI::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', DI::l10n()->t('Allowed email domains'), Config::get('system', 'allowed_email'), DI::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', DI::l10n()->t('No OEmbed rich content'), Config::get('system', 'no_oembed_rich_content'), DI::l10n()->t('Don\'t show the rich content (e.g. embedded PDF), except from the domains listed below.')],
|
||||
'$allowed_oembed' => ['allowed_oembed', DI::l10n()->t('Allowed OEmbed domains'), Config::get('system', 'allowed_oembed'), DI::l10n()->t('Comma separated list of domains which oembed content is allowed to be displayed. Wildcards are accepted.')],
|
||||
'$block_public' => ['block_public', DI::l10n()->t('Block public'), Config::get('system', 'block_public'), DI::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', DI::l10n()->t('Force publish'), Config::get('system', 'publish_all'), DI::l10n()->t('Check to force all profiles on this site to be listed in the site directory.') . '<strong>' . DI::l10n()->t('Enabling this may violate privacy laws like the GDPR') . '</strong>'],
|
||||
'$global_directory' => ['directory', DI::l10n()->t('Global directory URL'), Config::get('system', 'directory', 'https://dir.friendica.social'), DI::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', DI::l10n()->t('Private posts by default for new users'), Config::get('system', 'newuser_private'), DI::l10n()->t('Set default post permissions for all new members to the default privacy group rather than public.')],
|
||||
'$enotify_no_content' => ['enotify_no_content', DI::l10n()->t('Don\'t include post content in email notifications'), Config::get('system', 'enotify_no_content'), DI::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', DI::l10n()->t('Disallow public access to addons listed in the apps menu.'), Config::get('config', 'private_addons'), DI::l10n()->t('Checking this box will restrict addons listed in the apps menu to members only.')],
|
||||
'$disable_embedded' => ['disable_embedded', DI::l10n()->t('Don\'t embed private images in posts'), Config::get('system', 'disable_embedded'), DI::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.')],
|
||||
'$explicit_content' => ['explicit_content', DI::l10n()->t('Explicit Content'), Config::get('system', 'explicit_content', false), DI::l10n()->t('Set this to announce that your node is used mostly for explicit content that might not be suited for minors. This information will be published in the node information and might be used, e.g. by the global directory, to filter your node from listings of nodes to join. Additionally a note about this will be shown at the user registration page.')],
|
||||
'$allow_users_remote_self'=> ['allow_users_remote_self', DI::l10n()->t('Allow Users to set remote_self'), Config::get('system', 'allow_users_remote_self'), DI::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', DI::l10n()->t('Block multiple registrations'), Config::get('system', 'block_extended_register'), DI::l10n()->t('Disallow users to register additional accounts for use as pages.')],
|
||||
'$no_openid' => ['no_openid', DI::l10n()->t('Disable OpenID'), Config::get('system', 'no_openid'), DI::l10n()->t('Disable OpenID support for registration and logins.')],
|
||||
'$no_regfullname' => ['no_regfullname', DI::l10n()->t('No Fullname check'), Config::get('system', 'no_regfullname'), DI::l10n()->t('Allow users to register without a space between the first name and the last name in their full name.')],
|
||||
'$community_page_style' => ['community_page_style', DI::l10n()->t('Community pages for visitors'), Config::get('system', 'community_page_style'), DI::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', DI::l10n()->t('Posts per user on community page'), Config::get('system', 'max_author_posts_community_page'), DI::l10n()->t('The maximum number of posts per user on the community page. (Not valid for "Global Community")')],
|
||||
'$ostatus_disabled' => ['ostatus_disabled', DI::l10n()->t('Disable OStatus support'), Config::get('system', 'ostatus_disabled'), DI::l10n()->t('Disable built-in OStatus (StatusNet, GNU Social etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.')],
|
||||
'$ostatus_not_able' => DI::l10n()->t('OStatus support can only be enabled if threading is enabled.'),
|
||||
'$diaspora_able' => $diaspora_able,
|
||||
'$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', $diaspora_able), 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'), 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'), Config::get('system', 'maxloadavg', 20), L10n::t('Maximum system load before delivery and poll processes are deferred - default %d.', 20)],
|
||||
'$maxloadavg_frontend' => ['maxloadavg_frontend', L10n::t('Maximum Load Average (Frontend)'), 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'), 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. Enter -1 to disable it.')],
|
||||
'$optimize_fragmentation' => ['optimize_fragmentation', L10n::t('Minimum level of fragmentation'), Config::get('system', 'optimize_fragmentation', 30), L10n::t('Minimum fragmenation level to start the automatic optimization - default value is 30%.')],
|
||||
'$diaspora_not_able' => DI::l10n()->t('Diaspora support can\'t be enabled because Friendica was installed into a sub directory.'),
|
||||
'$diaspora_enabled' => ['diaspora_enabled', DI::l10n()->t('Enable Diaspora support'), Config::get('system', 'diaspora_enabled', $diaspora_able), DI::l10n()->t('Provide built-in Diaspora network compatibility.')],
|
||||
'$dfrn_only' => ['dfrn_only', DI::l10n()->t('Only allow Friendica contacts'), Config::get('system', 'dfrn_only'), DI::l10n()->t('All contacts must use Friendica protocols. All other built-in communication protocols disabled.')],
|
||||
'$verifyssl' => ['verifyssl', DI::l10n()->t('Verify SSL'), Config::get('system', 'verifyssl'), DI::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', DI::l10n()->t('Proxy user'), Config::get('system', 'proxyuser'), ''],
|
||||
'$proxy' => ['proxy', DI::l10n()->t('Proxy URL'), Config::get('system', 'proxy'), ''],
|
||||
'$timeout' => ['timeout', DI::l10n()->t('Network timeout'), Config::get('system', 'curl_timeout', 60), DI::l10n()->t('Value is in seconds. Set to 0 for unlimited (not recommended).')],
|
||||
'$maxloadavg' => ['maxloadavg', DI::l10n()->t('Maximum Load Average'), Config::get('system', 'maxloadavg', 20), DI::l10n()->t('Maximum system load before delivery and poll processes are deferred - default %d.', 20)],
|
||||
'$maxloadavg_frontend' => ['maxloadavg_frontend', DI::l10n()->t('Maximum Load Average (Frontend)'), Config::get('system', 'maxloadavg_frontend', 50), DI::l10n()->t('Maximum system load before the frontend quits service - default 50.')],
|
||||
'$min_memory' => ['min_memory', DI::l10n()->t('Minimal Memory'), Config::get('system', 'min_memory', 0), DI::l10n()->t('Minimal free memory in MB for the worker. Needs access to /proc/meminfo - default 0 (deactivated).')],
|
||||
'$optimize_max_tablesize' => ['optimize_max_tablesize', DI::l10n()->t('Maximum table size for optimization'), $optimize_max_tablesize, DI::l10n()->t('Maximum table size (in MB) for the automatic optimization. Enter -1 to disable it.')],
|
||||
'$optimize_fragmentation' => ['optimize_fragmentation', DI::l10n()->t('Minimum level of fragmentation'), Config::get('system', 'optimize_fragmentation', 30), DI::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 recommended 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.')],
|
||||
'$poco_completion' => ['poco_completion', DI::l10n()->t('Periodical check of global contacts'), Config::get('system', 'poco_completion'), DI::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', DI::l10n()->t('Days between requery'), Config::get('system', 'poco_requery_days'), DI::l10n()->t('Number of days after which a server is requeried for his contacts.')],
|
||||
'$poco_discovery' => ['poco_discovery', DI::l10n()->t('Discover contacts from other servers'), (string)intval(Config::get('system', 'poco_discovery')), DI::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 recommended setting is "Users, Global Contacts".'), $poco_discovery_choices],
|
||||
'$poco_discovery_since' => ['poco_discovery_since', DI::l10n()->t('Timeframe for fetching global contacts'), (string)intval(Config::get('system', 'poco_discovery_since')), DI::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', DI::l10n()->t('Search the local directory'), Config::get('system', 'poco_local_search'), DI::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.')],
|
||||
'$nodeinfo' => ['nodeinfo', DI::l10n()->t('Publish server information'), Config::get('system', 'nodeinfo'), DI::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.')],
|
||||
'$dbclean' => ['dbclean', L10n::t('Clean database'), Config::get('system', 'dbclean', false), L10n::t('Remove old remote items, orphaned database records and old content from some other helper tables.')],
|
||||
'$dbclean_expire_days' => ['dbclean_expire_days', L10n::t('Lifespan of remote items'), Config::get('system', 'dbclean-expire-days', 0), L10n::t('When the database cleanup is enabled, this defines the days after which remote items will be deleted. Own items, and marked or filed items are always kept. 0 disables this behaviour.')],
|
||||
'$dbclean_unclaimed' => ['dbclean_unclaimed', L10n::t('Lifespan of unclaimed items'), Config::get('system', 'dbclean-expire-unclaimed', 90), L10n::t('When the database cleanup is enabled, this defines the days after which unclaimed remote items (mostly content from the relay) will be deleted. Default value is 90 days. Defaults to the general lifespan value of remote items if set to 0.')],
|
||||
'$dbclean_expire_conv' => ['dbclean_expire_conv', L10n::t('Lifespan of raw conversation data'), Config::get('system', 'dbclean_expire_conversation', 90), L10n::t('The conversation data is used for ActivityPub and OStatus, as well as for debug purposes. It should be safe to remove it after 14 days, default is 90 days.')],
|
||||
'$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.')],
|
||||
'$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 bandwidth.')],
|
||||
'$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.')],
|
||||
'$check_new_version_url' => ['check_new_version_url', DI::l10n()->t('Check upstream version'), Config::get('system', 'check_new_version_url'), DI::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', DI::l10n()->t('Suppress Tags'), Config::get('system', 'suppress_tags'), DI::l10n()->t('Suppress showing a list of hashtags at the end of the posting.')],
|
||||
'$dbclean' => ['dbclean', DI::l10n()->t('Clean database'), Config::get('system', 'dbclean', false), DI::l10n()->t('Remove old remote items, orphaned database records and old content from some other helper tables.')],
|
||||
'$dbclean_expire_days' => ['dbclean_expire_days', DI::l10n()->t('Lifespan of remote items'), Config::get('system', 'dbclean-expire-days', 0), DI::l10n()->t('When the database cleanup is enabled, this defines the days after which remote items will be deleted. Own items, and marked or filed items are always kept. 0 disables this behaviour.')],
|
||||
'$dbclean_unclaimed' => ['dbclean_unclaimed', DI::l10n()->t('Lifespan of unclaimed items'), Config::get('system', 'dbclean-expire-unclaimed', 90), DI::l10n()->t('When the database cleanup is enabled, this defines the days after which unclaimed remote items (mostly content from the relay) will be deleted. Default value is 90 days. Defaults to the general lifespan value of remote items if set to 0.')],
|
||||
'$dbclean_expire_conv' => ['dbclean_expire_conv', DI::l10n()->t('Lifespan of raw conversation data'), Config::get('system', 'dbclean_expire_conversation', 90), DI::l10n()->t('The conversation data is used for ActivityPub and OStatus, as well as for debug purposes. It should be safe to remove it after 14 days, default is 90 days.')],
|
||||
'$itemcache' => ['itemcache', DI::l10n()->t('Path to item cache'), Config::get('system', 'itemcache'), DI::l10n()->t('The item caches buffers generated bbcode and external images.')],
|
||||
'$itemcache_duration' => ['itemcache_duration', DI::l10n()->t('Cache duration in seconds'), Config::get('system', 'itemcache_duration'), DI::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', DI::l10n()->t('Maximum numbers of comments per post'), Config::get('system', 'max_comments'), DI::l10n()->t('How much comments should be shown for each post? Default value is 100.')],
|
||||
'$temppath' => ['temppath', DI::l10n()->t('Temp path'), Config::get('system', 'temppath'), DI::l10n()->t('If you have a restricted system where the webserver can\'t access the system temp path, enter another path here.')],
|
||||
'$proxy_disabled' => ['proxy_disabled', DI::l10n()->t('Disable picture proxy'), Config::get('system', 'proxy_disabled'), DI::l10n()->t('The picture proxy increases performance and privacy. It shouldn\'t be used on systems with very low bandwidth.')],
|
||||
'$only_tag_search' => ['only_tag_search', DI::l10n()->t('Only search in tags'), Config::get('system', 'only_tag_search'), DI::l10n()->t('On large systems the text search can slow down the system extremely.')],
|
||||
|
||||
'$relocate_url' => ['relocate_url', L10n::t('New base url'), DI::baseUrl()->get(), L10n::t('Change base url for this server. Sends relocate message to all Friendica and Diaspora* contacts of all users.')],
|
||||
'$relocate_url' => ['relocate_url', DI::l10n()->t('New base url'), DI::baseUrl()->get(), DI::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 => L10n::t('Disabled'), 1 => L10n::t('Enabled')]],
|
||||
'$rino' => ['rino', DI::l10n()->t('RINO Encryption'), intval(Config::get('system', 'rino_encrypt')), DI::l10n()->t('Encryption layer between nodes.'), [0 => DI::l10n()->t('Disabled'), 1 => DI::l10n()->t('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 %d. On larger systems, values of %d are great. Default value is %d.', 5, 20, 10)],
|
||||
'$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.', DI::baseUrl()->get())],
|
||||
'$worker_queues' => ['worker_queues', DI::l10n()->t('Maximum number of parallel workers'), Config::get('system', 'worker_queues'), DI::l10n()->t('On shared hosters set this to %d. On larger systems, values of %d are great. Default value is %d.', 5, 20, 10)],
|
||||
'$worker_dont_fork' => ['worker_dont_fork', DI::l10n()->t('Don\'t use "proc_open" with the worker'), Config::get('system', 'worker_dont_fork'), DI::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', DI::l10n()->t('Enable fastlane'), Config::get('system', 'worker_fastlane'), DI::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', DI::l10n()->t('Enable frontend worker'), Config::get('system', 'frontend_worker'), DI::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.', DI::baseUrl()->get())],
|
||||
|
||||
'$relay_subscribe' => ['relay_subscribe', L10n::t('Subscribe to relay'), Config::get('system', 'relay_subscribe'), L10n::t('Enables the receiving of public posts from the relay. They will be included in the search, subscribed tags and on the global community page.')],
|
||||
'$relay_server' => ['relay_server', L10n::t('Relay server'), Config::get('system', 'relay_server', 'https://relay.diasp.org'), L10n::t('Address of the relay server where public posts should be send to. For example https://relay.diasp.org')],
|
||||
'$relay_directly' => ['relay_directly', L10n::t('Direct relay transfer'), Config::get('system', 'relay_directly'), L10n::t('Enables the direct transfer to other servers without using the relay servers')],
|
||||
'$relay_scope' => ['relay_scope', L10n::t('Relay scope'), Config::get('system', 'relay_scope'), L10n::t('Can be "all" or "tags". "all" means that every public post should be received. "tags" means that only posts with selected tags should be received.'), ['' => L10n::t('Disabled'), 'all' => L10n::t('all'), 'tags' => L10n::t('tags')]],
|
||||
'$relay_server_tags' => ['relay_server_tags', L10n::t('Server tags'), Config::get('system', 'relay_server_tags'), L10n::t('Comma separated list of tags for the "tags" subscription.')],
|
||||
'$relay_user_tags' => ['relay_user_tags', L10n::t('Allow user tags'), Config::get('system', 'relay_user_tags', true), L10n::t('If enabled, the tags from the saved searches will used for the "tags" subscription in addition to the "relay_server_tags".')],
|
||||
'$relay_subscribe' => ['relay_subscribe', DI::l10n()->t('Subscribe to relay'), Config::get('system', 'relay_subscribe'), DI::l10n()->t('Enables the receiving of public posts from the relay. They will be included in the search, subscribed tags and on the global community page.')],
|
||||
'$relay_server' => ['relay_server', DI::l10n()->t('Relay server'), Config::get('system', 'relay_server', 'https://relay.diasp.org'), DI::l10n()->t('Address of the relay server where public posts should be send to. For example https://relay.diasp.org')],
|
||||
'$relay_directly' => ['relay_directly', DI::l10n()->t('Direct relay transfer'), Config::get('system', 'relay_directly'), DI::l10n()->t('Enables the direct transfer to other servers without using the relay servers')],
|
||||
'$relay_scope' => ['relay_scope', DI::l10n()->t('Relay scope'), Config::get('system', 'relay_scope'), DI::l10n()->t('Can be "all" or "tags". "all" means that every public post should be received. "tags" means that only posts with selected tags should be received.'), ['' => DI::l10n()->t('Disabled'), 'all' => DI::l10n()->t('all'), 'tags' => DI::l10n()->t('tags')]],
|
||||
'$relay_server_tags' => ['relay_server_tags', DI::l10n()->t('Server tags'), Config::get('system', 'relay_server_tags'), DI::l10n()->t('Comma separated list of tags for the "tags" subscription.')],
|
||||
'$relay_user_tags' => ['relay_user_tags', DI::l10n()->t('Allow user tags'), Config::get('system', 'relay_user_tags', true), DI::l10n()->t('If enabled, the tags from the saved searches will used for the "tags" subscription in addition to the "relay_server_tags".')],
|
||||
|
||||
'$form_security_token' => parent::getFormSecurityToken('admin_site'),
|
||||
'$relocate_button' => L10n::t('Start Relocation'),
|
||||
'$relocate_button' => DI::l10n()->t('Start Relocation'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ class Summary extends BaseAdminModule
|
|||
// are there MyISAM tables in the DB? If so, trigger a warning message
|
||||
$warningtext = [];
|
||||
if (DBA::count(['information_schema' => 'tables'], ['engine' => 'myisam', 'table_schema' => DBA::databaseName()])) {
|
||||
$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 bin/console.php dbstructure 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[] = DI::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 bin/console.php dbstructure 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
|
||||
|
@ -38,7 +38,7 @@ class Summary extends BaseAdminModule
|
|||
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[] = 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);
|
||||
$warningtext[] = DI::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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,33 +47,33 @@ class Summary extends BaseAdminModule
|
|||
}
|
||||
|
||||
if (Config::get('system', 'dbupdate') == DBStructure::UPDATE_FAILED) {
|
||||
$warningtext[] = L10n::t('The database update failed. Please run "php bin/console.php dbstructure update" from the command line and have a look at the errors that might appear.');
|
||||
$warningtext[] = DI::l10n()->t('The database update failed. Please run "php bin/console.php dbstructure update" from the command line and have a look at the errors that might appear.');
|
||||
}
|
||||
|
||||
if (Config::get('system', 'update') == Update::FAILED) {
|
||||
$warningtext[] = L10n::t('The last update failed. Please run "php bin/console.php dbstructure update" from the command line and have a look at the errors that might appear. (Some of the errors are possibly inside the logfile.)');
|
||||
$warningtext[] = DI::l10n()->t('The last update failed. Please run "php bin/console.php dbstructure update" from the command line and have a look at the errors that might appear. (Some of the errors are possibly inside the logfile.)');
|
||||
}
|
||||
|
||||
$last_worker_call = Config::get('system', 'last_worker_execution', false);
|
||||
if (!$last_worker_call) {
|
||||
$warningtext[] = L10n::t('The worker was never executed. Please check your database structure!');
|
||||
$warningtext[] = DI::l10n()->t('The worker was never executed. Please check your database structure!');
|
||||
} elseif ((strtotime(DateTimeFormat::utcNow()) - strtotime($last_worker_call)) > 60 * 60) {
|
||||
$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);
|
||||
$warningtext[] = DI::l10n()->t('The last worker execution was on %s UTC. This is older than one hour. Please check your crontab settings.', $last_worker_call);
|
||||
}
|
||||
|
||||
// Legacy config file warning
|
||||
if (file_exists('.htconfig.php')) {
|
||||
$warningtext[] = L10n::t('Friendica\'s configuration now is stored in config/local.config.php, please copy config/local-sample.config.php and move your config from <code>.htconfig.php</code>. See <a href="%s">the Config help page</a> for help with the transition.', DI::baseUrl()->get() . '/help/Config');
|
||||
$warningtext[] = DI::l10n()->t('Friendica\'s configuration now is stored in config/local.config.php, please copy config/local-sample.config.php and move your config from <code>.htconfig.php</code>. See <a href="%s">the Config help page</a> for help with the transition.', DI::baseUrl()->get() . '/help/Config');
|
||||
}
|
||||
|
||||
if (file_exists('config/local.ini.php')) {
|
||||
$warningtext[] = L10n::t('Friendica\'s configuration now is stored in config/local.config.php, please copy config/local-sample.config.php and move your config from <code>config/local.ini.php</code>. See <a href="%s">the Config help page</a> for help with the transition.', DI::baseUrl()->get() . '/help/Config');
|
||||
$warningtext[] = DI::l10n()->t('Friendica\'s configuration now is stored in config/local.config.php, please copy config/local-sample.config.php and move your config from <code>config/local.ini.php</code>. See <a href="%s">the Config help page</a> for help with the transition.', DI::baseUrl()->get() . '/help/Config');
|
||||
}
|
||||
|
||||
// Check server vitality
|
||||
if (!self::checkSelfHostMeta()) {
|
||||
$well_known = DI::baseUrl()->get() . '/.well-known/host-meta';
|
||||
$warningtext[] = L10n::t('<a href="%s">%s</a> is not reachable on your system. This is a severe configuration issue that prevents server to server communication. See <a href="%s">the installation page</a> for help.',
|
||||
$warningtext[] = DI::l10n()->t('<a href="%s">%s</a> is not reachable on your system. This is a severe configuration issue that prevents server to server communication. See <a href="%s">the installation page</a> for help.',
|
||||
$well_known, $well_known, DI::baseUrl()->get() . '/help/Install');
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ class Summary extends BaseAdminModule
|
|||
}
|
||||
|
||||
} catch (\Throwable $exception) {
|
||||
$warningtext[] = L10n::t('The logfile \'%s\' is not usable. No logging possible (error: \'%s\')', $file, $exception->getMessage());
|
||||
$warningtext[] = DI::l10n()->t('The logfile \'%s\' is not usable. No logging possible (error: \'%s\')', $file, $exception->getMessage());
|
||||
}
|
||||
|
||||
$file = Config::get('system', 'dlogfile');
|
||||
|
@ -106,7 +106,7 @@ class Summary extends BaseAdminModule
|
|||
}
|
||||
|
||||
} catch (\Throwable $exception) {
|
||||
$warningtext[] = L10n::t('The debug logfile \'%s\' is not usable. No logging possible (error: \'%s\')', $file, $exception->getMessage());
|
||||
$warningtext[] = DI::l10n()->t('The debug logfile \'%s\' is not usable. No logging possible (error: \'%s\')', $file, $exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ class Summary extends BaseAdminModule
|
|||
'from' => $currBasepath,
|
||||
'to' => $confBasepath,
|
||||
]);
|
||||
$warningtext[] = L10n::t('Friendica\'s system.basepath was updated from \'%s\' to \'%s\'. Please remove the system.basepath from your db to avoid differences.',
|
||||
$warningtext[] = DI::l10n()->t('Friendica\'s system.basepath was updated from \'%s\' to \'%s\'. Please remove the system.basepath from your db to avoid differences.',
|
||||
$currBasepath,
|
||||
$confBasepath);
|
||||
} elseif (!is_dir($currBasepath)) {
|
||||
|
@ -130,7 +130,7 @@ class Summary extends BaseAdminModule
|
|||
'from' => $currBasepath,
|
||||
'to' => $confBasepath,
|
||||
]);
|
||||
$warningtext[] = L10n::t('Friendica\'s current system.basepath \'%s\' is wrong and the config file \'%s\' isn\'t used.',
|
||||
$warningtext[] = DI::l10n()->t('Friendica\'s current system.basepath \'%s\' is wrong and the config file \'%s\' isn\'t used.',
|
||||
$currBasepath,
|
||||
$confBasepath);
|
||||
} else {
|
||||
|
@ -138,19 +138,19 @@ class Summary extends BaseAdminModule
|
|||
'from' => $currBasepath,
|
||||
'to' => $confBasepath,
|
||||
]);
|
||||
$warningtext[] = L10n::t('Friendica\'s current system.basepath \'%s\' is not equal to the config file \'%s\'. Please fix your configuration.',
|
||||
$warningtext[] = DI::l10n()->t('Friendica\'s current system.basepath \'%s\' is not equal to the config file \'%s\'. Please fix your configuration.',
|
||||
$currBasepath,
|
||||
$confBasepath);
|
||||
}
|
||||
}
|
||||
|
||||
$accounts = [
|
||||
[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]
|
||||
[DI::l10n()->t('Normal Account'), 0],
|
||||
[DI::l10n()->t('Automatic Follower Account'), 0],
|
||||
[DI::l10n()->t('Public Forum Account'), 0],
|
||||
[DI::l10n()->t('Automatic Friend Account'), 0],
|
||||
[DI::l10n()->t('Blog Account'), 0],
|
||||
[DI::l10n()->t('Private Forum Account'), 0]
|
||||
];
|
||||
|
||||
$users = 0;
|
||||
|
@ -170,13 +170,13 @@ class Summary extends BaseAdminModule
|
|||
$workerqueue = DBA::count('workerqueue', ['NOT `done` AND `retrial` = ?', 0]);
|
||||
|
||||
// We can do better, but this is a quick queue status
|
||||
$queues = ['label' => L10n::t('Message queues'), 'deferred' => $deferred, 'workerq' => $workerqueue];
|
||||
$queues = ['label' => DI::l10n()->t('Message queues'), 'deferred' => $deferred, 'workerq' => $workerqueue];
|
||||
|
||||
$variables = DBA::toArray(DBA::p('SHOW variables LIKE "max_allowed_packet"'));
|
||||
$max_allowed_packet = $variables ? $variables[0]['Value'] : 0;
|
||||
|
||||
$server_settings = [
|
||||
'label' => L10n::t('Server Settings'),
|
||||
'label' => DI::l10n()->t('Server Settings'),
|
||||
'php' => [
|
||||
'upload_max_filesize' => ini_get('upload_max_filesize'),
|
||||
'post_max_size' => ini_get('post_max_size'),
|
||||
|
@ -189,17 +189,17 @@ class Summary extends BaseAdminModule
|
|||
|
||||
$t = Renderer::getMarkupTemplate('admin/summary.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$page' => L10n::t('Summary'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Summary'),
|
||||
'$queues' => $queues,
|
||||
'$users' => [L10n::t('Registered users'), $users],
|
||||
'$users' => [DI::l10n()->t('Registered users'), $users],
|
||||
'$accounts' => $accounts,
|
||||
'$pending' => [L10n::t('Pending registrations'), $pending],
|
||||
'$version' => [L10n::t('Version'), FRIENDICA_VERSION],
|
||||
'$pending' => [DI::l10n()->t('Pending registrations'), $pending],
|
||||
'$version' => [DI::l10n()->t('Version'), FRIENDICA_VERSION],
|
||||
'$platform' => FRIENDICA_PLATFORM,
|
||||
'$codename' => FRIENDICA_CODENAME,
|
||||
'$build' => Config::get('system', 'build'),
|
||||
'$addons' => [L10n::t('Active addons'), Addon::getEnabledList()],
|
||||
'$addons' => [DI::l10n()->t('Active addons'), Addon::getEnabledList()],
|
||||
'$serversettings' => $server_settings,
|
||||
'$warningtext' => $warningtext
|
||||
]);
|
||||
|
|
|
@ -30,7 +30,7 @@ class Details extends BaseAdminModule
|
|||
}
|
||||
}
|
||||
|
||||
info(L10n::t('Theme settings updated.'));
|
||||
info(DI::l10n()->t('Theme settings updated.'));
|
||||
|
||||
if (DI::mode()->isAjax()) {
|
||||
return;
|
||||
|
@ -51,17 +51,17 @@ class Details extends BaseAdminModule
|
|||
$theme = $a->argv[2];
|
||||
$theme = Strings::sanitizeFilePathItem($theme);
|
||||
if (!is_dir("view/theme/$theme")) {
|
||||
notice(L10n::t("Item not found."));
|
||||
notice(DI::l10n()->t("Item not found."));
|
||||
return '';
|
||||
}
|
||||
|
||||
$isEnabled = in_array($theme, Theme::getAllowedList());
|
||||
if ($isEnabled) {
|
||||
$status = "on";
|
||||
$action = L10n::t("Disable");
|
||||
$action = DI::l10n()->t("Disable");
|
||||
} else {
|
||||
$status = "off";
|
||||
$action = L10n::t("Enable");
|
||||
$action = DI::l10n()->t("Enable");
|
||||
}
|
||||
|
||||
if (!empty($_GET['action']) && $_GET['action'] == 'toggle') {
|
||||
|
@ -69,11 +69,11 @@ class Details extends BaseAdminModule
|
|||
|
||||
if ($isEnabled) {
|
||||
Theme::uninstall($theme);
|
||||
info(L10n::t('Theme %s disabled.', $theme));
|
||||
info(DI::l10n()->t('Theme %s disabled.', $theme));
|
||||
} elseif (Theme::install($theme)) {
|
||||
info(L10n::t('Theme %s successfully enabled.', $theme));
|
||||
info(DI::l10n()->t('Theme %s successfully enabled.', $theme));
|
||||
} else {
|
||||
info(L10n::t('Theme %s failed to install.', $theme));
|
||||
info(DI::l10n()->t('Theme %s failed to install.', $theme));
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('admin/themes/' . $theme);
|
||||
|
@ -95,17 +95,17 @@ class Details extends BaseAdminModule
|
|||
}
|
||||
}
|
||||
|
||||
$screenshot = [Theme::getScreenshot($theme), L10n::t('Screenshot')];
|
||||
$screenshot = [Theme::getScreenshot($theme), DI::l10n()->t('Screenshot')];
|
||||
if (!stristr($screenshot[0], $theme)) {
|
||||
$screenshot = null;
|
||||
}
|
||||
|
||||
$t = Renderer::getMarkupTemplate('admin/addons/details.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$page' => L10n::t('Themes'),
|
||||
'$toggle' => L10n::t('Toggle'),
|
||||
'$settings' => L10n::t('Settings'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Themes'),
|
||||
'$toggle' => DI::l10n()->t('Toggle'),
|
||||
'$settings' => DI::l10n()->t('Settings'),
|
||||
'$baseurl' => DI::baseUrl()->get(true),
|
||||
'$addon' => $theme,
|
||||
'$status' => $status,
|
||||
|
@ -113,8 +113,8 @@ class Details extends BaseAdminModule
|
|||
'$info' => Theme::getInfo($theme),
|
||||
'$function' => 'themes',
|
||||
'$admin_form' => $admin_form,
|
||||
'$str_author' => L10n::t('Author: '),
|
||||
'$str_maintainer' => L10n::t('Maintainer: '),
|
||||
'$str_author' => DI::l10n()->t('Author: '),
|
||||
'$str_maintainer' => DI::l10n()->t('Maintainer: '),
|
||||
'$screenshot' => $screenshot,
|
||||
'$readme' => $readme,
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class Embed extends BaseAdminModule
|
|||
}
|
||||
}
|
||||
|
||||
info(L10n::t('Theme settings updated.'));
|
||||
info(DI::l10n()->t('Theme settings updated.'));
|
||||
|
||||
if (DI::mode()->isAjax()) {
|
||||
return;
|
||||
|
@ -65,7 +65,7 @@ class Embed extends BaseAdminModule
|
|||
$theme = $a->argv[2];
|
||||
$theme = Strings::sanitizeFilePathItem($theme);
|
||||
if (!is_dir("view/theme/$theme")) {
|
||||
notice(L10n::t('Unknown theme.'));
|
||||
notice(DI::l10n()->t('Unknown theme.'));
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
@ -39,17 +39,17 @@ class Index extends BaseAdminModule
|
|||
if ($theme) {
|
||||
$theme = Strings::sanitizeFilePathItem($theme);
|
||||
if (!is_dir("view/theme/$theme")) {
|
||||
notice(L10n::t('Item not found.'));
|
||||
notice(DI::l10n()->t('Item not found.'));
|
||||
return '';
|
||||
}
|
||||
|
||||
if (in_array($theme, Theme::getAllowedList())) {
|
||||
Theme::uninstall($theme);
|
||||
info(L10n::t('Theme %s disabled.', $theme));
|
||||
info(DI::l10n()->t('Theme %s disabled.', $theme));
|
||||
} elseif (Theme::install($theme)) {
|
||||
info(L10n::t('Theme %s successfully enabled.', $theme));
|
||||
info(DI::l10n()->t('Theme %s successfully enabled.', $theme));
|
||||
} else {
|
||||
info(L10n::t('Theme %s failed to install.', $theme));
|
||||
info(DI::l10n()->t('Theme %s failed to install.', $theme));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,17 +91,17 @@ class Index extends BaseAdminModule
|
|||
|
||||
$t = Renderer::getMarkupTemplate('admin/addons/index.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$page' => L10n::t('Themes'),
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$reload' => L10n::t('Reload active themes'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Themes'),
|
||||
'$submit' => DI::l10n()->t('Save Settings'),
|
||||
'$reload' => DI::l10n()->t('Reload active themes'),
|
||||
'$baseurl' => DI::baseUrl()->get(true),
|
||||
'$function' => 'themes',
|
||||
'$addons' => $addons,
|
||||
'$pcount' => count($themes),
|
||||
'$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]'),
|
||||
'$noplugshint' => DI::l10n()->t('No themes found on the system. They should be placed in %1$s', '<code>/view/themes</code>'),
|
||||
'$experimental' => DI::l10n()->t('[Experimental]'),
|
||||
'$unsupported' => DI::l10n()->t('[Unsupported]'),
|
||||
'$form_security_token' => parent::getFormSecurityToken('admin_themes'),
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class Tos extends BaseAdminModule
|
|||
Config::set('system', 'tosprivstatement', $displayprivstatement);
|
||||
Config::set('system', 'tostext', $tostext);
|
||||
|
||||
info(L10n::t('The Terms of Service settings have been updated.'));
|
||||
info(DI::l10n()->t('The Terms of Service settings have been updated.'));
|
||||
|
||||
DI::baseUrl()->redirect('admin/tos');
|
||||
}
|
||||
|
@ -40,15 +40,15 @@ class Tos extends BaseAdminModule
|
|||
$tos = new \Friendica\Module\Tos();
|
||||
$t = Renderer::getMarkupTemplate('admin/tos.tpl');
|
||||
return Renderer::replaceMacros($t, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
'$page' => L10n::t('Terms of Service'),
|
||||
'$displaytos' => ['displaytos', L10n::t('Display Terms of Service'), Config::get('system', 'tosdisplay'), L10n::t('Enable the Terms of Service page. If this is enabled a link to the terms will be added to the registration form and the general information page.')],
|
||||
'$displayprivstatement' => ['displayprivstatement', L10n::t('Display Privacy Statement'), Config::get('system', 'tosprivstatement'), L10n::t('Show some informations regarding the needed information to operate the node according e.g. to <a href="%s" target="_blank">EU-GDPR</a>.', 'https://en.wikipedia.org/wiki/General_Data_Protection_Regulation')],
|
||||
'$preview' => L10n::t('Privacy Statement Preview'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Terms of Service'),
|
||||
'$displaytos' => ['displaytos', DI::l10n()->t('Display Terms of Service'), Config::get('system', 'tosdisplay'), DI::l10n()->t('Enable the Terms of Service page. If this is enabled a link to the terms will be added to the registration form and the general information page.')],
|
||||
'$displayprivstatement' => ['displayprivstatement', DI::l10n()->t('Display Privacy Statement'), Config::get('system', 'tosprivstatement'), DI::l10n()->t('Show some informations regarding the needed information to operate the node according e.g. to <a href="%s" target="_blank">EU-GDPR</a>.', 'https://en.wikipedia.org/wiki/General_Data_Protection_Regulation')],
|
||||
'$preview' => DI::l10n()->t('Privacy Statement Preview'),
|
||||
'$privtext' => $tos->privacy_complete,
|
||||
'$tostext' => ['tostext', L10n::t('The Terms of Service'), Config::get('system', 'tostext'), L10n::t('Enter the Terms of Service for your node here. You can use BBCode. Headers of sections should be [h2] and below.')],
|
||||
'$tostext' => ['tostext', DI::l10n()->t('The Terms of Service'), Config::get('system', 'tostext'), DI::l10n()->t('Enter the Terms of Service for your node here. You can use BBCode. Headers of sections should be [h2] and below.')],
|
||||
'$form_security_token' => parent::getFormSecurityToken('admin_tos'),
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$submit' => DI::l10n()->t('Save Settings'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,10 +44,10 @@ class Users extends BaseAdminModule
|
|||
}
|
||||
|
||||
$user = $result['user'];
|
||||
$preamble = Strings::deindent(L10n::t('
|
||||
$preamble = Strings::deindent(DI::l10n()->t('
|
||||
Dear %1$s,
|
||||
the administrator of %2$s has set up an account for you.'));
|
||||
$body = Strings::deindent(L10n::t('
|
||||
$body = Strings::deindent(DI::l10n()->t('
|
||||
The login details are as follows:
|
||||
|
||||
Site Location: %1$s
|
||||
|
@ -84,7 +84,7 @@ class Users extends BaseAdminModule
|
|||
'to_name' => $user['username'],
|
||||
'to_email' => $user['email'],
|
||||
'uid' => $user['uid'],
|
||||
'subject' => L10n::t('Registration details for %s', Config::get('config', 'sitename')),
|
||||
'subject' => DI::l10n()->t('Registration details for %s', Config::get('config', 'sitename')),
|
||||
'preamble' => $preamble,
|
||||
'body' => $body]);
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ class Users extends BaseAdminModule
|
|||
if (local_user() != $uid) {
|
||||
User::remove($uid);
|
||||
} else {
|
||||
notice(L10n::t('You can\'t remove yourself'));
|
||||
notice(DI::l10n()->t('You can\'t remove yourself'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,22 +154,22 @@ class Users extends BaseAdminModule
|
|||
// delete user
|
||||
User::remove($uid);
|
||||
|
||||
notice(L10n::t('User "%s" deleted', $user['username']));
|
||||
notice(DI::l10n()->t('User "%s" deleted', $user['username']));
|
||||
} else {
|
||||
notice(L10n::t('You can\'t remove yourself'));
|
||||
notice(DI::l10n()->t('You can\'t remove yourself'));
|
||||
}
|
||||
break;
|
||||
case 'block':
|
||||
parent::checkFormSecurityTokenRedirectOnError('/admin/users', 'admin_users', 't');
|
||||
// @TODO Move this to Model\User:block([$uid]);
|
||||
DBA::update('user', ['blocked' => 1], ['uid' => $uid]);
|
||||
notice(L10n::t('User "%s" blocked', $user['username']));
|
||||
notice(DI::l10n()->t('User "%s" blocked', $user['username']));
|
||||
break;
|
||||
case 'unblock':
|
||||
parent::checkFormSecurityTokenRedirectOnError('/admin/users', 'admin_users', 't');
|
||||
// @TODO Move this to Model\User:unblock([$uid]);
|
||||
DBA::update('user', ['blocked' => 0], ['uid' => $uid]);
|
||||
notice(L10n::t('User "%s" unblocked', $user['username']));
|
||||
notice(DI::l10n()->t('User "%s" unblocked', $user['username']));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -218,18 +218,18 @@ class Users extends BaseAdminModule
|
|||
$adminlist = explode(',', str_replace(' ', '', Config::get('config', 'admin_email')));
|
||||
$_setup_users = function ($e) use ($adminlist) {
|
||||
$page_types = [
|
||||
User::PAGE_FLAGS_NORMAL => L10n::t('Normal Account Page'),
|
||||
User::PAGE_FLAGS_SOAPBOX => L10n::t('Soapbox Page'),
|
||||
User::PAGE_FLAGS_COMMUNITY => L10n::t('Public Forum'),
|
||||
User::PAGE_FLAGS_FREELOVE => L10n::t('Automatic Friend Page'),
|
||||
User::PAGE_FLAGS_PRVGROUP => L10n::t('Private Forum')
|
||||
User::PAGE_FLAGS_NORMAL => DI::l10n()->t('Normal Account Page'),
|
||||
User::PAGE_FLAGS_SOAPBOX => DI::l10n()->t('Soapbox Page'),
|
||||
User::PAGE_FLAGS_COMMUNITY => DI::l10n()->t('Public Forum'),
|
||||
User::PAGE_FLAGS_FREELOVE => DI::l10n()->t('Automatic Friend Page'),
|
||||
User::PAGE_FLAGS_PRVGROUP => DI::l10n()->t('Private Forum')
|
||||
];
|
||||
$account_types = [
|
||||
User::ACCOUNT_TYPE_PERSON => L10n::t('Personal Page'),
|
||||
User::ACCOUNT_TYPE_ORGANISATION => L10n::t('Organisation Page'),
|
||||
User::ACCOUNT_TYPE_NEWS => L10n::t('News Page'),
|
||||
User::ACCOUNT_TYPE_COMMUNITY => L10n::t('Community Forum'),
|
||||
User::ACCOUNT_TYPE_RELAY => L10n::t('Relay'),
|
||||
User::ACCOUNT_TYPE_PERSON => DI::l10n()->t('Personal Page'),
|
||||
User::ACCOUNT_TYPE_ORGANISATION => DI::l10n()->t('Organisation Page'),
|
||||
User::ACCOUNT_TYPE_NEWS => DI::l10n()->t('News Page'),
|
||||
User::ACCOUNT_TYPE_COMMUNITY => DI::l10n()->t('Community Forum'),
|
||||
User::ACCOUNT_TYPE_RELAY => DI::l10n()->t('Relay'),
|
||||
];
|
||||
|
||||
$e['page_flags_raw'] = $e['page-flags'];
|
||||
|
@ -268,38 +268,38 @@ class Users extends BaseAdminModule
|
|||
}
|
||||
}
|
||||
|
||||
$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('Type')], $valid_orders);
|
||||
$th_users = array_map(null, [DI::l10n()->t('Name'), DI::l10n()->t('Email'), DI::l10n()->t('Register date'), DI::l10n()->t('Last login'), DI::l10n()->t('Last item'), DI::l10n()->t('Type')], $valid_orders);
|
||||
|
||||
$t = Renderer::getMarkupTemplate('admin/users.tpl');
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
// strings //
|
||||
'$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'),
|
||||
'$blocked' => L10n::t('User blocked'),
|
||||
'$unblock' => L10n::t('Unblock'),
|
||||
'$siteadmin' => L10n::t('Site admin'),
|
||||
'$accountexpired' => L10n::t('Account expired'),
|
||||
'$title' => DI::l10n()->t('Administration'),
|
||||
'$page' => DI::l10n()->t('Users'),
|
||||
'$submit' => DI::l10n()->t('Add User'),
|
||||
'$select_all' => DI::l10n()->t('select all'),
|
||||
'$h_pending' => DI::l10n()->t('User registrations waiting for confirm'),
|
||||
'$h_deleted' => DI::l10n()->t('User waiting for permanent deletion'),
|
||||
'$th_pending' => [DI::l10n()->t('Request date'), DI::l10n()->t('Name'), DI::l10n()->t('Email')],
|
||||
'$no_pending' => DI::l10n()->t('No registrations.'),
|
||||
'$pendingnotetext' => DI::l10n()->t('Note from the user'),
|
||||
'$approve' => DI::l10n()->t('Approve'),
|
||||
'$deny' => DI::l10n()->t('Deny'),
|
||||
'$delete' => DI::l10n()->t('Delete'),
|
||||
'$block' => DI::l10n()->t('Block'),
|
||||
'$blocked' => DI::l10n()->t('User blocked'),
|
||||
'$unblock' => DI::l10n()->t('Unblock'),
|
||||
'$siteadmin' => DI::l10n()->t('Site admin'),
|
||||
'$accountexpired' => DI::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('Permanent deletion')],
|
||||
'$h_users' => DI::l10n()->t('Users'),
|
||||
'$h_newuser' => DI::l10n()->t('New User'),
|
||||
'$th_deleted' => [DI::l10n()->t('Name'), DI::l10n()->t('Email'), DI::l10n()->t('Register date'), DI::l10n()->t('Last login'), DI::l10n()->t('Last item'), DI::l10n()->t('Permanent deletion')],
|
||||
'$th_users' => $th_users,
|
||||
'$order_users' => $order,
|
||||
'$order_direction_users' => $order_direction,
|
||||
|
||||
'$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?'),
|
||||
'$confirm_delete_multi' => DI::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' => DI::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' => parent::getFormSecurityToken('admin_users'),
|
||||
|
||||
|
@ -309,9 +309,9 @@ class Users extends BaseAdminModule
|
|||
'$pending' => $pending,
|
||||
'deleted' => $deleted,
|
||||
'$users' => $users,
|
||||
'$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'],
|
||||
'$newusername' => ['new_user_name', DI::l10n()->t('Name'), '', DI::l10n()->t('Name of the new user.')],
|
||||
'$newusernickname' => ['new_user_nickname', DI::l10n()->t('Nickname'), '', DI::l10n()->t('Nickname of the new user.')],
|
||||
'$newuseremail' => ['new_user_email', DI::l10n()->t('Email'), '', DI::l10n()->t('Email address of the new user.'), '', '', 'email'],
|
||||
]);
|
||||
|
||||
$o .= $pager->renderFull(DBA::count('user'));
|
||||
|
|
|
@ -33,7 +33,7 @@ class AllFriends extends BaseModule
|
|||
}
|
||||
|
||||
if (!$cid) {
|
||||
throw new HTTPException\BadRequestException(L10n::t('Invalid contact.'));
|
||||
throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid contact.'));
|
||||
}
|
||||
|
||||
$uid = $app->user['uid'];
|
||||
|
@ -41,7 +41,7 @@ class AllFriends extends BaseModule
|
|||
$contact = Model\Contact::getContactForUser($cid, local_user(), ['name', 'url', 'photo', 'uid', 'id']);
|
||||
|
||||
if (empty($contact)) {
|
||||
throw new HTTPException\BadRequestException(L10n::t('Invalid contact.'));
|
||||
throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid contact.'));
|
||||
}
|
||||
|
||||
DI::page()['aside'] = "";
|
||||
|
@ -53,7 +53,7 @@ class AllFriends extends BaseModule
|
|||
|
||||
$friends = Model\GContact::allFriends(local_user(), $cid, $pager->getStart(), $pager->getItemsPerPage());
|
||||
if (empty($friends)) {
|
||||
return L10n::t('No friends to display.');
|
||||
return DI::l10n()->t('No friends to display.');
|
||||
}
|
||||
|
||||
$id = 0;
|
||||
|
@ -72,8 +72,8 @@ class AllFriends extends BaseModule
|
|||
} else {
|
||||
$connlnk = DI::baseUrl()->get() . '/follow/?url=' . $friend['url'];
|
||||
$photoMenu = [
|
||||
'profile' => [L10n::t('View Profile'), Model\Contact::magicLinkbyId($friend['id'], $friend['url'])],
|
||||
'follow' => [L10n::t('Connect/Follow'), $connlnk]
|
||||
'profile' => [DI::l10n()->t('View Profile'), Model\Contact::magicLinkbyId($friend['id'], $friend['url'])],
|
||||
'follow' => [DI::l10n()->t('Connect/Follow'), $connlnk]
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ class AllFriends extends BaseModule
|
|||
'account_type' => Model\Contact::getAccountType($contactDetails),
|
||||
'network' => ContactSelector::networkToName($contactDetails['network'], $contactDetails['url']),
|
||||
'photoMenu' => $photoMenu,
|
||||
'conntxt' => L10n::t('Connect'),
|
||||
'conntxt' => DI::l10n()->t('Connect'),
|
||||
'connlnk' => $connlnk,
|
||||
'id' => ++$id,
|
||||
];
|
||||
|
|
|
@ -27,12 +27,12 @@ class Apps extends BaseModule
|
|||
$apps = Nav::getAppMenu();
|
||||
|
||||
if (count($apps) == 0) {
|
||||
notice(L10n::t('No installed applications.') . EOL);
|
||||
notice(DI::l10n()->t('No installed applications.') . EOL);
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('apps.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$title' => L10n::t('Applications'),
|
||||
'$title' => DI::l10n()->t('Applications'),
|
||||
'$apps' => $apps,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -34,19 +34,19 @@ class Attach extends BaseModule
|
|||
// Check for existence
|
||||
$item = MAttach::exists(['id' => $item_id]);
|
||||
if ($item === false) {
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException(L10n::t('Item was not found.'));
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Item was not found.'));
|
||||
}
|
||||
|
||||
// Now we'll fetch the item, if we have enough permisson
|
||||
$item = MAttach::getByIdWithPermission($item_id);
|
||||
if ($item === false) {
|
||||
throw new \Friendica\Network\HTTPException\ForbiddenException(L10n::t('Permission denied.'));
|
||||
throw new \Friendica\Network\HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
|
||||
$data = MAttach::getData($item);
|
||||
if (is_null($data)) {
|
||||
Logger::log('NULL data for attachment with id ' . $item['id']);
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException(L10n::t('Item was not found.'));
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Item was not found.'));
|
||||
}
|
||||
|
||||
// Use quotes around the filename to prevent a "multiple Content-Disposition"
|
||||
|
|
|
@ -39,13 +39,13 @@ class Api extends BaseModule
|
|||
public static function post(array $parameters = [])
|
||||
{
|
||||
if (!api_user()) {
|
||||
throw new HTTPException\UnauthorizedException(L10n::t('Permission denied.'));
|
||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
if (!empty($a->user['uid']) && $a->user['uid'] != api_user()) {
|
||||
throw new HTTPException\ForbiddenException(L10n::t('Permission denied.'));
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,13 +52,13 @@ abstract class BaseAdminModule extends BaseModule
|
|||
public static function content(array $parameters = [])
|
||||
{
|
||||
if (!is_site_admin()) {
|
||||
notice(L10n::t('Please login to continue.'));
|
||||
notice(DI::l10n()->t('Please login to continue.'));
|
||||
Session::set('return_path', DI::args()->getQueryString());
|
||||
DI::baseUrl()->redirect('login');
|
||||
}
|
||||
|
||||
if (!empty($_SESSION['submanage'])) {
|
||||
throw new ForbiddenException(L10n::t('Submanaged account can\'t access the administation pages. Please log back in as the master account.'));
|
||||
throw new ForbiddenException(DI::l10n()->t('Submanaged account can\'t access the administation pages. Please log back in as the master account.'));
|
||||
}
|
||||
|
||||
// Header stuff
|
||||
|
@ -71,38 +71,38 @@ abstract class BaseAdminModule extends BaseModule
|
|||
// array(url, name, extra css classes)
|
||||
// not part of $aside to make the template more adjustable
|
||||
$aside_sub = [
|
||||
'information' => [L10n::t('Information'), [
|
||||
'overview' => ['admin' , L10n::t('Overview') , 'overview'],
|
||||
'federation' => ['admin/federation' , L10n::t('Federation Statistics') , 'federation']
|
||||
'information' => [DI::l10n()->t('Information'), [
|
||||
'overview' => ['admin' , DI::l10n()->t('Overview') , 'overview'],
|
||||
'federation' => ['admin/federation' , DI::l10n()->t('Federation Statistics') , 'federation']
|
||||
]],
|
||||
'configuration' => [L10n::t('Configuration'), [
|
||||
'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'],
|
||||
'tos' => ['admin/tos' , L10n::t('Terms of Service') , 'tos'],
|
||||
'configuration' => [DI::l10n()->t('Configuration'), [
|
||||
'site' => ['admin/site' , DI::l10n()->t('Site') , 'site'],
|
||||
'users' => ['admin/users' , DI::l10n()->t('Users') , 'users'],
|
||||
'addons' => ['admin/addons' , DI::l10n()->t('Addons') , 'addons'],
|
||||
'themes' => ['admin/themes' , DI::l10n()->t('Themes') , 'themes'],
|
||||
'features' => ['admin/features' , DI::l10n()->t('Additional features') , 'features'],
|
||||
'tos' => ['admin/tos' , DI::l10n()->t('Terms of Service') , 'tos'],
|
||||
]],
|
||||
'database' => [L10n::t('Database'), [
|
||||
'dbsync' => ['admin/dbsync' , L10n::t('DB updates') , 'dbsync'],
|
||||
'deferred' => ['admin/queue/deferred', L10n::t('Inspect Deferred Workers'), 'deferred'],
|
||||
'workerqueue' => ['admin/queue' , L10n::t('Inspect worker Queue') , 'workerqueue'],
|
||||
'database' => [DI::l10n()->t('Database'), [
|
||||
'dbsync' => ['admin/dbsync' , DI::l10n()->t('DB updates') , 'dbsync'],
|
||||
'deferred' => ['admin/queue/deferred', DI::l10n()->t('Inspect Deferred Workers'), 'deferred'],
|
||||
'workerqueue' => ['admin/queue' , DI::l10n()->t('Inspect worker Queue') , 'workerqueue'],
|
||||
]],
|
||||
'tools' => [L10n::t('Tools'), [
|
||||
'contactblock' => ['admin/blocklist/contact', L10n::t('Contact Blocklist') , 'contactblock'],
|
||||
'blocklist' => ['admin/blocklist/server' , L10n::t('Server Blocklist') , 'blocklist'],
|
||||
'deleteitem' => ['admin/item/delete' , L10n::t('Delete Item') , 'deleteitem'],
|
||||
'tools' => [DI::l10n()->t('Tools'), [
|
||||
'contactblock' => ['admin/blocklist/contact', DI::l10n()->t('Contact Blocklist') , 'contactblock'],
|
||||
'blocklist' => ['admin/blocklist/server' , DI::l10n()->t('Server Blocklist') , 'blocklist'],
|
||||
'deleteitem' => ['admin/item/delete' , DI::l10n()->t('Delete Item') , 'deleteitem'],
|
||||
]],
|
||||
'logs' => [L10n::t('Logs'), [
|
||||
'logsconfig' => ['admin/logs/', L10n::t('Logs') , 'logs'],
|
||||
'logsview' => ['admin/logs/view' , L10n::t('View Logs') , 'viewlogs'],
|
||||
'logs' => [DI::l10n()->t('Logs'), [
|
||||
'logsconfig' => ['admin/logs/', DI::l10n()->t('Logs') , 'logs'],
|
||||
'logsview' => ['admin/logs/view' , DI::l10n()->t('View Logs') , 'viewlogs'],
|
||||
]],
|
||||
'diagnostics' => [L10n::t('Diagnostics'), [
|
||||
'phpinfo' => ['admin/phpinfo' , L10n::t('PHP Info') , 'phpinfo'],
|
||||
'probe' => ['probe' , L10n::t('probe address') , 'probe'],
|
||||
'webfinger' => ['webfinger' , L10n::t('check webfinger') , 'webfinger'],
|
||||
'itemsource' => ['admin/item/source' , L10n::t('Item Source') , 'itemsource'],
|
||||
'babel' => ['babel' , L10n::t('Babel') , 'babel'],
|
||||
'diagnostics' => [DI::l10n()->t('Diagnostics'), [
|
||||
'phpinfo' => ['admin/phpinfo' , DI::l10n()->t('PHP Info') , 'phpinfo'],
|
||||
'probe' => ['probe' , DI::l10n()->t('probe address') , 'probe'],
|
||||
'webfinger' => ['webfinger' , DI::l10n()->t('check webfinger') , 'webfinger'],
|
||||
'itemsource' => ['admin/item/source' , DI::l10n()->t('Item Source') , 'itemsource'],
|
||||
'babel' => ['babel' , DI::l10n()->t('Babel') , 'babel'],
|
||||
]],
|
||||
];
|
||||
|
||||
|
@ -110,9 +110,9 @@ abstract class BaseAdminModule extends BaseModule
|
|||
DI::page()['aside'] .= Renderer::replaceMacros($t, [
|
||||
'$admin' => ['addons_admin' => Addon::getAdminList()],
|
||||
'$subpages' => $aside_sub,
|
||||
'$admtxt' => L10n::t('Admin'),
|
||||
'$plugadmtxt' => L10n::t('Addon Features'),
|
||||
'$h_pending' => L10n::t('User registrations waiting for confirmation'),
|
||||
'$admtxt' => DI::l10n()->t('Admin'),
|
||||
'$plugadmtxt' => DI::l10n()->t('Addon Features'),
|
||||
'$h_pending' => DI::l10n()->t('User registrations waiting for confirmation'),
|
||||
'$admurl' => 'admin/'
|
||||
]);
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class BaseSearchModule extends BaseModule
|
|||
if (strpos($search, '@') === 0) {
|
||||
$search = substr($search, 1);
|
||||
$type = Search::TYPE_PEOPLE;
|
||||
$header = L10n::t('People Search - %s', $search);
|
||||
$header = DI::l10n()->t('People Search - %s', $search);
|
||||
|
||||
if (strrpos($search, '@') > 0) {
|
||||
$results = Search::getContactsFromProbe($search);
|
||||
|
@ -60,7 +60,7 @@ class BaseSearchModule extends BaseModule
|
|||
if (strpos($search, '!') === 0) {
|
||||
$search = substr($search, 1);
|
||||
$type = Search::TYPE_FORUM;
|
||||
$header = L10n::t('Forum Search - %s', $search);
|
||||
$header = DI::l10n()->t('Forum Search - %s', $search);
|
||||
}
|
||||
|
||||
$args = DI::args();
|
||||
|
@ -91,7 +91,7 @@ class BaseSearchModule extends BaseModule
|
|||
protected static function printResult(ResultList $results, Pager $pager, $header = '')
|
||||
{
|
||||
if ($results->getTotal() == 0) {
|
||||
info(L10n::t('No matches'));
|
||||
info(DI::l10n()->t('No matches'));
|
||||
return '';
|
||||
}
|
||||
|
||||
|
@ -128,10 +128,10 @@ class BaseSearchModule extends BaseModule
|
|||
}
|
||||
} else {
|
||||
$connLink = DI::baseUrl()->get() . '/follow/?url=' . $result->getUrl();
|
||||
$connTxt = L10n::t('Connect');
|
||||
$connTxt = DI::l10n()->t('Connect');
|
||||
|
||||
$photo_menu['profile'] = [L10n::t("View Profile"), Model\Contact::magicLink($result->getUrl())];
|
||||
$photo_menu['follow'] = [L10n::t("Connect/Follow"), $connLink];
|
||||
$photo_menu['profile'] = [DI::l10n()->t("View Profile"), Model\Contact::magicLink($result->getUrl())];
|
||||
$photo_menu['follow'] = [DI::l10n()->t("Connect/Follow"), $connLink];
|
||||
}
|
||||
|
||||
$photo = str_replace("http:///photo/", Search::getGlobalDirectory() . "/photo/", $result->getPhoto());
|
||||
|
|
|
@ -16,27 +16,27 @@ class BaseSettingsModule extends BaseModule
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/head.tpl');
|
||||
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
|
||||
'$ispublic' => L10n::t('everybody')
|
||||
'$ispublic' => DI::l10n()->t('everybody')
|
||||
]);
|
||||
|
||||
$tabs = [];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Account'),
|
||||
'label' => DI::l10n()->t('Account'),
|
||||
'url' => 'settings',
|
||||
'selected' => (($a->argc == 1) && ($a->argv[0] === 'settings') ? 'active' : ''),
|
||||
'accesskey' => 'o',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Two-factor authentication'),
|
||||
'label' => DI::l10n()->t('Two-factor authentication'),
|
||||
'url' => 'settings/2fa',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === '2fa') ? 'active' : ''),
|
||||
'accesskey' => 'o',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Profiles'),
|
||||
'label' => DI::l10n()->t('Profiles'),
|
||||
'url' => 'profiles',
|
||||
'selected' => (($a->argc == 1) && ($a->argv[0] === 'profiles') ? 'active' : ''),
|
||||
'accesskey' => 'p',
|
||||
|
@ -44,7 +44,7 @@ class BaseSettingsModule extends BaseModule
|
|||
|
||||
if (Feature::get()) {
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Additional features'),
|
||||
'label' => DI::l10n()->t('Additional features'),
|
||||
'url' => 'settings/features',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'features') ? 'active' : ''),
|
||||
'accesskey' => 't',
|
||||
|
@ -52,49 +52,49 @@ class BaseSettingsModule extends BaseModule
|
|||
}
|
||||
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Display'),
|
||||
'label' => DI::l10n()->t('Display'),
|
||||
'url' => 'settings/display',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'display') ? 'active' : ''),
|
||||
'accesskey' => 'i',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Social Networks'),
|
||||
'label' => DI::l10n()->t('Social Networks'),
|
||||
'url' => 'settings/connectors',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'connectors') ? 'active' : ''),
|
||||
'accesskey' => 'w',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Addons'),
|
||||
'label' => DI::l10n()->t('Addons'),
|
||||
'url' => 'settings/addon',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'addon') ? 'active' : ''),
|
||||
'accesskey' => 'l',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Delegations'),
|
||||
'label' => DI::l10n()->t('Delegations'),
|
||||
'url' => 'settings/delegation',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'delegation') ? 'active' : ''),
|
||||
'accesskey' => 'd',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Connected apps'),
|
||||
'label' => DI::l10n()->t('Connected apps'),
|
||||
'url' => 'settings/oauth',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'oauth') ? 'active' : ''),
|
||||
'accesskey' => 'b',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Export personal data'),
|
||||
'label' => DI::l10n()->t('Export personal data'),
|
||||
'url' => 'settings/userexport',
|
||||
'selected' => (($a->argc > 1) && ($a->argv[1] === 'userexport') ? 'active' : ''),
|
||||
'accesskey' => 'e',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => L10n::t('Remove account'),
|
||||
'label' => DI::l10n()->t('Remove account'),
|
||||
'url' => 'removeme',
|
||||
'selected' => (($a->argc == 1) && ($a->argv[0] === 'removeme') ? 'active' : ''),
|
||||
'accesskey' => 'r',
|
||||
|
@ -103,7 +103,7 @@ class BaseSettingsModule extends BaseModule
|
|||
|
||||
$tabtpl = Renderer::getMarkupTemplate("generic_links_widget.tpl");
|
||||
DI::page()['aside'] = Renderer::replaceMacros($tabtpl, [
|
||||
'$title' => L10n::t('Settings'),
|
||||
'$title' => DI::l10n()->t('Settings'),
|
||||
'$class' => 'settings-widget',
|
||||
'$items' => $tabs,
|
||||
]);
|
||||
|
|
|
@ -24,7 +24,7 @@ class Bookmarklet extends BaseModule
|
|||
$config = DI::config();
|
||||
|
||||
if (!local_user()) {
|
||||
$output = '<h2>' . L10n::t('Login') . '</h2>';
|
||||
$output = '<h2>' . DI::l10n()->t('Login') . '</h2>';
|
||||
$output .= Login::form(DI::args()->getQueryString(), intval($config->get('config', 'register_policy')) === Register::CLOSED ? false : true);
|
||||
return $output;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class Bookmarklet extends BaseModule
|
|||
|
||||
if (!strstr($referer, $page)) {
|
||||
if (empty($_REQUEST["url"])) {
|
||||
throw new HTTPException\BadRequestException(L10n::t('This page is missing a url parameter.'));
|
||||
throw new HTTPException\BadRequestException(DI::l10n()->t('This page is missing a url parameter.'));
|
||||
}
|
||||
|
||||
$content = add_page_info($_REQUEST["url"]);
|
||||
|
@ -56,7 +56,7 @@ class Bookmarklet extends BaseModule
|
|||
$output = status_editor($app, $x, 0, false);
|
||||
$output .= "<script>window.resizeTo(800,550);</script>";
|
||||
} else {
|
||||
$output = '<h2>' . L10n::t('The post was created') . '</h2>';
|
||||
$output = '<h2>' . DI::l10n()->t('The post was created') . '</h2>';
|
||||
$output .= "<script>window.close()</script>";
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ class Contact extends BaseModule
|
|||
}
|
||||
|
||||
if (!DBA::exists('contact', ['id' => $contact_id, 'uid' => local_user(), 'deleted' => false])) {
|
||||
notice(L10n::t('Could not access contact record.') . EOL);
|
||||
notice(DI::l10n()->t('Could not access contact record.') . EOL);
|
||||
DI::baseUrl()->redirect('contact');
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ class Contact extends BaseModule
|
|||
$profile_id = intval($_POST['profile-assign'] ?? 0);
|
||||
if ($profile_id) {
|
||||
if (!DBA::exists('profile', ['id' => $profile_id, 'uid' => local_user()])) {
|
||||
notice(L10n::t('Could not locate selected profile.') . EOL);
|
||||
notice(DI::l10n()->t('Could not locate selected profile.') . EOL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -136,9 +136,9 @@ class Contact extends BaseModule
|
|||
);
|
||||
|
||||
if (DBA::isResult($r)) {
|
||||
info(L10n::t('Contact updated.') . EOL);
|
||||
info(DI::l10n()->t('Contact updated.') . EOL);
|
||||
} else {
|
||||
notice(L10n::t('Failed to update contact record.') . EOL);
|
||||
notice(DI::l10n()->t('Failed to update contact record.') . EOL);
|
||||
}
|
||||
|
||||
$contact = DBA::selectFirst('contact', [], ['id' => $contact_id, 'uid' => local_user(), 'deleted' => false]);
|
||||
|
@ -311,13 +311,13 @@ class Contact extends BaseModule
|
|||
'$url' => Model\Contact::magicLinkByContact($contact, $contact['url']),
|
||||
'$addr' => $contact['addr'] ?? '',
|
||||
'$network_link' => $network_link,
|
||||
'$network' => L10n::t('Network:'),
|
||||
'$network' => DI::l10n()->t('Network:'),
|
||||
'$account_type' => Model\Contact::getAccountType($contact),
|
||||
'$follow' => L10n::t('Follow'),
|
||||
'$follow' => DI::l10n()->t('Follow'),
|
||||
'$follow_link' => $follow_link,
|
||||
'$unfollow' => L10n::t('Unfollow'),
|
||||
'$unfollow' => DI::l10n()->t('Unfollow'),
|
||||
'$unfollow_link' => $unfollow_link,
|
||||
'$wallmessage' => L10n::t('Message'),
|
||||
'$wallmessage' => DI::l10n()->t('Message'),
|
||||
'$wallmessage_link' => $wallmessage_link,
|
||||
]);
|
||||
|
||||
|
@ -356,7 +356,7 @@ class Contact extends BaseModule
|
|||
Nav::setSelected('contact');
|
||||
|
||||
if (!local_user()) {
|
||||
notice(L10n::t('Permission denied.') . EOL);
|
||||
notice(DI::l10n()->t('Permission denied.') . EOL);
|
||||
return Login::form();
|
||||
}
|
||||
|
||||
|
@ -371,7 +371,7 @@ class Contact extends BaseModule
|
|||
|
||||
$orig_record = DBA::selectFirst('contact', [], ['id' => $contact_id, 'uid' => [0, local_user()], 'self' => false, 'deleted' => false]);
|
||||
if (!DBA::isResult($orig_record)) {
|
||||
throw new NotFoundException(L10n::t('Contact not found'));
|
||||
throw new NotFoundException(DI::l10n()->t('Contact not found'));
|
||||
}
|
||||
|
||||
if ($cmd === 'update' && ($orig_record['uid'] != 0)) {
|
||||
|
@ -390,7 +390,7 @@ class Contact extends BaseModule
|
|||
self::blockContact($contact_id);
|
||||
|
||||
$blocked = Model\Contact::isBlockedByUser($contact_id, local_user());
|
||||
info(($blocked ? L10n::t('Contact has been blocked') : L10n::t('Contact has been unblocked')) . EOL);
|
||||
info(($blocked ? DI::l10n()->t('Contact has been blocked') : DI::l10n()->t('Contact has been unblocked')) . EOL);
|
||||
|
||||
DI::baseUrl()->redirect('contact/' . $contact_id);
|
||||
// NOTREACHED
|
||||
|
@ -400,7 +400,7 @@ class Contact extends BaseModule
|
|||
self::ignoreContact($contact_id);
|
||||
|
||||
$ignored = Model\Contact::isIgnoredByUser($contact_id, local_user());
|
||||
info(($ignored ? L10n::t('Contact has been ignored') : L10n::t('Contact has been unignored')) . EOL);
|
||||
info(($ignored ? DI::l10n()->t('Contact has been ignored') : DI::l10n()->t('Contact has been unignored')) . EOL);
|
||||
|
||||
DI::baseUrl()->redirect('contact/' . $contact_id);
|
||||
// NOTREACHED
|
||||
|
@ -410,7 +410,7 @@ class Contact extends BaseModule
|
|||
$r = self::archiveContact($contact_id, $orig_record);
|
||||
if ($r) {
|
||||
$archived = (($orig_record['archive']) ? 0 : 1);
|
||||
info((($archived) ? L10n::t('Contact has been archived') : L10n::t('Contact has been unarchived')) . EOL);
|
||||
info((($archived) ? DI::l10n()->t('Contact has been archived') : DI::l10n()->t('Contact has been unarchived')) . EOL);
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('contact/' . $contact_id);
|
||||
|
@ -434,15 +434,15 @@ class Contact extends BaseModule
|
|||
DI::page()['aside'] = '';
|
||||
|
||||
return Renderer::replaceMacros(Renderer::getMarkupTemplate('contact_drop_confirm.tpl'), [
|
||||
'$header' => L10n::t('Drop contact'),
|
||||
'$header' => DI::l10n()->t('Drop contact'),
|
||||
'$contact' => self::getContactTemplateVars($orig_record),
|
||||
'$method' => 'get',
|
||||
'$message' => L10n::t('Do you really want to delete this contact?'),
|
||||
'$message' => DI::l10n()->t('Do you really want to delete this contact?'),
|
||||
'$extra_inputs' => $inputs,
|
||||
'$confirm' => L10n::t('Yes'),
|
||||
'$confirm' => DI::l10n()->t('Yes'),
|
||||
'$confirm_url' => $query['base'],
|
||||
'$confirm_name' => 'confirmed',
|
||||
'$cancel' => L10n::t('Cancel'),
|
||||
'$cancel' => DI::l10n()->t('Cancel'),
|
||||
]);
|
||||
}
|
||||
// Now check how the user responded to the confirmation query
|
||||
|
@ -451,7 +451,7 @@ class Contact extends BaseModule
|
|||
}
|
||||
|
||||
self::dropContact($orig_record);
|
||||
info(L10n::t('Contact has been removed.') . EOL);
|
||||
info(DI::l10n()->t('Contact has been removed.') . EOL);
|
||||
|
||||
DI::baseUrl()->redirect('contact');
|
||||
// NOTREACHED
|
||||
|
@ -481,17 +481,17 @@ class Contact extends BaseModule
|
|||
switch ($contact['rel']) {
|
||||
case Model\Contact::FRIEND:
|
||||
$dir_icon = 'images/lrarrow.gif';
|
||||
$relation_text = L10n::t('You are mutual friends with %s');
|
||||
$relation_text = DI::l10n()->t('You are mutual friends with %s');
|
||||
break;
|
||||
|
||||
case Model\Contact::FOLLOWER;
|
||||
$dir_icon = 'images/larrow.gif';
|
||||
$relation_text = L10n::t('You are sharing with %s');
|
||||
$relation_text = DI::l10n()->t('You are sharing with %s');
|
||||
break;
|
||||
|
||||
case Model\Contact::SHARING;
|
||||
$dir_icon = 'images/rarrow.gif';
|
||||
$relation_text = L10n::t('%s is sharing with you');
|
||||
$relation_text = DI::l10n()->t('%s is sharing with you');
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -515,36 +515,36 @@ class Contact extends BaseModule
|
|||
$sparkle = '';
|
||||
}
|
||||
|
||||
$insecure = L10n::t('Private communications are not available for this contact.');
|
||||
$insecure = DI::l10n()->t('Private communications are not available for this contact.');
|
||||
|
||||
$last_update = (($contact['last-update'] <= DBA::NULL_DATETIME) ? L10n::t('Never') : DateTimeFormat::local($contact['last-update'], 'D, j M Y, g:i A'));
|
||||
$last_update = (($contact['last-update'] <= DBA::NULL_DATETIME) ? DI::l10n()->t('Never') : DateTimeFormat::local($contact['last-update'], 'D, j M Y, g:i A'));
|
||||
|
||||
if ($contact['last-update'] > DBA::NULL_DATETIME) {
|
||||
$last_update .= ' ' . (($contact['last-update'] <= $contact['success_update']) ? L10n::t('(Update was successful)') : L10n::t('(Update was not successful)'));
|
||||
$last_update .= ' ' . (($contact['last-update'] <= $contact['success_update']) ? DI::l10n()->t('(Update was successful)') : DI::l10n()->t('(Update was not successful)'));
|
||||
}
|
||||
$lblsuggest = (($contact['network'] === Protocol::DFRN) ? L10n::t('Suggest friends') : '');
|
||||
$lblsuggest = (($contact['network'] === Protocol::DFRN) ? DI::l10n()->t('Suggest friends') : '');
|
||||
|
||||
$poll_enabled = in_array($contact['network'], [Protocol::DFRN, Protocol::OSTATUS, Protocol::FEED, Protocol::MAIL]);
|
||||
|
||||
$nettype = L10n::t('Network type: %s', ContactSelector::networkToName($contact['network'], $contact['url'], $contact['protocol']));
|
||||
$nettype = DI::l10n()->t('Network type: %s', ContactSelector::networkToName($contact['network'], $contact['url'], $contact['protocol']));
|
||||
|
||||
// tabs
|
||||
$tab_str = self::getTabsHTML($a, $contact, 3);
|
||||
|
||||
$lost_contact = (($contact['archive'] && $contact['term-date'] > DBA::NULL_DATETIME && $contact['term-date'] < DateTimeFormat::utcNow()) ? L10n::t('Communications lost with this contact!') : '');
|
||||
$lost_contact = (($contact['archive'] && $contact['term-date'] > DBA::NULL_DATETIME && $contact['term-date'] < DateTimeFormat::utcNow()) ? DI::l10n()->t('Communications lost with this contact!') : '');
|
||||
|
||||
$fetch_further_information = null;
|
||||
if ($contact['network'] == Protocol::FEED) {
|
||||
$fetch_further_information = [
|
||||
'fetch_further_information',
|
||||
L10n::t('Fetch further information for feeds'),
|
||||
DI::l10n()->t('Fetch further information for feeds'),
|
||||
$contact['fetch_further_information'],
|
||||
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.'),
|
||||
DI::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')
|
||||
'0' => DI::l10n()->t('Disabled'),
|
||||
'1' => DI::l10n()->t('Fetch information'),
|
||||
'3' => DI::l10n()->t('Fetch keywords'),
|
||||
'2' => DI::l10n()->t('Fetch information and keywords')
|
||||
]
|
||||
];
|
||||
}
|
||||
|
@ -563,9 +563,9 @@ class Contact extends BaseModule
|
|||
$contact_actions = self::getContactActions($contact);
|
||||
|
||||
if ($contact['uid'] != 0) {
|
||||
$lbl_vis1 = L10n::t('Profile Visibility');
|
||||
$lbl_info1 = L10n::t('Contact Information / Notes');
|
||||
$contact_settings_label = L10n::t('Contact Settings');
|
||||
$lbl_vis1 = DI::l10n()->t('Profile Visibility');
|
||||
$lbl_info1 = DI::l10n()->t('Contact Information / Notes');
|
||||
$contact_settings_label = DI::l10n()->t('Contact Settings');
|
||||
} else {
|
||||
$lbl_vis1 = null;
|
||||
$lbl_info1 = null;
|
||||
|
@ -574,67 +574,67 @@ class Contact extends BaseModule
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('contact_edit.tpl');
|
||||
$o .= Renderer::replaceMacros($tpl, [
|
||||
'$header' => L10n::t('Contact'),
|
||||
'$header' => DI::l10n()->t('Contact'),
|
||||
'$tab_str' => $tab_str,
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$submit' => DI::l10n()->t('Submit'),
|
||||
'$lbl_vis1' => $lbl_vis1,
|
||||
'$lbl_vis2' => L10n::t('Please choose the profile you would like to display to %s when viewing your profile securely.', $contact['name']),
|
||||
'$lbl_vis2' => DI::l10n()->t('Please choose the profile you would like to display to %s when viewing your profile securely.', $contact['name']),
|
||||
'$lbl_info1' => $lbl_info1,
|
||||
'$lbl_info2' => L10n::t('Their personal note'),
|
||||
'$lbl_info2' => DI::l10n()->t('Their personal note'),
|
||||
'$reason' => trim(Strings::escapeTags($contact['reason'])),
|
||||
'$infedit' => L10n::t('Edit contact notes'),
|
||||
'$infedit' => DI::l10n()->t('Edit contact notes'),
|
||||
'$common_link' => 'common/loc/' . local_user() . '/' . $contact['id'],
|
||||
'$relation_text' => $relation_text,
|
||||
'$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'),
|
||||
'$visit' => DI::l10n()->t('Visit %s\'s profile [%s]', $contact['name'], $contact['url']),
|
||||
'$blockunblock' => DI::l10n()->t('Block/Unblock contact'),
|
||||
'$ignorecont' => DI::l10n()->t('Ignore contact'),
|
||||
'$lblcrepair' => DI::l10n()->t('Repair URL settings'),
|
||||
'$lblrecent' => DI::l10n()->t('View conversations'),
|
||||
'$lblsuggest' => $lblsuggest,
|
||||
'$nettype' => $nettype,
|
||||
'$poll_interval' => $poll_interval,
|
||||
'$poll_enabled' => $poll_enabled,
|
||||
'$lastupdtext' => L10n::t('Last update:'),
|
||||
'$lastupdtext' => DI::l10n()->t('Last update:'),
|
||||
'$lost_contact' => $lost_contact,
|
||||
'$updpub' => L10n::t('Update public posts'),
|
||||
'$updpub' => DI::l10n()->t('Update public posts'),
|
||||
'$last_update' => $last_update,
|
||||
'$udnow' => L10n::t('Update now'),
|
||||
'$udnow' => DI::l10n()->t('Update now'),
|
||||
'$profile_select' => $profile_select,
|
||||
'$contact_id' => $contact['id'],
|
||||
'$block_text' => ($contact['blocked'] ? L10n::t('Unblock') : L10n::t('Block')),
|
||||
'$ignore_text' => ($contact['readonly'] ? L10n::t('Unignore') : L10n::t('Ignore')),
|
||||
'$block_text' => ($contact['blocked'] ? DI::l10n()->t('Unblock') : DI::l10n()->t('Block')),
|
||||
'$ignore_text' => ($contact['readonly'] ? DI::l10n()->t('Unignore') : DI::l10n()->t('Ignore')),
|
||||
'$insecure' => (in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::MAIL, Protocol::DIASPORA]) ? '' : $insecure),
|
||||
'$info' => $contact['info'],
|
||||
'$cinfo' => ['info', '', $contact['info'], ''],
|
||||
'$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')],
|
||||
'$blocked' => ($contact['blocked'] ? DI::l10n()->t('Currently blocked') : ''),
|
||||
'$ignored' => ($contact['readonly'] ? DI::l10n()->t('Currently ignored') : ''),
|
||||
'$archived' => ($contact['archive'] ? DI::l10n()->t('Currently archived') : ''),
|
||||
'$pending' => ($contact['pending'] ? DI::l10n()->t('Awaiting connection acknowledge') : ''),
|
||||
'$hidden' => ['hidden', DI::l10n()->t('Hide this contact from others'), ($contact['hidden'] == 1), DI::l10n()->t('Replies/likes to your public posts <strong>may</strong> still be visible')],
|
||||
'$notify' => ['notify', DI::l10n()->t('Notification for new posts'), ($contact['notify_new_posts'] == 1), DI::l10n()->t('Send a notification of every new post of this contact')],
|
||||
'$fetch_further_information' => $fetch_further_information,
|
||||
'$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')],
|
||||
'$ffi_keyword_blacklist' => ['ffi_keyword_blacklist', DI::l10n()->t('Blacklisted keywords'), $contact['ffi_keyword_blacklist'], DI::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' => $contact['name'],
|
||||
'$dir_icon' => $dir_icon,
|
||||
'$sparkle' => $sparkle,
|
||||
'$url' => $url,
|
||||
'$profileurllabel'=> L10n::t('Profile URL'),
|
||||
'$profileurllabel'=> DI::l10n()->t('Profile URL'),
|
||||
'$profileurl' => $contact['url'],
|
||||
'$account_type' => Model\Contact::getAccountType($contact),
|
||||
'$location' => BBCode::convert($contact['location']),
|
||||
'$location_label' => L10n::t('Location:'),
|
||||
'$location_label' => DI::l10n()->t('Location:'),
|
||||
'$xmpp' => BBCode::convert($contact['xmpp']),
|
||||
'$xmpp_label' => L10n::t('XMPP:'),
|
||||
'$xmpp_label' => DI::l10n()->t('XMPP:'),
|
||||
'$about' => BBCode::convert($contact['about'], false),
|
||||
'$about_label' => L10n::t('About:'),
|
||||
'$about_label' => DI::l10n()->t('About:'),
|
||||
'$keywords' => $contact['keywords'],
|
||||
'$keywords_label' => L10n::t('Tags:'),
|
||||
'$contact_action_button' => L10n::t('Actions'),
|
||||
'$keywords_label' => DI::l10n()->t('Tags:'),
|
||||
'$contact_action_button' => DI::l10n()->t('Actions'),
|
||||
'$contact_actions'=> $contact_actions,
|
||||
'$contact_status' => L10n::t('Status'),
|
||||
'$contact_status' => DI::l10n()->t('Status'),
|
||||
'$contact_settings_label' => $contact_settings_label,
|
||||
'$contact_profile_label' => L10n::t('Profile'),
|
||||
'$contact_profile_label' => DI::l10n()->t('Profile'),
|
||||
]);
|
||||
|
||||
$arr = ['contact' => $contact, 'output' => $o];
|
||||
|
@ -680,58 +680,58 @@ class Contact extends BaseModule
|
|||
|
||||
$tabs = [
|
||||
[
|
||||
'label' => L10n::t('All Contacts'),
|
||||
'label' => DI::l10n()->t('All Contacts'),
|
||||
'url' => 'contact',
|
||||
'sel' => !$type ? 'active' : '',
|
||||
'title' => L10n::t('Show all contacts'),
|
||||
'title' => DI::l10n()->t('Show all contacts'),
|
||||
'id' => 'showall-tab',
|
||||
'accesskey' => 'l',
|
||||
],
|
||||
[
|
||||
'label' => L10n::t('Pending'),
|
||||
'label' => DI::l10n()->t('Pending'),
|
||||
'url' => 'contact/pending',
|
||||
'sel' => $type == 'pending' ? 'active' : '',
|
||||
'title' => L10n::t('Only show pending contacts'),
|
||||
'title' => DI::l10n()->t('Only show pending contacts'),
|
||||
'id' => 'showpending-tab',
|
||||
'accesskey' => 'p',
|
||||
],
|
||||
[
|
||||
'label' => L10n::t('Blocked'),
|
||||
'label' => DI::l10n()->t('Blocked'),
|
||||
'url' => 'contact/blocked',
|
||||
'sel' => $type == 'blocked' ? 'active' : '',
|
||||
'title' => L10n::t('Only show blocked contacts'),
|
||||
'title' => DI::l10n()->t('Only show blocked contacts'),
|
||||
'id' => 'showblocked-tab',
|
||||
'accesskey' => 'b',
|
||||
],
|
||||
[
|
||||
'label' => L10n::t('Ignored'),
|
||||
'label' => DI::l10n()->t('Ignored'),
|
||||
'url' => 'contact/ignored',
|
||||
'sel' => $type == 'ignored' ? 'active' : '',
|
||||
'title' => L10n::t('Only show ignored contacts'),
|
||||
'title' => DI::l10n()->t('Only show ignored contacts'),
|
||||
'id' => 'showignored-tab',
|
||||
'accesskey' => 'i',
|
||||
],
|
||||
[
|
||||
'label' => L10n::t('Archived'),
|
||||
'label' => DI::l10n()->t('Archived'),
|
||||
'url' => 'contact/archived',
|
||||
'sel' => $type == 'archived' ? 'active' : '',
|
||||
'title' => L10n::t('Only show archived contacts'),
|
||||
'title' => DI::l10n()->t('Only show archived contacts'),
|
||||
'id' => 'showarchived-tab',
|
||||
'accesskey' => 'y',
|
||||
],
|
||||
[
|
||||
'label' => L10n::t('Hidden'),
|
||||
'label' => DI::l10n()->t('Hidden'),
|
||||
'url' => 'contact/hidden',
|
||||
'sel' => $type == 'hidden' ? 'active' : '',
|
||||
'title' => L10n::t('Only show hidden contacts'),
|
||||
'title' => DI::l10n()->t('Only show hidden contacts'),
|
||||
'id' => 'showhidden-tab',
|
||||
'accesskey' => 'h',
|
||||
],
|
||||
[
|
||||
'label' => L10n::t('Groups'),
|
||||
'label' => DI::l10n()->t('Groups'),
|
||||
'url' => 'group',
|
||||
'sel' => '',
|
||||
'title' => L10n::t('Organize your contact groups'),
|
||||
'title' => DI::l10n()->t('Organize your contact groups'),
|
||||
'id' => 'contactgroups-tab',
|
||||
'accesskey' => 'e',
|
||||
],
|
||||
|
@ -791,18 +791,18 @@ class Contact extends BaseModule
|
|||
}
|
||||
|
||||
switch ($rel) {
|
||||
case 'followers': $header = L10n::t('Followers'); break;
|
||||
case 'following': $header = L10n::t('Following'); break;
|
||||
case 'mutuals': $header = L10n::t('Mutual friends'); break;
|
||||
default: $header = L10n::t('Contacts');
|
||||
case 'followers': $header = DI::l10n()->t('Followers'); break;
|
||||
case 'following': $header = DI::l10n()->t('Following'); break;
|
||||
case 'mutuals': $header = DI::l10n()->t('Mutual friends'); break;
|
||||
default: $header = DI::l10n()->t('Contacts');
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 'pending': $header .= ' - ' . L10n::t('Pending'); break;
|
||||
case 'blocked': $header .= ' - ' . L10n::t('Blocked'); break;
|
||||
case 'hidden': $header .= ' - ' . L10n::t('Hidden'); break;
|
||||
case 'ignored': $header .= ' - ' . L10n::t('Ignored'); break;
|
||||
case 'archived': $header .= ' - ' . L10n::t('Archived'); break;
|
||||
case 'pending': $header .= ' - ' . DI::l10n()->t('Pending'); break;
|
||||
case 'blocked': $header .= ' - ' . DI::l10n()->t('Blocked'); break;
|
||||
case 'hidden': $header .= ' - ' . DI::l10n()->t('Hidden'); break;
|
||||
case 'ignored': $header .= ' - ' . DI::l10n()->t('Ignored'); break;
|
||||
case 'archived': $header .= ' - ' . DI::l10n()->t('Archived'); break;
|
||||
}
|
||||
|
||||
$header .= $nets ? ' - ' . ContactSelector::networkToName($nets) : '';
|
||||
|
@ -813,21 +813,21 @@ class Contact extends BaseModule
|
|||
'$tabs' => $t,
|
||||
'$total' => $total,
|
||||
'$search' => $search_hdr,
|
||||
'$desc' => L10n::t('Search your contacts'),
|
||||
'$finding' => $searching ? L10n::t('Results for: %s', $search) : '',
|
||||
'$submit' => L10n::t('Find'),
|
||||
'$desc' => DI::l10n()->t('Search your contacts'),
|
||||
'$finding' => $searching ? DI::l10n()->t('Results for: %s', $search) : '',
|
||||
'$submit' => DI::l10n()->t('Find'),
|
||||
'$cmd' => DI::args()->getCommand(),
|
||||
'$contacts' => $contacts,
|
||||
'$contact_drop_confirm' => L10n::t('Do you really want to delete this contact?'),
|
||||
'$contact_drop_confirm' => DI::l10n()->t('Do you really want to delete this contact?'),
|
||||
'multiselect' => 1,
|
||||
'$batch_actions' => [
|
||||
'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'),
|
||||
'contacts_batch_update' => DI::l10n()->t('Update'),
|
||||
'contacts_batch_block' => DI::l10n()->t('Block') . '/' . DI::l10n()->t('Unblock'),
|
||||
'contacts_batch_ignore' => DI::l10n()->t('Ignore') . '/' . DI::l10n()->t('Unignore'),
|
||||
'contacts_batch_archive' => DI::l10n()->t('Archive') . '/' . DI::l10n()->t('Unarchive'),
|
||||
'contacts_batch_drop' => DI::l10n()->t('Delete'),
|
||||
],
|
||||
'$h_batch_actions' => L10n::t('Batch Actions'),
|
||||
'$h_batch_actions' => DI::l10n()->t('Batch Actions'),
|
||||
'$paginate' => $pager->renderFull($total),
|
||||
]);
|
||||
|
||||
|
@ -851,26 +851,26 @@ class Contact extends BaseModule
|
|||
// tabs
|
||||
$tabs = [
|
||||
[
|
||||
'label' => L10n::t('Status'),
|
||||
'label' => DI::l10n()->t('Status'),
|
||||
'url' => "contact/" . $contact['id'] . "/conversations",
|
||||
'sel' => (($active_tab == 1) ? 'active' : ''),
|
||||
'title' => L10n::t('Conversations started by this contact'),
|
||||
'title' => DI::l10n()->t('Conversations started by this contact'),
|
||||
'id' => 'status-tab',
|
||||
'accesskey' => 'm',
|
||||
],
|
||||
[
|
||||
'label' => L10n::t('Posts and Comments'),
|
||||
'label' => DI::l10n()->t('Posts and Comments'),
|
||||
'url' => "contact/" . $contact['id'] . "/posts",
|
||||
'sel' => (($active_tab == 2) ? 'active' : ''),
|
||||
'title' => L10n::t('Status Messages and Posts'),
|
||||
'title' => DI::l10n()->t('Status Messages and Posts'),
|
||||
'id' => 'posts-tab',
|
||||
'accesskey' => 'p',
|
||||
],
|
||||
[
|
||||
'label' => L10n::t('Profile'),
|
||||
'label' => DI::l10n()->t('Profile'),
|
||||
'url' => "contact/" . $contact['id'],
|
||||
'sel' => (($active_tab == 3) ? 'active' : ''),
|
||||
'title' => L10n::t('Profile Details'),
|
||||
'title' => DI::l10n()->t('Profile Details'),
|
||||
'id' => 'profile-tab',
|
||||
'accesskey' => 'o',
|
||||
]
|
||||
|
@ -879,10 +879,10 @@ class Contact extends BaseModule
|
|||
// Show this tab only if there is visible friend list
|
||||
$x = Model\GContact::countAllFriends(local_user(), $contact['id']);
|
||||
if ($x) {
|
||||
$tabs[] = ['label' => L10n::t('Contacts'),
|
||||
$tabs[] = ['label' => DI::l10n()->t('Contacts'),
|
||||
'url' => "allfriends/" . $contact['id'],
|
||||
'sel' => (($active_tab == 4) ? 'active' : ''),
|
||||
'title' => L10n::t('View all contacts'),
|
||||
'title' => DI::l10n()->t('View all contacts'),
|
||||
'id' => 'allfriends-tab',
|
||||
'accesskey' => 't'];
|
||||
}
|
||||
|
@ -890,20 +890,20 @@ class Contact extends BaseModule
|
|||
// Show this tab only if there is visible common friend list
|
||||
$common = Model\GContact::countCommonFriends(local_user(), $contact['id']);
|
||||
if ($common) {
|
||||
$tabs[] = ['label' => L10n::t('Common Friends'),
|
||||
$tabs[] = ['label' => DI::l10n()->t('Common Friends'),
|
||||
'url' => "common/loc/" . local_user() . "/" . $contact['id'],
|
||||
'sel' => (($active_tab == 5) ? 'active' : ''),
|
||||
'title' => L10n::t('View all common friends'),
|
||||
'title' => DI::l10n()->t('View all common friends'),
|
||||
'id' => 'common-loc-tab',
|
||||
'accesskey' => 'd'
|
||||
];
|
||||
}
|
||||
|
||||
if (!empty($contact['uid'])) {
|
||||
$tabs[] = ['label' => L10n::t('Advanced'),
|
||||
$tabs[] = ['label' => DI::l10n()->t('Advanced'),
|
||||
'url' => 'crepair/' . $contact['id'],
|
||||
'sel' => (($active_tab == 6) ? 'active' : ''),
|
||||
'title' => L10n::t('Advanced Contact Settings'),
|
||||
'title' => DI::l10n()->t('Advanced Contact Settings'),
|
||||
'id' => 'advanced-tab',
|
||||
'accesskey' => 'r'
|
||||
];
|
||||
|
@ -986,17 +986,17 @@ class Contact extends BaseModule
|
|||
switch ($rr['rel']) {
|
||||
case Model\Contact::FRIEND:
|
||||
$dir_icon = 'images/lrarrow.gif';
|
||||
$alt_text = L10n::t('Mutual Friendship');
|
||||
$alt_text = DI::l10n()->t('Mutual Friendship');
|
||||
break;
|
||||
|
||||
case Model\Contact::FOLLOWER;
|
||||
$dir_icon = 'images/larrow.gif';
|
||||
$alt_text = L10n::t('is a fan of yours');
|
||||
$alt_text = DI::l10n()->t('is a fan of yours');
|
||||
break;
|
||||
|
||||
case Model\Contact::SHARING;
|
||||
$dir_icon = 'images/rarrow.gif';
|
||||
$alt_text = L10n::t('you are a fan of');
|
||||
$alt_text = DI::l10n()->t('you are a fan of');
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1014,22 +1014,22 @@ class Contact extends BaseModule
|
|||
|
||||
if ($rr['pending']) {
|
||||
if (in_array($rr['rel'], [Model\Contact::FRIEND, Model\Contact::SHARING])) {
|
||||
$alt_text = L10n::t('Pending outgoing contact request');
|
||||
$alt_text = DI::l10n()->t('Pending outgoing contact request');
|
||||
} else {
|
||||
$alt_text = L10n::t('Pending incoming contact request');
|
||||
$alt_text = DI::l10n()->t('Pending incoming contact request');
|
||||
}
|
||||
}
|
||||
|
||||
if ($rr['self']) {
|
||||
$dir_icon = 'images/larrow.gif';
|
||||
$alt_text = L10n::t('This is you');
|
||||
$alt_text = DI::l10n()->t('This is you');
|
||||
$url = $rr['url'];
|
||||
$sparkle = '';
|
||||
}
|
||||
|
||||
return [
|
||||
'img_hover' => L10n::t('Visit %s\'s profile [%s]', $rr['name'], $rr['url']),
|
||||
'edit_hover'=> L10n::t('Edit contact'),
|
||||
'img_hover' => DI::l10n()->t('Visit %s\'s profile [%s]', $rr['name'], $rr['url']),
|
||||
'edit_hover'=> DI::l10n()->t('Edit contact'),
|
||||
'photo_menu'=> Model\Contact::photoMenu($rr),
|
||||
'id' => $rr['id'],
|
||||
'alt_text' => $alt_text,
|
||||
|
@ -1062,7 +1062,7 @@ class Contact extends BaseModule
|
|||
// Provide friend suggestion only for Friendica contacts
|
||||
if ($contact['network'] === Protocol::DFRN) {
|
||||
$contact_actions['suggest'] = [
|
||||
'label' => L10n::t('Suggest friends'),
|
||||
'label' => DI::l10n()->t('Suggest friends'),
|
||||
'url' => 'fsuggest/' . $contact['id'],
|
||||
'title' => '',
|
||||
'sel' => '',
|
||||
|
@ -1072,7 +1072,7 @@ class Contact extends BaseModule
|
|||
|
||||
if ($poll_enabled) {
|
||||
$contact_actions['update'] = [
|
||||
'label' => L10n::t('Update now'),
|
||||
'label' => DI::l10n()->t('Update now'),
|
||||
'url' => 'contact/' . $contact['id'] . '/update',
|
||||
'title' => '',
|
||||
'sel' => '',
|
||||
|
@ -1081,34 +1081,34 @@ class Contact extends BaseModule
|
|||
}
|
||||
|
||||
$contact_actions['block'] = [
|
||||
'label' => (intval($contact['blocked']) ? L10n::t('Unblock') : L10n::t('Block')),
|
||||
'label' => (intval($contact['blocked']) ? DI::l10n()->t('Unblock') : DI::l10n()->t('Block')),
|
||||
'url' => 'contact/' . $contact['id'] . '/block',
|
||||
'title' => L10n::t('Toggle Blocked status'),
|
||||
'title' => DI::l10n()->t('Toggle Blocked status'),
|
||||
'sel' => (intval($contact['blocked']) ? 'active' : ''),
|
||||
'id' => 'toggle-block',
|
||||
];
|
||||
|
||||
$contact_actions['ignore'] = [
|
||||
'label' => (intval($contact['readonly']) ? L10n::t('Unignore') : L10n::t('Ignore')),
|
||||
'label' => (intval($contact['readonly']) ? DI::l10n()->t('Unignore') : DI::l10n()->t('Ignore')),
|
||||
'url' => 'contact/' . $contact['id'] . '/ignore',
|
||||
'title' => L10n::t('Toggle Ignored status'),
|
||||
'title' => DI::l10n()->t('Toggle Ignored status'),
|
||||
'sel' => (intval($contact['readonly']) ? 'active' : ''),
|
||||
'id' => 'toggle-ignore',
|
||||
];
|
||||
|
||||
if ($contact['uid'] != 0) {
|
||||
$contact_actions['archive'] = [
|
||||
'label' => (intval($contact['archive']) ? L10n::t('Unarchive') : L10n::t('Archive')),
|
||||
'label' => (intval($contact['archive']) ? DI::l10n()->t('Unarchive') : DI::l10n()->t('Archive')),
|
||||
'url' => 'contact/' . $contact['id'] . '/archive',
|
||||
'title' => L10n::t('Toggle Archive status'),
|
||||
'title' => DI::l10n()->t('Toggle Archive status'),
|
||||
'sel' => (intval($contact['archive']) ? 'active' : ''),
|
||||
'id' => 'toggle-archive',
|
||||
];
|
||||
|
||||
$contact_actions['delete'] = [
|
||||
'label' => L10n::t('Delete'),
|
||||
'label' => DI::l10n()->t('Delete'),
|
||||
'url' => 'contact/' . $contact['id'] . '/drop',
|
||||
'title' => L10n::t('Delete contact'),
|
||||
'title' => DI::l10n()->t('Delete contact'),
|
||||
'sel' => '',
|
||||
'id' => 'delete',
|
||||
];
|
||||
|
|
|
@ -22,8 +22,8 @@ class Credits extends BaseModule
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('credits.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$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!'),
|
||||
'$title' => DI::l10n()->t('Credits'),
|
||||
'$thanks' => DI::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,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -29,58 +29,58 @@ class Babel extends BaseModule
|
|||
case 'bbcode':
|
||||
$bbcode = trim($_REQUEST['text']);
|
||||
$results[] = [
|
||||
'title' => L10n::t('Source input'),
|
||||
'title' => DI::l10n()->t('Source input'),
|
||||
'content' => visible_whitespace($bbcode)
|
||||
];
|
||||
|
||||
$plain = Text\BBCode::toPlaintext($bbcode, false);
|
||||
$results[] = [
|
||||
'title' => L10n::t('BBCode::toPlaintext'),
|
||||
'title' => DI::l10n()->t('BBCode::toPlaintext'),
|
||||
'content' => visible_whitespace($plain)
|
||||
];
|
||||
|
||||
$html = Text\BBCode::convert($bbcode);
|
||||
$results[] = [
|
||||
'title' => L10n::t('BBCode::convert (raw HTML)'),
|
||||
'title' => DI::l10n()->t('BBCode::convert (raw HTML)'),
|
||||
'content' => visible_whitespace(htmlspecialchars($html))
|
||||
];
|
||||
|
||||
$results[] = [
|
||||
'title' => L10n::t('BBCode::convert'),
|
||||
'title' => DI::l10n()->t('BBCode::convert'),
|
||||
'content' => $html
|
||||
];
|
||||
|
||||
$bbcode2 = Text\HTML::toBBCode($html);
|
||||
$results[] = [
|
||||
'title' => L10n::t('BBCode::convert => HTML::toBBCode'),
|
||||
'title' => DI::l10n()->t('BBCode::convert => HTML::toBBCode'),
|
||||
'content' => visible_whitespace($bbcode2)
|
||||
];
|
||||
|
||||
$markdown = Text\BBCode::toMarkdown($bbcode);
|
||||
$results[] = [
|
||||
'title' => L10n::t('BBCode::toMarkdown'),
|
||||
'title' => DI::l10n()->t('BBCode::toMarkdown'),
|
||||
'content' => visible_whitespace(htmlspecialchars($markdown))
|
||||
];
|
||||
|
||||
$html2 = Text\Markdown::convert($markdown);
|
||||
$results[] = [
|
||||
'title' => L10n::t('BBCode::toMarkdown => Markdown::convert (raw HTML)'),
|
||||
'title' => DI::l10n()->t('BBCode::toMarkdown => Markdown::convert (raw HTML)'),
|
||||
'content' => visible_whitespace(htmlspecialchars($html2))
|
||||
];
|
||||
$results[] = [
|
||||
'title' => L10n::t('BBCode::toMarkdown => Markdown::convert'),
|
||||
'title' => DI::l10n()->t('BBCode::toMarkdown => Markdown::convert'),
|
||||
'content' => $html2
|
||||
];
|
||||
|
||||
$bbcode3 = Text\Markdown::toBBCode($markdown);
|
||||
$results[] = [
|
||||
'title' => L10n::t('BBCode::toMarkdown => Markdown::toBBCode'),
|
||||
'title' => DI::l10n()->t('BBCode::toMarkdown => Markdown::toBBCode'),
|
||||
'content' => visible_whitespace($bbcode3)
|
||||
];
|
||||
|
||||
$bbcode4 = Text\HTML::toBBCode($html2);
|
||||
$results[] = [
|
||||
'title' => L10n::t('BBCode::toMarkdown => Markdown::convert => HTML::toBBCode'),
|
||||
'title' => DI::l10n()->t('BBCode::toMarkdown => Markdown::convert => HTML::toBBCode'),
|
||||
'content' => visible_whitespace($bbcode4)
|
||||
];
|
||||
|
||||
|
@ -91,88 +91,88 @@ class Babel extends BaseModule
|
|||
|
||||
Item::setHashtags($item);
|
||||
$results[] = [
|
||||
'title' => L10n::t('Item Body'),
|
||||
'title' => DI::l10n()->t('Item Body'),
|
||||
'content' => visible_whitespace($item['body'])
|
||||
];
|
||||
$results[] = [
|
||||
'title' => L10n::t('Item Tags'),
|
||||
'title' => DI::l10n()->t('Item Tags'),
|
||||
'content' => $item['tag']
|
||||
];
|
||||
break;
|
||||
case 'markdown':
|
||||
$markdown = trim($_REQUEST['text']);
|
||||
$results[] = [
|
||||
'title' => L10n::t('Source input (Diaspora format)'),
|
||||
'title' => DI::l10n()->t('Source input (Diaspora format)'),
|
||||
'content' => '<pre>' . htmlspecialchars($markdown) . '</pre>'
|
||||
];
|
||||
|
||||
$html = Text\Markdown::convert(html_entity_decode($markdown,ENT_COMPAT, 'UTF-8'));
|
||||
$results[] = [
|
||||
'title' => L10n::t('Markdown::convert (raw HTML)'),
|
||||
'title' => DI::l10n()->t('Markdown::convert (raw HTML)'),
|
||||
'content' => visible_whitespace(htmlspecialchars($html))
|
||||
];
|
||||
|
||||
$results[] = [
|
||||
'title' => L10n::t('Markdown::convert'),
|
||||
'title' => DI::l10n()->t('Markdown::convert'),
|
||||
'content' => $html
|
||||
];
|
||||
|
||||
$bbcode = Text\Markdown::toBBCode(XML::unescape($markdown));
|
||||
$results[] = [
|
||||
'title' => L10n::t('Markdown::toBBCode'),
|
||||
'title' => DI::l10n()->t('Markdown::toBBCode'),
|
||||
'content' => '<pre>' . $bbcode . '</pre>'
|
||||
];
|
||||
break;
|
||||
case 'html' :
|
||||
$html = trim($_REQUEST['text']);
|
||||
$results[] = [
|
||||
'title' => L10n::t('Raw HTML input'),
|
||||
'title' => DI::l10n()->t('Raw HTML input'),
|
||||
'content' => htmlspecialchars($html)
|
||||
];
|
||||
|
||||
$results[] = [
|
||||
'title' => L10n::t('HTML Input'),
|
||||
'title' => DI::l10n()->t('HTML Input'),
|
||||
'content' => $html
|
||||
];
|
||||
|
||||
$bbcode = Text\HTML::toBBCode($html);
|
||||
$results[] = [
|
||||
'title' => L10n::t('HTML::toBBCode'),
|
||||
'title' => DI::l10n()->t('HTML::toBBCode'),
|
||||
'content' => visible_whitespace($bbcode)
|
||||
];
|
||||
|
||||
$html2 = Text\BBCode::convert($bbcode);
|
||||
$results[] = [
|
||||
'title' => L10n::t('HTML::toBBCode => BBCode::convert'),
|
||||
'title' => DI::l10n()->t('HTML::toBBCode => BBCode::convert'),
|
||||
'content' => $html2
|
||||
];
|
||||
|
||||
$results[] = [
|
||||
'title' => L10n::t('HTML::toBBCode => BBCode::convert (raw HTML)'),
|
||||
'title' => DI::l10n()->t('HTML::toBBCode => BBCode::convert (raw HTML)'),
|
||||
'content' => htmlspecialchars($html2)
|
||||
];
|
||||
|
||||
$bbcode2plain = Text\BBCode::toPlaintext($bbcode);
|
||||
$results[] = [
|
||||
'title' => L10n::t('HTML::toBBCode => BBCode::toPlaintext'),
|
||||
'title' => DI::l10n()->t('HTML::toBBCode => BBCode::toPlaintext'),
|
||||
'content' => '<pre>' . $bbcode2plain . '</pre>'
|
||||
];
|
||||
|
||||
$markdown = Text\HTML::toMarkdown($html);
|
||||
$results[] = [
|
||||
'title' => L10n::t('HTML::toMarkdown'),
|
||||
'title' => DI::l10n()->t('HTML::toMarkdown'),
|
||||
'content' => visible_whitespace($markdown)
|
||||
];
|
||||
|
||||
$text = Text\HTML::toPlaintext($html, 0);
|
||||
$results[] = [
|
||||
'title' => L10n::t('HTML::toPlaintext'),
|
||||
'title' => DI::l10n()->t('HTML::toPlaintext'),
|
||||
'content' => '<pre>' . $text . '</pre>'
|
||||
];
|
||||
|
||||
$text = Text\HTML::toPlaintext($html, 0, true);
|
||||
$results[] = [
|
||||
'title' => L10n::t('HTML::toPlaintext (compact)'),
|
||||
'title' => DI::l10n()->t('HTML::toPlaintext (compact)'),
|
||||
'content' => '<pre>' . $text . '</pre>'
|
||||
];
|
||||
}
|
||||
|
@ -180,10 +180,10 @@ class Babel extends BaseModule
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('babel.tpl');
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$text' => ['text', L10n::t('Source text'), $_REQUEST['text'] ?? '', ''],
|
||||
'$type_bbcode' => ['type', L10n::t('BBCode'), 'bbcode', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'bbcode'],
|
||||
'$type_markdown' => ['type', L10n::t('Markdown'), 'markdown', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'markdown'],
|
||||
'$type_html' => ['type', L10n::t('HTML'), 'html', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'html'],
|
||||
'$text' => ['text', DI::l10n()->t('Source text'), $_REQUEST['text'] ?? '', ''],
|
||||
'$type_bbcode' => ['type', DI::l10n()->t('BBCode'), 'bbcode', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'bbcode'],
|
||||
'$type_markdown' => ['type', DI::l10n()->t('Markdown'), 'markdown', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'markdown'],
|
||||
'$type_html' => ['type', DI::l10n()->t('HTML'), 'html', '', (($_REQUEST['type'] ?? '') ?: 'bbcode') == 'html'],
|
||||
'$results' => $results
|
||||
]);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ class Feed extends BaseModule
|
|||
public static function init(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
info(L10n::t('You must be logged in to use this module'));
|
||||
info(DI::l10n()->t('You must be logged in to use this module'));
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class Feed extends BaseModule
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('feedtest.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$url' => ['url', L10n::t('Source URL'), $_REQUEST['url'] ?? '', ''],
|
||||
'$url' => ['url', DI::l10n()->t('Source URL'), $_REQUEST['url'] ?? '', ''],
|
||||
'$result' => $result
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ class ItemBody extends BaseModule
|
|||
public static function content(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
throw new HTTPException\UnauthorizedException(L10n::t('Access denied.'));
|
||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('Access denied.'));
|
||||
}
|
||||
|
||||
$app = DI::app();
|
||||
|
@ -25,7 +25,7 @@ class ItemBody extends BaseModule
|
|||
$itemId = (($app->argc > 1) ? intval($app->argv[1]) : 0);
|
||||
|
||||
if (!$itemId) {
|
||||
throw new HTTPException\NotFoundException(L10n::t('Item not found.'));
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('Item not found.'));
|
||||
}
|
||||
|
||||
$item = Item::selectFirst(['body'], ['uid' => local_user(), 'id' => $itemId]);
|
||||
|
@ -38,7 +38,7 @@ class ItemBody extends BaseModule
|
|||
return str_replace("\n", '<br />', $item['body']);
|
||||
}
|
||||
} else {
|
||||
throw new HTTPException\NotFoundException(L10n::t('Item not found.'));
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('Item not found.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class Localtime extends BaseModule
|
|||
{
|
||||
$time = ($_REQUEST['time'] ?? '') ?: 'now';
|
||||
|
||||
$bd_format = L10n::t('l F d, Y \@ g:i A');
|
||||
$bd_format = DI::l10n()->t('l F d, Y \@ g:i A');
|
||||
|
||||
if (!empty($_POST['timezone'])) {
|
||||
DI::app()->data['mod-localtime'] = DateTimeFormat::convert($time, $_POST['timezone'], 'UTC', $bd_format);
|
||||
|
@ -28,22 +28,22 @@ class Localtime extends BaseModule
|
|||
|
||||
$time = ($_REQUEST['time'] ?? '') ?: 'now';
|
||||
|
||||
$output = '<h3>' . L10n::t('Time Conversion') . '</h3>';
|
||||
$output .= '<p>' . L10n::t('Friendica provides this service for sharing events with other networks and friends in unknown timezones.') . '</p>';
|
||||
$output .= '<p>' . L10n::t('UTC time: %s', $time) . '</p>';
|
||||
$output = '<h3>' . DI::l10n()->t('Time Conversion') . '</h3>';
|
||||
$output .= '<p>' . DI::l10n()->t('Friendica provides this service for sharing events with other networks and friends in unknown timezones.') . '</p>';
|
||||
$output .= '<p>' . DI::l10n()->t('UTC time: %s', $time) . '</p>';
|
||||
|
||||
if (!empty($_REQUEST['timezone'])) {
|
||||
$output .= '<p>' . L10n::t('Current timezone: %s', $_REQUEST['timezone']) . '</p>';
|
||||
$output .= '<p>' . DI::l10n()->t('Current timezone: %s', $_REQUEST['timezone']) . '</p>';
|
||||
}
|
||||
|
||||
if (!empty($app->data['mod-localtime'])) {
|
||||
$output .= '<p>' . L10n::t('Converted localtime: %s', $app->data['mod-localtime']) . '</p>';
|
||||
$output .= '<p>' . DI::l10n()->t('Converted localtime: %s', $app->data['mod-localtime']) . '</p>';
|
||||
}
|
||||
|
||||
$output .= '<form action ="' . DI::baseUrl()->get() . '/localtime?time=' . $time . '" method="post" >';
|
||||
$output .= '<p>' . L10n::t('Please select your timezone:') . '</p>';
|
||||
$output .= '<p>' . DI::l10n()->t('Please select your timezone:') . '</p>';
|
||||
$output .= Temporal::getTimezoneSelect(($_REQUEST['timezone'] ?? '') ?: Installer::DEFAULT_TZ);
|
||||
$output .= '<input type="submit" name="submit" value="' . L10n::t('Submit') . '" /></form>';
|
||||
$output .= '<input type="submit" name="submit" value="' . DI::l10n()->t('Submit') . '" /></form>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ class Probe extends BaseModule
|
|||
public static function content(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
$e = new HTTPException\ForbiddenException(L10n::t('Only logged in users are permitted to perform a probing.'));
|
||||
$e->httpdesc = L10n::t('Public access denied.');
|
||||
$e = new HTTPException\ForbiddenException(DI::l10n()->t('Only logged in users are permitted to perform a probing.'));
|
||||
$e->httpdesc = DI::l10n()->t('Public access denied.');
|
||||
throw $e;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ class Probe extends BaseModule
|
|||
$tpl = Renderer::getMarkupTemplate('probe.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$addr' => ['addr',
|
||||
L10n::t('Lookup address'),
|
||||
DI::l10n()->t('Lookup address'),
|
||||
$addr,
|
||||
'',
|
||||
'required'
|
||||
|
|
|
@ -15,8 +15,8 @@ class WebFinger extends BaseModule
|
|||
public static function content(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
$e = new \Friendica\Network\HTTPException\ForbiddenException(L10n::t('Only logged in users are permitted to perform a probing.'));
|
||||
$e->httpdesc = L10n::t('Public access denied.');
|
||||
$e = new \Friendica\Network\HTTPException\ForbiddenException(DI::l10n()->t('Only logged in users are permitted to perform a probing.'));
|
||||
$e->httpdesc = DI::l10n()->t('Public access denied.');
|
||||
throw $e;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ class Delegation extends BaseModule
|
|||
public static function content(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
throw new ForbiddenException(L10n::t('Permission denied.'));
|
||||
throw new ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
|
||||
$identities = DI::app()->identities;
|
||||
|
@ -125,11 +125,11 @@ class Delegation extends BaseModule
|
|||
}
|
||||
|
||||
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('delegation.tpl'), [
|
||||
'$title' => L10n::t('Manage Identities and/or Pages'),
|
||||
'$desc' => L10n::t('Toggle between different identities or community/group pages which share your account details or which you have been granted "manage" permissions'),
|
||||
'$choose' => L10n::t('Select an identity to manage: '),
|
||||
'$title' => DI::l10n()->t('Manage Identities and/or Pages'),
|
||||
'$desc' => DI::l10n()->t('Toggle between different identities or community/group pages which share your account details or which you have been granted "manage" permissions'),
|
||||
'$choose' => DI::l10n()->t('Select an identity to manage: '),
|
||||
'$identities' => $identities,
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$submit' => DI::l10n()->t('Submit'),
|
||||
]);
|
||||
|
||||
return $o;
|
||||
|
|
|
@ -29,7 +29,7 @@ class Directory extends BaseModule
|
|||
|
||||
if (($config->get('system', 'block_public') && !Session::isAuthenticated()) ||
|
||||
($config->get('system', 'block_local_dir') && !Session::isAuthenticated())) {
|
||||
throw new HTTPException\ForbiddenException(L10n::t('Public access denied.'));
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Public access denied.'));
|
||||
}
|
||||
|
||||
if (local_user()) {
|
||||
|
@ -57,7 +57,7 @@ class Directory extends BaseModule
|
|||
$profiles = Profile::searchProfiles($pager->getStart(), $pager->getItemsPerPage(), $search);
|
||||
|
||||
if ($profiles['total'] === 0) {
|
||||
info(L10n::t('No entries (some entries may be hidden).') . EOL);
|
||||
info(DI::l10n()->t('No entries (some entries may be hidden).') . EOL);
|
||||
} else {
|
||||
if (in_array('small', $app->argv)) {
|
||||
$photo = 'thumb';
|
||||
|
@ -74,15 +74,15 @@ class Directory extends BaseModule
|
|||
|
||||
$output .= Renderer::replaceMacros($tpl, [
|
||||
'$search' => $search,
|
||||
'$globaldir' => L10n::t('Global Directory'),
|
||||
'$globaldir' => DI::l10n()->t('Global Directory'),
|
||||
'$gDirPath' => $gDirPath,
|
||||
'$desc' => L10n::t('Find on this site'),
|
||||
'$desc' => DI::l10n()->t('Find on this site'),
|
||||
'$contacts' => $entries,
|
||||
'$finding' => L10n::t('Results for:'),
|
||||
'$finding' => DI::l10n()->t('Results for:'),
|
||||
'$findterm' => (strlen($search) ? $search : ""),
|
||||
'$title' => L10n::t('Site Directory'),
|
||||
'$title' => DI::l10n()->t('Site Directory'),
|
||||
'$search_mod' => 'directory',
|
||||
'$submit' => L10n::t('Find'),
|
||||
'$submit' => DI::l10n()->t('Find'),
|
||||
'$paginate' => $pager->renderFull($profiles['total']),
|
||||
]);
|
||||
|
||||
|
@ -133,20 +133,20 @@ class Directory extends BaseModule
|
|||
|| !empty($profile['postal-code'])
|
||||
|| !empty($profile['country-name'])
|
||||
) {
|
||||
$location = L10n::t('Location:');
|
||||
$location = DI::l10n()->t('Location:');
|
||||
} else {
|
||||
$location = '';
|
||||
}
|
||||
|
||||
$gender = (!empty($profile['gender']) ? L10n::t('Gender:') : false);
|
||||
$marital = (!empty($profile['marital']) ? L10n::t('Status:') : false);
|
||||
$homepage = (!empty($profile['homepage']) ? L10n::t('Homepage:') : false);
|
||||
$about = (!empty($profile['about']) ? L10n::t('About:') : false);
|
||||
$gender = (!empty($profile['gender']) ? DI::l10n()->t('Gender:') : false);
|
||||
$marital = (!empty($profile['marital']) ? DI::l10n()->t('Status:') : false);
|
||||
$homepage = (!empty($profile['homepage']) ? DI::l10n()->t('Homepage:') : false);
|
||||
$about = (!empty($profile['about']) ? DI::l10n()->t('About:') : false);
|
||||
|
||||
$location_e = $location;
|
||||
|
||||
$photo_menu = [
|
||||
'profile' => [L10n::t("View Profile"), Contact::magicLink($profile_link)]
|
||||
'profile' => [DI::l10n()->t("View Profile"), Contact::magicLink($profile_link)]
|
||||
];
|
||||
|
||||
$entry = [
|
||||
|
|
|
@ -17,7 +17,7 @@ class SaveTag extends BaseModule
|
|||
public static function init(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
info(L10n::t('You must be logged in to use this module'));
|
||||
info(DI::l10n()->t('You must be logged in to use this module'));
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ class SaveTag extends BaseModule
|
|||
if ($item_id && strlen($term)) {
|
||||
// file item
|
||||
Model\FileTag::saveFile(local_user(), $item_id, $term);
|
||||
info(L10n::t('Filetag %s saved to item', $term));
|
||||
info(DI::l10n()->t('Filetag %s saved to item', $term));
|
||||
}
|
||||
|
||||
// return filer dialog
|
||||
|
@ -45,8 +45,8 @@ class SaveTag extends BaseModule
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate("filer_dialog.tpl");
|
||||
echo Renderer::replaceMacros($tpl, [
|
||||
'$field' => ['term', L10n::t("Save to Folder:"), '', '', $filetags, L10n::t('- select -')],
|
||||
'$submit' => L10n::t('Save'),
|
||||
'$field' => ['term', DI::l10n()->t("Save to Folder:"), '', '', $filetags, DI::l10n()->t('- select -')],
|
||||
'$submit' => DI::l10n()->t('Save'),
|
||||
]);
|
||||
|
||||
exit;
|
||||
|
|
|
@ -15,7 +15,7 @@ class FollowConfirm extends BaseModule
|
|||
{
|
||||
$uid = local_user();
|
||||
if (!$uid) {
|
||||
notice(L10n::t('Permission denied.') . EOL);
|
||||
notice(DI::l10n()->t('Permission denied.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,27 +37,27 @@ class Friendica extends BaseModule
|
|||
}
|
||||
}
|
||||
$addon = [
|
||||
'title' => L10n::t('Installed addons/apps:'),
|
||||
'title' => DI::l10n()->t('Installed addons/apps:'),
|
||||
'list' => $sortedAddonList,
|
||||
];
|
||||
} else {
|
||||
$addon = [
|
||||
'title' => L10n::t('No installed addons/apps'),
|
||||
'title' => DI::l10n()->t('No installed addons/apps'),
|
||||
];
|
||||
}
|
||||
|
||||
$tos = ($config->get('system', 'tosdisplay')) ?
|
||||
L10n::t('Read about the <a href="%1$s/tos">Terms of Service</a> of this node.', DI::baseUrl()->get()) :
|
||||
DI::l10n()->t('Read about the <a href="%1$s/tos">Terms of Service</a> of this node.', DI::baseUrl()->get()) :
|
||||
'';
|
||||
|
||||
$blockList = $config->get('system', 'blocklist');
|
||||
|
||||
if (!empty($blockList)) {
|
||||
$blocked = [
|
||||
'title' => L10n::t('On this server the following remote servers are blocked.'),
|
||||
'title' => DI::l10n()->t('On this server the following remote servers are blocked.'),
|
||||
'header' => [
|
||||
L10n::t('Blocked domain'),
|
||||
L10n::t('Reason for the block'),
|
||||
DI::l10n()->t('Blocked domain'),
|
||||
DI::l10n()->t('Reason for the block'),
|
||||
],
|
||||
'list' => $blockList,
|
||||
];
|
||||
|
@ -72,14 +72,14 @@ class Friendica extends BaseModule
|
|||
$tpl = Renderer::getMarkupTemplate('friendica.tpl');
|
||||
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'about' => L10n::t('This is Friendica, version %s that is running at the web location %s. The database version is %s, the post update version is %s.',
|
||||
'about' => DI::l10n()->t('This is Friendica, version %s that is running at the web location %s. The database version is %s, the post update version is %s.',
|
||||
'<strong>' . FRIENDICA_VERSION . '</strong>',
|
||||
DI::baseUrl()->get(),
|
||||
'<strong>' . DB_UPDATE_VERSION . '</strong>',
|
||||
'<strong>' . $config->get('system', 'post_update_version') . '</strong>'),
|
||||
'friendica' => L10n::t('Please visit <a href="https://friendi.ca">Friendi.ca</a> to learn more about the Friendica project.'),
|
||||
'bugs' => L10n::t('Bug reports and issues: please visit') . ' ' . '<a href="https://github.com/friendica/friendica/issues?state=open">' . L10n::t('the bugtracker at github') . '</a>',
|
||||
'info' => L10n::t('Suggestions, praise, etc. - please email "info" at "friendi - dot - ca'),
|
||||
'friendica' => DI::l10n()->t('Please visit <a href="https://friendi.ca">Friendi.ca</a> to learn more about the Friendica project.'),
|
||||
'bugs' => DI::l10n()->t('Bug reports and issues: please visit') . ' ' . '<a href="https://github.com/friendica/friendica/issues?state=open">' . DI::l10n()->t('the bugtracker at github') . '</a>',
|
||||
'info' => DI::l10n()->t('Suggestions, praise, etc. - please email "info" at "friendi - dot - ca'),
|
||||
|
||||
'visible_addons' => $addon,
|
||||
'tos' => $tos,
|
||||
|
|
|
@ -28,7 +28,7 @@ class Group extends BaseModule
|
|||
}
|
||||
|
||||
if (!local_user()) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
|
||||
|
@ -39,13 +39,13 @@ class Group extends BaseModule
|
|||
$name = Strings::escapeTags(trim($_POST['groupname']));
|
||||
$r = Model\Group::create(local_user(), $name);
|
||||
if ($r) {
|
||||
info(L10n::t('Group created.'));
|
||||
info(DI::l10n()->t('Group created.'));
|
||||
$r = Model\Group::getIdByName(local_user(), $name);
|
||||
if ($r) {
|
||||
DI::baseUrl()->redirect('group/' . $r);
|
||||
}
|
||||
} else {
|
||||
notice(L10n::t('Could not create group.'));
|
||||
notice(DI::l10n()->t('Could not create group.'));
|
||||
}
|
||||
DI::baseUrl()->redirect('group');
|
||||
}
|
||||
|
@ -56,13 +56,13 @@ class Group extends BaseModule
|
|||
|
||||
$group = DBA::selectFirst('group', ['id', 'name'], ['id' => $a->argv[1], 'uid' => local_user()]);
|
||||
if (!DBA::isResult($group)) {
|
||||
notice(L10n::t('Group not found.'));
|
||||
notice(DI::l10n()->t('Group not found.'));
|
||||
DI::baseUrl()->redirect('contact');
|
||||
}
|
||||
$groupname = Strings::escapeTags(trim($_POST['groupname']));
|
||||
if (strlen($groupname) && ($groupname != $group['name'])) {
|
||||
if (Model\Group::update($group['id'], $groupname)) {
|
||||
info(L10n::t('Group name changed.'));
|
||||
info(DI::l10n()->t('Group name changed.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ class Group extends BaseModule
|
|||
$a = DI::app();
|
||||
|
||||
if (!local_user()) {
|
||||
throw new \Exception(L10n::t('Permission denied.'), 403);
|
||||
throw new \Exception(DI::l10n()->t('Permission denied.'), 403);
|
||||
}
|
||||
|
||||
// POST /group/123/add/123
|
||||
|
@ -84,38 +84,38 @@ class Group extends BaseModule
|
|||
list($group_id, $command, $contact_id) = array_slice($a->argv, 1);
|
||||
|
||||
if (!Model\Group::exists($group_id, local_user())) {
|
||||
throw new \Exception(L10n::t('Unknown group.'), 404);
|
||||
throw new \Exception(DI::l10n()->t('Unknown group.'), 404);
|
||||
}
|
||||
|
||||
$contact = DBA::selectFirst('contact', ['deleted'], ['id' => $contact_id, 'uid' => local_user()]);
|
||||
if (!DBA::isResult($contact)) {
|
||||
throw new \Exception(L10n::t('Contact not found.'), 404);
|
||||
throw new \Exception(DI::l10n()->t('Contact not found.'), 404);
|
||||
}
|
||||
|
||||
if ($contact['deleted']) {
|
||||
throw new \Exception(L10n::t('Contact is deleted.'), 410);
|
||||
throw new \Exception(DI::l10n()->t('Contact is deleted.'), 410);
|
||||
}
|
||||
|
||||
switch($command) {
|
||||
case 'add':
|
||||
if (!Model\Group::addMember($group_id, $contact_id)) {
|
||||
throw new \Exception(L10n::t('Unable to add the contact to the group.'), 500);
|
||||
throw new \Exception(DI::l10n()->t('Unable to add the contact to the group.'), 500);
|
||||
}
|
||||
|
||||
$message = L10n::t('Contact successfully added to group.');
|
||||
$message = DI::l10n()->t('Contact successfully added to group.');
|
||||
break;
|
||||
case 'remove':
|
||||
if (!Model\Group::removeMember($group_id, $contact_id)) {
|
||||
throw new \Exception(L10n::t('Unable to remove the contact from the group.'), 500);
|
||||
throw new \Exception(DI::l10n()->t('Unable to remove the contact from the group.'), 500);
|
||||
}
|
||||
|
||||
$message = L10n::t('Contact successfully removed from group.');
|
||||
$message = DI::l10n()->t('Contact successfully removed from group.');
|
||||
break;
|
||||
default:
|
||||
throw new \Exception(L10n::t('Unknown group command.'), 400);
|
||||
throw new \Exception(DI::l10n()->t('Unknown group command.'), 400);
|
||||
}
|
||||
} else {
|
||||
throw new \Exception(L10n::t('Bad request.'), 400);
|
||||
throw new \Exception(DI::l10n()->t('Bad request.'), 400);
|
||||
}
|
||||
|
||||
notice($message);
|
||||
|
@ -154,15 +154,15 @@ class Group extends BaseModule
|
|||
|
||||
|
||||
$context = [
|
||||
'$submit' => L10n::t('Save Group'),
|
||||
'$submit_filter' => L10n::t('Filter'),
|
||||
'$submit' => DI::l10n()->t('Save Group'),
|
||||
'$submit_filter' => DI::l10n()->t('Filter'),
|
||||
];
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
if (($a->argc == 2) && ($a->argv[1] === 'new')) {
|
||||
return Renderer::replaceMacros($tpl, $context + [
|
||||
'$title' => L10n::t('Create a group of contacts/friends.'),
|
||||
'$gname' => ['groupname', L10n::t('Group Name: '), '', ''],
|
||||
'$title' => DI::l10n()->t('Create a group of contacts/friends.'),
|
||||
'$gname' => ['groupname', DI::l10n()->t('Group Name: '), '', ''],
|
||||
'$gid' => 'new',
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken("group_edit"),
|
||||
]);
|
||||
|
@ -177,7 +177,7 @@ class Group extends BaseModule
|
|||
$nogroup = true;
|
||||
$group = [
|
||||
'id' => $id,
|
||||
'name' => L10n::t('Contacts not in any group'),
|
||||
'name' => DI::l10n()->t('Contacts not in any group'),
|
||||
];
|
||||
|
||||
$members = [];
|
||||
|
@ -185,7 +185,7 @@ class Group extends BaseModule
|
|||
|
||||
$context = $context + [
|
||||
'$title' => $group['name'],
|
||||
'$gname' => ['groupname', L10n::t('Group Name: '), $group['name'], ''],
|
||||
'$gname' => ['groupname', DI::l10n()->t('Group Name: '), $group['name'], ''],
|
||||
'$gid' => $id,
|
||||
'$editable' => 0,
|
||||
];
|
||||
|
@ -198,14 +198,14 @@ class Group extends BaseModule
|
|||
// @TODO: Replace with parameter from router
|
||||
if (intval($a->argv[2])) {
|
||||
if (!Model\Group::exists($a->argv[2], local_user())) {
|
||||
notice(L10n::t('Group not found.'));
|
||||
notice(DI::l10n()->t('Group not found.'));
|
||||
DI::baseUrl()->redirect('contact');
|
||||
}
|
||||
|
||||
if (Model\Group::remove($a->argv[2])) {
|
||||
info(L10n::t('Group removed.'));
|
||||
info(DI::l10n()->t('Group removed.'));
|
||||
} else {
|
||||
notice(L10n::t('Unable to remove group.'));
|
||||
notice(DI::l10n()->t('Unable to remove group.'));
|
||||
}
|
||||
}
|
||||
DI::baseUrl()->redirect('group');
|
||||
|
@ -224,7 +224,7 @@ class Group extends BaseModule
|
|||
if (($a->argc > 1) && intval($a->argv[1])) {
|
||||
$group = DBA::selectFirst('group', ['id', 'name'], ['id' => $a->argv[1], 'uid' => local_user(), 'deleted' => false]);
|
||||
if (!DBA::isResult($group)) {
|
||||
notice(L10n::t('Group not found.'));
|
||||
notice(DI::l10n()->t('Group not found.'));
|
||||
DI::baseUrl()->redirect('contact');
|
||||
}
|
||||
|
||||
|
@ -256,17 +256,17 @@ class Group extends BaseModule
|
|||
$drop_tpl = Renderer::getMarkupTemplate('group_drop.tpl');
|
||||
$drop_txt = Renderer::replaceMacros($drop_tpl, [
|
||||
'$id' => $group['id'],
|
||||
'$delete' => L10n::t('Delete Group'),
|
||||
'$delete' => DI::l10n()->t('Delete Group'),
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken("group_drop"),
|
||||
]);
|
||||
|
||||
$context = $context + [
|
||||
'$title' => $group['name'],
|
||||
'$gname' => ['groupname', L10n::t('Group Name: '), $group['name'], ''],
|
||||
'$gname' => ['groupname', DI::l10n()->t('Group Name: '), $group['name'], ''],
|
||||
'$gid' => $group['id'],
|
||||
'$drop' => $drop_txt,
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken('group_edit'),
|
||||
'$edit_name' => L10n::t('Edit Group Name'),
|
||||
'$edit_name' => DI::l10n()->t('Edit Group Name'),
|
||||
'$editable' => 1,
|
||||
];
|
||||
}
|
||||
|
@ -276,10 +276,10 @@ class Group extends BaseModule
|
|||
}
|
||||
|
||||
$groupeditor = [
|
||||
'label_members' => L10n::t('Members'),
|
||||
'label_members' => DI::l10n()->t('Members'),
|
||||
'members' => [],
|
||||
'label_contacts' => L10n::t('All Contacts'),
|
||||
'group_is_empty' => L10n::t('Group is empty'),
|
||||
'label_contacts' => DI::l10n()->t('All Contacts'),
|
||||
'group_is_empty' => DI::l10n()->t('Group is empty'),
|
||||
'contacts' => [],
|
||||
];
|
||||
|
||||
|
@ -292,7 +292,7 @@ class Group extends BaseModule
|
|||
$entry['label'] = 'members';
|
||||
$entry['photo_menu'] = '';
|
||||
$entry['change_member'] = [
|
||||
'title' => L10n::t("Remove contact from group"),
|
||||
'title' => DI::l10n()->t("Remove contact from group"),
|
||||
'gid' => $group['id'],
|
||||
'cid' => $member['id'],
|
||||
'sec_token' => $sec_token
|
||||
|
@ -312,7 +312,7 @@ class Group extends BaseModule
|
|||
['order' => ['name']]
|
||||
);
|
||||
$contacts = DBA::toArray($contacts_stmt);
|
||||
$context['$desc'] = L10n::t('Click on a contact to add or remove.');
|
||||
$context['$desc'] = DI::l10n()->t('Click on a contact to add or remove.');
|
||||
}
|
||||
|
||||
if (DBA::isResult($contacts)) {
|
||||
|
@ -326,7 +326,7 @@ class Group extends BaseModule
|
|||
|
||||
if (!$nogroup) {
|
||||
$entry['change_member'] = [
|
||||
'title' => L10n::t("Add contact to group"),
|
||||
'title' => DI::l10n()->t("Add contact to group"),
|
||||
'gid' => $group['id'],
|
||||
'cid' => $member['id'],
|
||||
'sec_token' => $sec_token
|
||||
|
|
|
@ -10,6 +10,6 @@ class MethodNotAllowed extends BaseModule
|
|||
{
|
||||
public static function content(array $parameters = [])
|
||||
{
|
||||
throw new HTTPException\MethodNotAllowedException(L10n::t('Method Not Allowed.'));
|
||||
throw new HTTPException\MethodNotAllowedException(DI::l10n()->t('Method Not Allowed.'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@ class PageNotFound extends BaseModule
|
|||
{
|
||||
public static function content(array $parameters = [])
|
||||
{
|
||||
throw new HTTPException\NotFoundException(L10n::t('Page not found.'));
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('Page not found.'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,14 +41,14 @@ class Help extends BaseModule
|
|||
$title = basename($path);
|
||||
$filename = $path;
|
||||
$text = self::loadDocFile('doc/' . $path . '.md', $lang);
|
||||
DI::page()['title'] = L10n::t('Help:') . ' ' . str_replace('-', ' ', Strings::escapeTags($title));
|
||||
DI::page()['title'] = DI::l10n()->t('Help:') . ' ' . str_replace('-', ' ', Strings::escapeTags($title));
|
||||
}
|
||||
|
||||
$home = self::loadDocFile('doc/Home.md', $lang);
|
||||
if (!$text) {
|
||||
$text = $home;
|
||||
$filename = "Home";
|
||||
DI::page()['title'] = L10n::t('Help');
|
||||
DI::page()['title'] = DI::l10n()->t('Help');
|
||||
} else {
|
||||
DI::page()['aside'] = Markdown::convert($home, false);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ class Home extends BaseModule
|
|||
}
|
||||
|
||||
$customHome = '';
|
||||
$defaultHeader = ($config->get('config', 'sitename') ? L10n::t('Welcome to %s', $config->get('config', 'sitename')) : '');
|
||||
$defaultHeader = ($config->get('config', 'sitename') ? DI::l10n()->t('Welcome to %s', $config->get('config', 'sitename')) : '');
|
||||
|
||||
$homeFilePath = $app->getBasePath() . '/home.html';
|
||||
$cssFilePath = $app->getBasePath() . '/home.css';
|
||||
|
|
|
@ -156,7 +156,7 @@ class Install extends BaseModule
|
|||
|
||||
$output = '';
|
||||
|
||||
$install_title = L10n::t('Friendica Communications Server - Setup');
|
||||
$install_title = DI::l10n()->t('Friendica Communications Server - Setup');
|
||||
|
||||
switch (self::$currentWizardStep) {
|
||||
case self::SYSTEM_CHECK:
|
||||
|
@ -167,49 +167,49 @@ class Install extends BaseModule
|
|||
$tpl = Renderer::getMarkupTemplate('install_checks.tpl');
|
||||
$output .= Renderer::replaceMacros($tpl, [
|
||||
'$title' => $install_title,
|
||||
'$pass' => L10n::t('System check'),
|
||||
'$pass' => DI::l10n()->t('System check'),
|
||||
'$checks' => self::$installer->getChecks(),
|
||||
'$passed' => $status,
|
||||
'$see_install' => L10n::t('Please see the file "INSTALL.txt".'),
|
||||
'$next' => L10n::t('Next'),
|
||||
'$reload' => L10n::t('Check again'),
|
||||
'$see_install' => DI::l10n()->t('Please see the file "INSTALL.txt".'),
|
||||
'$next' => DI::l10n()->t('Next'),
|
||||
'$reload' => DI::l10n()->t('Check again'),
|
||||
'$php_path' => $php_path,
|
||||
]);
|
||||
break;
|
||||
|
||||
case self::BASE_CONFIG:
|
||||
$ssl_choices = [
|
||||
App\BaseURL::SSL_POLICY_NONE => L10n::t("No SSL policy, links will track page SSL state"),
|
||||
App\BaseURL::SSL_POLICY_FULL => L10n::t("Force all links to use SSL"),
|
||||
App\BaseURL::SSL_POLICY_SELFSIGN => L10n::t("Self-signed certificate, use SSL for local links only \x28discouraged\x29")
|
||||
App\BaseURL::SSL_POLICY_NONE => DI::l10n()->t("No SSL policy, links will track page SSL state"),
|
||||
App\BaseURL::SSL_POLICY_FULL => DI::l10n()->t("Force all links to use SSL"),
|
||||
App\BaseURL::SSL_POLICY_SELFSIGN => DI::l10n()->t("Self-signed certificate, use SSL for local links only \x28discouraged\x29")
|
||||
];
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('install_base.tpl');
|
||||
$output .= Renderer::replaceMacros($tpl, [
|
||||
'$title' => $install_title,
|
||||
'$pass' => L10n::t('Base settings'),
|
||||
'$pass' => DI::l10n()->t('Base settings'),
|
||||
'$ssl_policy' => ['system-ssl_policy',
|
||||
L10n::t("SSL link policy"),
|
||||
DI::l10n()->t("SSL link policy"),
|
||||
$configCache->get('system', 'ssl_policy'),
|
||||
L10n::t("Determines whether generated links should be forced to use SSL"),
|
||||
DI::l10n()->t("Determines whether generated links should be forced to use SSL"),
|
||||
$ssl_choices],
|
||||
'$hostname' => ['config-hostname',
|
||||
L10n::t('Host name'),
|
||||
DI::l10n()->t('Host name'),
|
||||
$configCache->get('config', 'hostname'),
|
||||
L10n::t('Overwrite this field in case the determinated hostname isn\'t right, otherweise leave it as is.'),
|
||||
DI::l10n()->t('Overwrite this field in case the determinated hostname isn\'t right, otherweise leave it as is.'),
|
||||
'required'],
|
||||
'$basepath' => ['system-basepath',
|
||||
L10n::t("Base path to installation"),
|
||||
DI::l10n()->t("Base path to installation"),
|
||||
$configCache->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."),
|
||||
DI::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."),
|
||||
'required'],
|
||||
'$urlpath' => ['system-urlpath',
|
||||
L10n::t('Sub path of the URL'),
|
||||
DI::l10n()->t('Sub path of the URL'),
|
||||
$configCache->get('system', 'urlpath'),
|
||||
L10n::t('Overwrite this field in case the sub path determination isn\'t right, otherwise leave it as is. Leaving this field blank means the installation is at the base URL without sub path.'),
|
||||
DI::l10n()->t('Overwrite this field in case the sub path determination isn\'t right, otherwise leave it as is. Leaving this field blank means the installation is at the base URL without sub path.'),
|
||||
''],
|
||||
'$php_path' => $configCache->get('config', 'php_path'),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$submit' => DI::l10n()->t('Submit'),
|
||||
]);
|
||||
break;
|
||||
|
||||
|
@ -217,39 +217,39 @@ class Install extends BaseModule
|
|||
$tpl = Renderer::getMarkupTemplate('install_db.tpl');
|
||||
$output .= Renderer::replaceMacros($tpl, [
|
||||
'$title' => $install_title,
|
||||
'$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.'),
|
||||
'$pass' => DI::l10n()->t('Database connection'),
|
||||
'$info_01' => DI::l10n()->t('In order to install Friendica we need to know how to connect to your database.'),
|
||||
'$info_02' => DI::l10n()->t('Please contact your hosting provider or site administrator if you have questions about these settings.'),
|
||||
'$info_03' => DI::l10n()->t('The database you specify below should already exist. If it does not, please create it before continuing.'),
|
||||
'checks' => self::$installer->getChecks(),
|
||||
'$hostname' => $configCache->get('config', 'hostname'),
|
||||
'$ssl_policy' => $configCache->get('system', 'ssl_policy'),
|
||||
'$basepath' => $configCache->get('system', 'basepath'),
|
||||
'$urlpath' => $configCache->get('system', 'urlpath'),
|
||||
'$dbhost' => ['database-hostname',
|
||||
L10n::t('Database Server Name'),
|
||||
DI::l10n()->t('Database Server Name'),
|
||||
$configCache->get('database', 'hostname'),
|
||||
'',
|
||||
'required'],
|
||||
'$dbuser' => ['database-username',
|
||||
L10n::t('Database Login Name'),
|
||||
DI::l10n()->t('Database Login Name'),
|
||||
$configCache->get('database', 'username'),
|
||||
'',
|
||||
'required',
|
||||
'autofocus'],
|
||||
'$dbpass' => ['database-password',
|
||||
L10n::t('Database Login Password'),
|
||||
DI::l10n()->t('Database Login Password'),
|
||||
$configCache->get('database', 'password'),
|
||||
L10n::t("For security reasons the password must not be empty"),
|
||||
DI::l10n()->t("For security reasons the password must not be empty"),
|
||||
'required'],
|
||||
'$dbdata' => ['database-database',
|
||||
L10n::t('Database Name'),
|
||||
DI::l10n()->t('Database Name'),
|
||||
$configCache->get('database', 'database'),
|
||||
'',
|
||||
'required'],
|
||||
'$lbl_10' => L10n::t('Please select a default timezone for your website'),
|
||||
'$lbl_10' => DI::l10n()->t('Please select a default timezone for your website'),
|
||||
'$php_path' => $configCache->get('config', 'php_path'),
|
||||
'$submit' => L10n::t('Submit')
|
||||
'$submit' => DI::l10n()->t('Submit')
|
||||
]);
|
||||
break;
|
||||
|
||||
|
@ -261,7 +261,7 @@ class Install extends BaseModule
|
|||
$output .= Renderer::replaceMacros($tpl, [
|
||||
'$title' => $install_title,
|
||||
'$checks' => self::$installer->getChecks(),
|
||||
'$pass' => L10n::t('Site settings'),
|
||||
'$pass' => DI::l10n()->t('Site settings'),
|
||||
'$hostname' => $configCache->get('config', 'hostname'),
|
||||
'$ssl_policy' => $configCache->get('system', 'ssl_policy'),
|
||||
'$basepath' => $configCache->get('system', 'basepath'),
|
||||
|
@ -271,21 +271,21 @@ class Install extends BaseModule
|
|||
'$dbpass' => $configCache->get('database', 'password'),
|
||||
'$dbdata' => $configCache->get('database', 'database'),
|
||||
'$adminmail' => ['config-admin_email',
|
||||
L10n::t('Site administrator email address'),
|
||||
DI::l10n()->t('Site administrator email address'),
|
||||
$configCache->get('config', 'admin_email'),
|
||||
L10n::t('Your account email address must match this in order to use the web admin panel.'),
|
||||
DI::l10n()->t('Your account email address must match this in order to use the web admin panel.'),
|
||||
'required', 'autofocus', 'email'],
|
||||
'$timezone' => Temporal::getTimezoneField('system-default_timezone',
|
||||
L10n::t('Please select a default timezone for your website'),
|
||||
DI::l10n()->t('Please select a default timezone for your website'),
|
||||
$configCache->get('system', 'default_timezone'),
|
||||
''),
|
||||
'$language' => ['system-language',
|
||||
L10n::t('System Language:'),
|
||||
DI::l10n()->t('System Language:'),
|
||||
$configCache->get('system', 'language'),
|
||||
L10n::t('Set the default language for your Friendica installation interface and to send emails.'),
|
||||
DI::l10n()->t('Set the default language for your Friendica installation interface and to send emails.'),
|
||||
$lang_choices],
|
||||
'$php_path' => $configCache->get('config', 'php_path'),
|
||||
'$submit' => L10n::t('Submit')
|
||||
'$submit' => DI::l10n()->t('Submit')
|
||||
]);
|
||||
break;
|
||||
|
||||
|
@ -294,7 +294,7 @@ class Install extends BaseModule
|
|||
|
||||
if (count(self::$installer->getChecks()) == 0) {
|
||||
$txt = '<p style="font-size: 130%;">';
|
||||
$txt .= L10n::t('Your Friendica site database has been installed.') . EOL;
|
||||
$txt .= DI::l10n()->t('Your Friendica site database has been installed.') . EOL;
|
||||
$db_return_text .= $txt;
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ class Install extends BaseModule
|
|||
$output .= Renderer::replaceMacros($tpl, [
|
||||
'$title' => $install_title,
|
||||
'$checks' => self::$installer->getChecks(),
|
||||
'$pass' => L10n::t('Installation finished'),
|
||||
'$pass' => DI::l10n()->t('Installation finished'),
|
||||
'$text' => $db_return_text . self::whatNext(),
|
||||
]);
|
||||
|
||||
|
@ -322,11 +322,11 @@ class Install extends BaseModule
|
|||
{
|
||||
$baseurl = DI::baseUrl()->get();
|
||||
return
|
||||
L10n::t('<h1>What next</h1>')
|
||||
. "<p>" . L10n::t('IMPORTANT: You will need to [manually] setup a scheduled task for the worker.')
|
||||
. L10n::t('Please see the file "INSTALL.txt".')
|
||||
DI::l10n()->t('<h1>What next</h1>')
|
||||
. "<p>" . DI::l10n()->t('IMPORTANT: You will need to [manually] setup a scheduled task for the worker.')
|
||||
. DI::l10n()->t('Please see the file "INSTALL.txt".')
|
||||
. "</p><p>"
|
||||
. L10n::t('Go to your new Friendica node <a href="%s/register">registration page</a> and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.', $baseurl)
|
||||
. DI::l10n()->t('Go to your new Friendica node <a href="%s/register">registration page</a> and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.', $baseurl)
|
||||
. "</p>";
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class Invite extends BaseModule
|
|||
public static function post(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
throw new HTTPException\ForbiddenException(L10n::t('Permission denied.'));
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
|
||||
self::checkFormSecurityTokenRedirectOnError('/', 'send_invite');
|
||||
|
@ -34,7 +34,7 @@ class Invite extends BaseModule
|
|||
|
||||
$current_invites = intval(DI::pConfig()->get(local_user(), 'system', 'sent_invites'));
|
||||
if ($current_invites > $max_invites) {
|
||||
throw new HTTPException\ForbiddenException(L10n::t('Total invitation limit exceeded.'));
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Total invitation limit exceeded.'));
|
||||
}
|
||||
|
||||
|
||||
|
@ -57,7 +57,7 @@ class Invite extends BaseModule
|
|||
$recipient = trim($recipient);
|
||||
|
||||
if (!filter_var($recipient, FILTER_VALIDATE_EMAIL)) {
|
||||
notice(L10n::t('%s : Not a valid email address.', $recipient) . EOL);
|
||||
notice(DI::l10n()->t('%s : Not a valid email address.', $recipient) . EOL);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ class Invite extends BaseModule
|
|||
|
||||
$res = mail(
|
||||
$recipient,
|
||||
Email::encodeHeader(L10n::t('Please join us on Friendica'), 'UTF-8'),
|
||||
Email::encodeHeader(DI::l10n()->t('Please join us on Friendica'), 'UTF-8'),
|
||||
$nmessage,
|
||||
$additional_headers);
|
||||
|
||||
|
@ -93,11 +93,11 @@ class Invite extends BaseModule
|
|||
$current_invites++;
|
||||
DI::pConfig()->set(local_user(), 'system', 'sent_invites', $current_invites);
|
||||
if ($current_invites > $max_invites) {
|
||||
notice(L10n::t('Invitation limit exceeded. Please contact your site administrator.') . EOL);
|
||||
notice(DI::l10n()->t('Invitation limit exceeded. Please contact your site administrator.') . EOL);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
notice(L10n::t('%s : Message delivery failed.', $recipient) . EOL);
|
||||
notice(DI::l10n()->t('%s : Message delivery failed.', $recipient) . EOL);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ class Invite extends BaseModule
|
|||
public static function content(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
throw new HTTPException\ForbiddenException(L10n::t('Permission denied.'));
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
|
||||
$app = DI::app();
|
||||
|
@ -119,42 +119,42 @@ class Invite extends BaseModule
|
|||
$inviteOnly = true;
|
||||
$x = DI::pConfig()->get(local_user(), 'system', 'invites_remaining');
|
||||
if ((!$x) && (!is_site_admin())) {
|
||||
throw new HTTPException\ForbiddenException(L10n::t('You have no more invitations available'));
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('You have no more invitations available'));
|
||||
}
|
||||
}
|
||||
|
||||
$dirLocation = $config->get('system', 'directory');
|
||||
if (strlen($dirLocation)) {
|
||||
if ($config->get('config', 'register_policy') === Register::CLOSED) {
|
||||
$linkTxt = L10n::t('Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks.', $dirLocation . '/servers');
|
||||
$linkTxt = DI::l10n()->t('Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks.', $dirLocation . '/servers');
|
||||
} else {
|
||||
$linkTxt = L10n::t('To accept this invitation, please visit and register at %s or any other public Friendica website.', DI::baseUrl()->get())
|
||||
. "\r\n" . "\r\n" . L10n::t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks. See %s for a list of alternate Friendica sites you can join.', $dirLocation . '/servers');
|
||||
$linkTxt = DI::l10n()->t('To accept this invitation, please visit and register at %s or any other public Friendica website.', DI::baseUrl()->get())
|
||||
. "\r\n" . "\r\n" . DI::l10n()->t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks. See %s for a list of alternate Friendica sites you can join.', $dirLocation . '/servers');
|
||||
}
|
||||
} else { // there is no global directory URL defined
|
||||
if ($config->get('config', 'register_policy') === Register::CLOSED) {
|
||||
return L10n::t('Our apologies. This system is not currently configured to connect with other public sites or invite members.');
|
||||
return DI::l10n()->t('Our apologies. This system is not currently configured to connect with other public sites or invite members.');
|
||||
} else {
|
||||
$linkTxt = L10n::t('To accept this invitation, please visit and register at %s.', DI::baseUrl()->get()
|
||||
. "\r\n" . "\r\n" . L10n::t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks.'));
|
||||
$linkTxt = DI::l10n()->t('To accept this invitation, please visit and register at %s.', DI::baseUrl()->get()
|
||||
. "\r\n" . "\r\n" . DI::l10n()->t('Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks.'));
|
||||
}
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('invite.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$form_security_token' => self::getFormSecurityToken('send_invite'),
|
||||
'$title' => L10n::t('Send invitations'),
|
||||
'$recipients' => ['recipients', L10n::t('Enter email addresses, one per line:')],
|
||||
'$title' => DI::l10n()->t('Send invitations'),
|
||||
'$recipients' => ['recipients', DI::l10n()->t('Enter email addresses, one per line:')],
|
||||
'$message' => [
|
||||
'message',
|
||||
L10n::t('Your message:'),
|
||||
L10n::t('You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web.') . "\r\n" . "\r\n"
|
||||
DI::l10n()->t('Your message:'),
|
||||
DI::l10n()->t('You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web.') . "\r\n" . "\r\n"
|
||||
. $linkTxt
|
||||
. "\r\n" . "\r\n" . (($inviteOnly) ? L10n::t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') . L10n::t('Once you have registered, please connect with me via my profile page at:')
|
||||
. "\r\n" . "\r\n" . (($inviteOnly) ? DI::l10n()->t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') . DI::l10n()->t('Once you have registered, please connect with me via my profile page at:')
|
||||
. "\r\n" . "\r\n" . DI::baseUrl()->get() . '/profile/' . $app->user['nickname']
|
||||
. "\r\n" . "\r\n" . L10n::t('For more information about the Friendica project and why we feel it is important, please visit http://friendi.ca') . "\r\n" . "\r\n",
|
||||
. "\r\n" . "\r\n" . DI::l10n()->t('For more information about the Friendica project and why we feel it is important, please visit http://friendi.ca') . "\r\n" . "\r\n",
|
||||
],
|
||||
'$submit' => L10n::t('Submit')
|
||||
'$submit' => DI::l10n()->t('Submit')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ class Compose extends BaseModule
|
|||
require_once 'mod/item.php';
|
||||
item_post(DI::app());
|
||||
} else {
|
||||
notice(L10n::t('Please enter a post body.'));
|
||||
notice(DI::l10n()->t('Please enter a post body.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class Compose extends BaseModule
|
|||
$a = DI::app();
|
||||
|
||||
if ($a->getCurrentTheme() !== 'frio') {
|
||||
throw new NotImplementedException(L10n::t('This feature is only available with the frio theme.'));
|
||||
throw new NotImplementedException(DI::l10n()->t('This feature is only available with the frio theme.'));
|
||||
}
|
||||
|
||||
/// @TODO Retrieve parameter from router
|
||||
|
@ -65,7 +65,7 @@ class Compose extends BaseModule
|
|||
|
||||
switch ($posttype) {
|
||||
case Item::PT_PERSONAL_NOTE:
|
||||
$compose_title = L10n::t('Compose new personal note');
|
||||
$compose_title = DI::l10n()->t('Compose new personal note');
|
||||
$type = 'note';
|
||||
$doesFederate = false;
|
||||
$contact_allow_list = [$a->contact['id']];
|
||||
|
@ -74,7 +74,7 @@ class Compose extends BaseModule
|
|||
$group_deny_list = [];
|
||||
break;
|
||||
default:
|
||||
$compose_title = L10n::t('Compose new post');
|
||||
$compose_title = DI::l10n()->t('Compose new post');
|
||||
$type = 'post';
|
||||
$doesFederate = true;
|
||||
|
||||
|
@ -114,33 +114,33 @@ class Compose extends BaseModule
|
|||
$tpl = Renderer::getMarkupTemplate('item/compose.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$compose_title'=> $compose_title,
|
||||
'$visibility_title'=> L10n::t('Visibility'),
|
||||
'$visibility_title'=> DI::l10n()->t('Visibility'),
|
||||
'$id' => 0,
|
||||
'$posttype' => $posttype,
|
||||
'$type' => $type,
|
||||
'$wall' => $wall,
|
||||
'$default' => '',
|
||||
'$mylink' => DI::baseUrl()->remove($a->contact['url']),
|
||||
'$mytitle' => L10n::t('This is you'),
|
||||
'$mytitle' => DI::l10n()->t('This is you'),
|
||||
'$myphoto' => DI::baseUrl()->remove($a->contact['thumb']),
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$edbold' => L10n::t('Bold'),
|
||||
'$editalic' => L10n::t('Italic'),
|
||||
'$eduline' => L10n::t('Underline'),
|
||||
'$edquote' => L10n::t('Quote'),
|
||||
'$edcode' => L10n::t('Code'),
|
||||
'$edimg' => L10n::t('Image'),
|
||||
'$edurl' => L10n::t('Link'),
|
||||
'$edattach' => L10n::t('Link or Media'),
|
||||
'$prompttext' => L10n::t('Please enter a image/video/audio/webpage URL:'),
|
||||
'$preview' => L10n::t('Preview'),
|
||||
'$location_set' => L10n::t('Set your location'),
|
||||
'$location_clear' => L10n::t('Clear the location'),
|
||||
'$location_unavailable' => L10n::t('Location services are unavailable on your device'),
|
||||
'$location_disabled' => L10n::t('Location services are disabled. Please check the website\'s permissions on your device'),
|
||||
'$wait' => L10n::t('Please wait'),
|
||||
'$placeholdertitle' => L10n::t('Set title'),
|
||||
'$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? L10n::t('Categories (comma-separated list)') : ''),
|
||||
'$submit' => DI::l10n()->t('Submit'),
|
||||
'$edbold' => DI::l10n()->t('Bold'),
|
||||
'$editalic' => DI::l10n()->t('Italic'),
|
||||
'$eduline' => DI::l10n()->t('Underline'),
|
||||
'$edquote' => DI::l10n()->t('Quote'),
|
||||
'$edcode' => DI::l10n()->t('Code'),
|
||||
'$edimg' => DI::l10n()->t('Image'),
|
||||
'$edurl' => DI::l10n()->t('Link'),
|
||||
'$edattach' => DI::l10n()->t('Link or Media'),
|
||||
'$prompttext' => DI::l10n()->t('Please enter a image/video/audio/webpage URL:'),
|
||||
'$preview' => DI::l10n()->t('Preview'),
|
||||
'$location_set' => DI::l10n()->t('Set your location'),
|
||||
'$location_clear' => DI::l10n()->t('Clear the location'),
|
||||
'$location_unavailable' => DI::l10n()->t('Location services are unavailable on your device'),
|
||||
'$location_disabled' => DI::l10n()->t('Location services are disabled. Please check the website\'s permissions on your device'),
|
||||
'$wait' => DI::l10n()->t('Please wait'),
|
||||
'$placeholdertitle' => DI::l10n()->t('Set title'),
|
||||
'$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? DI::l10n()->t('Categories (comma-separated list)') : ''),
|
||||
|
||||
'$title' => $title,
|
||||
'$category' => $category,
|
||||
|
@ -153,7 +153,7 @@ class Compose extends BaseModule
|
|||
'$group_deny' => implode(',', $group_deny_list),
|
||||
|
||||
'$jotplugins' => $jotplugins,
|
||||
'$sourceapp' => L10n::t($a->sourcename),
|
||||
'$sourceapp' => DI::l10n()->t($a->sourcename),
|
||||
'$rand_num' => Crypto::randomDigits(12),
|
||||
'$acl_selector' => ACL::getFullSelectorHTML(DI::page(), $a->user, $doesFederate, [
|
||||
'allow_cid' => $contact_allow_list,
|
||||
|
|
|
@ -25,7 +25,7 @@ class Maintenance extends BaseModule
|
|||
}
|
||||
|
||||
$exception = new HTTPException\ServiceUnavailableException($reason);
|
||||
$exception->httpdesc = L10n::t('System down for maintenance');
|
||||
$exception->httpdesc = DI::l10n()->t('System down for maintenance');
|
||||
throw $exception;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ class Notify extends BaseModule
|
|||
public static function init(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
throw new HTTPException\UnauthorizedException(L10n::t('Permission denied.'));
|
||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ class Photo extends BaseModule
|
|||
|
||||
if (is_null($img) || !$img->isValid()) {
|
||||
Logger::log("Invalid photo with id {$photo["id"]}.");
|
||||
throw new \Friendica\Network\HTTPException\InternalServerErrorException(L10n::t('Invalid photo with id %s.', $photo["id"]));
|
||||
throw new \Friendica\Network\HTTPException\InternalServerErrorException(DI::l10n()->t('Invalid photo with id %s.', $photo["id"]));
|
||||
}
|
||||
|
||||
// if customsize is set and image is not a gif, resize it
|
||||
|
|
|
@ -114,10 +114,10 @@ class Profile extends BaseModule
|
|||
$page['htmlhead'] .= '<meta content="noindex, noarchive" name="robots" />' . "\n";
|
||||
}
|
||||
|
||||
$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/dfrn_poll/' . self::$which . '" title="DFRN: ' . L10n::t('%s\'s timeline', $a->profile['username']) . '"/>' . "\n";
|
||||
$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/feed/' . self::$which . '/" title="' . L10n::t('%s\'s posts', $a->profile['username']) . '"/>' . "\n";
|
||||
$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/feed/' . self::$which . '/comments" title="' . L10n::t('%s\'s comments', $a->profile['username']) . '"/>' . "\n";
|
||||
$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/feed/' . self::$which . '/activity" title="' . L10n::t('%s\'s timeline', $a->profile['username']) . '"/>' . "\n";
|
||||
$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/dfrn_poll/' . self::$which . '" title="DFRN: ' . DI::l10n()->t('%s\'s timeline', $a->profile['username']) . '"/>' . "\n";
|
||||
$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/feed/' . self::$which . '/" title="' . DI::l10n()->t('%s\'s posts', $a->profile['username']) . '"/>' . "\n";
|
||||
$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/feed/' . self::$which . '/comments" title="' . DI::l10n()->t('%s\'s comments', $a->profile['username']) . '"/>' . "\n";
|
||||
$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/feed/' . self::$which . '/activity" title="' . DI::l10n()->t('%s\'s timeline', $a->profile['username']) . '"/>' . "\n";
|
||||
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . DI::baseUrl()->getHostname() . (DI::baseUrl()->getUrlPath() ? '/' . DI::baseUrl()->getUrlPath() : ''));
|
||||
$page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . DI::baseUrl() . '/xrd/?uri=' . $uri . '" />' . "\n";
|
||||
header('Link: <' . DI::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
||||
|
@ -169,7 +169,7 @@ class Profile extends BaseModule
|
|||
$last_updated_key = "profile:" . $a->profile['profile_uid'] . ":" . local_user() . ":" . $remote_contact;
|
||||
|
||||
if (!empty($a->profile['hidewall']) && !$is_owner && !$remote_contact) {
|
||||
notice(L10n::t('Access to this profile has been restricted.') . EOL);
|
||||
notice(DI::l10n()->t('Access to this profile has been restricted.') . EOL);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class Contacts extends BaseModule
|
|||
public static function content(array $parameters = [])
|
||||
{
|
||||
if (Config::get('system', 'block_public') && !Session::isAuthenticated()) {
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException(L10n::t('User not found.'));
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
|
||||
}
|
||||
|
||||
$a = DI::app();
|
||||
|
@ -35,7 +35,7 @@ class Contacts extends BaseModule
|
|||
|
||||
$user = DBA::selectFirst('user', [], ['nickname' => $nickname, 'blocked' => false]);
|
||||
if (!DBA::isResult($user)) {
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException(L10n::t('User not found.'));
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
|
||||
}
|
||||
|
||||
$a->profile_uid = $user['uid'];
|
||||
|
@ -48,7 +48,7 @@ class Contacts extends BaseModule
|
|||
$o = Profile::getTabs($a, 'contacts', $is_owner, $nickname);
|
||||
|
||||
if (!count($a->profile) || $a->profile['hide-friends']) {
|
||||
notice(L10n::t('Permission denied.') . EOL);
|
||||
notice(DI::l10n()->t('Permission denied.') . EOL);
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class Contacts extends BaseModule
|
|||
$contacts_stmt = DBA::select('contact', [], $condition, $params);
|
||||
|
||||
if (!DBA::isResult($contacts_stmt)) {
|
||||
info(L10n::t('No contacts.') . EOL);
|
||||
info(DI::l10n()->t('No contacts.') . EOL);
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ class Contacts extends BaseModule
|
|||
|
||||
$contacts[] = [
|
||||
'id' => $contact['id'],
|
||||
'img_hover' => L10n::t('Visit %s\'s profile [%s]', $contact_details['name'], $contact['url']),
|
||||
'img_hover' => DI::l10n()->t('Visit %s\'s profile [%s]', $contact_details['name'], $contact['url']),
|
||||
'photo_menu' => Contact::photoMenu($contact),
|
||||
'thumb' => ProxyUtils::proxifyUrl($contact_details['thumb'], false, ProxyUtils::SIZE_THUMB),
|
||||
'name' => substr($contact_details['name'], 0, 20),
|
||||
|
@ -123,10 +123,10 @@ class Contacts extends BaseModule
|
|||
'$nickname' => $nickname,
|
||||
'$type' => $type,
|
||||
|
||||
'$all_label' => L10n::t('All contacts'),
|
||||
'$followers_label' => L10n::t('Followers'),
|
||||
'$following_label' => L10n::t('Following'),
|
||||
'$mutuals_label' => L10n::t('Mutual friends'),
|
||||
'$all_label' => DI::l10n()->t('All contacts'),
|
||||
'$followers_label' => DI::l10n()->t('Followers'),
|
||||
'$following_label' => DI::l10n()->t('Following'),
|
||||
'$mutuals_label' => DI::l10n()->t('Mutual friends'),
|
||||
|
||||
'$contacts' => $contacts,
|
||||
'$paginate' => $pager->renderFull($total),
|
||||
|
|
|
@ -42,20 +42,20 @@ class Register extends BaseModule
|
|||
$block = Config::get('system', 'block_extended_register');
|
||||
|
||||
if (local_user() && $block) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
return '';
|
||||
}
|
||||
|
||||
if (local_user()) {
|
||||
$user = DBA::selectFirst('user', ['parent-uid'], ['uid' => local_user()]);
|
||||
if (!empty($user['parent-uid'])) {
|
||||
notice(L10n::t('Only parent users can create additional accounts.'));
|
||||
notice(DI::l10n()->t('Only parent users can create additional accounts.'));
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
if (!local_user() && (intval(Config::get('config', 'register_policy')) === self::CLOSED)) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
return '';
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ class Register extends BaseModule
|
|||
$count = DBA::count('user', ['`register_date` > UTC_TIMESTAMP - INTERVAL 1 day']);
|
||||
if ($count >= $max_dailies) {
|
||||
Logger::log('max daily registrations exceeded.');
|
||||
notice(L10n::t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.'));
|
||||
notice(DI::l10n()->t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.'));
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
@ -81,9 +81,9 @@ class Register extends BaseModule
|
|||
$fillext = '';
|
||||
$oidlabel = '';
|
||||
} else {
|
||||
$fillwith = L10n::t('You may (optionally) fill in this form via OpenID by supplying your OpenID and clicking "Register".');
|
||||
$fillext = L10n::t('If you are not familiar with OpenID, please leave that field blank and fill in the rest of the items.');
|
||||
$oidlabel = L10n::t('Your OpenID (optional): ');
|
||||
$fillwith = DI::l10n()->t('You may (optionally) fill in this form via OpenID by supplying your OpenID and clicking "Register".');
|
||||
$fillext = DI::l10n()->t('If you are not familiar with OpenID, please leave that field blank and fill in the rest of the items.');
|
||||
$oidlabel = DI::l10n()->t('Your OpenID (optional): ');
|
||||
}
|
||||
|
||||
if (Config::get('system', 'publish_all')) {
|
||||
|
@ -92,11 +92,11 @@ class Register extends BaseModule
|
|||
$publish_tpl = Renderer::getMarkupTemplate('profile_publish.tpl');
|
||||
$profile_publish = Renderer::replaceMacros($publish_tpl, [
|
||||
'$instance' => 'reg',
|
||||
'$pubdesc' => L10n::t('Include your profile in member directory?'),
|
||||
'$pubdesc' => DI::l10n()->t('Include your profile in member directory?'),
|
||||
'$yes_selected' => '',
|
||||
'$no_selected' => ' checked="checked"',
|
||||
'$str_yes' => L10n::t('Yes'),
|
||||
'$str_no' => L10n::t('No'),
|
||||
'$str_yes' => DI::l10n()->t('Yes'),
|
||||
'$str_no' => DI::l10n()->t('No'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -115,42 +115,42 @@ class Register extends BaseModule
|
|||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$invitations' => Config::get('system', 'invitation_only'),
|
||||
'$permonly' => intval(Config::get('config', 'register_policy')) === self::APPROVE,
|
||||
'$permonlybox' => ['permonlybox', L10n::t('Note for the admin'), '', L10n::t('Leave a message for the admin, why you want to join this node'), 'required'],
|
||||
'$invite_desc' => L10n::t('Membership on this site is by invitation only.'),
|
||||
'$invite_label' => L10n::t('Your invitation code: '),
|
||||
'$permonlybox' => ['permonlybox', DI::l10n()->t('Note for the admin'), '', DI::l10n()->t('Leave a message for the admin, why you want to join this node'), 'required'],
|
||||
'$invite_desc' => DI::l10n()->t('Membership on this site is by invitation only.'),
|
||||
'$invite_label' => DI::l10n()->t('Your invitation code: '),
|
||||
'$invite_id' => $invite_id,
|
||||
'$regtitle' => L10n::t('Registration'),
|
||||
'$regtitle' => DI::l10n()->t('Registration'),
|
||||
'$registertext' => BBCode::convert(Config::get('config', 'register_text', '')),
|
||||
'$fillwith' => $fillwith,
|
||||
'$fillext' => $fillext,
|
||||
'$oidlabel' => $oidlabel,
|
||||
'$openid' => $openid_url,
|
||||
'$namelabel' => L10n::t('Your Full Name (e.g. Joe Smith, real or real-looking): '),
|
||||
'$addrlabel' => L10n::t('Your Email Address: (Initial information will be send there, so this has to be an existing address.)'),
|
||||
'$addrlabel2' => L10n::t('Please repeat your e-mail address:'),
|
||||
'$namelabel' => DI::l10n()->t('Your Full Name (e.g. Joe Smith, real or real-looking): '),
|
||||
'$addrlabel' => DI::l10n()->t('Your Email Address: (Initial information will be send there, so this has to be an existing address.)'),
|
||||
'$addrlabel2' => DI::l10n()->t('Please repeat your e-mail address:'),
|
||||
'$ask_password' => $ask_password,
|
||||
'$password1' => ['password1', L10n::t('New Password:'), '', L10n::t('Leave empty for an auto generated password.')],
|
||||
'$password2' => ['confirm', L10n::t('Confirm:'), '', ''],
|
||||
'$nickdesc' => L10n::t('Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be "<strong>nickname@%s</strong>".', DI::baseUrl()->getHostname()),
|
||||
'$nicklabel' => L10n::t('Choose a nickname: '),
|
||||
'$password1' => ['password1', DI::l10n()->t('New Password:'), '', DI::l10n()->t('Leave empty for an auto generated password.')],
|
||||
'$password2' => ['confirm', DI::l10n()->t('Confirm:'), '', ''],
|
||||
'$nickdesc' => DI::l10n()->t('Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be "<strong>nickname@%s</strong>".', DI::baseUrl()->getHostname()),
|
||||
'$nicklabel' => DI::l10n()->t('Choose a nickname: '),
|
||||
'$photo' => $photo,
|
||||
'$publish' => $profile_publish,
|
||||
'$regbutt' => L10n::t('Register'),
|
||||
'$regbutt' => DI::l10n()->t('Register'),
|
||||
'$username' => $username,
|
||||
'$email' => $email,
|
||||
'$nickname' => $nickname,
|
||||
'$sitename' => DI::baseUrl()->getHostname(),
|
||||
'$importh' => L10n::t('Import'),
|
||||
'$importt' => L10n::t('Import your profile to this friendica instance'),
|
||||
'$importh' => DI::l10n()->t('Import'),
|
||||
'$importt' => DI::l10n()->t('Import your profile to this friendica instance'),
|
||||
'$showtoslink' => Config::get('system', 'tosdisplay'),
|
||||
'$tostext' => L10n::t('Terms of Service'),
|
||||
'$tostext' => DI::l10n()->t('Terms of Service'),
|
||||
'$showprivstatement' => Config::get('system', 'tosprivstatement'),
|
||||
'$privstatement'=> $tos->privacy_complete,
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken('register'),
|
||||
'$explicit_content' => Config::get('system', 'explicit_content', false),
|
||||
'$explicit_content_note' => L10n::t('Note: This node explicitly contains adult content'),
|
||||
'$explicit_content_note' => DI::l10n()->t('Note: This node explicitly contains adult content'),
|
||||
'$additional' => !empty(local_user()),
|
||||
'$parent_password' => ['parent_password', L10n::t('Parent Password:'), '', L10n::t('Please enter the password of the parent account to legitimize your request.')]
|
||||
'$parent_password' => ['parent_password', DI::l10n()->t('Parent Password:'), '', DI::l10n()->t('Please enter the password of the parent account to legitimize your request.')]
|
||||
|
||||
]);
|
||||
|
||||
|
@ -175,19 +175,19 @@ class Register extends BaseModule
|
|||
$additional_account = false;
|
||||
|
||||
if (!local_user() && !empty($arr['post']['parent_password'])) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
return;
|
||||
} elseif (local_user() && !empty($arr['post']['parent_password'])) {
|
||||
try {
|
||||
Model\User::getIdFromPasswordAuthentication(local_user(), $arr['post']['parent_password']);
|
||||
} catch (\Exception $ex) {
|
||||
notice(L10n::t("Password doesn't match."));
|
||||
notice(DI::l10n()->t("Password doesn't match."));
|
||||
$regdata = ['nickname' => $arr['post']['nickname'], 'username' => $arr['post']['username']];
|
||||
DI::baseUrl()->redirect('register?' . http_build_query($regdata));
|
||||
}
|
||||
$additional_account = true;
|
||||
} elseif (local_user()) {
|
||||
notice(L10n::t('Please enter your password.'));
|
||||
notice(DI::l10n()->t('Please enter your password.'));
|
||||
$regdata = ['nickname' => $arr['post']['nickname'], 'username' => $arr['post']['username']];
|
||||
DI::baseUrl()->redirect('register?' . http_build_query($regdata));
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ class Register extends BaseModule
|
|||
case self::CLOSED:
|
||||
default:
|
||||
if (empty($_SESSION['authenticated']) && empty($_SESSION['administrator'])) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
return;
|
||||
}
|
||||
$blocked = 1;
|
||||
|
@ -229,7 +229,7 @@ class Register extends BaseModule
|
|||
// Is there text in the tar pit?
|
||||
if (!empty($arr['email'])) {
|
||||
Logger::info('Tar pit', $arr);
|
||||
notice(L10n::t('You have entered too much information.'));
|
||||
notice(DI::l10n()->t('You have entered too much information.'));
|
||||
DI::baseUrl()->redirect('register/');
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ class Register extends BaseModule
|
|||
if ($additional_account) {
|
||||
$user = DBA::selectFirst('user', ['email'], ['uid' => local_user()]);
|
||||
if (!DBA::isResult($user)) {
|
||||
notice(L10n::t('User not found.'));
|
||||
notice(DI::l10n()->t('User not found.'));
|
||||
DI::baseUrl()->redirect('register');
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ class Register extends BaseModule
|
|||
|
||||
if ($arr['email'] != $arr['repeat']) {
|
||||
Logger::info('Mail mismatch', $arr);
|
||||
notice(L10n::t('Please enter the identical mail address in the second field.'));
|
||||
notice(DI::l10n()->t('Please enter the identical mail address in the second field.'));
|
||||
$regdata = ['email' => $arr['email'], 'nickname' => $arr['nickname'], 'username' => $arr['username']];
|
||||
DI::baseUrl()->redirect('register?' . http_build_query($regdata));
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ class Register extends BaseModule
|
|||
|
||||
if ($additional_account) {
|
||||
DBA::update('user', ['parent-uid' => local_user()], ['uid' => $user['uid']]);
|
||||
info(L10n::t('The additional account was created.'));
|
||||
info(DI::l10n()->t('The additional account was created.'));
|
||||
DI::baseUrl()->redirect('delegation');
|
||||
}
|
||||
|
||||
|
@ -305,29 +305,29 @@ class Register extends BaseModule
|
|||
);
|
||||
|
||||
if ($res) {
|
||||
info(L10n::t('Registration successful. Please check your email for further instructions.'));
|
||||
info(DI::l10n()->t('Registration successful. Please check your email for further instructions.'));
|
||||
DI::baseUrl()->redirect();
|
||||
} else {
|
||||
notice(
|
||||
L10n::t('Failed to send email message. Here your accout details:<br> login: %s<br> password: %s<br><br>You can change your password after login.',
|
||||
DI::l10n()->t('Failed to send email message. Here your accout details:<br> login: %s<br> password: %s<br><br>You can change your password after login.',
|
||||
$user['email'],
|
||||
$result['password'])
|
||||
);
|
||||
}
|
||||
} else {
|
||||
info(L10n::t('Registration successful.'));
|
||||
info(DI::l10n()->t('Registration successful.'));
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
} elseif (intval(Config::get('config', 'register_policy')) === self::APPROVE) {
|
||||
if (!strlen(Config::get('config', 'admin_email'))) {
|
||||
notice(L10n::t('Your registration can not be processed.'));
|
||||
notice(DI::l10n()->t('Your registration can not be processed.'));
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
|
||||
// Check if the note to the admin is actually filled out
|
||||
if (empty($_POST['permonlybox'])) {
|
||||
notice(L10n::t('You have to leave a request note for the admin.')
|
||||
. L10n::t('Your registration can not be processed.'));
|
||||
notice(DI::l10n()->t('You have to leave a request note for the admin.')
|
||||
. DI::l10n()->t('Your registration can not be processed.'));
|
||||
|
||||
DI::baseUrl()->redirect('register/');
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ class Register extends BaseModule
|
|||
$result['password']
|
||||
);
|
||||
|
||||
info(L10n::t('Your registration is pending approval by the site owner.'));
|
||||
info(DI::l10n()->t('Your registration is pending approval by the site owner.'));
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class Acl extends BaseModule
|
|||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this module.'));
|
||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this module.'));
|
||||
}
|
||||
|
||||
$type = $_REQUEST['type'] ?? self::TYPE_MENTION_CONTACT_GROUP;
|
||||
|
|
|
@ -17,7 +17,7 @@ class Directory extends BaseSearchModule
|
|||
public static function content(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
notice(L10n::t('Permission denied.'));
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
return Login::form();
|
||||
}
|
||||
|
||||
|
|
|
@ -28,12 +28,12 @@ class Index extends BaseSearchModule
|
|||
$search = (!empty($_GET['q']) ? Strings::escapeTags(trim(rawurldecode($_GET['q']))) : '');
|
||||
|
||||
if (Config::get('system', 'block_public') && !Session::isAuthenticated()) {
|
||||
throw new HTTPException\ForbiddenException(L10n::t('Public access denied.'));
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Public access denied.'));
|
||||
}
|
||||
|
||||
if (Config::get('system', 'local_search') && !Session::isAuthenticated()) {
|
||||
$e = new HTTPException\ForbiddenException(L10n::t('Only logged in users are permitted to perform a search.'));
|
||||
$e->httpdesc = L10n::t('Public access denied.');
|
||||
$e = new HTTPException\ForbiddenException(DI::l10n()->t('Only logged in users are permitted to perform a search.'));
|
||||
$e->httpdesc = DI::l10n()->t('Public access denied.');
|
||||
throw $e;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ class Index extends BaseSearchModule
|
|||
if (!is_null($result)) {
|
||||
$resultdata = json_decode($result);
|
||||
if (($resultdata->time > (time() - $crawl_permit_period)) && ($resultdata->accesses > $free_crawls)) {
|
||||
throw new HTTPException\TooManyRequestsException(L10n::t('Only one search per minute is permitted for not logged in users.'));
|
||||
throw new HTTPException\TooManyRequestsException(DI::l10n()->t('Only one search per minute is permitted for not logged in users.'));
|
||||
}
|
||||
DI::cache()->set('remote_search:' . $remote, json_encode(['time' => time(), 'accesses' => $resultdata->accesses + 1]), Duration::HOUR);
|
||||
} else {
|
||||
|
@ -77,7 +77,7 @@ class Index extends BaseSearchModule
|
|||
// contruct a wrapper for the search header
|
||||
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('content_wrapper.tpl'), [
|
||||
'name' => 'search-header',
|
||||
'$title' => L10n::t('Search'),
|
||||
'$title' => DI::l10n()->t('Search'),
|
||||
'$title_size' => 3,
|
||||
'$content' => HTML::search($search, 'search-box', false)
|
||||
]);
|
||||
|
@ -167,14 +167,14 @@ class Index extends BaseSearchModule
|
|||
}
|
||||
|
||||
if (!DBA::isResult($r)) {
|
||||
info(L10n::t('No results.'));
|
||||
info(DI::l10n()->t('No results.'));
|
||||
return $o;
|
||||
}
|
||||
|
||||
if ($tag) {
|
||||
$title = L10n::t('Items tagged with: %s', $search);
|
||||
$title = DI::l10n()->t('Items tagged with: %s', $search);
|
||||
} else {
|
||||
$title = L10n::t('Results for: %s', $search);
|
||||
$title = DI::l10n()->t('Results for: %s', $search);
|
||||
}
|
||||
|
||||
$o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'), [
|
||||
|
|
|
@ -23,15 +23,15 @@ class Saved extends BaseModule
|
|||
$fields = ['uid' => local_user(), 'term' => $search];
|
||||
if (!DBA::exists('search', $fields)) {
|
||||
DBA::insert('search', $fields);
|
||||
info(L10n::t('Search term successfully saved.'));
|
||||
info(DI::l10n()->t('Search term successfully saved.'));
|
||||
} else {
|
||||
info(L10n::t('Search term already saved.'));
|
||||
info(DI::l10n()->t('Search term already saved.'));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
DBA::delete('search', ['uid' => local_user(), 'term' => $search]);
|
||||
info(L10n::t('Search term successfully removed.'));
|
||||
info(DI::l10n()->t('Search term successfully removed.'));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,8 +87,8 @@ class Login extends BaseModule
|
|||
$reg = false;
|
||||
if ($register && intval(DI::config()->get('config', 'register_policy')) !== Register::CLOSED) {
|
||||
$reg = [
|
||||
'title' => L10n::t('Create a New Account'),
|
||||
'desc' => L10n::t('Register'),
|
||||
'title' => DI::l10n()->t('Create a New Account'),
|
||||
'desc' => DI::l10n()->t('Register'),
|
||||
'url' => self::getRegisterURL()
|
||||
];
|
||||
}
|
||||
|
@ -112,12 +112,12 @@ class Login extends BaseModule
|
|||
}
|
||||
|
||||
if (!empty(Session::get('openid_identity'))) {
|
||||
$openid_title = L10n::t('Your OpenID: ');
|
||||
$openid_title = DI::l10n()->t('Your OpenID: ');
|
||||
$openid_readonly = true;
|
||||
$identity = Session::get('openid_identity');
|
||||
$username_desc = L10n::t('Please enter your username and password to add the OpenID to your existing account.');
|
||||
$username_desc = DI::l10n()->t('Please enter your username and password to add the OpenID to your existing account.');
|
||||
} else {
|
||||
$openid_title = L10n::t('Or login using OpenID: ');
|
||||
$openid_title = DI::l10n()->t('Or login using OpenID: ');
|
||||
$openid_readonly = false;
|
||||
$identity = '';
|
||||
$username_desc = '';
|
||||
|
@ -127,12 +127,12 @@ class Login extends BaseModule
|
|||
$tpl,
|
||||
[
|
||||
'$dest_url' => DI::baseUrl()->get(true) . '/login',
|
||||
'$logout' => L10n::t('Logout'),
|
||||
'$login' => L10n::t('Login'),
|
||||
'$logout' => DI::l10n()->t('Logout'),
|
||||
'$login' => DI::l10n()->t('Login'),
|
||||
|
||||
'$lname' => ['username', L10n::t('Nickname or Email: '), '', $username_desc],
|
||||
'$lpassword' => ['password', L10n::t('Password: '), '', ''],
|
||||
'$lremember' => ['remember', L10n::t('Remember me'), 0, ''],
|
||||
'$lname' => ['username', DI::l10n()->t('Nickname or Email: '), '', $username_desc],
|
||||
'$lpassword' => ['password', DI::l10n()->t('Password: '), '', ''],
|
||||
'$lremember' => ['remember', DI::l10n()->t('Remember me'), 0, ''],
|
||||
|
||||
'$openid' => !$noid,
|
||||
'$lopenid' => ['openid_url', $openid_title, $identity, '', $openid_readonly],
|
||||
|
@ -141,14 +141,14 @@ class Login extends BaseModule
|
|||
|
||||
'$register' => $reg,
|
||||
|
||||
'$lostpass' => L10n::t('Forgot your password?'),
|
||||
'$lostlink' => L10n::t('Password Reset'),
|
||||
'$lostpass' => DI::l10n()->t('Forgot your password?'),
|
||||
'$lostlink' => DI::l10n()->t('Password Reset'),
|
||||
|
||||
'$tostitle' => L10n::t('Website Terms of Service'),
|
||||
'$toslink' => L10n::t('terms of service'),
|
||||
'$tostitle' => DI::l10n()->t('Website Terms of Service'),
|
||||
'$toslink' => DI::l10n()->t('terms of service'),
|
||||
|
||||
'$privacytitle' => L10n::t('Website Privacy Policy'),
|
||||
'$privacylink' => L10n::t('privacy policy'),
|
||||
'$privacytitle' => DI::l10n()->t('Website Privacy Policy'),
|
||||
'$privacylink' => DI::l10n()->t('privacy policy'),
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -40,11 +40,11 @@ class Recovery extends BaseModule
|
|||
if (RecoveryCode::existsForUser(local_user(), $recovery_code)) {
|
||||
RecoveryCode::markUsedForUser(local_user(), $recovery_code);
|
||||
Session::set('2fa', true);
|
||||
notice(L10n::t('Remaining recovery codes: %d', RecoveryCode::countValidForUser(local_user())));
|
||||
notice(DI::l10n()->t('Remaining recovery codes: %d', RecoveryCode::countValidForUser(local_user())));
|
||||
|
||||
DI::auth()->setForUser($a, $a->user, true, true);
|
||||
} else {
|
||||
notice(L10n::t('Invalid code, please retry.'));
|
||||
notice(DI::l10n()->t('Invalid code, please retry.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,11 +63,11 @@ class Recovery extends BaseModule
|
|||
return Renderer::replaceMacros(Renderer::getMarkupTemplate('twofactor/recovery.tpl'), [
|
||||
'$form_security_token' => self::getFormSecurityToken('twofactor_recovery'),
|
||||
|
||||
'$title' => L10n::t('Two-factor recovery'),
|
||||
'$message' => L10n::t('<p>You can enter one of your one-time recovery codes in case you lost access to your mobile device.</p>'),
|
||||
'$recovery_message' => L10n::t('Don’t have your phone? <a href="%s">Enter a two-factor recovery code</a>', '2fa/recovery'),
|
||||
'$recovery_code' => ['recovery_code', L10n::t('Please enter a recovery code'), '', '', '', 'placeholder="000000-000000"'],
|
||||
'$recovery_label' => L10n::t('Submit recovery code and complete login'),
|
||||
'$title' => DI::l10n()->t('Two-factor recovery'),
|
||||
'$message' => DI::l10n()->t('<p>You can enter one of your one-time recovery codes in case you lost access to your mobile device.</p>'),
|
||||
'$recovery_message' => DI::l10n()->t('Don’t have your phone? <a href="%s">Enter a two-factor recovery code</a>', '2fa/recovery'),
|
||||
'$recovery_code' => ['recovery_code', DI::l10n()->t('Please enter a recovery code'), '', '', '', 'placeholder="000000-000000"'],
|
||||
'$recovery_label' => DI::l10n()->t('Submit recovery code and complete login'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ class Verify extends BaseModule
|
|||
// Resume normal login workflow
|
||||
DI::auth()->setForUser($a, $a->user, true, true);
|
||||
} else {
|
||||
self::$errors[] = L10n::t('Invalid code, please retry.');
|
||||
self::$errors[] = DI::l10n()->t('Invalid code, please retry.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,13 +59,13 @@ class Verify extends BaseModule
|
|||
return Renderer::replaceMacros(Renderer::getMarkupTemplate('twofactor/verify.tpl'), [
|
||||
'$form_security_token' => self::getFormSecurityToken('twofactor_verify'),
|
||||
|
||||
'$title' => L10n::t('Two-factor authentication'),
|
||||
'$message' => L10n::t('<p>Open the two-factor authentication app on your device to get an authentication code and verify your identity.</p>'),
|
||||
'$title' => DI::l10n()->t('Two-factor authentication'),
|
||||
'$message' => DI::l10n()->t('<p>Open the two-factor authentication app on your device to get an authentication code and verify your identity.</p>'),
|
||||
'$errors_label' => L10n::tt('Error', 'Errors', count(self::$errors)),
|
||||
'$errors' => self::$errors,
|
||||
'$recovery_message' => L10n::t('Don’t have your phone? <a href="%s">Enter a two-factor recovery code</a>', '2fa/recovery'),
|
||||
'$verify_code' => ['verify_code', L10n::t('Please enter a code from your authentication app'), '', '', 'required', 'autofocus placeholder="000000"', 'tel'],
|
||||
'$verify_label' => L10n::t('Verify code and complete login'),
|
||||
'$recovery_message' => DI::l10n()->t('Don’t have your phone? <a href="%s">Enter a two-factor recovery code</a>', '2fa/recovery'),
|
||||
'$verify_code' => ['verify_code', DI::l10n()->t('Please enter a code from your authentication app'), '', '', 'required', 'autofocus placeholder="000000"', 'tel'],
|
||||
'$verify_label' => DI::l10n()->t('Verify code and complete login'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ class Delegation extends BaseSettingsModule
|
|||
public static function post(array $parameters = [])
|
||||
{
|
||||
if (!local_user() || !empty(DI::app()->user['uid']) && DI::app()->user['uid'] != local_user()) {
|
||||
throw new HTTPException\ForbiddenException(L10n::t('Permission denied.'));
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
|
||||
BaseModule::checkFormSecurityTokenRedirectOnError('settings/delegation', 'delegate');
|
||||
|
@ -34,13 +34,13 @@ class Delegation extends BaseSettingsModule
|
|||
if ($parent_uid != 0) {
|
||||
try {
|
||||
User::getIdFromPasswordAuthentication($parent_uid, $parent_password);
|
||||
info(L10n::t('Delegation successfully granted.'));
|
||||
info(DI::l10n()->t('Delegation successfully granted.'));
|
||||
} catch (\Exception $ex) {
|
||||
notice(L10n::t('Parent user not found, unavailable or password doesn\'t match.'));
|
||||
notice(DI::l10n()->t('Parent user not found, unavailable or password doesn\'t match.'));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
info(L10n::t('Delegation successfully revoked.'));
|
||||
info(DI::l10n()->t('Delegation successfully revoked.'));
|
||||
}
|
||||
|
||||
DBA::update('user', ['parent-uid' => $parent_uid], ['uid' => local_user()]);
|
||||
|
@ -51,7 +51,7 @@ class Delegation extends BaseSettingsModule
|
|||
parent::content($parameters);
|
||||
|
||||
if (!local_user()) {
|
||||
throw new HTTPException\ForbiddenException(L10n::t('Permission denied.'));
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
|
||||
$args = DI::args();
|
||||
|
@ -62,7 +62,7 @@ class Delegation extends BaseSettingsModule
|
|||
|
||||
if ($action === 'add' && $user_id) {
|
||||
if (Session::get('submanage')) {
|
||||
notice(L10n::t('Delegated administrators can view but not change delegation permissions.'));
|
||||
notice(DI::l10n()->t('Delegated administrators can view but not change delegation permissions.'));
|
||||
DI::baseUrl()->redirect('settings/delegation');
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class Delegation extends BaseSettingsModule
|
|||
DBA::insert('manage', ['uid' => $user_id, 'mid' => local_user()]);
|
||||
}
|
||||
} else {
|
||||
notice(L10n::t('Delegate user not found.'));
|
||||
notice(DI::l10n()->t('Delegate user not found.'));
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('settings/delegation');
|
||||
|
@ -84,7 +84,7 @@ class Delegation extends BaseSettingsModule
|
|||
|
||||
if ($action === 'remove' && $user_id) {
|
||||
if (Session::get('submanage')) {
|
||||
notice(L10n::t('Delegated administrators can view but not change delegation permissions.'));
|
||||
notice(DI::l10n()->t('Delegated administrators can view but not change delegation permissions.'));
|
||||
DI::baseUrl()->redirect('settings/delegation');
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ class Delegation extends BaseSettingsModule
|
|||
$user = User::getById(local_user(), ['parent-uid', 'email']);
|
||||
if (DBA::isResult($user) && !DBA::exists('user', ['parent-uid' => local_user()])) {
|
||||
$parent_uid = $user['parent-uid'];
|
||||
$parents = [0 => L10n::t('No parent user')];
|
||||
$parents = [0 => DI::l10n()->t('No parent user')];
|
||||
|
||||
$fields = ['uid', 'username', 'nickname'];
|
||||
$condition = ['email' => $user['email'], 'verified' => true, 'blocked' => false, 'parent-uid' => 0];
|
||||
|
@ -135,33 +135,33 @@ class Delegation extends BaseSettingsModule
|
|||
}
|
||||
|
||||
$parent_user = ['parent_user', '', $parent_uid, '', $parents];
|
||||
$parent_password = ['parent_password', L10n::t('Parent Password:'), '', L10n::t('Please enter the password of the parent account to legitimize your request.')];
|
||||
$parent_password = ['parent_password', DI::l10n()->t('Parent Password:'), '', DI::l10n()->t('Please enter the password of the parent account to legitimize your request.')];
|
||||
}
|
||||
|
||||
$is_child_user = !empty($user['parent-uid']);
|
||||
|
||||
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('settings/delegation.tpl'), [
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken('delegate'),
|
||||
'$account_header' => L10n::t('Additional Accounts'),
|
||||
'$account_desc' => L10n::t('Register additional accounts that are automatically connected to your existing account so you can manage it from this account.'),
|
||||
'$add_account' => L10n::t('Register an additional account'),
|
||||
'$parent_header' => L10n::t('Parent User'),
|
||||
'$account_header' => DI::l10n()->t('Additional Accounts'),
|
||||
'$account_desc' => DI::l10n()->t('Register additional accounts that are automatically connected to your existing account so you can manage it from this account.'),
|
||||
'$add_account' => DI::l10n()->t('Register an additional account'),
|
||||
'$parent_header' => DI::l10n()->t('Parent User'),
|
||||
'$parent_user' => $parent_user,
|
||||
'$parent_password' => $parent_password,
|
||||
'$parent_desc' => L10n::t('Parent users have total control about this account, including the account settings. Please double check whom you give this access.'),
|
||||
'$parent_desc' => DI::l10n()->t('Parent users have total control about this account, including the account settings. Please double check whom you give this access.'),
|
||||
'$is_child_user' => $is_child_user,
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$header' => L10n::t('Manage Accounts'),
|
||||
'$delegates_header' => L10n::t('Delegates'),
|
||||
'$submit' => DI::l10n()->t('Save Settings'),
|
||||
'$header' => DI::l10n()->t('Manage Accounts'),
|
||||
'$delegates_header' => DI::l10n()->t('Delegates'),
|
||||
'$base' => DI::baseUrl(),
|
||||
'$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_delegates' => L10n::t('Existing Page Delegates'),
|
||||
'$desc' => DI::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_delegates' => DI::l10n()->t('Existing Page Delegates'),
|
||||
'$delegates' => $delegates,
|
||||
'$head_potentials' => L10n::t('Potential Delegates'),
|
||||
'$head_potentials' => DI::l10n()->t('Potential Delegates'),
|
||||
'$potentials' => $potentials,
|
||||
'$remove' => L10n::t('Remove'),
|
||||
'$add' => L10n::t('Add'),
|
||||
'$none' => L10n::t('No entries.')
|
||||
'$remove' => DI::l10n()->t('Remove'),
|
||||
'$add' => DI::l10n()->t('Add'),
|
||||
'$none' => DI::l10n()->t('No entries.')
|
||||
]);
|
||||
|
||||
return $o;
|
||||
|
|
|
@ -31,7 +31,7 @@ class AppSpecific extends BaseSettingsModule
|
|||
}
|
||||
|
||||
if (!self::checkFormSecurityToken('settings_2fa_password', 't')) {
|
||||
notice(L10n::t('Please enter your password to access this page.'));
|
||||
notice(DI::l10n()->t('Please enter your password to access this page.'));
|
||||
DI::baseUrl()->redirect('settings/2fa');
|
||||
}
|
||||
}
|
||||
|
@ -49,20 +49,20 @@ class AppSpecific extends BaseSettingsModule
|
|||
case 'generate':
|
||||
$description = $_POST['description'] ?? '';
|
||||
if (empty($description)) {
|
||||
notice(L10n::t('App-specific password generation failed: The description is empty.'));
|
||||
notice(DI::l10n()->t('App-specific password generation failed: The description is empty.'));
|
||||
DI::baseUrl()->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password'));
|
||||
} elseif (AppSpecificPassword::checkDuplicateForUser(local_user(), $description)) {
|
||||
notice(L10n::t('App-specific password generation failed: This description already exists.'));
|
||||
notice(DI::l10n()->t('App-specific password generation failed: This description already exists.'));
|
||||
DI::baseUrl()->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password'));
|
||||
} else {
|
||||
self::$appSpecificPassword = AppSpecificPassword::generateForUser(local_user(), $_POST['description'] ?? '');
|
||||
notice(L10n::t('New app-specific password generated.'));
|
||||
notice(DI::l10n()->t('New app-specific password generated.'));
|
||||
}
|
||||
|
||||
break;
|
||||
case 'revoke_all' :
|
||||
AppSpecificPassword::deleteAllForUser(local_user());
|
||||
notice(L10n::t('App-specific passwords successfully revoked.'));
|
||||
notice(DI::l10n()->t('App-specific passwords successfully revoked.'));
|
||||
DI::baseUrl()->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password'));
|
||||
break;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ class AppSpecific extends BaseSettingsModule
|
|||
self::checkFormSecurityTokenRedirectOnError('settings/2fa/app_specific', 'settings_2fa_app_specific');
|
||||
|
||||
if (AppSpecificPassword::deleteForUser(local_user(), $_POST['revoke_id'])) {
|
||||
notice(L10n::t('App-specific password successfully revoked.'));
|
||||
notice(DI::l10n()->t('App-specific password successfully revoked.'));
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password'));
|
||||
|
@ -93,22 +93,22 @@ class AppSpecific extends BaseSettingsModule
|
|||
'$form_security_token' => self::getFormSecurityToken('settings_2fa_app_specific'),
|
||||
'$password_security_token' => self::getFormSecurityToken('settings_2fa_password'),
|
||||
|
||||
'$title' => L10n::t('Two-factor app-specific passwords'),
|
||||
'$help_label' => L10n::t('Help'),
|
||||
'$message' => L10n::t('<p>App-specific passwords are randomly generated passwords used instead your regular password to authenticate your account on third-party applications that don\'t support two-factor authentication.</p>'),
|
||||
'$generated_message' => L10n::t('Make sure to copy your new app-specific password now. You won’t be able to see it again!'),
|
||||
'$title' => DI::l10n()->t('Two-factor app-specific passwords'),
|
||||
'$help_label' => DI::l10n()->t('Help'),
|
||||
'$message' => DI::l10n()->t('<p>App-specific passwords are randomly generated passwords used instead your regular password to authenticate your account on third-party applications that don\'t support two-factor authentication.</p>'),
|
||||
'$generated_message' => DI::l10n()->t('Make sure to copy your new app-specific password now. You won’t be able to see it again!'),
|
||||
'$generated_app_specific_password' => self::$appSpecificPassword,
|
||||
|
||||
'$description_label' => L10n::t('Description'),
|
||||
'$last_used_label' => L10n::t('Last Used'),
|
||||
'$revoke_label' => L10n::t('Revoke'),
|
||||
'$revoke_all_label' => L10n::t('Revoke All'),
|
||||
'$description_label' => DI::l10n()->t('Description'),
|
||||
'$last_used_label' => DI::l10n()->t('Last Used'),
|
||||
'$revoke_label' => DI::l10n()->t('Revoke'),
|
||||
'$revoke_all_label' => DI::l10n()->t('Revoke All'),
|
||||
|
||||
'$app_specific_passwords' => $appSpecificPasswords,
|
||||
'$generate_message' => L10n::t('When you generate a new app-specific password, you must use it right away, it will be shown to you once after you generate it.'),
|
||||
'$generate_title' => L10n::t('Generate new app-specific password'),
|
||||
'$description_placeholder_label' => L10n::t('Friendiqa on my Fairphone 2...'),
|
||||
'$generate_label' => L10n::t('Generate'),
|
||||
'$generate_message' => DI::l10n()->t('When you generate a new app-specific password, you must use it right away, it will be shown to you once after you generate it.'),
|
||||
'$generate_title' => DI::l10n()->t('Generate new app-specific password'),
|
||||
'$description_placeholder_label' => DI::l10n()->t('Friendiqa on my Fairphone 2...'),
|
||||
'$generate_label' => DI::l10n()->t('Generate'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class Index extends BaseSettingsModule
|
|||
DI::pConfig()->delete(local_user(), '2fa', 'verified');
|
||||
Session::remove('2fa');
|
||||
|
||||
notice(L10n::t('Two-factor authentication successfully disabled.'));
|
||||
notice(DI::l10n()->t('Two-factor authentication successfully disabled.'));
|
||||
DI::baseUrl()->redirect('settings/2fa');
|
||||
}
|
||||
break;
|
||||
|
@ -67,7 +67,7 @@ class Index extends BaseSettingsModule
|
|||
break;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
notice(L10n::t('Wrong Password'));
|
||||
notice(DI::l10n()->t('Wrong Password'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,35 +84,35 @@ class Index extends BaseSettingsModule
|
|||
|
||||
return Renderer::replaceMacros(Renderer::getMarkupTemplate('settings/twofactor/index.tpl'), [
|
||||
'$form_security_token' => self::getFormSecurityToken('settings_2fa'),
|
||||
'$title' => L10n::t('Two-factor authentication'),
|
||||
'$help_label' => L10n::t('Help'),
|
||||
'$status_title' => L10n::t('Status'),
|
||||
'$message' => L10n::t('<p>Use an application on a mobile device to get two-factor authentication codes when prompted on login.</p>'),
|
||||
'$title' => DI::l10n()->t('Two-factor authentication'),
|
||||
'$help_label' => DI::l10n()->t('Help'),
|
||||
'$status_title' => DI::l10n()->t('Status'),
|
||||
'$message' => DI::l10n()->t('<p>Use an application on a mobile device to get two-factor authentication codes when prompted on login.</p>'),
|
||||
'$has_secret' => $has_secret,
|
||||
'$verified' => $verified,
|
||||
|
||||
'$auth_app_label' => L10n::t('Authenticator app'),
|
||||
'$app_status' => $has_secret ? $verified ? L10n::t('Configured') : L10n::t('Not Configured') : L10n::t('Disabled'),
|
||||
'$not_configured_message' => L10n::t('<p>You haven\'t finished configuring your authenticator app.</p>'),
|
||||
'$configured_message' => L10n::t('<p>Your authenticator app is correctly configured.</p>'),
|
||||
'$auth_app_label' => DI::l10n()->t('Authenticator app'),
|
||||
'$app_status' => $has_secret ? $verified ? DI::l10n()->t('Configured') : DI::l10n()->t('Not Configured') : DI::l10n()->t('Disabled'),
|
||||
'$not_configured_message' => DI::l10n()->t('<p>You haven\'t finished configuring your authenticator app.</p>'),
|
||||
'$configured_message' => DI::l10n()->t('<p>Your authenticator app is correctly configured.</p>'),
|
||||
|
||||
'$recovery_codes_title' => L10n::t('Recovery codes'),
|
||||
'$recovery_codes_remaining' => L10n::t('Remaining valid codes'),
|
||||
'$recovery_codes_title' => DI::l10n()->t('Recovery codes'),
|
||||
'$recovery_codes_remaining' => DI::l10n()->t('Remaining valid codes'),
|
||||
'$recovery_codes_count' => RecoveryCode::countValidForUser(local_user()),
|
||||
'$recovery_codes_message' => L10n::t('<p>These one-use codes can replace an authenticator app code in case you have lost access to it.</p>'),
|
||||
'$recovery_codes_message' => DI::l10n()->t('<p>These one-use codes can replace an authenticator app code in case you have lost access to it.</p>'),
|
||||
|
||||
'$app_specific_passwords_title' => L10n::t('App-specific passwords'),
|
||||
'$app_specific_passwords_remaining' => L10n::t('Generated app-specific passwords'),
|
||||
'$app_specific_passwords_title' => DI::l10n()->t('App-specific passwords'),
|
||||
'$app_specific_passwords_remaining' => DI::l10n()->t('Generated app-specific passwords'),
|
||||
'$app_specific_passwords_count' => AppSpecificPassword::countForUser(local_user()),
|
||||
'$app_specific_passwords_message' => L10n::t('<p>These randomly generated passwords allow you to authenticate on apps not supporting two-factor authentication.</p>'),
|
||||
'$app_specific_passwords_message' => DI::l10n()->t('<p>These randomly generated passwords allow you to authenticate on apps not supporting two-factor authentication.</p>'),
|
||||
|
||||
'$action_title' => L10n::t('Actions'),
|
||||
'$password' => ['password', L10n::t('Current password:'), '', L10n::t('You need to provide your current password to change two-factor authentication settings.'), 'required', 'autofocus'],
|
||||
'$enable_label' => L10n::t('Enable two-factor authentication'),
|
||||
'$disable_label' => L10n::t('Disable two-factor authentication'),
|
||||
'$recovery_codes_label' => L10n::t('Show recovery codes'),
|
||||
'$app_specific_passwords_label' => L10n::t('Manage app-specific passwords'),
|
||||
'$configure_label' => L10n::t('Finish app configuration'),
|
||||
'$action_title' => DI::l10n()->t('Actions'),
|
||||
'$password' => ['password', DI::l10n()->t('Current password:'), '', DI::l10n()->t('You need to provide your current password to change two-factor authentication settings.'), 'required', 'autofocus'],
|
||||
'$enable_label' => DI::l10n()->t('Enable two-factor authentication'),
|
||||
'$disable_label' => DI::l10n()->t('Disable two-factor authentication'),
|
||||
'$recovery_codes_label' => DI::l10n()->t('Show recovery codes'),
|
||||
'$app_specific_passwords_label' => DI::l10n()->t('Manage app-specific passwords'),
|
||||
'$configure_label' => DI::l10n()->t('Finish app configuration'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class Recovery extends BaseSettingsModule
|
|||
}
|
||||
|
||||
if (!self::checkFormSecurityToken('settings_2fa_password', 't')) {
|
||||
notice(L10n::t('Please enter your password to access this page.'));
|
||||
notice(DI::l10n()->t('Please enter your password to access this page.'));
|
||||
DI::baseUrl()->redirect('settings/2fa');
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ class Recovery extends BaseSettingsModule
|
|||
|
||||
if ($_POST['action'] == 'regenerate') {
|
||||
RecoveryCode::regenerateForUser(local_user());
|
||||
notice(L10n::t('New recovery codes successfully generated.'));
|
||||
notice(DI::l10n()->t('New recovery codes successfully generated.'));
|
||||
DI::baseUrl()->redirect('settings/2fa/recovery?t=' . self::getFormSecurityToken('settings_2fa_password'));
|
||||
}
|
||||
}
|
||||
|
@ -71,14 +71,14 @@ class Recovery extends BaseSettingsModule
|
|||
'$form_security_token' => self::getFormSecurityToken('settings_2fa_recovery'),
|
||||
'$password_security_token' => self::getFormSecurityToken('settings_2fa_password'),
|
||||
|
||||
'$title' => L10n::t('Two-factor recovery codes'),
|
||||
'$help_label' => L10n::t('Help'),
|
||||
'$message' => L10n::t('<p>Recovery codes can be used to access your account in the event you lose access to your device and cannot receive two-factor authentication codes.</p><p><strong>Put these in a safe spot!</strong> If you lose your device and don’t have the recovery codes you will lose access to your account.</p>'),
|
||||
'$title' => DI::l10n()->t('Two-factor recovery codes'),
|
||||
'$help_label' => DI::l10n()->t('Help'),
|
||||
'$message' => DI::l10n()->t('<p>Recovery codes can be used to access your account in the event you lose access to your device and cannot receive two-factor authentication codes.</p><p><strong>Put these in a safe spot!</strong> If you lose your device and don’t have the recovery codes you will lose access to your account.</p>'),
|
||||
'$recovery_codes' => $recoveryCodes,
|
||||
'$regenerate_message' => L10n::t('When you generate new recovery codes, you must copy the new codes. Your old codes won’t work anymore.'),
|
||||
'$regenerate_label' => L10n::t('Generate new recovery codes'),
|
||||
'$regenerate_message' => DI::l10n()->t('When you generate new recovery codes, you must copy the new codes. Your old codes won’t work anymore.'),
|
||||
'$regenerate_label' => DI::l10n()->t('Generate new recovery codes'),
|
||||
'$verified' => $verified,
|
||||
'$verify_label' => L10n::t('Next: Verification'),
|
||||
'$verify_label' => DI::l10n()->t('Next: Verification'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class Verify extends BaseSettingsModule
|
|||
}
|
||||
|
||||
if (!self::checkFormSecurityToken('settings_2fa_password', 't')) {
|
||||
notice(L10n::t('Please enter your password to access this page.'));
|
||||
notice(DI::l10n()->t('Please enter your password to access this page.'));
|
||||
DI::baseUrl()->redirect('settings/2fa');
|
||||
}
|
||||
}
|
||||
|
@ -57,11 +57,11 @@ class Verify extends BaseSettingsModule
|
|||
DI::pConfig()->set(local_user(), '2fa', 'verified', true);
|
||||
Session::set('2fa', true);
|
||||
|
||||
notice(L10n::t('Two-factor authentication successfully activated.'));
|
||||
notice(DI::l10n()->t('Two-factor authentication successfully activated.'));
|
||||
|
||||
DI::baseUrl()->redirect('settings/2fa');
|
||||
} else {
|
||||
notice(L10n::t('Invalid code, please retry.'));
|
||||
notice(DI::l10n()->t('Invalid code, please retry.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ class Verify extends BaseSettingsModule
|
|||
|
||||
$shortOtpauthUrl = explode('?', $otpauthUrl)[0];
|
||||
|
||||
$manual_message = L10n::t('<p>Or you can submit the authentication settings manually:</p>
|
||||
$manual_message = DI::l10n()->t('<p>Or you can submit the authentication settings manually:</p>
|
||||
<dl>
|
||||
<dt>Issuer</dt>
|
||||
<dd>%s</dd>
|
||||
|
@ -110,18 +110,18 @@ class Verify extends BaseSettingsModule
|
|||
'$form_security_token' => self::getFormSecurityToken('settings_2fa_verify'),
|
||||
'$password_security_token' => self::getFormSecurityToken('settings_2fa_password'),
|
||||
|
||||
'$title' => L10n::t('Two-factor code verification'),
|
||||
'$help_label' => L10n::t('Help'),
|
||||
'$message' => L10n::t('<p>Please scan this QR Code with your authenticator app and submit the provided code.</p>'),
|
||||
'$title' => DI::l10n()->t('Two-factor code verification'),
|
||||
'$help_label' => DI::l10n()->t('Help'),
|
||||
'$message' => DI::l10n()->t('<p>Please scan this QR Code with your authenticator app and submit the provided code.</p>'),
|
||||
'$qrcode_image' => $qrcode_image,
|
||||
'$qrcode_url_message' => L10n::t('<p>Or you can open the following URL in your mobile devicde:</p><p><a href="%s">%s</a></p>', $otpauthUrl, $shortOtpauthUrl),
|
||||
'$qrcode_url_message' => DI::l10n()->t('<p>Or you can open the following URL in your mobile devicde:</p><p><a href="%s">%s</a></p>', $otpauthUrl, $shortOtpauthUrl),
|
||||
'$manual_message' => $manual_message,
|
||||
'$company' => $company,
|
||||
'$holder' => $holder,
|
||||
'$secret' => $secret,
|
||||
|
||||
'$verify_code' => ['verify_code', L10n::t('Please enter a code from your authentication app'), '', '', 'required', 'autofocus placeholder="000000"'],
|
||||
'$verify_label' => L10n::t('Verify code and enable two-factor authentication'),
|
||||
'$verify_code' => ['verify_code', DI::l10n()->t('Please enter a code from your authentication app'), '', '', 'required', 'autofocus placeholder="000000"'],
|
||||
'$verify_label' => DI::l10n()->t('Verify code and enable two-factor authentication'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,15 +39,15 @@ class UserExport extends BaseSettingsModule
|
|||
* list of array( 'link url', 'link text', 'help text' )
|
||||
*/
|
||||
$options = [
|
||||
['settings/userexport/account', L10n::t('Export account'), L10n::t('Export your account info and contacts. Use this to make a backup of your account and/or to move it to another server.')],
|
||||
['settings/userexport/backup', L10n::t('Export all'), L10n::t("Export your accout info, contacts and all your items as json. Could be a very big file, and could take a lot of time. Use this to make a full backup of your account \x28photos are not exported\x29")],
|
||||
['settings/userexport/contact', L10n::t('Export Contacts to CSV'), L10n::t("Export the list of the accounts you are following as CSV file. Compatible to e.g. Mastodon.")],
|
||||
['settings/userexport/account', DI::l10n()->t('Export account'), DI::l10n()->t('Export your account info and contacts. Use this to make a backup of your account and/or to move it to another server.')],
|
||||
['settings/userexport/backup', DI::l10n()->t('Export all'), DI::l10n()->t("Export your accout info, contacts and all your items as json. Could be a very big file, and could take a lot of time. Use this to make a full backup of your account \x28photos are not exported\x29")],
|
||||
['settings/userexport/contact', DI::l10n()->t('Export Contacts to CSV'), DI::l10n()->t("Export the list of the accounts you are following as CSV file. Compatible to e.g. Mastodon.")],
|
||||
];
|
||||
Hook::callAll('uexport_options', $options);
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate("settings/userexport.tpl");
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$title' => L10n::t('Export personal data'),
|
||||
'$title' => DI::l10n()->t('Export personal data'),
|
||||
'$options' => $options
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -29,30 +29,30 @@ class HTTPException
|
|||
|
||||
$titles = [
|
||||
200 => 'OK',
|
||||
400 => L10n::t('Bad Request'),
|
||||
401 => L10n::t('Unauthorized'),
|
||||
403 => L10n::t('Forbidden'),
|
||||
404 => L10n::t('Not Found'),
|
||||
500 => L10n::t('Internal Server Error'),
|
||||
503 => L10n::t('Service Unavailable'),
|
||||
400 => DI::l10n()->t('Bad Request'),
|
||||
401 => DI::l10n()->t('Unauthorized'),
|
||||
403 => DI::l10n()->t('Forbidden'),
|
||||
404 => DI::l10n()->t('Not Found'),
|
||||
500 => DI::l10n()->t('Internal Server Error'),
|
||||
503 => DI::l10n()->t('Service Unavailable'),
|
||||
];
|
||||
$title = ($titles[$e->getCode()] ?? '') ?: 'Error ' . $e->getCode();
|
||||
|
||||
if (empty($message)) {
|
||||
// Explanations are taken from https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
|
||||
$explanation = [
|
||||
400 => L10n::t('The server cannot or will not process the request due to an apparent client error.'),
|
||||
401 => L10n::t('Authentication is required and has failed or has not yet been provided.'),
|
||||
403 => L10n::t('The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource, or may need an account.'),
|
||||
404 => L10n::t('The requested resource could not be found but may be available in the future.'),
|
||||
500 => L10n::t('An unexpected condition was encountered and no more specific message is suitable.'),
|
||||
503 => L10n::t('The server is currently unavailable (because it is overloaded or down for maintenance). Please try again later.'),
|
||||
400 => DI::l10n()->t('The server cannot or will not process the request due to an apparent client error.'),
|
||||
401 => DI::l10n()->t('Authentication is required and has failed or has not yet been provided.'),
|
||||
403 => DI::l10n()->t('The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource, or may need an account.'),
|
||||
404 => DI::l10n()->t('The requested resource could not be found but may be available in the future.'),
|
||||
500 => DI::l10n()->t('An unexpected condition was encountered and no more specific message is suitable.'),
|
||||
503 => DI::l10n()->t('The server is currently unavailable (because it is overloaded or down for maintenance). Please try again later.'),
|
||||
];
|
||||
|
||||
$message = $explanation[$e->getCode()] ?? '';
|
||||
}
|
||||
|
||||
return ['$title' => $title, '$message' => $message, '$back' => L10n::t('Go back')];
|
||||
return ['$title' => $title, '$message' => $message, '$back' => DI::l10n()->t('Go back')];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,12 +32,12 @@ class Tos extends BaseModule
|
|||
**/
|
||||
public function __construct()
|
||||
{
|
||||
$this->privacy_operate = L10n::t('At the time of registration, and for providing communications between the user account and their contacts, the user has to provide a display name (pen name), an username (nickname) and a working email address. The names will be accessible on the profile page of the account by any visitor of the page, even if other profile details are not displayed. The email address will only be used to send the user notifications about interactions, but wont be visibly displayed. The listing of an account in the node\'s user directory or the global user directory is optional and can be controlled in the user settings, it is not necessary for communication.');
|
||||
$this->privacy_distribute = L10n::t('This data is required for communication and is passed on to the nodes of the communication partners and is stored there. Users can enter additional private data that may be transmitted to the communication partners accounts.');
|
||||
$this->privacy_delete = L10n::t('At any point in time a logged in user can export their account data from the <a href="%1$s/settings/userexport">account settings</a>. If the user wants to delete their account they can do so at <a href="%1$s/removeme">%1$s/removeme</a>. The deletion of the account will be permanent. Deletion of the data will also be requested from the nodes of the communication partners.', DI::baseUrl());
|
||||
$this->privacy_operate = DI::l10n()->t('At the time of registration, and for providing communications between the user account and their contacts, the user has to provide a display name (pen name), an username (nickname) and a working email address. The names will be accessible on the profile page of the account by any visitor of the page, even if other profile details are not displayed. The email address will only be used to send the user notifications about interactions, but wont be visibly displayed. The listing of an account in the node\'s user directory or the global user directory is optional and can be controlled in the user settings, it is not necessary for communication.');
|
||||
$this->privacy_distribute = DI::l10n()->t('This data is required for communication and is passed on to the nodes of the communication partners and is stored there. Users can enter additional private data that may be transmitted to the communication partners accounts.');
|
||||
$this->privacy_delete = DI::l10n()->t('At any point in time a logged in user can export their account data from the <a href="%1$s/settings/userexport">account settings</a>. If the user wants to delete their account they can do so at <a href="%1$s/removeme">%1$s/removeme</a>. The deletion of the account will be permanent. Deletion of the data will also be requested from the nodes of the communication partners.', DI::baseUrl());
|
||||
// In some cases we don't need every single one of the above separate, but all in one block.
|
||||
// So here is an array to look over
|
||||
$this->privacy_complete = [L10n::t('Privacy Statement'), $this->privacy_operate, $this->privacy_distribute, $this->privacy_delete];
|
||||
$this->privacy_complete = [DI::l10n()->t('Privacy Statement'), $this->privacy_operate, $this->privacy_distribute, $this->privacy_delete];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -70,13 +70,13 @@ class Tos extends BaseModule
|
|||
$tpl = Renderer::getMarkupTemplate('tos.tpl');
|
||||
if (Config::get('system', 'tosdisplay')) {
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$title' => L10n::t('Terms of Service'),
|
||||
'$title' => DI::l10n()->t('Terms of Service'),
|
||||
'$tostext' => BBCode::convert(Config::get('system', 'tostext')),
|
||||
'$displayprivstatement' => Config::get('system', 'tosprivstatement'),
|
||||
'$privstatementtitle' => L10n::t('Privacy Statement'),
|
||||
'$privacy_operate' => L10n::t('At the time of registration, and for providing communications between the user account and their contacts, the user has to provide a display name (pen name), an username (nickname) and a working email address. The names will be accessible on the profile page of the account by any visitor of the page, even if other profile details are not displayed. The email address will only be used to send the user notifications about interactions, but wont be visibly displayed. The listing of an account in the node\'s user directory or the global user directory is optional and can be controlled in the user settings, it is not necessary for communication.'),
|
||||
'$privacy_distribute' => L10n::t('This data is required for communication and is passed on to the nodes of the communication partners and is stored there. Users can enter additional private data that may be transmitted to the communication partners accounts.'),
|
||||
'$privacy_delete' => L10n::t('At any point in time a logged in user can export their account data from the <a href="%1$s/settings/userexport">account settings</a>. If the user wants to delete their account they can do so at <a href="%1$s/removeme">%1$s/removeme</a>. The deletion of the account will be permanent. Deletion of the data will also be requested from the nodes of the communication partners.', DI::baseUrl())
|
||||
'$privstatementtitle' => DI::l10n()->t('Privacy Statement'),
|
||||
'$privacy_operate' => DI::l10n()->t('At the time of registration, and for providing communications between the user account and their contacts, the user has to provide a display name (pen name), an username (nickname) and a working email address. The names will be accessible on the profile page of the account by any visitor of the page, even if other profile details are not displayed. The email address will only be used to send the user notifications about interactions, but wont be visibly displayed. The listing of an account in the node\'s user directory or the global user directory is optional and can be controlled in the user settings, it is not necessary for communication.'),
|
||||
'$privacy_distribute' => DI::l10n()->t('This data is required for communication and is passed on to the nodes of the communication partners and is stored there. Users can enter additional private data that may be transmitted to the communication partners accounts.'),
|
||||
'$privacy_delete' => DI::l10n()->t('At any point in time a logged in user can export their account data from the <a href="%1$s/settings/userexport">account settings</a>. If the user wants to delete their account they can do so at <a href="%1$s/removeme">%1$s/removeme</a>. The deletion of the account will be permanent. Deletion of the data will also be requested from the nodes of the communication partners.', DI::baseUrl())
|
||||
]);
|
||||
} else {
|
||||
return;
|
||||
|
|
|
@ -23,48 +23,48 @@ class Welcome extends BaseModule
|
|||
$tpl = Renderer::getMarkupTemplate('welcome.tpl');
|
||||
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$welcome' => L10n::t('Welcome to Friendica'),
|
||||
'$checklist' => L10n::t('New Member Checklist'),
|
||||
'$description' => L10n::t('We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page. A link to this page will be visible from your home page for two weeks after your initial registration and then will quietly disappear.'),
|
||||
'$welcome' => DI::l10n()->t('Welcome to Friendica'),
|
||||
'$checklist' => DI::l10n()->t('New Member Checklist'),
|
||||
'$description' => DI::l10n()->t('We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page. A link to this page will be visible from your home page for two weeks after your initial registration and then will quietly disappear.'),
|
||||
|
||||
'$started' => L10n::t('Getting Started'),
|
||||
'$quickstart_link' => L10n::t('Friendica Walk-Through'),
|
||||
'$quickstart_txt' => L10n::t('On your <em>Quick Start</em> page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.'),
|
||||
'$started' => DI::l10n()->t('Getting Started'),
|
||||
'$quickstart_link' => DI::l10n()->t('Friendica Walk-Through'),
|
||||
'$quickstart_txt' => DI::l10n()->t('On your <em>Quick Start</em> page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.'),
|
||||
|
||||
'$settings' => L10n::t('Settings'),
|
||||
'$settings_link' => L10n::t('Go to Your Settings'),
|
||||
'$settings_txt' => L10n::t('On your <em>Settings</em> page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.'),
|
||||
'$settings_other' => L10n::t('Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you.'),
|
||||
'$settings' => DI::l10n()->t('Settings'),
|
||||
'$settings_link' => DI::l10n()->t('Go to Your Settings'),
|
||||
'$settings_txt' => DI::l10n()->t('On your <em>Settings</em> page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.'),
|
||||
'$settings_other' => DI::l10n()->t('Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you.'),
|
||||
|
||||
'$profile' => L10n::t('Profile'),
|
||||
'$profile_photo_link' => L10n::t('Upload Profile Photo'),
|
||||
'$profile_photo_txt' => L10n::t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.'),
|
||||
'$profiles_link' => L10n::t('Edit Your Profile'),
|
||||
'$profiles_txt' => L10n::t('Edit your <strong>default</strong> profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors.'),
|
||||
'$profiles_keywords_link' => L10n::t('Profile Keywords'),
|
||||
'$profiles_keywords_txt' => L10n::t('Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships.'),
|
||||
'$profile' => DI::l10n()->t('Profile'),
|
||||
'$profile_photo_link' => DI::l10n()->t('Upload Profile Photo'),
|
||||
'$profile_photo_txt' => DI::l10n()->t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.'),
|
||||
'$profiles_link' => DI::l10n()->t('Edit Your Profile'),
|
||||
'$profiles_txt' => DI::l10n()->t('Edit your <strong>default</strong> profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors.'),
|
||||
'$profiles_keywords_link' => DI::l10n()->t('Profile Keywords'),
|
||||
'$profiles_keywords_txt' => DI::l10n()->t('Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships.'),
|
||||
|
||||
'$connecting' => L10n::t('Connecting'),
|
||||
'$connecting' => DI::l10n()->t('Connecting'),
|
||||
'$mail_disabled' => $mail_disabled,
|
||||
'$import_mail_link' => L10n::t('Importing Emails'),
|
||||
'$import_mail_txt' => L10n::t('Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX'),
|
||||
'$contact_link' => L10n::t('Go to Your Contacts Page'),
|
||||
'$contact_txt' => L10n::t('Your Contacts page is your gateway to managing friendships and connecting with friends on other networks. Typically you enter their address or site URL in the <em>Add New Contact</em> dialog.'),
|
||||
'$directory_link' => L10n::t('Go to Your Site\'s Directory'),
|
||||
'$directory_txt' => L10n::t('The Directory page lets you find other people in this network or other federated sites. Look for a <em>Connect</em> or <em>Follow</em> link on their profile page. Provide your own Identity Address if requested.'),
|
||||
'$finding_link' => L10n::t('Finding New People'),
|
||||
'$finding_txt' => L10n::t('On the side panel of the Contacts page are several tools to find new friends. We can match people by interest, look up people by name or interest, and provide suggestions based on network relationships. On a brand new site, friend suggestions will usually begin to be populated within 24 hours.'),
|
||||
'$import_mail_link' => DI::l10n()->t('Importing Emails'),
|
||||
'$import_mail_txt' => DI::l10n()->t('Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX'),
|
||||
'$contact_link' => DI::l10n()->t('Go to Your Contacts Page'),
|
||||
'$contact_txt' => DI::l10n()->t('Your Contacts page is your gateway to managing friendships and connecting with friends on other networks. Typically you enter their address or site URL in the <em>Add New Contact</em> dialog.'),
|
||||
'$directory_link' => DI::l10n()->t('Go to Your Site\'s Directory'),
|
||||
'$directory_txt' => DI::l10n()->t('The Directory page lets you find other people in this network or other federated sites. Look for a <em>Connect</em> or <em>Follow</em> link on their profile page. Provide your own Identity Address if requested.'),
|
||||
'$finding_link' => DI::l10n()->t('Finding New People'),
|
||||
'$finding_txt' => DI::l10n()->t('On the side panel of the Contacts page are several tools to find new friends. We can match people by interest, look up people by name or interest, and provide suggestions based on network relationships. On a brand new site, friend suggestions will usually begin to be populated within 24 hours.'),
|
||||
|
||||
'$groups' => L10n::t('Groups'),
|
||||
'$group_contact_link' => L10n::t('Group Your Contacts'),
|
||||
'$group_contact_txt' => L10n::t('Once you have made some friends, organize them into private conversation groups from the sidebar of your Contacts page and then you can interact with each group privately on your Network page.'),
|
||||
'$groups' => DI::l10n()->t('Groups'),
|
||||
'$group_contact_link' => DI::l10n()->t('Group Your Contacts'),
|
||||
'$group_contact_txt' => DI::l10n()->t('Once you have made some friends, organize them into private conversation groups from the sidebar of your Contacts page and then you can interact with each group privately on your Network page.'),
|
||||
'$newuser_private' => $newuser_private,
|
||||
'$private_link' => L10n::t('Why Aren\'t My Posts Public?'),
|
||||
'$private_txt' => L10n::t('Friendica respects your privacy. By default, your posts will only show up to people you\'ve added as friends. For more information, see the help section from the link above.'),
|
||||
'$private_link' => DI::l10n()->t('Why Aren\'t My Posts Public?'),
|
||||
'$private_txt' => DI::l10n()->t('Friendica respects your privacy. By default, your posts will only show up to people you\'ve added as friends. For more information, see the help section from the link above.'),
|
||||
|
||||
'$help' => L10n::t('Getting Help'),
|
||||
'$help_link' => L10n::t('Go to the Help Section'),
|
||||
'$help_txt' => L10n::t('Our <strong>help</strong> pages may be consulted for detail on other program features and resources.'),
|
||||
'$help' => DI::l10n()->t('Getting Help'),
|
||||
'$help_link' => DI::l10n()->t('Go to the Help Section'),
|
||||
'$help_txt' => DI::l10n()->t('Our <strong>help</strong> pages may be consulted for detail on other program features and resources.'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue