Move L10n::t() calls to DI::l10n()->t() calls

This commit is contained in:
Philipp Holzer 2020-01-18 20:52:33 +01:00
parent 1eb23e3667
commit 48fecb9a40
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
71 changed files with 721 additions and 721 deletions

View file

@ -140,7 +140,7 @@ function advancedcontentfilter_prepare_body_content_filter(App $a, &$hook_data)
}
if ($found) {
$hook_data['filter_reasons'][] = L10n::t('Filtered by rule: %s', $rule['name']);
$hook_data['filter_reasons'][] = DI::l10n()->t('Filtered by rule: %s', $rule['name']);
break;
}
}
@ -154,7 +154,7 @@ function advancedcontentfilter_addon_settings(App $a, &$s)
return;
}
$advancedcontentfilter = L10n::t('Advanced Content Filter');
$advancedcontentfilter = DI::l10n()->t('Advanced Content Filter');
$s .= <<<HTML
<span class="settings-block fakelink" style="display: block;"><h3><a href="advancedcontentfilter">$advancedcontentfilter <i class="glyphicon glyphicon-share"></i></a></h3></span>
@ -210,27 +210,27 @@ function advancedcontentfilter_content(App $a)
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/advancedcontentfilter/');
return Renderer::replaceMacros($t, [
'$messages' => [
'backtosettings' => L10n::t('Back to Addon Settings'),
'title' => L10n::t('Advanced Content Filter'),
'add_a_rule' => L10n::t('Add a Rule'),
'help' => L10n::t('Help'),
'intro' => L10n::t('Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the help page.'),
'your_rules' => L10n::t('Your rules'),
'no_rules' => L10n::t('You have no rules yet! Start adding one by clicking on the button above next to the title.'),
'disabled' => L10n::t('Disabled'),
'enabled' => L10n::t('Enabled'),
'disable_this_rule' => L10n::t('Disable this rule'),
'enable_this_rule' => L10n::t('Enable this rule'),
'edit_this_rule' => L10n::t('Edit this rule'),
'edit_the_rule' => L10n::t('Edit the rule'),
'save_this_rule' => L10n::t('Save this rule'),
'delete_this_rule' => L10n::t('Delete this rule'),
'rule' => L10n::t('Rule'),
'close' => L10n::t('Close'),
'addtitle' => L10n::t('Add new rule'),
'rule_name' => L10n::t('Rule Name'),
'rule_expression' => L10n::t('Rule Expression'),
'cancel' => L10n::t('Cancel'),
'backtosettings' => DI::l10n()->t('Back to Addon Settings'),
'title' => DI::l10n()->t('Advanced Content Filter'),
'add_a_rule' => DI::l10n()->t('Add a Rule'),
'help' => DI::l10n()->t('Help'),
'intro' => DI::l10n()->t('Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the help page.'),
'your_rules' => DI::l10n()->t('Your rules'),
'no_rules' => DI::l10n()->t('You have no rules yet! Start adding one by clicking on the button above next to the title.'),
'disabled' => DI::l10n()->t('Disabled'),
'enabled' => DI::l10n()->t('Enabled'),
'disable_this_rule' => DI::l10n()->t('Disable this rule'),
'enable_this_rule' => DI::l10n()->t('Enable this rule'),
'edit_this_rule' => DI::l10n()->t('Edit this rule'),
'edit_the_rule' => DI::l10n()->t('Edit the rule'),
'save_this_rule' => DI::l10n()->t('Save this rule'),
'delete_this_rule' => DI::l10n()->t('Delete this rule'),
'rule' => DI::l10n()->t('Rule'),
'close' => DI::l10n()->t('Close'),
'addtitle' => DI::l10n()->t('Add new rule'),
'rule_name' => DI::l10n()->t('Rule Name'),
'rule_expression' => DI::l10n()->t('Rule Expression'),
'cancel' => DI::l10n()->t('Cancel'),
],
'$current_theme' => $a->getCurrentTheme(),
'$rules' => advancedcontentfilter_get_rules(),
@ -297,7 +297,7 @@ function advancedcontentfilter_build_fields($data)
function advancedcontentfilter_get_rules()
{
if (!local_user()) {
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
$rules = DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => local_user()]));
@ -308,7 +308,7 @@ function advancedcontentfilter_get_rules()
function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
{
if (!local_user()) {
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
$rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => $args['id'], 'uid' => local_user()]);
@ -319,11 +319,11 @@ function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, Res
function advancedcontentfilter_post_rules(ServerRequestInterface $request)
{
if (!local_user()) {
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
if (!BaseModule::checkFormSecurityToken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid form security token, please refresh the page.'));
}
$data = json_decode($request->getBody(), true);
@ -335,7 +335,7 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request)
}
if (empty($fields['name']) || empty($fields['expression'])) {
throw new HTTPException\BadRequestException(L10n::t('The rule name and expression are required.'));
throw new HTTPException\BadRequestException(DI::l10n()->t('The rule name and expression are required.'));
}
$fields['uid'] = local_user();
@ -347,21 +347,21 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request)
$rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => DBA::lastInsertId()]);
return json_encode(['message' => L10n::t('Rule successfully added'), 'rule' => $rule]);
return json_encode(['message' => DI::l10n()->t('Rule successfully added'), 'rule' => $rule]);
}
function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
{
if (!local_user()) {
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
if (!BaseModule::checkFormSecurityToken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid form security token, please refresh the page.'));
}
if (!DBA::exists('advancedcontentfilter_rules', ['id' => $args['id'], 'uid' => local_user()])) {
throw new HTTPException\NotFoundException(L10n::t('Rule doesn\'t exist or doesn\'t belong to you.'));
throw new HTTPException\NotFoundException(DI::l10n()->t('Rule doesn\'t exist or doesn\'t belong to you.'));
}
$data = json_decode($request->getBody(), true);
@ -376,38 +376,38 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res
throw new HTTPException\ServiceUnavaiableException(DBA::errorMessage());
}
return json_encode(['message' => L10n::t('Rule successfully updated')]);
return json_encode(['message' => DI::l10n()->t('Rule successfully updated')]);
}
function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
{
if (!local_user()) {
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
if (!BaseModule::checkFormSecurityToken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid form security token, please refresh the page.'));
}
if (!DBA::exists('advancedcontentfilter_rules', ['id' => $args['id'], 'uid' => local_user()])) {
throw new HTTPException\NotFoundException(L10n::t('Rule doesn\'t exist or doesn\'t belong to you.'));
throw new HTTPException\NotFoundException(DI::l10n()->t('Rule doesn\'t exist or doesn\'t belong to you.'));
}
if (!DBA::delete('advancedcontentfilter_rules', ['id' => $args['id']])) {
throw new HTTPException\ServiceUnavaiableException(DBA::errorMessage());
}
return json_encode(['message' => L10n::t('Rule successfully deleted')]);
return json_encode(['message' => DI::l10n()->t('Rule successfully deleted')]);
}
function advancedcontentfilter_get_variables_guid(ServerRequestInterface $request, ResponseInterface $response, $args)
{
if (!local_user()) {
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
if (!isset($args['guid'])) {
throw new HTTPException\BadRequestException(L10n::t('Missing argument: guid.'));
throw new HTTPException\BadRequestException(DI::l10n()->t('Missing argument: guid.'));
}
$condition = ["`guid` = ? AND (`uid` = ? OR `uid` = 0)", $args['guid'], local_user()];
@ -415,7 +415,7 @@ function advancedcontentfilter_get_variables_guid(ServerRequestInterface $reques
$item = Item::selectFirstForUser(local_user(), [], $condition, $params);
if (!DBA::isResult($item)) {
throw new HTTPException\NotFoundException(L10n::t('Unknown post with guid: %s', $args['guid']));
throw new HTTPException\NotFoundException(DI::l10n()->t('Unknown post with guid: %s', $args['guid']));
}
$tags = Term::populateTagsFromItem($item);

View file

@ -26,6 +26,6 @@ $container['errorHandler'] = function () {
$container['notFoundHandler'] = function () {
return function ()
{
throw new \Friendica\Network\HTTPException\NotFoundException(L10n::t('Method not found'));
throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Method not found'));
};
};

View file

@ -98,17 +98,17 @@ function blackout_addon_admin(&$a, &$o) {
// a note for the admin
$adminnote = "";
if ($date2 < $date1) {
$adminnote = L10n::t("The end-date is prior to the start-date of the blackout, you should fix this");
$adminnote = DI::l10n()->t("The end-date is prior to the start-date of the blackout, you should fix this");
} else {
$adminnote = L10n::t("Please double check that the current settings for the blackout. Begin will be <strong>%s</strong> and it will end <strong>%s</strong>.", $mystart, $myend);
$adminnote = DI::l10n()->t("Please double check that the current settings for the blackout. Begin will be <strong>%s</strong> and it will end <strong>%s</strong>.", $mystart, $myend);
}
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$rurl' => ["rurl", L10n::t("Redirect URL"), $myurl, L10n::t("all your visitors from the web will be redirected to this URL"), "", "", "url"],
'$startdate' => ["startdate", L10n::t("Begin of the Blackout"), $mystart, L10n::t("Format is <tt>YYYY-MM-DD hh:mm</tt>; <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute.")],
'$enddate' => ["enddate", L10n::t("End of the Blackout"), $myend, ""],
'$submit' => DI::l10n()->t('Save Settings'),
'$rurl' => ["rurl", DI::l10n()->t("Redirect URL"), $myurl, DI::l10n()->t("all your visitors from the web will be redirected to this URL"), "", "", "url"],
'$startdate' => ["startdate", DI::l10n()->t("Begin of the Blackout"), $mystart, DI::l10n()->t("Format is <tt>YYYY-MM-DD hh:mm</tt>; <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute.")],
'$enddate' => ["enddate", DI::l10n()->t("End of the Blackout"), $myend, ""],
'$adminnote' => $adminnote,
'$aboutredirect' => L10n::t("<strong>Note</strong>: The redirect will be active from the moment you press the submit button. Users currently logged in will <strong>not</strong> be thrown out but can't login again after logging out should the blackout is still in place."),
'$aboutredirect' => DI::l10n()->t("<strong>Note</strong>: The redirect will be active from the moment you press the submit button. Users currently logged in will <strong>not</strong> be thrown out but can't login again after logging out should the blackout is still in place."),
]);
}
function blackout_addon_admin_post (&$a) {

View file

@ -32,10 +32,10 @@ function blockbot_addon_admin(&$a, &$o) {
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/blockbot/");
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$good_crawlers' => ['good_crawlers', L10n::t('Allow "good" crawlers'), Config::get('blockbot', 'good_crawlers'), "Don't block fediverse crawlers, relay servers and other bots with good purposes."],
'$block_gab' => ['block_gab', L10n::t('Block GabSocial'), Config::get('blockbot', 'block_gab'), 'Block the software GabSocial. This will block every access for that software. You can block dedicated gab instances in the blocklist settings in the admin section.'],
'$training' => ['training', L10n::t('Training mode'), Config::get('blockbot', 'training'), "Activates the training mode. This is only meant for developing purposes. Don't activate this on a production machine. This can cut communication with some systems."],
'$submit' => DI::l10n()->t('Save Settings'),
'$good_crawlers' => ['good_crawlers', DI::l10n()->t('Allow "good" crawlers'), Config::get('blockbot', 'good_crawlers'), "Don't block fediverse crawlers, relay servers and other bots with good purposes."],
'$block_gab' => ['block_gab', DI::l10n()->t('Block GabSocial'), Config::get('blockbot', 'block_gab'), 'Block the software GabSocial. This will block every access for that software. You can block dedicated gab instances in the blocklist settings in the admin section.'],
'$training' => ['training', DI::l10n()->t('Training mode'), Config::get('blockbot', 'training'), "Activates the training mode. This is only meant for developing purposes. Don't activate this on a production machine. This can cut communication with some systems."],
]);
}
@ -43,7 +43,7 @@ function blockbot_addon_admin_post(&$a) {
Config::set('blockbot', 'good_crawlers', $_POST['good_crawlers'] ?? false);
Config::set('blockbot', 'block_gab', $_POST['block_gab'] ?? false);
Config::set('blockbot', 'training', $_POST['training'] ?? false);
info(L10n::t('Settings updated.'). EOL);
info(DI::l10n()->t('Settings updated.'). EOL);
}
function blockbot_init_1(App $a) {

View file

@ -52,20 +52,20 @@ function blockem_addon_settings (App $a, &$s)
}
$s .= '<span id="settings_blockem_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_blockem_expanded\'); openClose(\'settings_blockem_inflated\');">';
$s .= '<h3>' . L10n::t('Blockem') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Blockem') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_blockem_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_blockem_expanded\'); openClose(\'settings_blockem_inflated\');">';
$s .= '<h3>' . L10n::t('Blockem') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Blockem') . '</h3>';
$s .= '</span>';
$s .= '<div id="blockem-wrapper">';
$s .= '<div id="blockem-desc">'. L10n::t("Hides user's content by collapsing posts. Also replaces their avatar with generic image.") . ' </div>';
$s .= '<label id="blockem-label" for="blockem-words">' . L10n::t('Comma separated profile URLS:') . ' </label>';
$s .= '<div id="blockem-desc">'. DI::l10n()->t("Hides user's content by collapsing posts. Also replaces their avatar with generic image.") . ' </div>';
$s .= '<label id="blockem-label" for="blockem-words">' . DI::l10n()->t('Comma separated profile URLS:') . ' </label>';
$s .= '<textarea id="blockem-words" type="text" name="blockem-words" >' . htmlspecialchars($words) . '</textarea>';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="blockem-submit" name="blockem-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="blockem-submit" name="blockem-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
return;
@ -79,7 +79,7 @@ function blockem_addon_settings_post(App $a, array &$b)
if (!empty($_POST['blockem-submit'])) {
DI::pConfig()->set(local_user(), 'blockem', 'words', trim($_POST['blockem-words']));
info(L10n::t('BLOCKEM Settings saved.') . EOL);
info(DI::l10n()->t('BLOCKEM Settings saved.') . EOL);
}
}
@ -141,7 +141,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data)
}
if ($found) {
$hook_data['filter_reasons'][] = L10n::t('Filtered user: %s', $hook_data['item']['author-name']);
$hook_data['filter_reasons'][] = DI::l10n()->t('Filtered user: %s', $hook_data['item']['author-name']);
}
}
@ -200,9 +200,9 @@ function blockem_item_photo_menu(App $a, array &$b)
}
}
if ($blocked) {
$b['menu'][L10n::t('Unblock Author')] = 'javascript:blockemUnblock(\'' . $author . '\');';
$b['menu'][DI::l10n()->t('Unblock Author')] = 'javascript:blockemUnblock(\'' . $author . '\');';
} else {
$b['menu'][L10n::t('Block Author')] = 'javascript:blockemBlock(\'' . $author . '\');';
$b['menu'][DI::l10n()->t('Block Author')] = 'javascript:blockemBlock(\'' . $author . '\');';
}
}
@ -242,6 +242,6 @@ function blockem_init(App $a)
}
DI::pConfig()->set(local_user(), 'blockem', 'words', $words);
info(L10n::t('blockem settings updated') . EOL);
info(DI::l10n()->t('blockem settings updated') . EOL);
exit();
}

View file

@ -52,7 +52,7 @@ function blogger_jot_nets(App $a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'blogger_enable',
L10n::t('Post to blogger'),
DI::l10n()->t('Post to blogger'),
DI::pConfig()->get(local_user(), 'blogger', 'post_by_default')
]
];
@ -86,40 +86,40 @@ function blogger_settings(App $a, &$s)
/* Add some HTML to the existing form */
$s .= '<span id="settings_blogger_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_blogger_expanded\'); openClose(\'settings_blogger_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'. L10n::t('Blogger Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'. DI::l10n()->t('Blogger Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_blogger_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_blogger_expanded\'); openClose(\'settings_blogger_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'. L10n::t('Blogger Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/blogger.png" /><h3 class="connector">'. DI::l10n()->t('Blogger Export').'</h3>';
$s .= '</span>';
$s .= '<div id="blogger-enable-wrapper">';
$s .= '<label id="blogger-enable-label" for="blogger-checkbox">' . L10n::t('Enable Blogger Post Addon') . '</label>';
$s .= '<label id="blogger-enable-label" for="blogger-checkbox">' . DI::l10n()->t('Enable Blogger Post Addon') . '</label>';
$s .= '<input id="blogger-checkbox" type="checkbox" name="blogger" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-username-wrapper">';
$s .= '<label id="blogger-username-label" for="blogger-username">' . L10n::t('Blogger username') . '</label>';
$s .= '<label id="blogger-username-label" for="blogger-username">' . DI::l10n()->t('Blogger username') . '</label>';
$s .= '<input id="blogger-username" type="text" name="bl_username" value="' . $bl_username . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-password-wrapper">';
$s .= '<label id="blogger-password-label" for="blogger-password">' . L10n::t('Blogger password') . '</label>';
$s .= '<label id="blogger-password-label" for="blogger-password">' . DI::l10n()->t('Blogger password') . '</label>';
$s .= '<input id="blogger-password" type="password" name="bl_password" value="' . $bl_password . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-blog-wrapper">';
$s .= '<label id="blogger-blog-label" for="blogger-blog">' . L10n::t('Blogger API URL') . '</label>';
$s .= '<label id="blogger-blog-label" for="blogger-blog">' . DI::l10n()->t('Blogger API URL') . '</label>';
$s .= '<input id="blogger-blog" type="text" name="bl_blog" value="' . $bl_blog . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="blogger-bydefault-wrapper">';
$s .= '<label id="blogger-bydefault-label" for="blogger-bydefault">' . L10n::t('Post to Blogger by default') . '</label>';
$s .= '<label id="blogger-bydefault-label" for="blogger-bydefault">' . DI::l10n()->t('Post to Blogger by default') . '</label>';
$s .= '<input id="blogger-bydefault" type="checkbox" name="bl_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="blogger-submit" name="blogger-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="blogger-submit" name="blogger-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}
@ -203,7 +203,7 @@ function blogger_send(App $a, array &$b)
$bl_blog = DI::pConfig()->get($b['uid'], 'blogger', 'bl_blog');
if ($bl_username && $bl_password && $bl_blog) {
$title = '<title>' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . '</title>';
$title = '<title>' . (($b['title']) ? $b['title'] : DI::l10n()->t('Post from Friendica')) . '</title>';
$post = $title . BBCode::convert($b['body']);
$post = XML::escape($post);

View file

@ -48,7 +48,7 @@ function buffer_module()
function buffer_content(App $a)
{
if (! local_user()) {
notice(L10n::t('Permission denied.') . EOL);
notice(DI::l10n()->t('Permission denied.') . EOL);
return '';
}
@ -77,10 +77,10 @@ function buffer_addon_admin(App $a, &$o)
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/buffer/");
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$submit' => DI::l10n()->t('Save Settings'),
// name, label, value, help, [extra values]
'$client_id' => ['client_id', L10n::t('Client ID'), Config::get('buffer', 'client_id'), ''],
'$client_secret' => ['client_secret', L10n::t('Client Secret'), Config::get('buffer', 'client_secret'), ''],
'$client_id' => ['client_id', DI::l10n()->t('Client ID'), Config::get('buffer', 'client_id'), ''],
'$client_secret' => ['client_secret', DI::l10n()->t('Client Secret'), Config::get('buffer', 'client_secret'), ''],
]);
}
@ -92,13 +92,13 @@ function buffer_addon_admin_post(App $a)
Config::set('buffer', 'client_id' , $client_id);
Config::set('buffer', 'client_secret', $client_secret);
info(L10n::t('Settings updated.'). EOL);
info(DI::l10n()->t('Settings updated.'). EOL);
}
function buffer_connect(App $a)
{
if (isset($_REQUEST["error"])) {
$o = L10n::t('Error when registering buffer connection:')." ".$_REQUEST["error"];
$o = DI::l10n()->t('Error when registering buffer connection:')." ".$_REQUEST["error"];
return $o;
}
@ -118,8 +118,8 @@ function buffer_connect(App $a)
$o = '<a href="' . $buffer->get_login_url() . '">Connect to Buffer!</a>';
} else {
Logger::log("buffer_connect: authenticated");
$o = L10n::t("You are now authenticated to buffer. ");
$o .= '<br /><a href="' . DI::baseUrl()->get() . '/settings/connectors">' . L10n::t("return to the connector page") . '</a>';
$o = DI::l10n()->t("You are now authenticated to buffer. ");
$o .= '<br /><a href="' . DI::baseUrl()->get() . '/settings/connectors">' . DI::l10n()->t("return to the connector page") . '</a>';
DI::pConfig()->set(local_user(), 'buffer','access_token', $buffer->access_token);
}
@ -137,7 +137,7 @@ function buffer_jot_nets(App $a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'buffer_enable',
L10n::t('Post to Buffer'),
DI::l10n()->t('Post to Buffer'),
DI::pConfig()->get(local_user(), 'buffer', 'post_by_default')
]
];
@ -166,11 +166,11 @@ function buffer_settings(App $a, &$s)
/* Add some HTML to the existing form */
$s .= '<span id="settings_buffer_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_buffer_expanded\'); openClose(\'settings_buffer_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/buffer.png" /><h3 class="connector">'. L10n::t('Buffer Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/buffer.png" /><h3 class="connector">'. DI::l10n()->t('Buffer Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_buffer_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_buffer_expanded\'); openClose(\'settings_buffer_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/buffer.png" /><h3 class="connector">'. L10n::t('Buffer Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/buffer.png" /><h3 class="connector">'. DI::l10n()->t('Buffer Export').'</h3>';
$s .= '</span>';
$client_id = Config::get("buffer", "client_id");
@ -181,21 +181,21 @@ function buffer_settings(App $a, &$s)
if ($access_token == "") {
$s .= '<div id="buffer-authenticate-wrapper">';
$s .= '<a href="'.DI::baseUrl()->get().'/buffer/connect">'.L10n::t("Authenticate your Buffer connection").'</a>';
$s .= '<a href="'.DI::baseUrl()->get().'/buffer/connect">'.DI::l10n()->t("Authenticate your Buffer connection").'</a>';
$s .= '</div><div class="clear"></div>';
} else {
$s .= '<div id="buffer-enable-wrapper">';
$s .= '<label id="buffer-enable-label" for="buffer-checkbox">' . L10n::t('Enable Buffer Post Addon') . '</label>';
$s .= '<label id="buffer-enable-label" for="buffer-checkbox">' . DI::l10n()->t('Enable Buffer Post Addon') . '</label>';
$s .= '<input id="buffer-checkbox" type="checkbox" name="buffer" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="buffer-bydefault-wrapper">';
$s .= '<label id="buffer-bydefault-label" for="buffer-bydefault">' . L10n::t('Post to Buffer by default') . '</label>';
$s .= '<label id="buffer-bydefault-label" for="buffer-bydefault">' . DI::l10n()->t('Post to Buffer by default') . '</label>';
$s .= '<input id="buffer-bydefault" type="checkbox" name="buffer_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="buffer-delete-wrapper">';
$s .= '<label id="buffer-delete-label" for="buffer-delete">' . L10n::t('Check to delete this preset') . '</label>';
$s .= '<label id="buffer-delete-label" for="buffer-delete">' . DI::l10n()->t('Check to delete this preset') . '</label>';
$s .= '<input id="buffer-delete" type="checkbox" name="buffer_delete" value="1" />';
$s .= '</div><div class="clear"></div>';
@ -207,7 +207,7 @@ function buffer_settings(App $a, &$s)
$profiles = $buffer->go('/profiles');
if (is_array($profiles)) {
$s .= '<div id="buffer-accounts-wrapper">';
$s .= L10n::t("Posts are going to all accounts that are enabled by default:");
$s .= DI::l10n()->t("Posts are going to all accounts that are enabled by default:");
$s .= "<ul>";
foreach ($profiles as $profile) {
if (!$profile->default)
@ -227,7 +227,7 @@ function buffer_settings(App $a, &$s)
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="buffer-submit" name="buffer-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="buffer-submit" name="buffer-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -22,5 +22,5 @@ function buglink_uninstall()
function buglink_active(App $a, &$b)
{
$b .= '<div id="buglink_wrapper" style="position: fixed; bottom: 5px; left: 5px;"><a href="https://github.com/friendica/friendica/issues" target="_blank" title="' . L10n::t('Report Bug') . '"><img src="addon/buglink/bug-x.gif" alt="' . L10n::t('Report Bug') . '" /></a></div>';
$b .= '<div id="buglink_wrapper" style="position: fixed; bottom: 5px; left: 5px;"><a href="https://github.com/friendica/friendica/issues" target="_blank" title="' . DI::l10n()->t('Report Bug') . '"><img src="addon/buglink/bug-x.gif" alt="' . DI::l10n()->t('Report Bug') . '" /></a></div>';
}

View file

@ -59,11 +59,11 @@ function catavatar_addon_settings(App $a, &$s)
'$postpost' => !empty($_POST['catavatar-morecat']) || !empty($_POST['catavatar-emailcat']),
'$uncache' => time(),
'$uid' => local_user(),
'$usecat' => L10n::t('Use Cat as Avatar'),
'$morecat' => L10n::t('More Random Cat!'),
'$emailcat' => L10n::t('Reset to email Cat'),
'$usecat' => DI::l10n()->t('Use Cat as Avatar'),
'$morecat' => DI::l10n()->t('More Random Cat!'),
'$emailcat' => DI::l10n()->t('Reset to email Cat'),
'$seed' => DI::pConfig()->get(local_user(), 'catavatar', 'seed', false),
'$header' => L10n::t('Cat Avatar Settings'),
'$header' => DI::l10n()->t('Cat Avatar Settings'),
]);
}
@ -88,7 +88,7 @@ function catavatar_addon_settings_post(App $a, &$s)
$self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
if (!DBA::isResult($self)) {
notice(L10n::t("The cat hadn't found itself."));
notice(DI::l10n()->t("The cat hadn't found itself."));
return;
}
@ -97,13 +97,13 @@ function catavatar_addon_settings_post(App $a, &$s)
$condition = ['uid' => local_user(), 'contact-id' => $self['id']];
$photo = DBA::selectFirst('photo', ['resource-id'], $condition);
if (!DBA::isResult($photo)) {
notice(L10n::t('There was an error, the cat ran away.'));
notice(DI::l10n()->t('There was an error, the cat ran away.'));
return;
}
DBA::update('photo', ['profile' => false], ['profile' => true, 'uid' => local_user()]);
$fields = ['profile' => true, 'album' => L10n::t('Profile Photos'), 'contact-id' => 0];
$fields = ['profile' => true, 'album' => DI::l10n()->t('Profile Photos'), 'contact-id' => 0];
DBA::update('photo', $fields, ['uid' => local_user(), 'resource-id' => $photo['resource-id']]);
Photo::importProfilePhoto($url, local_user(), $self['id']);
@ -118,7 +118,7 @@ function catavatar_addon_settings_post(App $a, &$s)
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
info(L10n::t('Meow!'));
info(DI::l10n()->t('Meow!'));
return;
}

View file

@ -41,15 +41,15 @@ function cookienotice_addon_admin(App $a, &$s)
return;
}
$text = Config::get('cookienotice', 'text', L10n::t('This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'));
$oktext = Config::get('cookienotice', 'oktext', L10n::t('OK'));
$text = Config::get('cookienotice', 'text', DI::l10n()->t('This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'));
$oktext = Config::get('cookienotice', 'oktext', DI::l10n()->t('OK'));
$t = Renderer::getMarkupTemplate('admin.tpl', __DIR__);
$s .= Renderer::replaceMacros($t, [
'$description' => L10n::t('<b>Configure your cookie usage notice.</b> It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'),
'$text' => ['cookienotice-text', L10n::t('Cookie Usage Notice'), $text],
'$oktext' => ['cookienotice-oktext', L10n::t('OK Button Text'), $oktext],
'$submit' => L10n::t('Save Settings')
'$description' => DI::l10n()->t('<b>Configure your cookie usage notice.</b> It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'),
'$text' => ['cookienotice-text', DI::l10n()->t('Cookie Usage Notice'), $text],
'$oktext' => ['cookienotice-oktext', DI::l10n()->t('OK Button Text'), $oktext],
'$submit' => DI::l10n()->t('Save Settings')
]);
return;
@ -72,7 +72,7 @@ function cookienotice_addon_admin_post(App $a)
if ($_POST['cookienotice-submit']) {
Config::set('cookienotice', 'text', trim(strip_tags($_POST['cookienotice-text'])));
Config::set('cookienotice', 'oktext', trim(strip_tags($_POST['cookienotice-oktext'])));
info(L10n::t('cookienotice Settings saved.'));
info(DI::l10n()->t('cookienotice Settings saved.'));
}
}
@ -107,8 +107,8 @@ function cookienotice_page_content_top(App $a, &$b)
*/
function cookienotice_page_end(App $a, &$b)
{
$text = (string)Config::get('cookienotice', 'text', L10n::t('This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'));
$oktext = (string)Config::get('cookienotice', 'oktext', L10n::t('OK'));
$text = (string)Config::get('cookienotice', 'text', DI::l10n()->t('This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'));
$oktext = (string)Config::get('cookienotice', 'oktext', DI::l10n()->t('OK'));
$page_end_tpl = Renderer::getMarkupTemplate('cookienotice.tpl', __DIR__);

View file

@ -53,7 +53,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
$res = new SimpleXMLElement(Network::fetchUrl($url));
} catch (Exception $e) {
if (empty($_SESSION['curweather_notice_shown'])) {
info(L10n::t('Error fetching weather data. Error was: '.$e->getMessage()));
info(DI::l10n()->t('Error fetching weather data. Error was: '.$e->getMessage()));
$_SESSION['curweather_notice_shown'] = true;
}
@ -136,26 +136,26 @@ function curweather_network_mod_init(App $a, &$b)
if ($ok) {
$t = Renderer::getMarkupTemplate("widget.tpl", "addon/curweather/" );
$curweather = Renderer::replaceMacros($t, [
'$title' => L10n::t("Current Weather"),
'$title' => DI::l10n()->t("Current Weather"),
'$icon' => ProxyUtils::proxifyUrl('http://openweathermap.org/img/w/'.$res['icon'].'.png'),
'$city' => $res['city'],
'$lon' => $res['lon'],
'$lat' => $res['lat'],
'$description' => $res['descripion'],
'$temp' => $res['temperature'],
'$relhumidity' => ['caption'=>L10n::t('Relative Humidity'), 'val'=>$res['humidity']],
'$pressure' => ['caption'=>L10n::t('Pressure'), 'val'=>$res['pressure']],
'$wind' => ['caption'=>L10n::t('Wind'), 'val'=> $res['wind']],
'$lastupdate' => L10n::t('Last Updated').': '.$res['update'].'UTC',
'$databy' => L10n::t('Data by'),
'$showonmap' => L10n::t('Show on map')
'$relhumidity' => ['caption'=>DI::l10n()->t('Relative Humidity'), 'val'=>$res['humidity']],
'$pressure' => ['caption'=>DI::l10n()->t('Pressure'), 'val'=>$res['pressure']],
'$wind' => ['caption'=>DI::l10n()->t('Wind'), 'val'=> $res['wind']],
'$lastupdate' => DI::l10n()->t('Last Updated').': '.$res['update'].'UTC',
'$databy' => DI::l10n()->t('Data by'),
'$showonmap' => DI::l10n()->t('Show on map')
]);
} else {
$t = Renderer::getMarkupTemplate('widget-error.tpl', 'addon/curweather/');
$curweather = Renderer::replaceMacros( $t, [
'$problem' => L10n::t('There was a problem accessing the weather data. But have a look'),
'$problem' => DI::l10n()->t('There was a problem accessing the weather data. But have a look'),
'$rpt' => $rpt,
'$atOWM' => L10n::t('at OpenWeatherMap')
'$atOWM' => DI::l10n()->t('at OpenWeatherMap')
]);
}
@ -172,7 +172,7 @@ function curweather_addon_settings_post(App $a, $post)
DI::pConfig()->set(local_user(), 'curweather', 'curweather_enable', intval($_POST['curweather_enable']));
DI::pConfig()->set(local_user(), 'curweather', 'curweather_units' , trim($_POST['curweather_units']));
info(L10n::t('Current Weather settings updated.') . EOL);
info(DI::l10n()->t('Current Weather settings updated.') . EOL);
}
function curweather_addon_settings(App $a, &$s)
@ -187,7 +187,7 @@ function curweather_addon_settings(App $a, &$s)
$appid = Config::get('curweather', 'appid');
if ($appid == "") {
$noappidtext = L10n::t('No APPID found, please contact your admin to obtain one.');
$noappidtext = DI::l10n()->t('No APPID found, please contact your admin to obtain one.');
} else {
$noappidtext = '';
}
@ -199,13 +199,13 @@ function curweather_addon_settings(App $a, &$s)
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/curweather/" );
$s = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$header' => L10n::t('Current Weather').' '.L10n::t('Settings'),
'$submit' => DI::l10n()->t('Save Settings'),
'$header' => DI::l10n()->t('Current Weather').' '.DI::l10n()->t('Settings'),
'$noappidtext' => $noappidtext,
'$info' => L10n::t('Enter either the name of your location or the zip code.'),
'$curweather_loc' => [ 'curweather_loc', L10n::t('Your Location'), $curweather_loc, L10n::t('Identifier of your location (name or zip code), e.g. <em>Berlin,DE</em> or <em>14476,DE</em>.') ],
'$curweather_units' => [ 'curweather_units', L10n::t('Units'), $curweather_units, L10n::t('select if the temperature should be displayed in &deg;C or &deg;F'), ['metric'=>'°C', 'imperial'=>'°F']],
'$enabled' => [ 'curweather_enable', L10n::t('Show weather data'), $enable, '']
'$info' => DI::l10n()->t('Enter either the name of your location or the zip code.'),
'$curweather_loc' => [ 'curweather_loc', DI::l10n()->t('Your Location'), $curweather_loc, DI::l10n()->t('Identifier of your location (name or zip code), e.g. <em>Berlin,DE</em> or <em>14476,DE</em>.') ],
'$curweather_units' => [ 'curweather_units', DI::l10n()->t('Units'), $curweather_units, DI::l10n()->t('select if the temperature should be displayed in &deg;C or &deg;F'), ['metric'=>'°C', 'imperial'=>'°F']],
'$enabled' => [ 'curweather_enable', DI::l10n()->t('Show weather data'), $enable, '']
]);
return;
@ -223,7 +223,7 @@ function curweather_addon_admin_post(App $a)
Config::set('curweather', 'appid', trim($_POST['appid']));
Config::set('curweather', 'cachetime', trim($_POST['cachetime']));
info(L10n::t('Curweather settings saved.' . PHP_EOL));
info(DI::l10n()->t('Curweather settings saved.' . PHP_EOL));
}
}
@ -239,19 +239,19 @@ function curweather_addon_admin(App $a, &$o)
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/curweather/" );
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$submit' => DI::l10n()->t('Save Settings'),
'$cachetime' => [
'cachetime',
L10n::t('Caching Interval'),
DI::l10n()->t('Caching Interval'),
$cachetime,
L10n::t('For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'), [
'0' => L10n::t('no cache'),
'300' => '5 ' . L10n::t('minutes'),
'900' => '15 ' . L10n::t('minutes'),
'1800' => '30 ' . L10n::t('minutes'),
'3600' => '60 ' . L10n::t('minutes')
DI::l10n()->t('For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'), [
'0' => DI::l10n()->t('no cache'),
'300' => '5 ' . DI::l10n()->t('minutes'),
'900' => '15 ' . DI::l10n()->t('minutes'),
'1800' => '30 ' . DI::l10n()->t('minutes'),
'3600' => '60 ' . DI::l10n()->t('minutes')
]
],
'$appid' => ['appid', L10n::t('Your APPID'), $appid, L10n::t('Your API key provided by OpenWeatherMap')]
'$appid' => ['appid', DI::l10n()->t('Your APPID'), $appid, DI::l10n()->t('Your API key provided by OpenWeatherMap')]
]);
}

View file

@ -49,7 +49,7 @@ function diaspora_jot_nets(App $a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'diaspora_enable',
L10n::t('Post to Diaspora'),
DI::l10n()->t('Post to Diaspora'),
DI::pConfig()->get(local_user(), 'diaspora', 'post_by_default')
]
];
@ -85,9 +85,9 @@ function diaspora_settings(App $a, &$s)
$r = q("SELECT `addr` FROM `contact` WHERE `self` AND `uid` = %d", intval(local_user()));
if (DBA::isResult($r)) {
$status = L10n::t("Please remember: You can always be reached from Diaspora with your Friendica handle %s. ", $r[0]['addr']);
$status .= L10n::t('This connector is only meant if you still want to use your old Diaspora account for some time. ');
$status .= L10n::t('However, it is preferred that you tell your Diaspora contacts the new handle %s instead.', $r[0]['addr']);
$status = DI::l10n()->t("Please remember: You can always be reached from Diaspora with your Friendica handle %s. ", $r[0]['addr']);
$status .= DI::l10n()->t('This connector is only meant if you still want to use your old Diaspora account for some time. ');
$status .= DI::l10n()->t('However, it is preferred that you tell your Diaspora contacts the new handle %s instead.', $r[0]['addr']);
}
$aspects = false;
@ -98,18 +98,18 @@ function diaspora_settings(App $a, &$s)
$aspects = $conn->getAspects();
if (!$aspects) {
$status = L10n::t("Can't login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.");
$status = DI::l10n()->t("Can't login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.");
}
}
/* Add some HTML to the existing form */
$s .= '<span id="settings_diaspora_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_diaspora_expanded\'); openClose(\'settings_diaspora_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/diaspora-logo.png" /><h3 class="connector">'. L10n::t('Diaspora Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/diaspora-logo.png" /><h3 class="connector">'. DI::l10n()->t('Diaspora Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_diaspora_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_diaspora_expanded\'); openClose(\'settings_diaspora_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/diaspora-logo.png" /><h3 class="connector">'. L10n::t('Diaspora Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/diaspora-logo.png" /><h3 class="connector">'. DI::l10n()->t('Diaspora Export').'</h3>';
$s .= '</span>';
if ($status) {
@ -119,32 +119,32 @@ function diaspora_settings(App $a, &$s)
}
$s .= '<div id="diaspora-enable-wrapper">';
$s .= '<label id="diaspora-enable-label" for="diaspora-checkbox">' . L10n::t('Enable Diaspora Post Addon') . '</label>';
$s .= '<label id="diaspora-enable-label" for="diaspora-checkbox">' . DI::l10n()->t('Enable Diaspora Post Addon') . '</label>';
$s .= '<input id="diaspora-checkbox" type="checkbox" name="diaspora" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="diaspora-username-wrapper">';
$s .= '<label id="diaspora-username-label" for="diaspora-username">' . L10n::t('Diaspora handle') . '</label>';
$s .= '<label id="diaspora-username-label" for="diaspora-username">' . DI::l10n()->t('Diaspora handle') . '</label>';
$s .= '<input id="diaspora-username" type="text" name="handle" value="' . $handle . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="diaspora-password-wrapper">';
$s .= '<label id="diaspora-password-label" for="diaspora-password">' . L10n::t('Diaspora password') . '</label>';
$s .= '<label id="diaspora-password-label" for="diaspora-password">' . DI::l10n()->t('Diaspora password') . '</label>';
$s .= '<input id="diaspora-password" type="password" name="password" value="' . $password . '" />';
$s .= '</div><div class="clear"></div>';
if ($aspects) {
$single_aspect = new stdClass();
$single_aspect->id = 'all_aspects';
$single_aspect->name = L10n::t('All aspects');
$single_aspect->name = DI::l10n()->t('All aspects');
$aspects[] = $single_aspect;
$single_aspect = new stdClass();
$single_aspect->id = 'public';
$single_aspect->name = L10n::t('Public');
$single_aspect->name = DI::l10n()->t('Public');
$aspects[] = $single_aspect;
$s .= '<label id="diaspora-aspect-label" for="diaspora-aspect">' . L10n::t('Post to aspect:') . '</label>';
$s .= '<label id="diaspora-aspect-label" for="diaspora-aspect">' . DI::l10n()->t('Post to aspect:') . '</label>';
$s .= '<select name="aspect" id="diaspora-aspect">';
foreach($aspects as $single_aspect) {
if ($single_aspect->id == $aspect)
@ -158,13 +158,13 @@ function diaspora_settings(App $a, &$s)
}
$s .= '<div id="diaspora-bydefault-wrapper">';
$s .= '<label id="diaspora-bydefault-label" for="diaspora-bydefault">' . L10n::t('Post to Diaspora by default') . '</label>';
$s .= '<label id="diaspora-bydefault-label" for="diaspora-bydefault">' . DI::l10n()->t('Post to Diaspora by default') . '</label>';
$s .= '<input id="diaspora-bydefault" type="checkbox" name="diaspora_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="diaspora-submit" name="diaspora-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="diaspora-submit" name="diaspora-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -47,9 +47,9 @@ function discourse_settings(App $a, &$s)
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/discourse/');
$s .= Renderer::replaceMacros($t, [
'$title' => L10n::t('Discourse'),
'$enabled' => ['enabled', L10n::t('Enable processing of Discourse mailing list mails'), $enabled, L10n::t('If enabled, incoming mails from Discourse will be improved so they look much better. To make it work, you have to configure the e-mail settings in Friendica. You also have to enable the mailing list mode in Discourse. Then you have to add the Discourse mail account as contact.')],
'$submit' => L10n::t('Save Settings'),
'$title' => DI::l10n()->t('Discourse'),
'$enabled' => ['enabled', DI::l10n()->t('Enable processing of Discourse mailing list mails'), $enabled, DI::l10n()->t('If enabled, incoming mails from Discourse will be improved so they look much better. To make it work, you have to configure the e-mail settings in Friendica. You also have to enable the mailing list mode in Discourse. Then you have to add the Discourse mail account as contact.')],
'$submit' => DI::l10n()->t('Save Settings'),
]);
}

View file

@ -48,7 +48,7 @@ function dwpost_jot_nets(App $a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'dwpost_enable',
L10n::t('Post to Dreamwidth'),
DI::l10n()->t('Post to Dreamwidth'),
DI::pConfig()->get(local_user(), 'dwpost', 'post_by_default')
]
];
@ -79,35 +79,35 @@ function dwpost_settings(App $a, &$s)
/* Add some HTML to the existing form */
$s .= '<span id="settings_dwpost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_dwpost_expanded\'); openClose(\'settings_dwpost_inflated\');">';
$s .= '<img class="connector" src="images/dreamwidth.png" /><h3 class="connector">'. L10n::t("Dreamwidth Export").'</h3>';
$s .= '<img class="connector" src="images/dreamwidth.png" /><h3 class="connector">'. DI::l10n()->t("Dreamwidth Export").'</h3>';
$s .= '</span>';
$s .= '<div id="settings_dwpost_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_dwpost_expanded\'); openClose(\'settings_dwpost_inflated\');">';
$s .= '<img class="connector" src="images/dreamwidth.png" /><h3 class="connector">'. L10n::t("Dreamwidth Export").'</h3>';
$s .= '<img class="connector" src="images/dreamwidth.png" /><h3 class="connector">'. DI::l10n()->t("Dreamwidth Export").'</h3>';
$s .= '</span>';
$s .= '<div id="dwpost-enable-wrapper">';
$s .= '<label id="dwpost-enable-label" for="dwpost-checkbox">' . L10n::t('Enable dreamwidth Post Addon') . '</label>';
$s .= '<label id="dwpost-enable-label" for="dwpost-checkbox">' . DI::l10n()->t('Enable dreamwidth Post Addon') . '</label>';
$s .= '<input id="dwpost-checkbox" type="checkbox" name="dwpost" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="dwpost-username-wrapper">';
$s .= '<label id="dwpost-username-label" for="dwpost-username">' . L10n::t('dreamwidth username') . '</label>';
$s .= '<label id="dwpost-username-label" for="dwpost-username">' . DI::l10n()->t('dreamwidth username') . '</label>';
$s .= '<input id="dwpost-username" type="text" name="dw_username" value="' . $dw_username . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="dwpost-password-wrapper">';
$s .= '<label id="dwpost-password-label" for="dwpost-password">' . L10n::t('dreamwidth password') . '</label>';
$s .= '<label id="dwpost-password-label" for="dwpost-password">' . DI::l10n()->t('dreamwidth password') . '</label>';
$s .= '<input id="dwpost-password" type="password" name="dw_password" value="' . $dw_password . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="dwpost-bydefault-wrapper">';
$s .= '<label id="dwpost-bydefault-label" for="dwpost-bydefault">' . L10n::t('Post to dreamwidth by default') . '</label>';
$s .= '<label id="dwpost-bydefault-label" for="dwpost-bydefault">' . DI::l10n()->t('Post to dreamwidth by default') . '</label>';
$s .= '<input id="dwpost-bydefault" type="checkbox" name="dw_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="dwpost-submit" name="dwpost-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="dwpost-submit" name="dwpost-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -36,7 +36,7 @@ function forumdirectory_module()
function forumdirectory_app_menu(App $a, array &$b)
{
$b['app_menu'][] = '<div class="app-title"><a href="forumdirectory">' . L10n::t('Forum Directory') . '</a></div>';
$b['app_menu'][] = '<div class="app-title"><a href="forumdirectory">' . DI::l10n()->t('Forum Directory') . '</a></div>';
}
function forumdirectory_init(App $a)
@ -56,7 +56,7 @@ function forumdirectory_post(App $a)
function forumdirectory_content(App $a)
{
if ((Config::get('system', 'block_public')) && (!local_user()) && (!remote_user())) {
notice(L10n::t('Public access denied.') . EOL);
notice(DI::l10n()->t('Public access denied.') . EOL);
return;
}
@ -134,21 +134,21 @@ function forumdirectory_content(App $a)
}
DBA::close($r);
} else {
info(L10n::t("No entries \x28some entries may be hidden\x29.") . EOL);
info(DI::l10n()->t("No entries \x28some entries may be hidden\x29.") . EOL);
}
$tpl = Renderer::getMarkupTemplate('directory_header.tpl');
$o .= 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('Forum Directory'),
'$title' => DI::l10n()->t('Forum Directory'),
'$search_mod' => 'forumdirectory',
'$submit' => L10n::t('Find'),
'$submit' => DI::l10n()->t('Find'),
'$paginate' => $pager->renderFull($total),
]);

View file

@ -37,7 +37,7 @@ function fromapp_settings_post($a, $post)
DI::pConfig()->set(local_user(), 'fromapp', 'app', $_POST['fromapp-input']);
DI::pConfig()->set(local_user(), 'fromapp', 'force', intval($_POST['fromapp-force']));
info(L10n::t('Fromapp settings updated.') . EOL);
info(DI::l10n()->t('Fromapp settings updated.') . EOL);
}
function fromapp_settings(&$a, &$s)
@ -62,25 +62,25 @@ function fromapp_settings(&$a, &$s)
/* Add some HTML to the existing form */
$s .= '<span id="settings_fromapp_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_fromapp_expanded\'); openClose(\'settings_fromapp_inflated\');">';
$s .= '<h3>' . L10n::t('FromApp Settings') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('FromApp Settings') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_fromapp_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_fromapp_expanded\'); openClose(\'settings_fromapp_inflated\');">';
$s .= '<h3>' . L10n::t('FromApp Settings') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('FromApp Settings') . '</h3>';
$s .= '</span>';
$s .= '<div id="fromapp-wrapper">';
$s .= '<label id="fromapp-label" for="fromapp-input">' . L10n::t('The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.') . '</label>';
$s .= '<label id="fromapp-label" for="fromapp-input">' . DI::l10n()->t('The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.') . '</label>';
$s .= '<input id="fromapp-input" type="text" name="fromapp-input" value="' . $fromapp . '" ' . '/>';
$s .= '<div class="clear"></div>';
$s .= '<label id="fromapp-force-label" for="fromapp-force">' . L10n::t('Use this application name even if another application was used.') . '</label>';
$s .= '<label id="fromapp-force-label" for="fromapp-force">' . DI::l10n()->t('Use this application name even if another application was used.') . '</label>';
$s .= '<input id="fromapp-force" type="checkbox" name="fromapp-force" value="1" ' . $force_enabled . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="fromapp-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="fromapp-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}
function fromapp_post_hook(&$a, &$item)

View file

@ -92,9 +92,9 @@ function geocoordinates_addon_admin(&$a, &$o)
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/geocoordinates/");
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$api_key' => ['api_key', L10n::t('API Key'), Config::get('geocoordinates', 'api_key'), ''],
'$language' => ['language', L10n::t('Language code (IETF format)'), Config::get('geocoordinates', 'language'), ''],
'$submit' => DI::l10n()->t('Save Settings'),
'$api_key' => ['api_key', DI::l10n()->t('API Key'), Config::get('geocoordinates', 'api_key'), ''],
'$language' => ['language', DI::l10n()->t('Language code (IETF format)'), Config::get('geocoordinates', 'language'), ''],
]);
}
@ -105,5 +105,5 @@ function geocoordinates_addon_admin_post(&$a)
$language = (!empty($_POST['language']) ? Strings::escapeTags(trim($_POST['language'])) : '');
Config::set('geocoordinates', 'language', $language);
info(L10n::t('Settings updated.'). EOL);
info(DI::l10n()->t('Settings updated.'). EOL);
}

View file

@ -111,7 +111,7 @@ function geonames_addon_settings_post(App $a, array $post)
DI::pConfig()->set(local_user(), 'geonames', 'enable', intval($_POST['geonames-enable']));
info(L10n::t('Geonames settings updated.'));
info(DI::l10n()->t('Geonames settings updated.'));
}
/**
@ -143,9 +143,9 @@ function geonames_addon_settings(App $a, &$s)
$t = Renderer::getMarkupTemplate('settings.tpl', __DIR__);
$s .= Renderer::replaceMacros($t, [
'$title' => L10n::t('Geonames Settings'),
'$description' => L10n::t('Replace numerical coordinates by the nearest populated location name in your posts.'),
'$enable' => ['geonames-enable', L10n::t('Enable Geonames Addon'), $enabled],
'$submit' => L10n::t('Save Settings')
'$title' => DI::l10n()->t('Geonames Settings'),
'$description' => DI::l10n()->t('Replace numerical coordinates by the nearest populated location name in your posts.'),
'$enable' => ['geonames-enable', DI::l10n()->t('Enable Geonames Addon'), $enabled],
'$submit' => DI::l10n()->t('Save Settings')
]);
}

View file

@ -49,7 +49,7 @@ function gnot_settings_post($a,$post) {
return;
DI::pConfig()->set(local_user(),'gnot','enable',intval($_POST['gnot']));
info(L10n::t('Gnot settings updated.') . EOL);
info(DI::l10n()->t('Gnot settings updated.') . EOL);
}
@ -81,11 +81,11 @@ function gnot_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= Renderer::replaceMacros($t, [
'$title' => L10n::t('Gnot Settings') ,
'$submit' => L10n::t('Save Settings'),
'$enable' => L10n::t('Enable this addon?'),
'$title' => DI::l10n()->t('Gnot Settings') ,
'$submit' => DI::l10n()->t('Save Settings'),
'$enable' => DI::l10n()->t('Enable this addon?'),
'$enabled' => $gnot_checked,
'$text' => L10n::t("Allows threading of email comment notifications on Gmail and anonymising the subject line.")
'$text' => DI::l10n()->t("Allows threading of email comment notifications on Gmail and anonymising the subject line.")
]);
}
@ -94,5 +94,5 @@ function gnot_enotify_mail(&$a,&$b) {
if((! $b['uid']) || (! intval(DI::pConfig()->get($b['uid'], 'gnot','enable'))))
return;
if($b['type'] == NOTIFY_COMMENT)
$b['subject'] = L10n::t('[Friendica:Notify] Comment to conversation #%d', $b['parent']);
$b['subject'] = DI::l10n()->t('[Friendica:Notify] Comment to conversation #%d', $b['parent']);
}

View file

@ -86,11 +86,11 @@ function gravatar_addon_admin (&$a, &$o) {
// Available options for the select boxes
$default_avatars = [
'mm' => L10n::t('generic profile image'),
'identicon' => L10n::t('random geometric pattern'),
'monsterid' => L10n::t('monster face'),
'wavatar' => L10n::t('computer generated face'),
'retro' => L10n::t('retro arcade style face'),
'mm' => DI::l10n()->t('generic profile image'),
'identicon' => DI::l10n()->t('random geometric pattern'),
'monsterid' => DI::l10n()->t('monster face'),
'wavatar' => DI::l10n()->t('computer generated face'),
'retro' => DI::l10n()->t('retro arcade style face'),
];
$ratings = [
'g' => 'g',
@ -104,15 +104,15 @@ function gravatar_addon_admin (&$a, &$o) {
DBA::escape('libravatar')
);
if (count($r)) {
$o = '<h5>' .L10n::t('Information') .'</h5><p>' .L10n::t('Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'</p><br><br>';
$o = '<h5>' .DI::l10n()->t('Information') .'</h5><p>' .DI::l10n()->t('Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'</p><br><br>';
}
// output Gravatar settings
$o .= '<input type="hidden" name="form_security_token" value="' . BaseModule::getFormSecurityToken("gravatarsave") .'">';
$o .= Renderer::replaceMacros( $t, [
'$submit' => L10n::t('Save Settings'),
'$default_avatar' => ['avatar', L10n::t('Default avatar image'), $default_avatar, L10n::t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars],
'$rating' => ['rating', L10n::t('Rating of images'), $rating, L10n::t('Select the appropriate avatar rating for your site. See README'), $ratings],
'$submit' => DI::l10n()->t('Save Settings'),
'$default_avatar' => ['avatar', DI::l10n()->t('Default avatar image'), $default_avatar, DI::l10n()->t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars],
'$rating' => ['rating', DI::l10n()->t('Rating of images'), $rating, DI::l10n()->t('Select the appropriate avatar rating for your site. See README'), $ratings],
]);
}
@ -126,5 +126,5 @@ function gravatar_addon_admin_post (&$a) {
$rating = (!empty($_POST['rating']) ? Strings::escapeTags(trim($_POST['rating'])) : 'g');
Config::set('gravatar', 'default_avatar', $default_avatar);
Config::set('gravatar', 'rating', $rating);
info(L10n::t('Gravatar settings updated.') .EOL);
info(DI::l10n()->t('Gravatar settings updated.') .EOL);
}

View file

@ -44,7 +44,7 @@ function group_text_settings_post($a,$post) {
return;
DI::pConfig()->set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text']));
info(L10n::t('Group Text settings updated.') . EOL);
info(DI::l10n()->t('Group Text settings updated.') . EOL);
}
@ -74,14 +74,14 @@ function group_text_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . L10n::t('Group Text') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Group Text') . '</h3>';
$s .= '<div id="group_text-enable-wrapper">';
$s .= '<label id="group_text-enable-label" for="group_text-checkbox">' . L10n::t('Use a text only (non-image) group selector in the "group edit" menu') . '</label>';
$s .= '<label id="group_text-enable-label" for="group_text-checkbox">' . DI::l10n()->t('Use a text only (non-image) group selector in the "group edit" menu') . '</label>';
$s .= '<input id="group_text-checkbox" type="checkbox" name="group_text" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="group_text-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="group_text-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -53,35 +53,35 @@ function ifttt_settings(App $a, &$s)
}
$s .= '<span id="settings_ifttt_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_ifttt_expanded\'); openClose(\'settings_ifttt_inflated\');">';
$s .= '<img class="connector" src="addon/ifttt/ifttt.png" /><h3 class="connector">' . L10n::t('IFTTT Mirror') . '</h3>';
$s .= '<img class="connector" src="addon/ifttt/ifttt.png" /><h3 class="connector">' . DI::l10n()->t('IFTTT Mirror') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_ifttt_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_ifttt_expanded\'); openClose(\'settings_ifttt_inflated\');">';
$s .= '<img class="connector" src="addon/ifttt/ifttt.png" /><h3 class="connector">' . L10n::t('IFTTT Mirror') . '</h3>';
$s .= '<img class="connector" src="addon/ifttt/ifttt.png" /><h3 class="connector">' . DI::l10n()->t('IFTTT Mirror') . '</h3>';
$s .= '</span>';
$s .= '<div id="ifttt-configuration-wrapper">';
$s .= '<p>' . L10n::t('Create an account at <a href="http://www.ifttt.com">IFTTT</a>. Create three Facebook recipes that are connected with <a href="https://ifttt.com/maker">Maker</a> (In the form "if Facebook then Maker") with the following parameters:') . '</p>';
$s .= '<p>' . DI::l10n()->t('Create an account at <a href="http://www.ifttt.com">IFTTT</a>. Create three Facebook recipes that are connected with <a href="https://ifttt.com/maker">Maker</a> (In the form "if Facebook then Maker") with the following parameters:') . '</p>';
$s .= '<h4>URL</h4>';
$s .= '<p>' . DI::baseUrl()->get() . '/ifttt/' . $a->user['nickname'] . '</p>';
$s .= '<h4>Method</h4>';
$s .= '<p>POST</p>';
$s .= '<h4>Content Type</h4>';
$s .= '<p>application/x-www-form-urlencoded</p>';
$s .= '<h4>' . L10n::t('Body for "new status message"') . '</h4>';
$s .= '<h4>' . DI::l10n()->t('Body for "new status message"') . '</h4>';
$s .= '<p><code>' . htmlentities('key=' . $key . '&type=status&msg=<<<{{Message}}>>>&date=<<<{{UpdatedAt}}>>>&url=<<<{{PageUrl}}>>>') . '</code></p>';
$s .= '<h4>' . L10n::t('Body for "new photo upload"') . '</h4>';
$s .= '<h4>' . DI::l10n()->t('Body for "new photo upload"') . '</h4>';
$s .= '<p><code>' . htmlentities('key=' . $key . '&type=photo&link=<<<{{Link}}>>>&image=<<<{{ImageSource}}>>>&msg=<<<{{Caption}}>>>&date=<<<{{CreatedAt}}>>>&url=<<<{{PageUrl}}>>>') . '</code></p>';
$s .= '<h4>' . L10n::t('Body for "new link post"') . '</h4>';
$s .= '<h4>' . DI::l10n()->t('Body for "new link post"') . '</h4>';
$s .= '<p><code>' . htmlentities('key=' . $key . '&type=link&link=<<<{{Link}}>>>&title=<<<{{Title}}>>>&msg=<<<{{Message}}>>>&description=<<<{{Description}}>>>&date=<<<{{CreatedAt}}>>>&url=<<<{{PageUrl}}>>>') . '</code></p>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ifttt-rekey-wrapper">';
$s .= '<label id="ifttt-rekey-label" for="ifttt-checkbox">' . L10n::t('Generate new key') . '</label>';
$s .= '<label id="ifttt-rekey-label" for="ifttt-checkbox">' . DI::l10n()->t('Generate new key') . '</label>';
$s .= '<input id="ifttt-checkbox" type="checkbox" name="ifttt-rekey" value="1" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="ifttt-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="ifttt-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
$s .= '</div>';
}

View file

@ -46,7 +46,7 @@ function ijpost_jot_nets(\Friendica\App &$a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'ijpost_enable',
L10n::t('Post to Insanejournal'),
DI::l10n()->t('Post to Insanejournal'),
DI::pConfig()->get(local_user(), 'ijpost', 'post_by_default')
]
];
@ -78,35 +78,35 @@ function ijpost_settings(&$a, &$s)
/* Add some HTML to the existing form */
$s .= '<span id="settings_ijpost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_ijpost_expanded\'); openClose(\'settings_ijpost_inflated\');">';
$s .= '<img class="connector" src="images/insanejournal.gif" /><h3 class="connector">'. L10n::t("InsaneJournal Export").'</h3>';
$s .= '<img class="connector" src="images/insanejournal.gif" /><h3 class="connector">'. DI::l10n()->t("InsaneJournal Export").'</h3>';
$s .= '</span>';
$s .= '<div id="settings_ijpost_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_ijpost_expanded\'); openClose(\'settings_ijpost_inflated\');">';
$s .= '<img class="connector" src="images/insanejournal.gif" /><h3 class="connector">'. L10n::t("InsaneJournal Export").'</h3>';
$s .= '<img class="connector" src="images/insanejournal.gif" /><h3 class="connector">'. DI::l10n()->t("InsaneJournal Export").'</h3>';
$s .= '</span>';
$s .= '<div id="ijpost-enable-wrapper">';
$s .= '<label id="ijpost-enable-label" for="ijpost-checkbox">' . L10n::t('Enable InsaneJournal Post Addon') . '</label>';
$s .= '<label id="ijpost-enable-label" for="ijpost-checkbox">' . DI::l10n()->t('Enable InsaneJournal Post Addon') . '</label>';
$s .= '<input id="ijpost-checkbox" type="checkbox" name="ijpost" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ijpost-username-wrapper">';
$s .= '<label id="ijpost-username-label" for="ijpost-username">' . L10n::t('InsaneJournal username') . '</label>';
$s .= '<label id="ijpost-username-label" for="ijpost-username">' . DI::l10n()->t('InsaneJournal username') . '</label>';
$s .= '<input id="ijpost-username" type="text" name="ij_username" value="' . $ij_username . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ijpost-password-wrapper">';
$s .= '<label id="ijpost-password-label" for="ijpost-password">' . L10n::t('InsaneJournal password') . '</label>';
$s .= '<label id="ijpost-password-label" for="ijpost-password">' . DI::l10n()->t('InsaneJournal password') . '</label>';
$s .= '<input id="ijpost-password" type="password" name="ij_password" value="' . $ij_password . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ijpost-bydefault-wrapper">';
$s .= '<label id="ijpost-bydefault-label" for="ijpost-bydefault">' . L10n::t('Post to InsaneJournal by default') . '</label>';
$s .= '<label id="ijpost-bydefault-label" for="ijpost-bydefault">' . DI::l10n()->t('Post to InsaneJournal by default') . '</label>';
$s .= '<input id="ijpost-bydefault" type="checkbox" name="ij_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ijpost-submit" name="ijpost-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ijpost-submit" name="ijpost-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}
function ijpost_settings_post(&$a, &$b)

View file

@ -59,7 +59,7 @@ function impressum_load_config(\Friendica\App $a, ConfigFileLoader $loader)
}
function impressum_show($a,&$b) {
$b .= '<h3>'.L10n::t('Impressum').'</h3>';
$b .= '<h3>'.DI::l10n()->t('Impressum').'</h3>';
$owner = Config::get('impressum', 'owner');
$owner_profile = Config::get('impressum','ownerprofile');
$postal = ProxyUtils::proxifyHtml(BBCode::convert(Config::get('impressum', 'postal')));
@ -72,18 +72,18 @@ function impressum_show($a,&$b) {
$tmp = $owner;
}
if (strlen($email)) {
$b .= '<p><strong>'.L10n::t('Site Owner').'</strong>: '. $tmp .'<br /><strong>'.L10n::t('Email Address').'</strong>: '.$email.'</p>';
$b .= '<p><strong>'.DI::l10n()->t('Site Owner').'</strong>: '. $tmp .'<br /><strong>'.DI::l10n()->t('Email Address').'</strong>: '.$email.'</p>';
} else {
$b .= '<p><strong>'.L10n::t('Site Owner').'</strong>: '. $tmp .'</p>';
$b .= '<p><strong>'.DI::l10n()->t('Site Owner').'</strong>: '. $tmp .'</p>';
}
if (strlen($postal)) {
$b .= '<p><strong>'.L10n::t('Postal Address').'</strong><br />'. $postal .'</p>';
$b .= '<p><strong>'.DI::l10n()->t('Postal Address').'</strong><br />'. $postal .'</p>';
}
if (strlen($notes)) {
$b .= '<p>'.$notes.'</p>';
}
} else {
$b .= '<p>'.L10n::t('The impressum addon needs to be configured!<br />Please add at least the <tt>owner</tt> variable to your config file. For other variables please refer to the README file of the addon.').'</p>';
$b .= '<p>'.DI::l10n()->t('The impressum addon needs to be configured!<br />Please add at least the <tt>owner</tt> variable to your config file. For other variables please refer to the README file of the addon.').'</p>';
}
}
@ -100,17 +100,17 @@ function impressum_addon_admin_post (&$a) {
Config::set('impressum','email',strip_tags($email));
Config::set('impressum','notes',strip_tags($notes));
Config::set('impressum','footer_text',strip_tags($footer_text));
info(L10n::t('Settings updated.'). EOL );
info(DI::l10n()->t('Settings updated.'). EOL );
}
function impressum_addon_admin (&$a, &$o) {
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/impressum/" );
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$owner' => ['owner', L10n::t('Site Owner'), Config::get('impressum','owner'), L10n::t('The page operators name.')],
'$ownerprofile' => ['ownerprofile', L10n::t('Site Owners Profile'), Config::get('impressum','ownerprofile'), L10n::t('Profile address of the operator.')],
'$postal' => ['postal', L10n::t('Postal Address'), Config::get('impressum','postal'), L10n::t('How to contact the operator via snail mail. You can use BBCode here.')],
'$notes' => ['notes', L10n::t('Notes'), Config::get('impressum','notes'), L10n::t('Additional notes that are displayed beneath the contact information. You can use BBCode here.')],
'$email' => ['email', L10n::t('Email Address'), Config::get('impressum','email'), L10n::t('How to contact the operator via email. (will be displayed obfuscated)')],
'$footer_text' => ['footer_text', L10n::t('Footer note'), Config::get('impressum','footer_text'), L10n::t('Text for the footer. You can use BBCode here.')],
'$submit' => DI::l10n()->t('Save Settings'),
'$owner' => ['owner', DI::l10n()->t('Site Owner'), Config::get('impressum','owner'), DI::l10n()->t('The page operators name.')],
'$ownerprofile' => ['ownerprofile', DI::l10n()->t('Site Owners Profile'), Config::get('impressum','ownerprofile'), DI::l10n()->t('Profile address of the operator.')],
'$postal' => ['postal', DI::l10n()->t('Postal Address'), Config::get('impressum','postal'), DI::l10n()->t('How to contact the operator via snail mail. You can use BBCode here.')],
'$notes' => ['notes', DI::l10n()->t('Notes'), Config::get('impressum','notes'), DI::l10n()->t('Additional notes that are displayed beneath the contact information. You can use BBCode here.')],
'$email' => ['email', DI::l10n()->t('Email Address'), Config::get('impressum','email'), DI::l10n()->t('How to contact the operator via email. (will be displayed obfuscated)')],
'$footer_text' => ['footer_text', DI::l10n()->t('Footer note'), Config::get('impressum','footer_text'), DI::l10n()->t('Text for the footer. You can use BBCode here.')],
]);
}

View file

@ -21,7 +21,7 @@ function infiniteimprobabilitydrive_uninstall()
function infiniteimprobabilitydrive_app_menu($a, &$b)
{
$b['app_menu'][] = '<div class="app-title"><a href="infiniteimprobabilitydrive">' . L10n::t('Infinite Improbability Drive') . '</a></div>';
$b['app_menu'][] = '<div class="app-title"><a href="infiniteimprobabilitydrive">' . DI::l10n()->t('Infinite Improbability Drive') . '</a></div>';
}

View file

@ -40,11 +40,11 @@ function irc_addon_settings(&$a,&$s) {
$t = Renderer::getMarkupTemplate( "settings.tpl", "addon/irc/" );
$s .= Renderer::replaceMacros($t, [
'$header' => L10n::t('IRC Settings'),
'$info' => L10n::t('Here you can change the system wide settings for the channels to automatically join and access via the side bar. Note the changes you do here, only effect the channel selection if you are logged in.'),
'$submit' => L10n::t('Save Settings'),
'$autochans' => [ 'autochans', L10n::t('Channel(s) to auto connect (comma separated)'), $autochans, L10n::t('List of channels that shall automatically connected to when the app is launched.')],
'$sitechats' => [ 'sitechats', L10n::t('Popular Channels (comma separated)'), $sitechats, L10n::t('List of popular channels, will be displayed at the side and hotlinked for easy joining.') ]
'$header' => DI::l10n()->t('IRC Settings'),
'$info' => DI::l10n()->t('Here you can change the system wide settings for the channels to automatically join and access via the side bar. Note the changes you do here, only effect the channel selection if you are logged in.'),
'$submit' => DI::l10n()->t('Save Settings'),
'$autochans' => [ 'autochans', DI::l10n()->t('Channel(s) to auto connect (comma separated)'), $autochans, DI::l10n()->t('List of channels that shall automatically connected to when the app is launched.')],
'$sitechats' => [ 'sitechats', DI::l10n()->t('Popular Channels (comma separated)'), $sitechats, DI::l10n()->t('List of popular channels, will be displayed at the side and hotlinked for easy joining.') ]
]);
@ -64,12 +64,12 @@ function irc_addon_settings_post(&$a, &$b) {
DI::pConfig()->set(local_user(), 'irc', 'sitechats', trim($_POST['sitechats']));
}
/* upid pop-up thing */
info(L10n::t('IRC settings saved.') . EOL);
info(DI::l10n()->t('IRC settings saved.') . EOL);
}
}
function irc_app_menu($a,&$b) {
$b['app_menu'][] = '<div class="app-title"><a href="irc">' . L10n::t('IRC Chatroom') . '</a></div>';
$b['app_menu'][] = '<div class="app-title"><a href="irc">' . DI::l10n()->t('IRC Chatroom') . '</a></div>';
}
@ -97,7 +97,7 @@ function irc_content(&$a) {
$chats = ['friendica','chat','chatback','hottub','ircbar','dateroom','debian'];
DI::page()['aside'] .= '<div class="widget"><h3>' . L10n::t('Popular Channels') . '</h3><ul>';
DI::page()['aside'] .= '<div class="widget"><h3>' . DI::l10n()->t('Popular Channels') . '</h3><ul>';
foreach($chats as $chat) {
DI::page()['aside'] .= '<li><a href="' . DI::baseUrl()->get() . '/irc?channels=' . $chat . '" >' . '#' . $chat . '</a></li>';
}
@ -135,7 +135,7 @@ function irc_addon_admin_post (&$a) {
Config::set('irc','autochans',trim($_POST['autochans']));
Config::set('irc','sitechats',trim($_POST['sitechats']));
/* stupid pop-up thing */
info(L10n::t('IRC settings saved.') . EOL);
info(DI::l10n()->t('IRC settings saved.') . EOL);
}
}
function irc_addon_admin (&$a, &$o) {
@ -143,8 +143,8 @@ function irc_addon_admin (&$a, &$o) {
$autochans = Config::get('irc','autochans'); /* auto connect chans */
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/irc/" );
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$autochans' => [ 'autochans', L10n::t('Channel(s) to auto connect (comma separated)'), $autochans, L10n::t('List of channels that shall automatically connected to when the app is launched.')],
'$sitechats' => [ 'sitechats', L10n::t('Popular Channels (comma separated)'), $sitechats, L10n::t('List of popular channels, will be displayed at the side and hotlinked for easy joining.') ]
'$submit' => DI::l10n()->t('Save Settings'),
'$autochans' => [ 'autochans', DI::l10n()->t('Channel(s) to auto connect (comma separated)'), $autochans, DI::l10n()->t('List of channels that shall automatically connected to when the app is launched.')],
'$sitechats' => [ 'sitechats', DI::l10n()->t('Popular Channels (comma separated)'), $sitechats, DI::l10n()->t('List of popular channels, will be displayed at the side and hotlinked for easy joining.') ]
]);
}

View file

@ -331,58 +331,58 @@ function jappixmini_settings(App $a, &$s)
}
$s .= '<span id="settings_jappixmini_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_jappixmini_expanded\'); openClose(\'settings_jappixmini_inflated\');">';
$s .= '<h3>' . L10n::t('Jappix Mini') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Jappix Mini') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_jappixmini_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_jappixmini_expanded\'); openClose(\'settings_jappixmini_inflated\');">';
$s .= '<h3>' . L10n::t('Jappix Mini') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Jappix Mini') . '</h3>';
$s .= '</span>';
$s .= '<label for="jappixmini-activate">' . L10n::t('Activate addon') . '</label>';
$s .= '<label for="jappixmini-activate">' . DI::l10n()->t('Activate addon') . '</label>';
$s .= ' <input id="jappixmini-activate" type="checkbox" name="jappixmini-activate" value="1"' . $activate . ' />';
$s .= '<br />';
$s .= '<label for"jappixmini-dont-insertchat">' . L10n::t('Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface') . '</label>';
$s .= '<label for"jappixmini-dont-insertchat">' . DI::l10n()->t('Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface') . '</label>';
$s .= '<input id="jappixmini-dont-insertchat" type="checkbox" name="jappixmini-dont-insertchat" value="1"' . $insertchat . ' />';
$s .= '<br />';
$s .= '<label for="jappixmini-username">' . L10n::t('Jabber username') . '</label>';
$s .= '<label for="jappixmini-username">' . DI::l10n()->t('Jabber username') . '</label>';
$s .= ' <input id="jappixmini-username" type="text" name="jappixmini-username" value="' . $username . '" />';
$s .= '<br />';
$s .= '<label for="jappixmini-server">' . L10n::t('Jabber server') . '</label>';
$s .= '<label for="jappixmini-server">' . DI::l10n()->t('Jabber server') . '</label>';
$s .= ' <input id="jappixmini-server" type="text" name="jappixmini-server" value="' . $server . '" />';
$s .= '<br />';
if ($defaultbosh == "") {
$s .= '<label for="jappixmini-bosh">' . L10n::t('Jabber BOSH host') . '</label>';
$s .= '<label for="jappixmini-bosh">' . DI::l10n()->t('Jabber BOSH host') . '</label>';
$s .= ' <input id="jappixmini-bosh" type="text" name="jappixmini-bosh" value="' . $bosh . '" />';
$s .= '<br />';
}
$s .= '<label for="jappixmini-password">' . L10n::t('Jabber password') . '</label>';
$s .= '<label for="jappixmini-password">' . DI::l10n()->t('Jabber password') . '</label>';
$s .= ' <input type="hidden" id="jappixmini-password" name="jappixmini-encrypted-password" value="' . $password . '" />';
$s .= ' <input id="jappixmini-clear-password" type="password" value="" onchange="jappixmini_set_password();" />';
$s .= '<br />';
$onchange = "document.getElementById('jappixmini-friendica-password').disabled = !this.checked;jappixmini_set_password();";
$s .= '<label for="jappixmini-encrypt">' . L10n::t('Encrypt Jabber password with Friendica password (recommended)') . '</label>';
$s .= '<label for="jappixmini-encrypt">' . DI::l10n()->t('Encrypt Jabber password with Friendica password (recommended)') . '</label>';
$s .= ' <input id="jappixmini-encrypt" type="checkbox" name="jappixmini-encrypt" onchange="' . $onchange . '" value="1"' . $encrypt_checked . ' />';
$s .= '<br />';
$s .= '<label for="jappixmini-friendica-password">' . L10n::t('Friendica password') . '</label>';
$s .= '<label for="jappixmini-friendica-password">' . DI::l10n()->t('Friendica password') . '</label>';
$s .= ' <input id="jappixmini-friendica-password" name="jappixmini-friendica-password" type="password" onchange="jappixmini_set_password();" value=""' . $encrypt_disabled . ' />';
$s .= '<br />';
$s .= '<label for="jappixmini-autoapprove">' . L10n::t('Approve subscription requests from Friendica contacts automatically') . '</label>';
$s .= '<label for="jappixmini-autoapprove">' . DI::l10n()->t('Approve subscription requests from Friendica contacts automatically') . '</label>';
$s .= ' <input id="jappixmini-autoapprove" type="checkbox" name="jappixmini-autoapprove" value="1"' . $autoapprove . ' />';
$s .= '<br />';
$s .= '<label for="jappixmini-autosubscribe">' . L10n::t('Subscribe to Friendica contacts automatically') . '</label>';
$s .= '<label for="jappixmini-autosubscribe">' . DI::l10n()->t('Subscribe to Friendica contacts automatically') . '</label>';
$s .= ' <input id="jappixmini-autosubscribe" type="checkbox" name="jappixmini-autosubscribe" value="1"' . $autosubscribe . ' />';
$s .= '<br />';
$s .= '<label for="jappixmini-purge">' . L10n::t('Purge internal list of jabber addresses of contacts') . '</label>';
$s .= '<label for="jappixmini-purge">' . DI::l10n()->t('Purge internal list of jabber addresses of contacts') . '</label>';
$s .= ' <input id="jappixmini-purge" type="checkbox" name="jappixmini-purge" value="1" />';
$s .= '<br />';
if ($info_text) {
$s .= '<br />Configuration help:<p style="margin-left:2em;">' . $info_text . '</p>';
}
$s .= '<br />Status:<p style="margin-left:2em;">Addon knows ' . $address_cnt . ' Jabber addresses of ' . $contact_cnt . ' Friendica contacts (takes some time, usually 10 minutes, to update).</p>';
$s .= '<input type="submit" name="jappixmini-submit" value="' . L10n::t('Save Settings') . '" />';
$s .= ' <input type="button" value="' . L10n::t('Add contact') . '" onclick="jappixmini_addon_subscribe();" />';
$s .= '<input type="submit" name="jappixmini-submit" value="' . DI::l10n()->t('Save Settings') . '" />';
$s .= ' <input type="button" value="' . DI::l10n()->t('Add contact') . '" onclick="jappixmini_addon_subscribe();" />';
$s .= '</div>';

View file

@ -32,10 +32,10 @@ function js_upload_form(App $a, array &$b)
$tpl = Renderer::getMarkupTemplate('js_upload.tpl', 'addon/js_upload');
$b['addon_text'] .= Renderer::replaceMacros($tpl, [
'$upload_msg' => L10n::t('Select files for upload'),
'$drop_msg' => L10n::t('Drop files here to upload'),
'$cancel' => L10n::t('Cancel'),
'$failed' => L10n::t('Failed'),
'$upload_msg' => DI::l10n()->t('Select files for upload'),
'$drop_msg' => DI::l10n()->t('Drop files here to upload'),
'$cancel' => DI::l10n()->t('Cancel'),
'$failed' => DI::l10n()->t('Failed'),
'$post_url' => $b['post_url'],
'$maximagesize' => intval(Config::get('system', 'maximagesize')),
]);
@ -213,25 +213,25 @@ class qqFileUploader
function handleUpload()
{
if (!$this->file) {
return ['error' => L10n::t('No files were uploaded.')];
return ['error' => DI::l10n()->t('No files were uploaded.')];
}
$size = $this->file->getSize();
if ($size == 0) {
return ['error' => L10n::t('Uploaded file is empty')];
return ['error' => DI::l10n()->t('Uploaded file is empty')];
}
// if ($size > $this->sizeLimit) {
// return array('error' => L10n::t('Uploaded file is too large'));
// return array('error' => DI::l10n()->t('Uploaded file is too large'));
// }
$maximagesize = Config::get('system', 'maximagesize');
if (($maximagesize) && ($size > $maximagesize)) {
return ['error' => L10n::t('Image exceeds size limit of ') . $maximagesize];
return ['error' => DI::l10n()->t('Image exceeds size limit of ') . $maximagesize];
}
@ -245,7 +245,7 @@ class qqFileUploader
if ($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)) {
$these = implode(', ', $this->allowedExtensions);
return ['error' => L10n::t('File has an invalid extension, it should be one of ') . $these . '.'];
return ['error' => DI::l10n()->t('File has an invalid extension, it should be one of ') . $these . '.'];
}
if ($this->file->save()) {
@ -256,7 +256,7 @@ class qqFileUploader
];
} else {
return [
'error' => L10n::t('Upload was cancelled, or server error encountered'),
'error' => DI::l10n()->t('Upload was cancelled, or server error encountered'),
'path' => $this->file->getPath(),
'filename' => $filename . '.' . $ext
];

View file

@ -153,23 +153,23 @@ function krynn_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<span id="settings_krynn_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_krynn_expanded\'); openClose(\'settings_krynn_inflated\');">';
$s .= '<h3>' . L10n::t('Krynn') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Krynn') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_krynn_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_krynn_expanded\'); openClose(\'settings_krynn_inflated\');">';
$s .= '<h3>' . L10n::t('Krynn') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Krynn') . '</h3>';
$s .= '</span>';
$s .= '<div class="settings-block">';
$s .= '<h3>' . L10n::t('Krynn Settings') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Krynn Settings') . '</h3>';
$s .= '<div id="krynn-enable-wrapper">';
$s .= '<label id="krynn-enable-label" for="krynn-checkbox">' . L10n::t('Enable Krynn Addon') . '</label>';
$s .= '<label id="krynn-enable-label" for="krynn-checkbox">' . DI::l10n()->t('Enable Krynn Addon') . '</label>';
$s .= '<input id="krynn-checkbox" type="checkbox" name="krynn" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="krynn-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="krynn-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -53,13 +53,13 @@ function langfilter_addon_settings(App $a, &$s)
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/langfilter/");
$s .= Renderer::replaceMacros($t, [
'$title' => L10n::t("Language Filter"),
'$intro' => L10n::t('This addon tries to identify the language posts are writen in. If it does not match any language specifed below, posts will be hidden by collapsing them.'),
'$enabled' => ['langfilter_enable', L10n::t('Use the language filter'), $enable_checked, ''],
'$languages' => ['langfilter_languages', L10n::t('Able to read'), $languages, L10n::t('List of abbreviations (iso2 codes) for languages you speak, comma separated. For example "de,it".')],
'$minconfidence' => ['langfilter_minconfidence', L10n::t('Minimum confidence in language detection'), $minconfidence, L10n::t('Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.')],
'$minlength' => ['langfilter_minlength', L10n::t('Minimum length of message body'), $minlength, L10n::t('Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).')],
'$submit' => L10n::t('Save Settings'),
'$title' => DI::l10n()->t("Language Filter"),
'$intro' => DI::l10n()->t('This addon tries to identify the language posts are writen in. If it does not match any language specifed below, posts will be hidden by collapsing them.'),
'$enabled' => ['langfilter_enable', DI::l10n()->t('Use the language filter'), $enable_checked, ''],
'$languages' => ['langfilter_languages', DI::l10n()->t('Able to read'), $languages, DI::l10n()->t('List of abbreviations (iso2 codes) for languages you speak, comma separated. For example "de,it".')],
'$minconfidence' => ['langfilter_minconfidence', DI::l10n()->t('Minimum confidence in language detection'), $minconfidence, DI::l10n()->t('Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.')],
'$minlength' => ['langfilter_minlength', DI::l10n()->t('Minimum length of message body'), $minlength, DI::l10n()->t('Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).')],
'$submit' => DI::l10n()->t('Save Settings'),
]);
return;
@ -100,7 +100,7 @@ function langfilter_addon_settings_post(App $a, &$b)
}
DI::pConfig()->set(local_user(), 'langfilter', 'minlength', $minlength);
info(L10n::t('Language Filter Settings saved.') . EOL);
info(DI::l10n()->t('Language Filter Settings saved.') . EOL);
}
}
@ -197,6 +197,6 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data)
}
if (!in_array($iso2, $read_languages_array)) {
$hook_data['filter_reasons'][] = L10n::t('Filtered language: %s', ucfirst($lang));
$hook_data['filter_reasons'][] = DI::l10n()->t('Filtered language: %s', ucfirst($lang));
}
}

View file

@ -46,7 +46,7 @@ function libertree_jot_nets(App &$a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'libertree_enable',
L10n::t('Post to libertree'),
DI::l10n()->t('Post to libertree'),
DI::pConfig()->get(local_user(), 'libertree', 'post_by_default')
]
];
@ -80,36 +80,36 @@ function libertree_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<span id="settings_libertree_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_libertree_expanded\'); openClose(\'settings_libertree_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/libertree.png" /><h3 class="connector">'. L10n::t('libertree Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/libertree.png" /><h3 class="connector">'. DI::l10n()->t('libertree Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_libertree_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_libertree_expanded\'); openClose(\'settings_libertree_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/libertree.png" /><h3 class="connector">'. L10n::t('libertree Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/libertree.png" /><h3 class="connector">'. DI::l10n()->t('libertree Export').'</h3>';
$s .= '</span>';
$s .= '<div id="libertree-enable-wrapper">';
$s .= '<label id="libertree-enable-label" for="libertree-checkbox">' . L10n::t('Enable Libertree Post Addon') . '</label>';
$s .= '<label id="libertree-enable-label" for="libertree-checkbox">' . DI::l10n()->t('Enable Libertree Post Addon') . '</label>';
$s .= '<input id="libertree-checkbox" type="checkbox" name="libertree" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="libertree-api_token-wrapper">';
$s .= '<label id="libertree-api_token-label" for="libertree-api_token">' . L10n::t('Libertree API token') . '</label>';
$s .= '<label id="libertree-api_token-label" for="libertree-api_token">' . DI::l10n()->t('Libertree API token') . '</label>';
$s .= '<input id="libertree-api_token" type="text" name="libertree_api_token" value="' . $ltree_api_token . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="libertree-url-wrapper">';
$s .= '<label id="libertree-url-label" for="libertree-url">' . L10n::t('Libertree site URL') . '</label>';
$s .= '<label id="libertree-url-label" for="libertree-url">' . DI::l10n()->t('Libertree site URL') . '</label>';
$s .= '<input id="libertree-url" type="text" name="libertree_url" value="' . $ltree_url . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="libertree-bydefault-wrapper">';
$s .= '<label id="libertree-bydefault-label" for="libertree-bydefault">' . L10n::t('Post to Libertree by default') . '</label>';
$s .= '<label id="libertree-bydefault-label" for="libertree-bydefault">' . DI::l10n()->t('Post to Libertree by default') . '</label>';
$s .= '<input id="libertree-bydefault" type="checkbox" name="libertree_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="libertree-submit" name="libertree-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="libertree-submit" name="libertree-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -87,18 +87,18 @@ function libravatar_addon_admin(&$a, &$o)
// Available options for the select boxes
$default_avatars = [
'mm' => L10n::t('generic profile image'),
'identicon' => L10n::t('random geometric pattern'),
'monsterid' => L10n::t('monster face'),
'wavatar' => L10n::t('computer generated face'),
'retro' => L10n::t('retro arcade style face'),
'mm' => DI::l10n()->t('generic profile image'),
'identicon' => DI::l10n()->t('random geometric pattern'),
'monsterid' => DI::l10n()->t('monster face'),
'wavatar' => DI::l10n()->t('computer generated face'),
'retro' => DI::l10n()->t('retro arcade style face'),
];
// Show warning if PHP version is too old
if (! version_compare(PHP_VERSION, '5.3.0', '>=')) {
$o = '<h5>' .L10n::t('Warning') .'</h5><p>';
$o .= L10n::t('Your PHP version %s is lower than the required PHP >= 5.3.', PHP_VERSION);
$o .= '<br>' .L10n::t('This addon is not functional on your server.') .'<p><br>';
$o = '<h5>' .DI::l10n()->t('Warning') .'</h5><p>';
$o .= DI::l10n()->t('Your PHP version %s is lower than the required PHP >= 5.3.', PHP_VERSION);
$o .= '<br>' .DI::l10n()->t('This addon is not functional on your server.') .'<p><br>';
return;
}
@ -107,14 +107,14 @@ function libravatar_addon_admin(&$a, &$o)
DBA::escape('gravatar')
);
if (count($r)) {
$o = '<h5>' .L10n::t('Information') .'</h5><p>' .L10n::t('Gravatar addon is installed. Please disable the Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'</p><br><br>';
$o = '<h5>' .DI::l10n()->t('Information') .'</h5><p>' .DI::l10n()->t('Gravatar addon is installed. Please disable the Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'</p><br><br>';
}
// output Libravatar settings
$o .= '<input type="hidden" name="form_security_token" value="' . BaseModule::getFormSecurityToken("libravatarsave") .'">';
$o .= Renderer::replaceMacros( $t, [
'$submit' => L10n::t('Save Settings'),
'$default_avatar' => ['avatar', L10n::t('Default avatar image'), $default_avatar, L10n::t('Select default avatar image if none was found. See README'), $default_avatars],
'$submit' => DI::l10n()->t('Save Settings'),
'$default_avatar' => ['avatar', DI::l10n()->t('Default avatar image'), $default_avatar, DI::l10n()->t('Select default avatar image if none was found. See README'), $default_avatars],
]);
}
@ -127,5 +127,5 @@ function libravatar_addon_admin_post(&$a)
$default_avatar = (!empty($_POST['avatar']) ? Strings::escapeTags(trim($_POST['avatar'])) : 'identicon');
Config::set('libravatar', 'default_avatar', $default_avatar);
info(L10n::t('Libravatar settings updated.') .EOL);
info(DI::l10n()->t('Libravatar settings updated.') .EOL);
}

View file

@ -46,7 +46,7 @@ function ljpost_jot_nets(\Friendica\App &$a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'ljpost_enable',
L10n::t('Post to LiveJournal'),
DI::l10n()->t('Post to LiveJournal'),
DI::pConfig()->get(local_user(),'ljpost','post_by_default')
]
];
@ -80,30 +80,30 @@ function ljpost_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . L10n::t('LiveJournal Post Settings') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('LiveJournal Post Settings') . '</h3>';
$s .= '<div id="ljpost-enable-wrapper">';
$s .= '<label id="ljpost-enable-label" for="ljpost-checkbox">' . L10n::t('Enable LiveJournal Post Addon') . '</label>';
$s .= '<label id="ljpost-enable-label" for="ljpost-checkbox">' . DI::l10n()->t('Enable LiveJournal Post Addon') . '</label>';
$s .= '<input id="ljpost-checkbox" type="checkbox" name="ljpost" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ljpost-username-wrapper">';
$s .= '<label id="ljpost-username-label" for="ljpost-username">' . L10n::t('LiveJournal username') . '</label>';
$s .= '<label id="ljpost-username-label" for="ljpost-username">' . DI::l10n()->t('LiveJournal username') . '</label>';
$s .= '<input id="ljpost-username" type="text" name="lj_username" value="' . $lj_username . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ljpost-password-wrapper">';
$s .= '<label id="ljpost-password-label" for="ljpost-password">' . L10n::t('LiveJournal password') . '</label>';
$s .= '<label id="ljpost-password-label" for="ljpost-password">' . DI::l10n()->t('LiveJournal password') . '</label>';
$s .= '<input id="ljpost-password" type="password" name="lj_password" value="' . $lj_password . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ljpost-bydefault-wrapper">';
$s .= '<label id="ljpost-bydefault-label" for="ljpost-bydefault">' . L10n::t('Post to LiveJournal by default') . '</label>';
$s .= '<label id="ljpost-bydefault-label" for="ljpost-bydefault">' . DI::l10n()->t('Post to LiveJournal by default') . '</label>';
$s .= '<input id="ljpost-bydefault" type="checkbox" name="lj_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ljpost-submit" name="ljpost-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ljpost-submit" name="ljpost-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -78,12 +78,12 @@ function mailstream_addon_admin(&$a,&$o) {
$frommail = Config::get('mailstream', 'frommail');
$template = Renderer::getMarkupTemplate('admin.tpl', 'addon/mailstream/');
$config = ['frommail',
L10n::t('From Address'),
DI::l10n()->t('From Address'),
$frommail,
L10n::t('Email address that stream items will appear to be from.')];
DI::l10n()->t('Email address that stream items will appear to be from.')];
$o .= Renderer::replaceMacros($template, [
'$frommail' => $config,
'$submit' => L10n::t('Save Settings')]);
'$submit' => DI::l10n()->t('Save Settings')]);
}
function mailstream_addon_admin_post ($a) {
@ -237,7 +237,7 @@ function mailstream_subject($item) {
break;
}
if ($parent_item['title']) {
return L10n::t('Re:') . ' ' . mailstream_decode_subject($parent_item['title']);
return DI::l10n()->t('Re:') . ' ' . mailstream_decode_subject($parent_item['title']);
}
$parent = $parent_item['thr-parent'];
}
@ -245,10 +245,10 @@ function mailstream_subject($item) {
intval($item['contact-id']), intval($item['uid']));
$contact = $r[0];
if ($contact['network'] === 'dfrn') {
return L10n::t("Friendica post");
return DI::l10n()->t("Friendica post");
}
if ($contact['network'] === 'dspr') {
return L10n::t("Diaspora post");
return DI::l10n()->t("Diaspora post");
}
if ($contact['network'] === 'face') {
$text = mailstream_decode_subject($item['body']);
@ -258,12 +258,12 @@ function mailstream_subject($item) {
return preg_replace('/\\s+/', ' ', $subject);
}
if ($contact['network'] === 'feed') {
return L10n::t("Feed item");
return DI::l10n()->t("Feed item");
}
if ($contact['network'] === 'mail') {
return L10n::t("Email");
return DI::l10n()->t("Email");
}
return L10n::t("Friendica Item");
return DI::l10n()->t("Friendica Item");
}
function mailstream_send(\Friendica\App $a, $message_id, $item, $user) {
@ -308,8 +308,8 @@ function mailstream_send(\Friendica\App $a, $message_id, $item, $user) {
$item['body'] = BBCode::convert($item['body']);
$item['url'] = DI::baseUrl()->get() . '/display/' . $item['guid'];
$mail->Body = Renderer::replaceMacros($template, [
'$upstream' => L10n::t('Upstream'),
'$local' => L10n::t('Local'),
'$upstream' => DI::l10n()->t('Upstream'),
'$local' => DI::l10n()->t('Local'),
'$item' => $item]);
mailstream_html_wrap($mail->Body);
if (!$mail->Send()) {
@ -376,25 +376,25 @@ function mailstream_addon_settings(&$a,&$s) {
$s .= Renderer::replaceMacros($template, [
'$enabled' => [
'mailstream_enabled',
L10n::t('Enabled'),
DI::l10n()->t('Enabled'),
$enabled],
'$address' => [
'mailstream_address',
L10n::t('Email Address'),
DI::l10n()->t('Email Address'),
$address,
L10n::t("Leave blank to use your account email address")],
DI::l10n()->t("Leave blank to use your account email address")],
'$nolikes' => [
'mailstream_nolikes',
L10n::t('Exclude Likes'),
DI::l10n()->t('Exclude Likes'),
$nolikes,
L10n::t("Check this to omit mailing \"Like\" notifications")],
DI::l10n()->t("Check this to omit mailing \"Like\" notifications")],
'$attachimg' => [
'mailstream_attachimg',
L10n::t('Attach Images'),
DI::l10n()->t('Attach Images'),
$attachimg,
L10n::t("Download images in posts and attach them to the email. Useful for reading email while offline.")],
'$title' => L10n::t('Mail Stream Settings'),
'$submit' => L10n::t('Save Settings')]);
DI::l10n()->t("Download images in posts and attach them to the email. Useful for reading email while offline.")],
'$title' => DI::l10n()->t('Mail Stream Settings'),
'$submit' => DI::l10n()->t('Save Settings')]);
}
function mailstream_addon_settings_post($a,$post) {

View file

@ -28,9 +28,9 @@ function markdown_addon_settings(App $a, &$s)
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/markdown/');
$s .= Renderer::replaceMacros($t, [
'$title' => L10n::t('Markdown'),
'$enabled' => ['enabled', L10n::t('Enable Markdown parsing'), $enabled, L10n::t('If enabled, self created items will additionally be parsed via Markdown.')],
'$submit' => L10n::t('Save Settings'),
'$title' => DI::l10n()->t('Markdown'),
'$enabled' => ['enabled', DI::l10n()->t('Enable Markdown parsing'), $enabled, DI::l10n()->t('If enabled, self created items will additionally be parsed via Markdown.')],
'$submit' => DI::l10n()->t('Save Settings'),
]);
}

View file

@ -53,9 +53,9 @@ function mathjax_settings(App $a, &$s)
$tpl = Renderer::getMarkupTemplate('settings.tpl', __DIR__);
$s .= Renderer::replaceMacros($tpl, [
'$title' => 'MathJax',
'$description' => L10n::t('The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail.'),
'$mathjax_use' => ['mathjax_use', L10n::t('Use the MathJax renderer'), $use, ''],
'$savesettings' => L10n::t('Save Settings'),
'$description' => DI::l10n()->t('The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail.'),
'$mathjax_use' => ['mathjax_use', DI::l10n()->t('Use the MathJax renderer'), $use, ''],
'$savesettings' => DI::l10n()->t('Save Settings'),
]);
}

View file

@ -39,7 +39,7 @@ function membersince_display(Friendica\App $a, &$b)
$hr->setAttribute('class','profile-separator');
// The label div.
$label = $doc->createElement('div', L10n::t('Member since:'));
$label = $doc->createElement('div', DI::l10n()->t('Member since:'));
$label->setAttribute('class', 'col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted');
// The div for the register date of the profile owner.
@ -54,6 +54,6 @@ function membersince_display(Friendica\App $a, &$b)
$b = $doc->saveHTML();
} else {
// Works in Vier.
$b = preg_replace('/<\/dl>/', "</dl>\n\n\n<dl id=\"aprofile-membersince\" class=\"aprofile\">\n<dt>" . L10n::t('Member since:') . "</dt>\n<dd>" . DateTimeFormat::local($a->profile['register_date']) . "</dd>\n</dl>", $b, 1);
$b = preg_replace('/<\/dl>/', "</dl>\n\n\n<dl id=\"aprofile-membersince\" class=\"aprofile\">\n<dt>" . DI::l10n()->t('Member since:') . "</dt>\n<dd>" . DateTimeFormat::local($a->profile['register_date']) . "</dd>\n</dl>", $b, 1);
}
}

View file

@ -31,90 +31,90 @@ function morechoice_uninstall() {
}
function morechoice_gender_selector($a,&$b) {
$b['Androgyne'] = L10n::t('Androgyne');
$b['Bear'] = L10n::t('Bear');
$b['Bigender'] = L10n::t('Bigender');
$b['Cross dresser'] = L10n::t('Cross dresser');
$b['Drag queen'] = L10n::t('Drag queen');
$b['Eunuch'] = L10n::t('Eunuch');
$b['Faux queen'] = L10n::t('Faux queen');
$b['Gender fluid'] = L10n::t('Gender fluid');
$b['Kathoey'] = L10n::t('Kathoey');
$b['Lady'] = L10n::t('Lady');
$b['Lipstick lesbian'] = L10n::t('Lipstick lesbian');
$b['Metrosexual'] = L10n::t('Metrosexual');
$b['Monk'] = L10n::t('Monk');
$b['Nun'] = L10n::t('Nun');
$b['Soft butch'] = L10n::t('Soft butch');
$b['Stone femme'] = L10n::t('Stone femme');
$b['Tomboy'] = L10n::t('Tomboy');
$b['Transman'] = L10n::t('Transman');
$b['Transwoman'] = L10n::t('Transwoman');
$b['Transvesti'] = L10n::t('Transvesti');
$b['Trigender'] = L10n::t('Trigender');
$b['Can\'t remember'] = L10n::t('Can\'t remember');
$b['Hard to tell these days'] = L10n::t('Hard to tell these days');
$b['Androgyne'] = DI::l10n()->t('Androgyne');
$b['Bear'] = DI::l10n()->t('Bear');
$b['Bigender'] = DI::l10n()->t('Bigender');
$b['Cross dresser'] = DI::l10n()->t('Cross dresser');
$b['Drag queen'] = DI::l10n()->t('Drag queen');
$b['Eunuch'] = DI::l10n()->t('Eunuch');
$b['Faux queen'] = DI::l10n()->t('Faux queen');
$b['Gender fluid'] = DI::l10n()->t('Gender fluid');
$b['Kathoey'] = DI::l10n()->t('Kathoey');
$b['Lady'] = DI::l10n()->t('Lady');
$b['Lipstick lesbian'] = DI::l10n()->t('Lipstick lesbian');
$b['Metrosexual'] = DI::l10n()->t('Metrosexual');
$b['Monk'] = DI::l10n()->t('Monk');
$b['Nun'] = DI::l10n()->t('Nun');
$b['Soft butch'] = DI::l10n()->t('Soft butch');
$b['Stone femme'] = DI::l10n()->t('Stone femme');
$b['Tomboy'] = DI::l10n()->t('Tomboy');
$b['Transman'] = DI::l10n()->t('Transman');
$b['Transwoman'] = DI::l10n()->t('Transwoman');
$b['Transvesti'] = DI::l10n()->t('Transvesti');
$b['Trigender'] = DI::l10n()->t('Trigender');
$b['Can\'t remember'] = DI::l10n()->t('Can\'t remember');
$b['Hard to tell these days'] = DI::l10n()->t('Hard to tell these days');
}
function morechoice_sexpref_selector($a,&$b) {
$b['Girls with big tits'] = L10n::t('Girls with big tits');
$b['Millionaires'] = L10n::t('Millionaires');
$b['Guys with big schlongs'] = L10n::t('Guys with big schlongs');
$b['Easy women'] = L10n::t('Easy women');
$b['People with impaired mobility'] = L10n::t('People with impaired mobility');
$b['Amputees'] = L10n::t('Amputees');
$b['Statues, mannequins and immobility'] = L10n::t('Statues, mannequins and immobility');
$b['Pain'] = L10n::t('Pain');
$b['Trans men'] = L10n::t('Trans men');
$b['Older women'] = L10n::t('Older women');
$b['Asphyxiation'] = L10n::t('Asphyxiation');
$b['In public'] = L10n::t('In public');
$b['In danger'] = L10n::t('In danger');
$b['Pretending to be male'] = L10n::t('Pretending to be male');
$b['Pretending to be female'] = L10n::t('Pretending to be female');
$b['Breats'] = L10n::t('Breats');
$b['Scat'] = L10n::t('Scat');
$b['Crying'] = L10n::t('Crying');
$b['Nappies/Diapers'] = L10n::t('Nappies/Diapers');
$b['Trees'] = L10n::t('Trees');
$b['Vomit'] = L10n::t('Vomit');
$b['Murder'] = L10n::t('Murder');
$b['Fat people'] = L10n::t('Fat people');
$b['Feet'] = L10n::t('Feet');
$b['Covered in insects'] = L10n::t('Covered in insects');
$b['Turning a human being into furniture'] = L10n::t('Turning a human being into furniture');
$b['Elderly people'] = L10n::t('Elderly people');
$b['Transgender people'] = L10n::t('Transgender people');
$b['Criminals'] = L10n::t('Criminals');
$b['Stealing'] = L10n::t('Stealing');
$b['Breast milk'] = L10n::t('Breast milk');
$b['Immersing genitals in liquids'] = L10n::t('Immersing genitals in liquids');
$b['Giants'] = L10n::t('Giants');
$b['Masochism'] = L10n::t('Masochism');
$b['Cars'] = L10n::t('Cars');
$b['Menstruation'] = L10n::t('Menstruation');
$b['Mucus'] = L10n::t('Mucus');
$b['Obscene language'] = L10n::t('Obscene language');
$b['Noses'] = L10n::t('Noses');
$b['Navels'] = L10n::t('Navels');
$b['Corpses'] = L10n::t('Corpses');
$b['Smells'] = L10n::t('Smells');
$b['Buttocks'] = L10n::t('Buttocks');
$b['Nonliving objects'] = L10n::t('Nonliving objects');
$b['Sleeping people'] = L10n::t('Sleeping people');
$b['Urination'] = L10n::t('Urination');
$b['Eating people'] = L10n::t('Eating people');
$b['Being eaten'] = L10n::t('Being eaten');
$b['Animals'] = L10n::t('Animals');
$b['I\'d rather just have some chocolate'] = L10n::t('I\'d rather just have some chocolate');
$b['Girls with big tits'] = DI::l10n()->t('Girls with big tits');
$b['Millionaires'] = DI::l10n()->t('Millionaires');
$b['Guys with big schlongs'] = DI::l10n()->t('Guys with big schlongs');
$b['Easy women'] = DI::l10n()->t('Easy women');
$b['People with impaired mobility'] = DI::l10n()->t('People with impaired mobility');
$b['Amputees'] = DI::l10n()->t('Amputees');
$b['Statues, mannequins and immobility'] = DI::l10n()->t('Statues, mannequins and immobility');
$b['Pain'] = DI::l10n()->t('Pain');
$b['Trans men'] = DI::l10n()->t('Trans men');
$b['Older women'] = DI::l10n()->t('Older women');
$b['Asphyxiation'] = DI::l10n()->t('Asphyxiation');
$b['In public'] = DI::l10n()->t('In public');
$b['In danger'] = DI::l10n()->t('In danger');
$b['Pretending to be male'] = DI::l10n()->t('Pretending to be male');
$b['Pretending to be female'] = DI::l10n()->t('Pretending to be female');
$b['Breats'] = DI::l10n()->t('Breats');
$b['Scat'] = DI::l10n()->t('Scat');
$b['Crying'] = DI::l10n()->t('Crying');
$b['Nappies/Diapers'] = DI::l10n()->t('Nappies/Diapers');
$b['Trees'] = DI::l10n()->t('Trees');
$b['Vomit'] = DI::l10n()->t('Vomit');
$b['Murder'] = DI::l10n()->t('Murder');
$b['Fat people'] = DI::l10n()->t('Fat people');
$b['Feet'] = DI::l10n()->t('Feet');
$b['Covered in insects'] = DI::l10n()->t('Covered in insects');
$b['Turning a human being into furniture'] = DI::l10n()->t('Turning a human being into furniture');
$b['Elderly people'] = DI::l10n()->t('Elderly people');
$b['Transgender people'] = DI::l10n()->t('Transgender people');
$b['Criminals'] = DI::l10n()->t('Criminals');
$b['Stealing'] = DI::l10n()->t('Stealing');
$b['Breast milk'] = DI::l10n()->t('Breast milk');
$b['Immersing genitals in liquids'] = DI::l10n()->t('Immersing genitals in liquids');
$b['Giants'] = DI::l10n()->t('Giants');
$b['Masochism'] = DI::l10n()->t('Masochism');
$b['Cars'] = DI::l10n()->t('Cars');
$b['Menstruation'] = DI::l10n()->t('Menstruation');
$b['Mucus'] = DI::l10n()->t('Mucus');
$b['Obscene language'] = DI::l10n()->t('Obscene language');
$b['Noses'] = DI::l10n()->t('Noses');
$b['Navels'] = DI::l10n()->t('Navels');
$b['Corpses'] = DI::l10n()->t('Corpses');
$b['Smells'] = DI::l10n()->t('Smells');
$b['Buttocks'] = DI::l10n()->t('Buttocks');
$b['Nonliving objects'] = DI::l10n()->t('Nonliving objects');
$b['Sleeping people'] = DI::l10n()->t('Sleeping people');
$b['Urination'] = DI::l10n()->t('Urination');
$b['Eating people'] = DI::l10n()->t('Eating people');
$b['Being eaten'] = DI::l10n()->t('Being eaten');
$b['Animals'] = DI::l10n()->t('Animals');
$b['I\'d rather just have some chocolate'] = DI::l10n()->t('I\'d rather just have some chocolate');
}
function morechoice_marital_selector($a,&$b) {
$b['Married to my job'] = L10n::t('Married to my job');
$b['Polygamist'] = L10n::t('Polygamist');
$b['Half married'] = L10n::t('Half married');
$b['Living in the past'] = L10n::t('Living in the past');
$b['Pretending to be over my ex'] = L10n::t('Pretending to be over my ex');
$b['Hurt in the past'] = L10n::t('Hurt in the past');
$b['Wallowing in self-pity'] = L10n::t('Wallowing in self-pity');
$b['Married to my job'] = DI::l10n()->t('Married to my job');
$b['Polygamist'] = DI::l10n()->t('Polygamist');
$b['Half married'] = DI::l10n()->t('Half married');
$b['Living in the past'] = DI::l10n()->t('Living in the past');
$b['Pretending to be over my ex'] = DI::l10n()->t('Pretending to be over my ex');
$b['Hurt in the past'] = DI::l10n()->t('Hurt in the past');
$b['Wallowing in self-pity'] = DI::l10n()->t('Wallowing in self-pity');
}

View file

@ -21,22 +21,22 @@ function morepokes_uninstall()
function morepokes_poke_verbs($a, &$b)
{
$b['bitchslap'] = ['bitchslapped', L10n::t('bitchslap'), L10n::t('bitchslapped')];
$b['shag'] = ['shag', L10n::t('shag'), L10n::t('shagged')];
$b['somethingobscenelybiological'] = ['something obscenely biological', L10n::t('do something obscenely biological to'), L10n::t('did something obscenely biological to')];
$b['newpokefeature'] = ['pointed out the poke feature to', L10n::t('point out the poke feature to'), L10n::t('pointed out the poke feature to')];
$b['declareundyinglove'] = ['declared undying love for', L10n::t('declare undying love for'), L10n::t('declared undying love for')];
$b['patent'] = ['patented', L10n::t('patent'), L10n::t('patented')];
$b['strokebeard'] = ['stroked their beard at', L10n::t('stroke beard'), L10n::t('stroked their beard at')];
$b['bemoan'] = ['bemoaned the declining standards of modern secondary and tertiary education to', L10n::t('bemoan the declining standards of modern secondary and tertiary education to'), L10n::t('bemoans the declining standards of modern secondary and tertiary education to')];
$b['hugs'] = ['hugged', L10n::t('hug'), L10n::t('hugged')];
$b['kiss'] = ['kissed', L10n::t('kiss'), L10n::t('kissed')];
$b['raiseeyebrows'] = ['raised their eyebrows at', L10n::t('raise eyebrows at'), L10n::t('raised their eyebrows at')];
$b['insult'] = ['insulted', L10n::t('insult'), L10n::t('insulted')];
$b['praise'] = ['praised', L10n::t('praise'), L10n::t('praised')];
$b['bedubiousof'] = ['was dubious of', L10n::t('be dubious of'), L10n::t('was dubious of')];
$b['eat'] = ['ate', L10n::t('eat'), L10n::t('ate')];
$b['giggleandfawn'] = ['giggled and fawned at', L10n::t('giggle and fawn at'), L10n::t('giggled and fawned at')];
$b['doubt'] = ['doubted', L10n::t('doubt'), L10n::t('doubted')];
$b['glare'] = ['glared at', L10n::t('glare'), L10n::t('glared at')];
$b['bitchslap'] = ['bitchslapped', DI::l10n()->t('bitchslap'), DI::l10n()->t('bitchslapped')];
$b['shag'] = ['shag', DI::l10n()->t('shag'), DI::l10n()->t('shagged')];
$b['somethingobscenelybiological'] = ['something obscenely biological', DI::l10n()->t('do something obscenely biological to'), DI::l10n()->t('did something obscenely biological to')];
$b['newpokefeature'] = ['pointed out the poke feature to', DI::l10n()->t('point out the poke feature to'), DI::l10n()->t('pointed out the poke feature to')];
$b['declareundyinglove'] = ['declared undying love for', DI::l10n()->t('declare undying love for'), DI::l10n()->t('declared undying love for')];
$b['patent'] = ['patented', DI::l10n()->t('patent'), DI::l10n()->t('patented')];
$b['strokebeard'] = ['stroked their beard at', DI::l10n()->t('stroke beard'), DI::l10n()->t('stroked their beard at')];
$b['bemoan'] = ['bemoaned the declining standards of modern secondary and tertiary education to', DI::l10n()->t('bemoan the declining standards of modern secondary and tertiary education to'), DI::l10n()->t('bemoans the declining standards of modern secondary and tertiary education to')];
$b['hugs'] = ['hugged', DI::l10n()->t('hug'), DI::l10n()->t('hugged')];
$b['kiss'] = ['kissed', DI::l10n()->t('kiss'), DI::l10n()->t('kissed')];
$b['raiseeyebrows'] = ['raised their eyebrows at', DI::l10n()->t('raise eyebrows at'), DI::l10n()->t('raised their eyebrows at')];
$b['insult'] = ['insulted', DI::l10n()->t('insult'), DI::l10n()->t('insulted')];
$b['praise'] = ['praised', DI::l10n()->t('praise'), DI::l10n()->t('praised')];
$b['bedubiousof'] = ['was dubious of', DI::l10n()->t('be dubious of'), DI::l10n()->t('was dubious of')];
$b['eat'] = ['ate', DI::l10n()->t('eat'), DI::l10n()->t('ate')];
$b['giggleandfawn'] = ['giggled and fawned at', DI::l10n()->t('giggle and fawn at'), DI::l10n()->t('giggled and fawned at')];
$b['doubt'] = ['doubted', DI::l10n()->t('doubt'), DI::l10n()->t('doubted')];
$b['glare'] = ['glared at', DI::l10n()->t('glare'), DI::l10n()->t('glared at')];
}

View file

@ -33,15 +33,15 @@ function newmemberwidget_network_mod_init ($a, $b)
}
$t = '<div id="newmember_widget" class="widget">'.EOL;
$t .= '<h3>'.L10n::t('New Member').'</h3>'.EOL;
$t .= '<a href="newmember" id="newmemberwidget-tips">' . L10n::t('Tips for New Members') . '</a><br />'.EOL;
$t .= '<h3>'.DI::l10n()->t('New Member').'</h3>'.EOL;
$t .= '<a href="newmember" id="newmemberwidget-tips">' . DI::l10n()->t('Tips for New Members') . '</a><br />'.EOL;
if (Config::get('newmemberwidget','linkglobalsupport', false)) {
$t .= '<a href="https://forum.friendi.ca/profile/helpers" target="_new">'.L10n::t('Global Support Forum').'</a><br />'.EOL;
$t .= '<a href="https://forum.friendi.ca/profile/helpers" target="_new">'.DI::l10n()->t('Global Support Forum').'</a><br />'.EOL;
}
if (Config::get('newmemberwidget','linklocalsupport', false)) {
$t .= '<a href="'.DI::baseUrl()->get().'/profile/'.Config::get('newmemberwidget','localsupport').'" target="_new">'.L10n::t('Local Support Forum').'</a><br />'.EOL;
$t .= '<a href="'.DI::baseUrl()->get().'/profile/'.Config::get('newmemberwidget','localsupport').'" target="_new">'.DI::l10n()->t('Local Support Forum').'</a><br />'.EOL;
}
$ft = Config::get('newmemberwidget','freetext', '');
@ -69,10 +69,10 @@ function newmemberwidget_addon_admin(&$a, &$o)
{
$t = Renderer::getMarkupTemplate('admin.tpl', 'addon/newmemberwidget');
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$freetext' => [ "freetext", L10n::t("Message"), Config::get("newmemberwidget", "freetext"), L10n::t("Your message for new members. You can use bbcode here.")],
'$linkglobalsupport' => [ "linkglobalsupport", L10n::t('Add a link to global support forum'), Config::get('newmemberwidget', 'linkglobalsupport'), L10n::t('Should a link to the global support forum be displayed?')." (<a href='https://forum.friendi.ca/profile/helpers'>@helpers</a>)"],
'$linklocalsupport' => [ "linklocalsupport", L10n::t('Add a link to the local support forum'), Config::get('newmemberwidget', 'linklocalsupport'), L10n::t('If you have a local support forum and want to have a link displayed in the widget, check this box.')],
'$localsupportname' => [ "localsupportname", L10n::t('Name of the local support group'), Config::get('newmemberwidget', 'localsupport'), L10n::t('If you checked the above, specify the <em>nickname</em> of the local support group here (i.e. helpers)')],
'$submit' => DI::l10n()->t('Save Settings'),
'$freetext' => [ "freetext", DI::l10n()->t("Message"), Config::get("newmemberwidget", "freetext"), DI::l10n()->t("Your message for new members. You can use bbcode here.")],
'$linkglobalsupport' => [ "linkglobalsupport", DI::l10n()->t('Add a link to global support forum'), Config::get('newmemberwidget', 'linkglobalsupport'), DI::l10n()->t('Should a link to the global support forum be displayed?')." (<a href='https://forum.friendi.ca/profile/helpers'>@helpers</a>)"],
'$linklocalsupport' => [ "linklocalsupport", DI::l10n()->t('Add a link to the local support forum'), Config::get('newmemberwidget', 'linklocalsupport'), DI::l10n()->t('If you have a local support forum and want to have a link displayed in the widget, check this box.')],
'$localsupportname' => [ "localsupportname", DI::l10n()->t('Name of the local support group'), Config::get('newmemberwidget', 'localsupport'), DI::l10n()->t('If you checked the above, specify the <em>nickname</em> of the local support group here (i.e. helpers)')],
]);
}

View file

@ -32,7 +32,7 @@ function notifyall_module() {}
function notifyall_addon_admin(App $a, &$o)
{
$o = '<div></div>&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . DI::baseUrl()->get() . '/notifyall">' . L10n::t('Send email to all members') . '</a></br/>';
$o = '<div></div>&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . DI::baseUrl()->get() . '/notifyall">' . DI::l10n()->t('Send email to all members') . '</a></br/>';
}
@ -51,9 +51,9 @@ function notifyall_post(App $a)
$sitename = Config::get('config', 'sitename');
if (empty(Config::get('config', 'admin_name'))) {
$sender_name = '"' . L10n::t('%s Administrator', $sitename) . '"';
$sender_name = '"' . DI::l10n()->t('%s Administrator', $sitename) . '"';
} else {
$sender_name = '"' . L10n::t('%1$s, %2$s Administrator', Config::get('config', 'admin_name'), $sitename) . '"';
$sender_name = '"' . DI::l10n()->t('%1$s, %2$s Administrator', Config::get('config', 'admin_name'), $sitename) . '"';
}
if (!Config::get('config', 'sender_email')) {
@ -80,7 +80,7 @@ function notifyall_post(App $a)
$recips = q("SELECT DISTINCT `email` FROM `user` WHERE `verified` AND NOT `account_removed` AND NOT `account_expired` $sql_extra");
if (! $recips) {
notice(L10n::t('No recipients found.') . EOL);
notice(DI::l10n()->t('No recipients found.') . EOL);
return;
}
@ -96,7 +96,7 @@ function notifyall_post(App $a)
]);
}
notice(L10n::t('Emails sent'));
notice(DI::l10n()->t('Emails sent'));
DI::baseUrl()->redirect('admin');
}
@ -106,14 +106,14 @@ function notifyall_content(&$a)
return;
}
$title = L10n::t('Send email to all members of this Friendica instance.');
$title = DI::l10n()->t('Send email to all members of this Friendica instance.');
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('notifyall_form.tpl', 'addon/notifyall/'), [
'$title' => $title,
'$text' => htmlspecialchars($_REQUEST['text'] ?? ''),
'$subject' => ['subject', L10n::t('Message subject'), $_REQUEST['subject'] ?? '',''],
'$test' => ['test',L10n::t('Test mode (only send to administrator)'), 0,''],
'$submit' => L10n::t('Submit')
'$subject' => ['subject', DI::l10n()->t('Message subject'), $_REQUEST['subject'] ?? '',''],
'$test' => ['test',DI::l10n()->t('Test mode (only send to administrator)'), 0,''],
'$submit' => DI::l10n()->t('Submit')
]);
return $o;

View file

@ -30,7 +30,7 @@ function notimeline_settings_post($a, $post)
}
DI::pConfig()->set(local_user(), 'system', 'no_wall_archive_widget', intval($_POST['notimeline']));
info(L10n::t('No Timeline settings updated.') . EOL);
info(DI::l10n()->t('No Timeline settings updated.') . EOL);
}
function notimeline_settings(&$a, &$s)
@ -53,13 +53,13 @@ function notimeline_settings(&$a, &$s)
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . L10n::t('No Timeline Settings') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('No Timeline Settings') . '</h3>';
$s .= '<div id="notimeline-wrapper">';
$s .= '<label id="notimeline-label" for="notimeline-checkbox">' . L10n::t('Disable Archive selector on profile wall') . '</label>';
$s .= '<label id="notimeline-label" for="notimeline-checkbox">' . DI::l10n()->t('Disable Archive selector on profile wall') . '</label>';
$s .= '<input id="notimeline-checkbox" type="checkbox" name="notimeline" value="1" ' . $notimeline_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="notimeline-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="notimeline-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -74,24 +74,24 @@ function nsfw_addon_settings(&$a, &$s)
}
$s .= '<span id="settings_nsfw_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_nsfw_expanded\'); openClose(\'settings_nsfw_inflated\');">';
$s .= '<h3>' . L10n::t('Content Filter (NSFW and more)') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Content Filter (NSFW and more)') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_nsfw_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_nsfw_expanded\'); openClose(\'settings_nsfw_inflated\');">';
$s .= '<h3>' . L10n::t('Content Filter (NSFW and more)') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Content Filter (NSFW and more)') . '</h3>';
$s .= '</span>';
$s .= '<div id="nsfw-wrapper">';
$s .= '<p>' . L10n::t('This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.') . '</p>';
$s .= '<label id="nsfw-enable-label" for="nsfw-enable">' . L10n::t('Enable Content filter') . ' </label>';
$s .= '<p>' . DI::l10n()->t('This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.') . '</p>';
$s .= '<label id="nsfw-enable-label" for="nsfw-enable">' . DI::l10n()->t('Enable Content filter') . ' </label>';
$s .= '<input id="nsfw-enable" type="checkbox" name="nsfw-enable" value="1"' . $enable_checked . ' />';
$s .= '<div class="clear"></div>';
$s .= '<label id="nsfw-label" for="nsfw-words">' . L10n::t('Comma separated list of keywords to hide') . ' </label>';
$s .= '<label id="nsfw-label" for="nsfw-words">' . DI::l10n()->t('Comma separated list of keywords to hide') . ' </label>';
$s .= '<textarea id="nsfw-words" type="text" name="nsfw-words">' . $words . '</textarea>';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="nsfw-submit" name="nsfw-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
$s .= '<div class="nsfw-desc">' . L10n::t('Use /expression/ to provide regular expressions') . '</div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="nsfw-submit" name="nsfw-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
$s .= '<div class="nsfw-desc">' . DI::l10n()->t('Use /expression/ to provide regular expressions') . '</div></div>';
return;
}
@ -106,7 +106,7 @@ function nsfw_addon_settings_post(&$a, &$b)
$enable = (!empty($_POST['nsfw-enable']) ? intval($_POST['nsfw-enable']) : 0);
$disable = 1 - $enable;
DI::pConfig()->set(local_user(), 'nsfw', 'disable', $disable);
info(L10n::t('NSFW Settings saved.') . EOL);
info(DI::l10n()->t('NSFW Settings saved.') . EOL);
}
}
@ -159,9 +159,9 @@ function nsfw_prepare_body_content_filter(\Friendica\App $a, &$hook_data)
if ($found) {
if ($tag_search) {
$hook_data['filter_reasons'][] = L10n::t('Filtered tag: %s', $word);
$hook_data['filter_reasons'][] = DI::l10n()->t('Filtered tag: %s', $word);
} else {
$hook_data['filter_reasons'][] = L10n::t('Filtered word: %s', $word);
$hook_data['filter_reasons'][] = DI::l10n()->t('Filtered word: %s', $word);
}
}
}

View file

@ -41,7 +41,7 @@ function numfriends_settings_post($a,$post) {
return;
DI::pConfig()->set(local_user(),'system','display_friend_count',intval($_POST['numfriends']));
info( L10n::t('Numfriends settings updated.') . EOL);
info( DI::l10n()->t('Numfriends settings updated.') . EOL);
}
@ -68,13 +68,13 @@ function numfriends_settings(&$a, &$s)
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . L10n::t('Numfriends Settings') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Numfriends Settings') . '</h3>';
$s .= '<div id="numfriends-wrapper">';
$s .= '<label id="numfriends-label" for="numfriends">' . L10n::t('How many contacts to display on profile sidebar') . '</label>';
$s .= '<label id="numfriends-label" for="numfriends">' . DI::l10n()->t('How many contacts to display on profile sidebar') . '</label>';
$s .= '<input id="numfriends-input" type="text" name="numfriends" value="' . intval($numfriends) . '" ' . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="numfriends-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="numfriends-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -179,7 +179,7 @@ function openstreetmap_generate_map(&$a, &$b)
$cardlink .= '?mlat=' . $lat . '&mlon=' . $lon;
}
$cardlink .= '#map=' . $zoom . '/' . $lat . '/' . $lon . '">' . ($b['location'] ? Strings::escapeHtml($b['location']) : L10n::t('View Larger')) . '</a>';
$cardlink .= '#map=' . $zoom . '/' . $lat . '/' . $lon . '">' . ($b['location'] ? Strings::escapeHtml($b['location']) : DI::l10n()->t('View Larger')) . '</a>';
if (empty($b['mode'])) {
$b['html'] = '<iframe style="width:100%; height:300px; border:1px solid #ccc" src="' . $tmsserver .
'/export/embed.html?bbox=' . ($lon - 0.01) . '%2C' . ($lat - 0.01) . '%2C' . ($lon + 0.01) . '%2C' . ($lat + 0.01) .
@ -206,11 +206,11 @@ function openstreetmap_addon_admin(&$a, &$o)
}
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Submit'),
'$tmsserver' => ['tmsserver', L10n::t('Tile Server URL'), $tmsserver, L10n::t('A list of <a href="http://wiki.openstreetmap.org/wiki/TMS" target="_blank">public tile servers</a>')],
'$nomserver' => ['nomserver', L10n::t('Nominatim (reverse geocoding) Server URL'), $nomserver, L10n::t('A list of <a href="http://wiki.openstreetmap.org/wiki/Nominatim" target="_blank">Nominatim servers</a>')],
'$zoom' => ['zoom', L10n::t('Default zoom'), $zoom, L10n::t('The default zoom level. (1:world, 18:highest, also depends on tile server)')],
'$marker' => ['marker', L10n::t('Include marker on map'), $marker, L10n::t('Include a marker on the map.')],
'$submit' => DI::l10n()->t('Submit'),
'$tmsserver' => ['tmsserver', DI::l10n()->t('Tile Server URL'), $tmsserver, DI::l10n()->t('A list of <a href="http://wiki.openstreetmap.org/wiki/TMS" target="_blank">public tile servers</a>')],
'$nomserver' => ['nomserver', DI::l10n()->t('Nominatim (reverse geocoding) Server URL'), $nomserver, DI::l10n()->t('A list of <a href="http://wiki.openstreetmap.org/wiki/Nominatim" target="_blank">Nominatim servers</a>')],
'$zoom' => ['zoom', DI::l10n()->t('Default zoom'), $zoom, DI::l10n()->t('The default zoom level. (1:world, 18:highest, also depends on tile server)')],
'$marker' => ['marker', DI::l10n()->t('Include marker on map'), $marker, DI::l10n()->t('Include a marker on the map.')],
]);
}
@ -226,5 +226,5 @@ function openstreetmap_addon_admin_post(&$a)
Config::set('openstreetmap', 'zoom', $zoom);
Config::set('openstreetmap', 'marker', $marker);
info(L10n::t('Settings updated.') . EOL);
info(DI::l10n()->t('Settings updated.') . EOL);
}

View file

@ -35,9 +35,9 @@ function pageheader_addon_admin(App &$a, &$s)
$t = Renderer::getMarkupTemplate('admin.tpl', __DIR__);
$s .= Renderer::replaceMacros($t, [
'$title' => L10n::t('"pageheader" Settings'),
'$phwords' => ['pageheader-words', L10n::t('Message'), $words, L10n::t('Message to display on every page on this server (or put a pageheader.html file in your docroot)')],
'$submit' => L10n::t('Save Settings')
'$title' => DI::l10n()->t('"pageheader" Settings'),
'$phwords' => ['pageheader-words', DI::l10n()->t('Message'), $words, DI::l10n()->t('Message to display on every page on this server (or put a pageheader.html file in your docroot)')],
'$submit' => DI::l10n()->t('Save Settings')
]);
return;
@ -53,7 +53,7 @@ function pageheader_addon_admin_post(App $a)
if (isset($_POST['pageheader-words'])) {
Config::set('pageheader', 'text', trim(strip_tags($_POST['pageheader-words'])));
}
info(L10n::t('pageheader Settings saved.'));
info(DI::l10n()->t('pageheader Settings saved.'));
}
}

View file

@ -93,21 +93,21 @@ function piwik_analytics($a,&$b) {
*/
if ($optout) {
$b .= "<div id='piwik-optout-link'>";
$b .= L10n::t("This website is tracked using the <a href='http://www.matomo.org'>Matomo</a> analytics tool.");
$b .= DI::l10n()->t("This website is tracked using the <a href='http://www.matomo.org'>Matomo</a> analytics tool.");
$b .= " ";
$the_url = "http://".$baseurl ."index.php?module=CoreAdminHome&action=optOut";
$b .= L10n::t("If you do not want that your visits are logged in this way you <a href='%s'>can set a cookie to prevent Matomo / Piwik from tracking further visits of the site</a> (opt-out).", $the_url);
$b .= DI::l10n()->t("If you do not want that your visits are logged in this way you <a href='%s'>can set a cookie to prevent Matomo / Piwik from tracking further visits of the site</a> (opt-out).", $the_url);
$b .= "</div>";
}
}
function piwik_addon_admin (&$a, &$o) {
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/piwik/" );
$o = Renderer::replaceMacros( $t, [
'$submit' => L10n::t('Save Settings'),
'$piwikbaseurl' => ['baseurl', L10n::t('Matomo (Piwik) Base URL'), Config::get('piwik','baseurl' ), L10n::t('Absolute path to your Matomo (Piwik) installation. (without protocol (http/s), with trailing slash)')],
'$siteid' => ['siteid', L10n::t('Site ID'), Config::get('piwik','siteid' ), ''],
'$optout' => ['optout', L10n::t('Show opt-out cookie link?'), Config::get('piwik','optout' ), ''],
'$async' => ['async', L10n::t('Asynchronous tracking'), Config::get('piwik','async' ), ''],
'$submit' => DI::l10n()->t('Save Settings'),
'$piwikbaseurl' => ['baseurl', DI::l10n()->t('Matomo (Piwik) Base URL'), Config::get('piwik','baseurl' ), DI::l10n()->t('Absolute path to your Matomo (Piwik) installation. (without protocol (http/s), with trailing slash)')],
'$siteid' => ['siteid', DI::l10n()->t('Site ID'), Config::get('piwik','siteid' ), ''],
'$optout' => ['optout', DI::l10n()->t('Show opt-out cookie link?'), Config::get('piwik','optout' ), ''],
'$async' => ['async', DI::l10n()->t('Asynchronous tracking'), Config::get('piwik','async' ), ''],
]);
}
function piwik_addon_admin_post (&$a) {
@ -119,5 +119,5 @@ function piwik_addon_admin_post (&$a) {
Config::set('piwik', 'siteid', $id);
Config::set('piwik', 'optout', $optout);
Config::set('piwik', 'async', $async);
info(L10n::t('Settings updated.'). EOL);
info(DI::l10n()->t('Settings updated.'). EOL);
}

View file

@ -150,22 +150,22 @@ function planets_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<span id="settings_planets_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_planets_expanded\'); openClose(\'settings_planets_inflated\');">';
$s .= '<h3>' . L10n::t('Planets') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Planets') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_planets_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_planets_expanded\'); openClose(\'settings_planets_inflated\');">';
$s .= '<h3>' . L10n::t('Planets') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Planets') . '</h3>';
$s .= '</span>';
$s .= '<div class="settings-block">';
$s .= '<h3>' . L10n::t('Planets Settings') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Planets Settings') . '</h3>';
$s .= '<div id="planets-enable-wrapper">';
$s .= '<label id="planets-enable-label" for="planets-checkbox">' . L10n::t('Enable Planets Addon') . '</label>';
$s .= '<label id="planets-enable-label" for="planets-checkbox">' . DI::l10n()->t('Enable Planets Addon') . '</label>';
$s .= '<input id="planets-checkbox" type="checkbox" name="planets" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="planets-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="planets-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -74,7 +74,7 @@ function public_server_cron($a, $b)
'language' => $rr['language'],
'to_name' => $rr['username'],
'to_email' => $rr['email'],
'source_name' => L10n::t('Administrator'),
'source_name' => DI::l10n()->t('Administrator'),
'source_link' => DI::baseUrl()->get(),
'source_photo' => DI::baseUrl()->get() . '/images/person-80.jpg',
]);
@ -128,9 +128,9 @@ function public_server_enotify(&$a, &$b)
if (!empty($b['params']) && $b['params']['type'] == NOTIFY_SYSTEM
&& !empty($b['params']['system_type']) && $b['params']['system_type'] === 'public_server_expire') {
$b['itemlink'] = DI::baseUrl()->get();
$b['epreamble'] = $b['preamble'] = L10n::t('Your account on %s will expire in a few days.', Config::get('system', 'sitename'));
$b['subject'] = L10n::t('Your Friendica account is about to expire.');
$b['body'] = L10n::t("Hi %1\$s,\n\nYour account on %2\$s will expire in less than five days. You may keep your account by logging in at least once every 30 days", $b['params']['to_name'], "[url=" . Config::get('system', 'url') . "]" . Config::get('config', 'sitename') . "[/url]");
$b['epreamble'] = $b['preamble'] = DI::l10n()->t('Your account on %s will expire in a few days.', Config::get('system', 'sitename'));
$b['subject'] = DI::l10n()->t('Your Friendica account is about to expire.');
$b['body'] = DI::l10n()->t("Hi %1\$s,\n\nYour account on %2\$s will expire in less than five days. You may keep your account by logging in at least once every 30 days", $b['params']['to_name'], "[url=" . Config::get('system', 'url') . "]" . Config::get('config', 'sitename') . "[/url]");
}
}
@ -161,7 +161,7 @@ function public_server_addon_admin_post(&$a)
Config::set('public_server', 'flagusers', $flagusers);
Config::set('public_server', 'flagposts', $flagposts);
Config::set('public_server', 'flagpostsexpire', $flagpostsexpire);
info(L10n::t('Settings saved').EOL);
info(DI::l10n()->t('Settings saved').EOL);
}
function public_server_addon_admin(&$a, &$o)
@ -169,9 +169,9 @@ function public_server_addon_admin(&$a, &$o)
$token = BaseModule::getFormSecurityToken("publicserver");
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/public_server");
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$submit' => DI::l10n()->t('Save Settings'),
'$form_security_token' => $token,
'$infotext' => L10n::t('Set any of these options to 0 to deactivate it.'),
'$infotext' => DI::l10n()->t('Set any of these options to 0 to deactivate it.'),
'$expiredays' => ["expiredays","Expire Days", intval(Config::get('public_server', 'expiredays')), "When an account is created on the site, it is given a hard "],
'$expireposts' => ["expireposts", "Expire Posts", intval(Config::get('public_server', 'expireposts')), "Set the default days for posts to expire here"],
'$nologin' => ["nologin", "No Login", intval(Config::get('public_server', 'nologin')), "Remove users who have never logged in after nologin days "],

View file

@ -66,7 +66,7 @@ function pumpio_module() {}
function pumpio_content(App $a)
{
if (!local_user()) {
notice(L10n::t('Permission denied.') . EOL);
notice(DI::l10n()->t('Permission denied.') . EOL);
return '';
}
@ -161,7 +161,7 @@ function pumpio_connect(App $a)
if (($consumer_key == "") || ($consumer_secret == "")) {
Logger::log("pumpio_connect: ".sprintf("Unable to register the client at the pump.io server '%s'.", $hostname));
$o .= L10n::t("Unable to register the client at the pump.io server '%s'.", $hostname);
$o .= DI::l10n()->t("Unable to register the client at the pump.io server '%s'.", $hostname);
return $o;
}
@ -202,8 +202,8 @@ function pumpio_connect(App $a)
if ($success) {
Logger::log("pumpio_connect: authenticated");
$o = L10n::t("You are now authenticated to pumpio.");
$o .= '<br /><a href="'.DI::baseUrl()->get().'/settings/connectors">'.L10n::t("return to the connector page").'</a>';
$o = DI::l10n()->t("You are now authenticated to pumpio.");
$o .= '<br /><a href="'.DI::baseUrl()->get().'/settings/connectors">'.DI::l10n()->t("return to the connector page").'</a>';
} else {
Logger::log("pumpio_connect: could not connect");
$o = 'Could not connect to pumpio. Refresh the page or try again later.';
@ -223,7 +223,7 @@ function pumpio_jot_nets(App $a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'pumpio_enable',
L10n::t('Post to pumpio'),
DI::l10n()->t('Post to pumpio'),
DI::pConfig()->get(local_user(), 'pumpio', 'post_by_default')
]
];
@ -264,20 +264,20 @@ function pumpio_settings(App $a, &$s)
/* Add some HTML to the existing form */
$s .= '<span id="settings_pumpio_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_pumpio_expanded\'); openClose(\'settings_pumpio_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/pumpio.png" /><h3 class="connector">'. L10n::t('Pump.io Import/Export/Mirror').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/pumpio.png" /><h3 class="connector">'. DI::l10n()->t('Pump.io Import/Export/Mirror').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_pumpio_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_pumpio_expanded\'); openClose(\'settings_pumpio_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/pumpio.png" /><h3 class="connector">'. L10n::t('Pump.io Import/Export/Mirror').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/pumpio.png" /><h3 class="connector">'. DI::l10n()->t('Pump.io Import/Export/Mirror').'</h3>';
$s .= '</span>';
$s .= '<div id="pumpio-username-wrapper">';
$s .= '<label id="pumpio-username-label" for="pumpio-username">'.L10n::t('pump.io username (without the servername)').'</label>';
$s .= '<label id="pumpio-username-label" for="pumpio-username">'.DI::l10n()->t('pump.io username (without the servername)').'</label>';
$s .= '<input id="pumpio-username" type="text" name="pumpio_user" value="'.$username.'" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="pumpio-servername-wrapper">';
$s .= '<label id="pumpio-servername-label" for="pumpio-servername">'.L10n::t('pump.io servername (without "http://" or "https://" )').'</label>';
$s .= '<label id="pumpio-servername-label" for="pumpio-servername">'.DI::l10n()->t('pump.io servername (without "http://" or "https://" )').'</label>';
$s .= '<input id="pumpio-servername" type="text" name="pumpio_host" value="'.$servername.'" />';
$s .= '</div><div class="clear"></div>';
@ -288,36 +288,36 @@ function pumpio_settings(App $a, &$s)
$s .= '<div id="pumpio-password-wrapper">';
if (($oauth_token == "") || ($oauth_token_secret == "")) {
$s .= '<div id="pumpio-authenticate-wrapper">';
$s .= '<a href="'.DI::baseUrl()->get().'/pumpio/connect">'.L10n::t("Authenticate your pump.io connection").'</a>';
$s .= '<a href="'.DI::baseUrl()->get().'/pumpio/connect">'.DI::l10n()->t("Authenticate your pump.io connection").'</a>';
$s .= '</div><div class="clear"></div>';
} else {
$s .= '<div id="pumpio-import-wrapper">';
$s .= '<label id="pumpio-import-label" for="pumpio-import">' . L10n::t('Import the remote timeline') . '</label>';
$s .= '<label id="pumpio-import-label" for="pumpio-import">' . DI::l10n()->t('Import the remote timeline') . '</label>';
$s .= '<input id="pumpio-import" type="checkbox" name="pumpio_import" value="1" ' . $import_checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="pumpio-enable-wrapper">';
$s .= '<label id="pumpio-enable-label" for="pumpio-checkbox">' . L10n::t('Enable pump.io Post Addon') . '</label>';
$s .= '<label id="pumpio-enable-label" for="pumpio-checkbox">' . DI::l10n()->t('Enable pump.io Post Addon') . '</label>';
$s .= '<input id="pumpio-checkbox" type="checkbox" name="pumpio" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="pumpio-bydefault-wrapper">';
$s .= '<label id="pumpio-bydefault-label" for="pumpio-bydefault">' . L10n::t('Post to pump.io by default') . '</label>';
$s .= '<label id="pumpio-bydefault-label" for="pumpio-bydefault">' . DI::l10n()->t('Post to pump.io by default') . '</label>';
$s .= '<input id="pumpio-bydefault" type="checkbox" name="pumpio_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="pumpio-public-wrapper">';
$s .= '<label id="pumpio-public-label" for="pumpio-public">' . L10n::t('Should posts be public?') . '</label>';
$s .= '<label id="pumpio-public-label" for="pumpio-public">' . DI::l10n()->t('Should posts be public?') . '</label>';
$s .= '<input id="pumpio-public" type="checkbox" name="pumpio_public" value="1" ' . $public_checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="pumpio-mirror-wrapper">';
$s .= '<label id="pumpio-mirror-label" for="pumpio-mirror">' . L10n::t('Mirror all public posts') . '</label>';
$s .= '<label id="pumpio-mirror-label" for="pumpio-mirror">' . DI::l10n()->t('Mirror all public posts') . '</label>';
$s .= '<input id="pumpio-mirror" type="checkbox" name="pumpio_mirror" value="1" ' . $mirror_checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="pumpio-delete-wrapper">';
$s .= '<label id="pumpio-delete-label" for="pumpio-delete">' . L10n::t('Check to delete this preset') . '</label>';
$s .= '<label id="pumpio-delete-label" for="pumpio-delete">' . DI::l10n()->t('Check to delete this preset') . '</label>';
$s .= '<input id="pumpio-delete" type="checkbox" name="pumpio_delete" value="1" />';
$s .= '</div><div class="clear"></div>';
}
@ -327,7 +327,7 @@ function pumpio_settings(App $a, &$s)
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="pumpio-submit" name="pumpio-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="pumpio-submit" name="pumpio-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}
function pumpio_settings_post(App $a, array &$b)
@ -996,11 +996,11 @@ function pumpio_dolike(App $a, $uid, $self, $post, $own_id, $threadcompletion =
$author = '[url=' . $likedata['author-link'] . ']' . $likedata['author-name'] . '[/url]';
$objauthor = '[url=' . $orig_post['author-link'] . ']' . $orig_post['author-name'] . '[/url]';
$post_type = L10n::t('status');
$post_type = DI::l10n()->t('status');
$plink = '[url=' . $orig_post['plink'] . ']' . $post_type . '[/url]';
$likedata['object-type'] = Activity\ObjectType::NOTE;
$likedata['body'] = L10n::t('%1$s likes %2$s\'s %3$s', $author, $objauthor, $plink);
$likedata['body'] = DI::l10n()->t('%1$s likes %2$s\'s %3$s', $author, $objauthor, $plink);
$likedata['object'] = '<object><type>' . Activity\ObjectType::NOTE . '</type><local>1</local>' .
'<id>' . $orig_post['uri'] . '</id><link>' . XML::escape('<link rel="alternate" type="text/html" href="' . XML::escape($orig_post['plink']) . '" />') . '</link><title>' . $orig_post['title'] . '</title><content>' . $orig_post['body'] . '</content></object>';

View file

@ -44,17 +44,17 @@ function qcomment_addon_settings(&$a, &$s)
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/qcomment/qcomment.css' . '" media="all" />' . "\r\n";
$words = DI::pConfig()->get(local_user(), 'qcomment', 'words', L10n::t(':-)') . "\n" . L10n::t(':-(') . "\n" . L10n::t('lol'));
$words = DI::pConfig()->get(local_user(), 'qcomment', 'words', DI::l10n()->t(':-)') . "\n" . DI::l10n()->t(':-(') . "\n" . DI::l10n()->t('lol'));
$s .= '<div class="settings-block">';
$s .= '<h3>' . L10n::t('Quick Comment Settings') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Quick Comment Settings') . '</h3>';
$s .= '<div id="qcomment-wrapper">';
$s .= '<div id="qcomment-desc">' . L10n::t("Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies.") . '</div>';
$s .= '<label id="qcomment-label" for="qcomment-words">' . L10n::t('Enter quick comments, one per line') . ' </label>';
$s .= '<div id="qcomment-desc">' . DI::l10n()->t("Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies.") . '</div>';
$s .= '<label id="qcomment-label" for="qcomment-words">' . DI::l10n()->t('Enter quick comments, one per line') . ' </label>';
$s .= '<textarea id="qcomment-words" type="text" name="qcomment-words" >' . htmlspecialchars(XML::unescape($words)) . '</textarea>';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="qcomment-submit" name="qcomment-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="qcomment-submit" name="qcomment-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
$s .= '</div>';
return;
@ -68,6 +68,6 @@ function qcomment_addon_settings_post(&$a, &$b)
if ($_POST['qcomment-submit']) {
DI::pConfig()->set(local_user(), 'qcomment', 'words', XML::escape($_POST['qcomment-words']));
info(L10n::t('Quick Comment settings saved.') . EOL);
info(DI::l10n()->t('Quick Comment settings saved.') . EOL);
}
}

View file

@ -169,14 +169,14 @@ function randplace_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . L10n::t('Randplace Settings') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Randplace Settings') . '</h3>';
$s .= '<div id="randplace-enable-wrapper">';
$s .= '<label id="randplace-enable-label" for="randplace-checkbox">' . L10n::t('Enable Randplace Addon') . '</label>';
$s .= '<label id="randplace-enable-label" for="randplace-checkbox">' . DI::l10n()->t('Enable Randplace Addon') . '</label>';
$s .= '<input id="randplace-checkbox" type="checkbox" name="randplace" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="randplace-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="randplace-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -49,10 +49,10 @@ function remote_permissions_settings(&$a,&$o) {
// $t = file_get_contents("addon/remote_permissions/settings.tpl" );
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/remote_permissions/" );
$o .= Renderer::replaceMacros($t, [
'$remote_perms_title' => L10n::t('Remote Permissions Settings'),
'$remote_perms_label' => L10n::t('Allow recipients of your private posts to see the other recipients of the posts'),
'$remote_perms_title' => DI::l10n()->t('Remote Permissions Settings'),
'$remote_perms_label' => DI::l10n()->t('Allow recipients of your private posts to see the other recipients of the posts'),
'$checked' => (($remote_perms == 1) ? 'checked="checked"' : ''),
'$submit' => L10n::t('Save Settings')
'$submit' => DI::l10n()->t('Save Settings')
]);
}
@ -62,7 +62,7 @@ function remote_permissions_settings_post($a,$post) {
return;
DI::pConfig()->set(local_user(),'remote_perms','show',intval($_POST['remote-perms']));
info(L10n::t('Remote Permissions settings updated.') . EOL);
info(DI::l10n()->t('Remote Permissions settings updated.') . EOL);
}
function remote_permissions_content($a, $item_copy) {
@ -130,7 +130,7 @@ function remote_permissions_content($a, $item_copy) {
$deny_users = $aclFormatter->expand($item['deny_cid']);
$deny_groups = $aclFormatter->expand($item['deny_gid']);
$o = L10n::t('Visible to:') . '<br />';
$o = DI::l10n()->t('Visible to:') . '<br />';
$allow = [];
$deny = [];
@ -184,7 +184,7 @@ function remote_permissions_content($a, $item_copy) {
if(! $r)
return;
$o = L10n::t('Visible to') . ' (' . L10n::t('may only be a partial list') . '):<br />';
$o = DI::l10n()->t('Visible to') . ' (' . DI::l10n()->t('may only be a partial list') . '):<br />';
foreach($r as $rr)
$allow_names[] = $rr['username'];
@ -202,14 +202,14 @@ function remote_permissions_content($a, $item_copy) {
function remote_permissions_addon_admin(&$a, &$o){
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/remote_permissions/" );
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$global' => ['remotepermschoice', L10n::t('Global'), 1, L10n::t('The posts of every user on this server show the post recipients'), Config::get('remote_perms', 'global') == 1],
'$individual' => ['remotepermschoice', L10n::t('Individual'), 2, L10n::t('Each user chooses whether his/her posts show the post recipients'), Config::get('remote_perms', 'global') == 0]
'$submit' => DI::l10n()->t('Save Settings'),
'$global' => ['remotepermschoice', DI::l10n()->t('Global'), 1, DI::l10n()->t('The posts of every user on this server show the post recipients'), Config::get('remote_perms', 'global') == 1],
'$individual' => ['remotepermschoice', DI::l10n()->t('Individual'), 2, DI::l10n()->t('Each user chooses whether his/her posts show the post recipients'), Config::get('remote_perms', 'global') == 0]
]);
}
function remote_permissions_addon_admin_post(&$a){
$choice = (!empty($_POST['remotepermschoice']) ? Strings::escapeTags(trim($_POST['remotepermschoice'])) : '');
Config::set('remote_perms','global',($choice == 1 ? 1 : 0));
info(L10n::t('Settings updated.'). EOL);
info(DI::l10n()->t('Settings updated.'). EOL);
}

View file

@ -40,7 +40,7 @@ function rendertime_page_end(Friendica\App $a, &$o)
if (is_site_admin() && (($_GET['mode'] ?? '') != 'minimal') && !DI::mode()->isMobile() && !DI::mode()->isMobile() && !$ignored) {
$o = $o . '<div class="renderinfo">' . L10n::t("Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: %s, Total: %s",
$o = $o . '<div class="renderinfo">' . DI::l10n()->t("Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: %s, Total: %s",
round($profiler->get('database') - $profiler->get('database_write'), 3),
round($profiler->get('database_write'), 3),
round($profiler->get('network'), 2),

View file

@ -59,11 +59,11 @@ function securemail_settings(App &$a, &$s)
$t = Renderer::getMarkupTemplate('admin.tpl', 'addon/securemail/');
$s .= Renderer::replaceMacros($t, [
'$title' => L10n::t('"Secure Mail" Settings'),
'$submit' => L10n::t('Save Settings'),
'$test' => L10n::t('Save and send test'), //NOTE: update also in 'post'
'$enable' => ['securemail-enable', L10n::t('Enable Secure Mail'), $enable, ''],
'$publickey' => ['securemail-pkey', L10n::t('Public key'), $publickey, L10n::t('Your public PGP key, ascii armored format'), 'rows="10"']
'$title' => DI::l10n()->t('"Secure Mail" Settings'),
'$submit' => DI::l10n()->t('Save Settings'),
'$test' => DI::l10n()->t('Save and send test'), //NOTE: update also in 'post'
'$enable' => ['securemail-enable', DI::l10n()->t('Enable Secure Mail'), $enable, ''],
'$publickey' => ['securemail-pkey', DI::l10n()->t('Public key'), $publickey, DI::l10n()->t('Your public PGP key, ascii armored format'), 'rows="10"']
]);
}
@ -87,9 +87,9 @@ function securemail_settings_post(App &$a, array &$b)
DI::pConfig()->set(local_user(), 'securemail', 'pkey', trim($_POST['securemail-pkey']));
$enable = (!empty($_POST['securemail-enable']) ? 1 : 0);
DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable);
info(L10n::t('Secure Mail Settings saved.') . EOL);
info(DI::l10n()->t('Secure Mail Settings saved.') . EOL);
if ($_POST['securemail-submit'] == L10n::t('Save and send test')) {
if ($_POST['securemail-submit'] == DI::l10n()->t('Save and send test')) {
$sitename = Config::get('config', 'sitename');
$hostname = DI::baseUrl()->getHostname();
@ -124,9 +124,9 @@ function securemail_settings_post(App &$a, array &$b)
DI::pConfig()->set(local_user(), 'securemail', 'enable', $enable);
if ($res) {
info(L10n::t('Test email sent') . EOL);
info(DI::l10n()->t('Test email sent') . EOL);
} else {
notice(L10n::t('There was an error sending the test email') . EOL);
notice(DI::l10n()->t('There was an error sending the test email') . EOL);
}
}
}

View file

@ -40,24 +40,24 @@ function showmore_addon_settings(&$a, &$s)
$chars = DI::pConfig()->get(local_user(), 'showmore', 'chars', 1100);
$s .= '<span id="settings_showmore_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_showmore_expanded\'); openClose(\'settings_showmore_inflated\');">';
$s .= '<h3>' . L10n::t('"Show more" Settings').'</h3>';
$s .= '<h3>' . DI::l10n()->t('"Show more" Settings').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_showmore_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_showmore_expanded\'); openClose(\'settings_showmore_inflated\');">';
$s .= '<h3>' . L10n::t('"Show more" Settings').'</h3>';
$s .= '<h3>' . DI::l10n()->t('"Show more" Settings').'</h3>';
$s .= '</span>';
$s .= '<div id="showmore-wrapper">';
$s .= '<label id="showmore-enable-label" for="showmore-enable">'.L10n::t('Enable Show More').'</label>';
$s .= '<label id="showmore-enable-label" for="showmore-enable">'.DI::l10n()->t('Enable Show More').'</label>';
$s .= '<input id="showmore-enable" type="checkbox" name="showmore-enable" value="1"'.$enable_checked.' />';
$s .= '<div class="clear"></div>';
$s .= '<label id="showmore-label" for="showmore-chars">'.L10n::t('Cutting posts after how much characters').' </label>';
$s .= '<label id="showmore-label" for="showmore-chars">'.DI::l10n()->t('Cutting posts after how much characters').' </label>';
$s .= '<input id="showmore-words" type="text" name="showmore-chars" value="'.$chars.'" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="showmore-submit" name="showmore-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
// $s .= '<div class="showmore-desc">' . L10n::t('Use /expression/ to provide regular expressions') . '</div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="showmore-submit" name="showmore-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
// $s .= '<div class="showmore-desc">' . DI::l10n()->t('Use /expression/ to provide regular expressions') . '</div>';
$s .= '</div>';
return;
@ -74,7 +74,7 @@ function showmore_addon_settings_post(&$a, &$b)
$enable = (!empty($_POST['showmore-enable']) ? intval($_POST['showmore-enable']) : 0);
$disable = 1-$enable;
DI::pConfig()->set(local_user(), 'showmore', 'disable', $disable);
info(L10n::t('Show More Settings saved.') . EOL);
info(DI::l10n()->t('Show More Settings saved.') . EOL);
}
}
@ -134,7 +134,7 @@ function showmore_prepare_body(\Friendica\App $a, &$hook_data)
if ($found) {
$rnd = Strings::getRandomHex(8);
$hook_data['html'] = '<span id="showmore-teaser-' . $rnd . '" class="showmore-teaser" style="display: block;">' . $shortened . " " .
'<span id="showmore-wrap-' . $rnd . '" style="white-space:nowrap;" class="showmore-wrap fakelink" onclick="openClose(\'showmore-' . $rnd . '\'); openClose(\'showmore-teaser-' . $rnd . '\');" >' . L10n::t('show more') . '</span></span>' .
'<span id="showmore-wrap-' . $rnd . '" style="white-space:nowrap;" class="showmore-wrap fakelink" onclick="openClose(\'showmore-' . $rnd . '\'); openClose(\'showmore-teaser-' . $rnd . '\');" >' . DI::l10n()->t('show more') . '</span></span>' .
'<div id="showmore-' . $rnd . '" class="showmore-content" style="display: none;">' . $hook_data['html'] . '</div>';
}
}

View file

@ -79,19 +79,19 @@ function startpage_settings(&$a, &$s)
/* Add some HTML to the existing form */
$s .= '<span id="settings_startpage_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_startpage_expanded\'); openClose(\'settings_startpage_inflated\');">';
$s .= '<h3>' . L10n::t('Startpage') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Startpage') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_startpage_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_startpage_expanded\'); openClose(\'settings_startpage_inflated\');">';
$s .= '<h3>' . L10n::t('Startpage') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Startpage') . '</h3>';
$s .= '</span>';
$s .= '<div id="startpage-page-wrapper">';
$s .= '<label id="startpage-page-label" for="startpage-page">' . L10n::t('Home page to load after login - leave blank for profile wall') . '</label>';
$s .= '<label id="startpage-page-label" for="startpage-page">' . DI::l10n()->t('Home page to load after login - leave blank for profile wall') . '</label>';
$s .= '<input id="startpage-page" type="text" name="startpage" value="' . $page . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="startpage-desc">' . L10n::t('Examples: &quot;network&quot; or &quot;notifications/system&quot;') . '</div>';
$s .= '<div id="startpage-desc">' . DI::l10n()->t('Examples: &quot;network&quot; or &quot;notifications/system&quot;') . '</div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="startpage-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="startpage-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}

View file

@ -112,7 +112,7 @@ function statusnet_jot_nets(App $a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'statusnet_enable',
L10n::t('Post to GNU Social'),
DI::l10n()->t('Post to GNU Social'),
DI::pConfig()->get(local_user(), 'statusnet', 'post_by_default')
]
];
@ -163,7 +163,7 @@ function statusnet_settings_post(App $a, $post)
DI::pConfig()->set(local_user(), 'statusnet', 'baseapi', $asn['apiurl']);
//DI::pConfig()->set(local_user(), 'statusnet', 'application_name', $asn['applicationname'] );
} else {
notice(L10n::t('Please contact your site administrator.<br />The provided API URL is not valid.') . EOL . $asn['apiurl'] . EOL);
notice(DI::l10n()->t('Please contact your site administrator.<br />The provided API URL is not valid.') . EOL . $asn['apiurl'] . EOL);
}
}
}
@ -192,7 +192,7 @@ function statusnet_settings_post(App $a, $post)
DI::pConfig()->set(local_user(), 'statusnet', 'baseapi', $apibase);
} else {
// still not the correct API base, let's do noting
notice(L10n::t('We could not contact the GNU Social API with the Path you entered.') . EOL);
notice(DI::l10n()->t('We could not contact the GNU Social API with the Path you entered.') . EOL);
}
}
DI::baseUrl()->redirect('settings/connectors');
@ -226,7 +226,7 @@ function statusnet_settings_post(App $a, $post)
if (!intval($_POST['statusnet-mirror']))
DI::pConfig()->delete(local_user(), 'statusnet', 'lastid');
info(L10n::t('GNU Social settings updated.') . EOL);
info(DI::l10n()->t('GNU Social settings updated.') . EOL);
}
}
}
@ -267,11 +267,11 @@ function statusnet_settings(App $a, &$s)
$css = (($enabled) ? '' : '-disabled');
$s .= '<span id="settings_statusnet_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_statusnet_expanded\'); openClose(\'settings_statusnet_inflated\');">';
$s .= '<img class="connector' . $css . '" src="images/gnusocial.png" /><h3 class="connector">' . L10n::t('GNU Social Import/Export/Mirror') . '</h3>';
$s .= '<img class="connector' . $css . '" src="images/gnusocial.png" /><h3 class="connector">' . DI::l10n()->t('GNU Social Import/Export/Mirror') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_statusnet_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_statusnet_expanded\'); openClose(\'settings_statusnet_inflated\');">';
$s .= '<img class="connector' . $css . '" src="images/gnusocial.png" /><h3 class="connector">' . L10n::t('GNU Social Import/Export/Mirror') . '</h3>';
$s .= '<img class="connector' . $css . '" src="images/gnusocial.png" /><h3 class="connector">' . DI::l10n()->t('GNU Social Import/Export/Mirror') . '</h3>';
$s .= '</span>';
if ((!$ckey) && (!$csecret)) {
@ -286,31 +286,31 @@ function statusnet_settings(App $a, &$s)
* ignore this option entirely.
*/
if (!$globalsn == null) {
$s .= '<h4>' . L10n::t('Globally Available GNU Social OAuthKeys') . '</h4>';
$s .= '<p>' . L10n::t("There are preconfigured OAuth key pairs for some GNU Social servers available. If you are using one of them, please use these credentials. If not feel free to connect to any other GNU Social instance \x28see below\x29.") . '</p>';
$s .= '<h4>' . DI::l10n()->t('Globally Available GNU Social OAuthKeys') . '</h4>';
$s .= '<p>' . DI::l10n()->t("There are preconfigured OAuth key pairs for some GNU Social servers available. If you are using one of them, please use these credentials. If not feel free to connect to any other GNU Social instance \x28see below\x29.") . '</p>';
$s .= '<div id="statusnet-preconf-wrapper">';
foreach ($globalsn as $asn) {
$s .= '<input type="radio" name="statusnet-preconf-apiurl" value="' . $asn['apiurl'] . '">' . $asn['sitename'] . '<br />';
}
$s .= '<p></p><div class="clear"></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
}
$s .= '<h4>' . L10n::t('Provide your own OAuth Credentials') . '</h4>';
$s .= '<p>' . L10n::t('No consumer key pair for GNU Social found. Register your Friendica Account as an desktop client on your GNU Social account, copy the consumer key pair here and enter the API base root.<br />Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendica installation at your favorited GNU Social installation.') . '</p>';
$s .= '<h4>' . DI::l10n()->t('Provide your own OAuth Credentials') . '</h4>';
$s .= '<p>' . DI::l10n()->t('No consumer key pair for GNU Social found. Register your Friendica Account as an desktop client on your GNU Social account, copy the consumer key pair here and enter the API base root.<br />Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendica installation at your favorited GNU Social installation.') . '</p>';
$s .= '<div id="statusnet-consumer-wrapper">';
$s .= '<label id="statusnet-consumerkey-label" for="statusnet-consumerkey">' . L10n::t('OAuth Consumer Key') . '</label>';
$s .= '<label id="statusnet-consumerkey-label" for="statusnet-consumerkey">' . DI::l10n()->t('OAuth Consumer Key') . '</label>';
$s .= '<input id="statusnet-consumerkey" type="text" name="statusnet-consumerkey" size="35" /><br />';
$s .= '<div class="clear"></div>';
$s .= '<label id="statusnet-consumersecret-label" for="statusnet-consumersecret">' . L10n::t('OAuth Consumer Secret') . '</label>';
$s .= '<label id="statusnet-consumersecret-label" for="statusnet-consumersecret">' . DI::l10n()->t('OAuth Consumer Secret') . '</label>';
$s .= '<input id="statusnet-consumersecret" type="text" name="statusnet-consumersecret" size="35" /><br />';
$s .= '<div class="clear"></div>';
$s .= '<label id="statusnet-baseapi-label" for="statusnet-baseapi">' . L10n::t("Base API Path \x28remember the trailing /\x29") . '</label>';
$s .= '<label id="statusnet-baseapi-label" for="statusnet-baseapi">' . DI::l10n()->t("Base API Path \x28remember the trailing /\x29") . '</label>';
$s .= '<input id="statusnet-baseapi" type="text" name="statusnet-baseapi" size="35" /><br />';
$s .= '<div class="clear"></div>';
//$s .= '<label id="statusnet-applicationname-label" for="statusnet-applicationname">'.L10n::t('GNU Socialapplication name').'</label>';
//$s .= '<label id="statusnet-applicationname-label" for="statusnet-applicationname">'.DI::l10n()->t('GNU Socialapplication name').'</label>';
//$s .= '<input id="statusnet-applicationname" type="text" name="statusnet-applicationname" size="35" /><br />';
$s .= '<p></p><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
$s .= '</div>';
} else {
/* * *
@ -329,22 +329,22 @@ function statusnet_settings(App $a, &$s)
/* * *
* make some nice form
*/
$s .= '<p>' . L10n::t('To connect to your GNU Social account click the button below to get a security code from GNU Social which you have to copy into the input box below and submit the form. Only your <strong>public</strong> posts will be posted to GNU Social.') . '</p>';
$s .= '<a href="' . $connection->getAuthorizeURL($token, False) . '" target="_statusnet"><img src="addon/statusnet/signinwithstatusnet.png" alt="' . L10n::t('Log in with GNU Social') . '"></a>';
$s .= '<p>' . DI::l10n()->t('To connect to your GNU Social account click the button below to get a security code from GNU Social which you have to copy into the input box below and submit the form. Only your <strong>public</strong> posts will be posted to GNU Social.') . '</p>';
$s .= '<a href="' . $connection->getAuthorizeURL($token, False) . '" target="_statusnet"><img src="addon/statusnet/signinwithstatusnet.png" alt="' . DI::l10n()->t('Log in with GNU Social') . '"></a>';
$s .= '<div id="statusnet-pin-wrapper">';
$s .= '<label id="statusnet-pin-label" for="statusnet-pin">' . L10n::t('Copy the security code from GNU Social here') . '</label>';
$s .= '<label id="statusnet-pin-label" for="statusnet-pin">' . DI::l10n()->t('Copy the security code from GNU Social here') . '</label>';
$s .= '<input id="statusnet-pin" type="text" name="statusnet-pin" />';
$s .= '<input id="statusnet-token" type="hidden" name="statusnet-token" value="' . $token . '" />';
$s .= '<input id="statusnet-token2" type="hidden" name="statusnet-token2" value="' . $request_token['oauth_token_secret'] . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
$s .= '<h4>' . L10n::t('Cancel Connection Process') . '</h4>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
$s .= '<h4>' . DI::l10n()->t('Cancel Connection Process') . '</h4>';
$s .= '<div id="statusnet-cancel-wrapper">';
$s .= '<p>' . L10n::t('Current GNU Social API is') . ': ' . $api . '</p>';
$s .= '<label id="statusnet-cancel-label" for="statusnet-cancel">' . L10n::t('Cancel GNU Social Connection') . '</label>';
$s .= '<p>' . DI::l10n()->t('Current GNU Social API is') . ': ' . $api . '</p>';
$s .= '<label id="statusnet-cancel-label" for="statusnet-cancel">' . DI::l10n()->t('Cancel GNU Social Connection') . '</label>';
$s .= '<input id="statusnet-cancel" type="checkbox" name="statusnet-disconnect" value="1" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
} else {
/* * *
* we have an OAuth key / secret pair for the user
@ -353,45 +353,45 @@ function statusnet_settings(App $a, &$s)
$connection = new StatusNetOAuth($api, $ckey, $csecret, $otoken, $osecret);
$details = $connection->get('account/verify_credentials');
if (!empty($details)) {
$s .= '<div id="statusnet-info" ><img id="statusnet-avatar" src="' . $details->profile_image_url . '" /><p id="statusnet-info-block">' . L10n::t('Currently connected to: ') . '<a href="' . $details->statusnet_profile_url . '" target="_statusnet">' . $details->screen_name . '</a><br /><em>' . $details->description . '</em></p></div>';
$s .= '<div id="statusnet-info" ><img id="statusnet-avatar" src="' . $details->profile_image_url . '" /><p id="statusnet-info-block">' . DI::l10n()->t('Currently connected to: ') . '<a href="' . $details->statusnet_profile_url . '" target="_statusnet">' . $details->screen_name . '</a><br /><em>' . $details->description . '</em></p></div>';
}
$s .= '<p>' . L10n::t('If enabled all your <strong>public</strong> postings can be posted to the associated GNU Social account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.') . '</p>';
$s .= '<p>' . DI::l10n()->t('If enabled all your <strong>public</strong> postings can be posted to the associated GNU Social account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.') . '</p>';
if ($a->user['hidewall']) {
$s .= '<p>' . L10n::t('<strong>Note</strong>: Due your privacy settings (<em>Hide your profile details from unknown viewers?</em>) the link potentially included in public postings relayed to GNU Social will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '</p>';
$s .= '<p>' . DI::l10n()->t('<strong>Note</strong>: Due your privacy settings (<em>Hide your profile details from unknown viewers?</em>) the link potentially included in public postings relayed to GNU Social will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '</p>';
}
$s .= '<div id="statusnet-enable-wrapper">';
$s .= '<label id="statusnet-enable-label" for="statusnet-checkbox">' . L10n::t('Allow posting to GNU Social') . '</label>';
$s .= '<label id="statusnet-enable-label" for="statusnet-checkbox">' . DI::l10n()->t('Allow posting to GNU Social') . '</label>';
$s .= '<input id="statusnet-checkbox" type="checkbox" name="statusnet-enable" value="1" ' . $checked . '/>';
$s .= '<div class="clear"></div>';
$s .= '<label id="statusnet-default-label" for="statusnet-default">' . L10n::t('Send public postings to GNU Social by default') . '</label>';
$s .= '<label id="statusnet-default-label" for="statusnet-default">' . DI::l10n()->t('Send public postings to GNU Social by default') . '</label>';
$s .= '<input id="statusnet-default" type="checkbox" name="statusnet-default" value="1" ' . $defchecked . '/>';
$s .= '<div class="clear"></div>';
$s .= '<label id="statusnet-mirror-label" for="statusnet-mirror">' . L10n::t('Mirror all posts from GNU Social that are no replies or repeated messages') . '</label>';
$s .= '<label id="statusnet-mirror-label" for="statusnet-mirror">' . DI::l10n()->t('Mirror all posts from GNU Social that are no replies or repeated messages') . '</label>';
$s .= '<input id="statusnet-mirror" type="checkbox" name="statusnet-mirror" value="1" ' . $mirrorchecked . '/>';
$s .= '<div class="clear"></div>';
$s .= '</div>';
$s .= '<label id="statusnet-import-label" for="statusnet-import">' . L10n::t('Import the remote timeline') . '</label>';
$s .= '<label id="statusnet-import-label" for="statusnet-import">' . DI::l10n()->t('Import the remote timeline') . '</label>';
//$s .= '<input id="statusnet-import" type="checkbox" name="statusnet-import" value="1" '. $importchecked . '/>';
$s .= '<select name="statusnet-import" id="statusnet-import" />';
$s .= '<option value="0" ' . $importselected[0] . '>' . L10n::t("Disabled") . '</option>';
$s .= '<option value="1" ' . $importselected[1] . '>' . L10n::t("Full Timeline") . '</option>';
$s .= '<option value="2" ' . $importselected[2] . '>' . L10n::t("Only Mentions") . '</option>';
$s .= '<option value="0" ' . $importselected[0] . '>' . DI::l10n()->t("Disabled") . '</option>';
$s .= '<option value="1" ' . $importselected[1] . '>' . DI::l10n()->t("Full Timeline") . '</option>';
$s .= '<option value="2" ' . $importselected[2] . '>' . DI::l10n()->t("Only Mentions") . '</option>';
$s .= '</select>';
$s .= '<div class="clear"></div>';
/*
$s .= '<label id="statusnet-create_user-label" for="statusnet-create_user">'.L10n::t('Automatically create contacts').'</label>';
$s .= '<label id="statusnet-create_user-label" for="statusnet-create_user">'.DI::l10n()->t('Automatically create contacts').'</label>';
$s .= '<input id="statusnet-create_user" type="checkbox" name="statusnet-create_user" value="1" '. $create_userchecked . '/>';
$s .= '<div class="clear"></div>';
*/
$s .= '<div id="statusnet-disconnect-wrapper">';
$s .= '<label id="statusnet-disconnect-label" for="statusnet-disconnect">' . L10n::t('Clear OAuth configuration') . '</label>';
$s .= '<label id="statusnet-disconnect-label" for="statusnet-disconnect">' . DI::l10n()->t('Clear OAuth configuration') . '</label>';
$s .= '<input id="statusnet-disconnect" type="checkbox" name="statusnet-disconnect" value="1" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
}
}
$s .= '</div><div class="clear"></div>';
@ -697,7 +697,7 @@ function statusnet_addon_admin(App $a, &$o)
foreach ($sites as $id => $s) {
$sitesform[] = [
'sitename' => ["sitename[$id]", "Site name", $s['sitename'], ""],
'apiurl' => ["apiurl[$id]", "Api url", $s['apiurl'], L10n::t("Base API Path \x28remember the trailing /\x29")],
'apiurl' => ["apiurl[$id]", "Api url", $s['apiurl'], DI::l10n()->t("Base API Path \x28remember the trailing /\x29")],
'secret' => ["secret[$id]", "Secret", $s['consumersecret'], ""],
'key' => ["key[$id]", "Key", $s['consumerkey'], ""],
//'applicationname' => Array("applicationname[$id]", "Application name", $s['applicationname'], ""),
@ -708,16 +708,16 @@ function statusnet_addon_admin(App $a, &$o)
/* empty form to add new site */
$id = count($sitesform);
$sitesform[] = [
'sitename' => ["sitename[$id]", L10n::t("Site name"), "", ""],
'apiurl' => ["apiurl[$id]", "Api url", "", L10n::t("Base API Path \x28remember the trailing /\x29")],
'secret' => ["secret[$id]", L10n::t("Consumer Secret"), "", ""],
'key' => ["key[$id]", L10n::t("Consumer Key"), "", ""],
//'applicationname' => Array("applicationname[$id]", L10n::t("Application name"), "", ""),
'sitename' => ["sitename[$id]", DI::l10n()->t("Site name"), "", ""],
'apiurl' => ["apiurl[$id]", "Api url", "", DI::l10n()->t("Base API Path \x28remember the trailing /\x29")],
'secret' => ["secret[$id]", DI::l10n()->t("Consumer Secret"), "", ""],
'key' => ["key[$id]", DI::l10n()->t("Consumer Key"), "", ""],
//'applicationname' => Array("applicationname[$id]", DI::l10n()->t("Application name"), "", ""),
];
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/statusnet/");
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$submit' => DI::l10n()->t('Save Settings'),
'$sites' => $sitesform,
]);
}

View file

@ -45,18 +45,18 @@ function superblock_addon_settings(&$a, &$s)
}
$s .= '<span id="settings_superblock_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_superblock_expanded\'); openClose(\'settings_superblock_inflated\');">';
$s .= '<h3>' . L10n::t('Superblock') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Superblock') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_superblock_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_superblock_expanded\'); openClose(\'settings_superblock_inflated\');">';
$s .= '<h3>' . L10n::t('Superblock') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('Superblock') . '</h3>';
$s .= '</span>';
$s .= '<div id="superblock-wrapper">';
$s .= '<label id="superblock-label" for="superblock-words">' . L10n::t('Comma separated profile URLS to block') . ' </label>';
$s .= '<label id="superblock-label" for="superblock-words">' . DI::l10n()->t('Comma separated profile URLS to block') . ' </label>';
$s .= '<textarea id="superblock-words" type="text" name="superblock-words" >' . htmlspecialchars($words) . '</textarea>';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="superblock-submit" name="superblock-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="superblock-submit" name="superblock-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
return;
}
@ -69,7 +69,7 @@ function superblock_addon_settings_post(&$a, &$b)
if (!empty($_POST['superblock-submit'])) {
DI::pConfig()->set(local_user(), 'system', 'blocked',trim($_POST['superblock-words']));
info(L10n::t('SUPERBLOCK Settings saved.') . EOL);
info(DI::l10n()->t('SUPERBLOCK Settings saved.') . EOL);
}
}
@ -142,7 +142,7 @@ function superblock_item_photo_menu(&$a, &$b)
}
}
$b['menu'][L10n::t('Block Completely')] = 'javascript:superblockBlock(\'' . $author . '\'); return false;';
$b['menu'][DI::l10n()->t('Block Completely')] = 'javascript:superblockBlock(\'' . $author . '\'); return false;';
}
function superblock_module() {}
@ -163,6 +163,6 @@ function superblock_init(&$a)
}
DI::pConfig()->set(local_user(), 'system', 'blocked', $words);
info(L10n::t('superblock settings updated') . EOL );
info(DI::l10n()->t('superblock settings updated') . EOL );
exit();
}

View file

@ -76,7 +76,7 @@ function testdrive_cron($a,$b) {
'language' => $rr['language'],
'to_name' => $rr['username'],
'to_email' => $rr['email'],
'source_name' => L10n::t('Administrator'),
'source_name' => DI::l10n()->t('Administrator'),
'source_link' => DI::baseUrl()->get(),
'source_photo' => DI::baseUrl()->get() . '/images/person-80.jpg',
]);
@ -101,8 +101,8 @@ function testdrive_enotify(&$a, &$b) {
if (!empty($b['params']) && $b['params']['type'] == NOTIFY_SYSTEM
&& !empty($b['params']['system_type']) && $b['params']['system_type'] === 'testdrive_expire') {
$b['itemlink'] = DI::baseUrl()->get();
$b['epreamble'] = $b['preamble'] = L10n::t('Your account on %s will expire in a few days.', Config::get('system', 'sitename'));
$b['subject'] = L10n::t('Your Friendica test account is about to expire.');
$b['body'] = L10n::t("Hi %1\$s,\n\nYour test account on %2\$s will expire in less than five days. We hope you enjoyed this test drive and use this opportunity to find a permanent Friendica website for your integrated social communications. A list of public sites is available at %s/siteinfo - and for more information on setting up your own Friendica server please see the Friendica project website at https://friendi.ca.", $b['params']['to_name'], "[url=".Config::get('system', 'url')."]".Config::get('config', 'sitename')."[/url]", Search::getGlobalDirectory());
$b['epreamble'] = $b['preamble'] = DI::l10n()->t('Your account on %s will expire in a few days.', Config::get('system', 'sitename'));
$b['subject'] = DI::l10n()->t('Your Friendica test account is about to expire.');
$b['body'] = DI::l10n()->t("Hi %1\$s,\n\nYour test account on %2\$s will expire in less than five days. We hope you enjoyed this test drive and use this opportunity to find a permanent Friendica website for your integrated social communications. A list of public sites is available at %s/siteinfo - and for more information on setting up your own Friendica server please see the Friendica project website at https://friendi.ca.", $b['params']['to_name'], "[url=".Config::get('system', 'url')."]".Config::get('config', 'sitename')."[/url]", Search::getGlobalDirectory());
}
}

View file

@ -19,7 +19,7 @@ function tictac_uninstall() {
}
function tictac_app_menu($a,&$b) {
$b['app_menu'][] = '<div class="app-title"><a href="tictac">' . L10n::t('Three Dimensional Tic-Tac-Toe') . '</a></div>';
$b['app_menu'][] = '<div class="app-title"><a href="tictac">' . DI::l10n()->t('Three Dimensional Tic-Tac-Toe') . '</a></div>';
}
@ -52,17 +52,17 @@ function tictac_content(&$a) {
$dimen = 3;
}
$o .= '<h3>' . L10n::t('3D Tic-Tac-Toe') . '</h3><br />';
$o .= '<h3>' . DI::l10n()->t('3D Tic-Tac-Toe') . '</h3><br />';
$t = new tictac($dimen,$handicap,$mefirst,$yours,$mine);
$o .= $t->play();
$o .= '<a href="tictac">' . L10n::t('New game') . '</a><br />';
$o .= '<a href="tictac/1">' . L10n::t('New game with handicap') . '</a><br />';
$o .= '<p>' . L10n::t('Three dimensional tic-tac-toe is just like the traditional game except that it is played on multiple levels simultaneously. ');
$o .= L10n::t('In this case there are three levels. You win by getting three in a row on any level, as well as up, down, and diagonally across the different levels.');
$o .= '<a href="tictac">' . DI::l10n()->t('New game') . '</a><br />';
$o .= '<a href="tictac/1">' . DI::l10n()->t('New game with handicap') . '</a><br />';
$o .= '<p>' . DI::l10n()->t('Three dimensional tic-tac-toe is just like the traditional game except that it is played on multiple levels simultaneously. ');
$o .= DI::l10n()->t('In this case there are three levels. You win by getting three in a row on any level, as well as up, down, and diagonally across the different levels.');
$o .= '</p><p>';
$o .= L10n::t('The handicap game disables the center position on the middle level because the player claiming this square often has an unfair advantage.');
$o .= DI::l10n()->t('The handicap game disables the center position on the middle level because the player claiming this square often has an unfair advantage.');
$o .= '</p>';
return $o;
@ -181,24 +181,24 @@ class tictac {
if($this->first_move) {
if(rand(0,1) == 1) {
$o .= '<div class="error-message">' . L10n::t('You go first...') . '</div><br />';
$o .= '<div class="error-message">' . DI::l10n()->t('You go first...') . '</div><br />';
$this->mefirst = 0;
$o .= $this->draw_board();
return $o;
}
$o .= '<div class="error-message">' . L10n::t('I\'m going first this time...') . ' </div><br />';
$o .= '<div class="error-message">' . DI::l10n()->t('I\'m going first this time...') . ' </div><br />';
$this->mefirst = 1;
}
if($this->check_youwin()) {
$o .= '<div class="error-message">' . L10n::t('You won!') . '</div><br />';
$o .= '<div class="error-message">' . DI::l10n()->t('You won!') . '</div><br />';
$o .= $this->draw_board();
return $o;
}
if($this->fullboard())
$o .= '<div class="error-message">' . L10n::t('"Cat" game!') . '</div><br />';
$o .= '<div class="error-message">' . DI::l10n()->t('"Cat" game!') . '</div><br />';
$move = $this->winning_move();
if(strlen($move)) {
@ -221,9 +221,9 @@ class tictac {
}
if($this->check_iwon())
$o .= '<div class="error-message">' . L10n::t('I won!') . '</div><br />';
$o .= '<div class="error-message">' . DI::l10n()->t('I won!') . '</div><br />';
if($this->fullboard())
$o .= '<div class="error-message">' . L10n::t('"Cat" game!') . '</div><br />';
$o .= '<div class="error-message">' . DI::l10n()->t('"Cat" game!') . '</div><br />';
$o .= $this->draw_board();
return $o;
}

View file

@ -47,7 +47,7 @@ function tumblr_module()
function tumblr_content(App $a)
{
if (! local_user()) {
notice(L10n::t('Permission denied.') . EOL);
notice(DI::l10n()->t('Permission denied.') . EOL);
return '';
}
@ -77,10 +77,10 @@ function tumblr_addon_admin(App $a, &$o)
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/tumblr/" );
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$submit' => DI::l10n()->t('Save Settings'),
// name, label, value, help, [extra values]
'$consumer_key' => ['consumer_key', L10n::t('Consumer Key'), Config::get('tumblr', 'consumer_key' ), ''],
'$consumer_secret' => ['consumer_secret', L10n::t('Consumer Secret'), Config::get('tumblr', 'consumer_secret' ), ''],
'$consumer_key' => ['consumer_key', DI::l10n()->t('Consumer Key'), Config::get('tumblr', 'consumer_key' ), ''],
'$consumer_secret' => ['consumer_secret', DI::l10n()->t('Consumer Secret'), Config::get('tumblr', 'consumer_secret' ), ''],
]);
}
@ -92,7 +92,7 @@ function tumblr_addon_admin_post(App $a)
Config::set('tumblr', 'consumer_key',$consumer_key);
Config::set('tumblr', 'consumer_secret',$consumer_secret);
info(L10n::t('Settings updated.'). EOL);
info(DI::l10n()->t('Settings updated.'). EOL);
}
function tumblr_connect(App $a)
@ -187,8 +187,8 @@ function tumblr_callback(App $a)
DI::pConfig()->set(local_user(), "tumblr", "oauth_token", $access_token['oauth_token']);
DI::pConfig()->set(local_user(), "tumblr", "oauth_token_secret", $access_token['oauth_token_secret']);
$o = L10n::t("You are now authenticated to tumblr.");
$o .= '<br /><a href="' . DI::baseUrl()->get() . '/settings/connectors">' . L10n::t("return to the connector page") . '</a>';
$o = DI::l10n()->t("You are now authenticated to tumblr.");
$o .= '<br /><a href="' . DI::baseUrl()->get() . '/settings/connectors">' . DI::l10n()->t("return to the connector page") . '</a>';
return $o;
}
@ -204,7 +204,7 @@ function tumblr_jot_nets(App $a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'tumblr_enable',
L10n::t('Post to Tumblr'),
DI::l10n()->t('Post to Tumblr'),
DI::pConfig()->get(local_user(),'tumblr','post_by_default')
]
];
@ -234,25 +234,25 @@ function tumblr_settings(App $a, &$s)
/* Add some HTML to the existing form */
$s .= '<span id="settings_tumblr_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_tumblr_expanded\'); openClose(\'settings_tumblr_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/tumblr.png" /><h3 class="connector">'. L10n::t('Tumblr Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/tumblr.png" /><h3 class="connector">'. DI::l10n()->t('Tumblr Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_tumblr_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_tumblr_expanded\'); openClose(\'settings_tumblr_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/tumblr.png" /><h3 class="connector">'. L10n::t('Tumblr Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/tumblr.png" /><h3 class="connector">'. DI::l10n()->t('Tumblr Export').'</h3>';
$s .= '</span>';
$s .= '<div id="tumblr-username-wrapper">';
$s .= '<a href="'.DI::baseUrl()->get().'/tumblr/connect">'.L10n::t("(Re-)Authenticate your tumblr page").'</a>';
$s .= '<a href="'.DI::baseUrl()->get().'/tumblr/connect">'.DI::l10n()->t("(Re-)Authenticate your tumblr page").'</a>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="tumblr-enable-wrapper">';
$s .= '<label id="tumblr-enable-label" for="tumblr-checkbox">' . L10n::t('Enable Tumblr Post Addon') . '</label>';
$s .= '<label id="tumblr-enable-label" for="tumblr-checkbox">' . DI::l10n()->t('Enable Tumblr Post Addon') . '</label>';
$s .= '<input type="hidden" name="tumblr" value="0"/>';
$s .= '<input id="tumblr-checkbox" type="checkbox" name="tumblr" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="tumblr-bydefault-wrapper">';
$s .= '<label id="tumblr-bydefault-label" for="tumblr-bydefault">' . L10n::t('Post to Tumblr by default') . '</label>';
$s .= '<label id="tumblr-bydefault-label" for="tumblr-bydefault">' . DI::l10n()->t('Post to Tumblr by default') . '</label>';
$s .= '<input type="hidden" name="tumblr_bydefault" value="0"/>';
$s .= '<input id="tumblr-bydefault" type="checkbox" name="tumblr_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
@ -273,7 +273,7 @@ function tumblr_settings(App $a, &$s)
$blogs = [];
$s .= '<label id="tumblr-page-label" for="tumblr-page">' . L10n::t('Post to page:') . '</label>';
$s .= '<label id="tumblr-page-label" for="tumblr-page">' . DI::l10n()->t('Post to page:') . '</label>';
$s .= '<select name="tumblr_page" id="tumblr-page">';
foreach($userinfo->response->user->blogs as $blog) {
$blogurl = substr(str_replace(["http://", "https://"], ["", ""], $blog->url), 0, -1);
@ -287,13 +287,13 @@ function tumblr_settings(App $a, &$s)
$s .= "</select>";
} else {
$s .= L10n::t("You are not authenticated to tumblr");
$s .= DI::l10n()->t("You are not authenticated to tumblr");
}
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="tumblr-submit" name="tumblr-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="tumblr-submit" name="tumblr-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}
function tumblr_settings_post(App $a, array &$b)

View file

@ -203,7 +203,7 @@ function twitter_jot_nets(App $a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'twitter_enable',
L10n::t('Post to Twitter'),
DI::l10n()->t('Post to Twitter'),
DI::pConfig()->get(local_user(), 'twitter', 'post_by_default')
]
];
@ -248,7 +248,7 @@ function twitter_settings_post(App $a)
// and secret to request a Access Token with the PIN
try {
if (empty($_POST['twitter-pin'])) {
throw new Exception(L10n::t('You submitted an empty PIN, please Sign In with Twitter again to get a new one.'));
throw new Exception(DI::l10n()->t('You submitted an empty PIN, please Sign In with Twitter again to get a new one.'));
}
$connection = new TwitterOAuth($ckey, $csecret, $_POST['twitter-token'], $_POST['twitter-token2']);
@ -277,7 +277,7 @@ function twitter_settings_post(App $a)
DI::pConfig()->delete(local_user(), 'twitter', 'lastid');
}
info(L10n::t('Twitter settings updated.') . EOL);
info(DI::l10n()->t('Twitter settings updated.') . EOL);
}
}
}
@ -307,18 +307,18 @@ function twitter_settings(App $a, &$s)
$css = (($enabled) ? '' : '-disabled');
$s .= '<span id="settings_twitter_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_twitter_expanded\'); openClose(\'settings_twitter_inflated\');">';
$s .= '<img class="connector' . $css . '" src="images/twitter.png" /><h3 class="connector">' . L10n::t('Twitter Import/Export/Mirror') . '</h3>';
$s .= '<img class="connector' . $css . '" src="images/twitter.png" /><h3 class="connector">' . DI::l10n()->t('Twitter Import/Export/Mirror') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_twitter_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_twitter_expanded\'); openClose(\'settings_twitter_inflated\');">';
$s .= '<img class="connector' . $css . '" src="images/twitter.png" /><h3 class="connector">' . L10n::t('Twitter Import/Export/Mirror') . '</h3>';
$s .= '<img class="connector' . $css . '" src="images/twitter.png" /><h3 class="connector">' . DI::l10n()->t('Twitter Import/Export/Mirror') . '</h3>';
$s .= '</span>';
if ((!$ckey) && (!$csecret)) {
/* no global consumer keys
* display warning and skip personal config
*/
$s .= '<p>' . L10n::t('No consumer key pair for Twitter found. Please contact your site administrator.') . '</p>';
$s .= '<p>' . DI::l10n()->t('No consumer key pair for Twitter found. Please contact your site administrator.') . '</p>';
} else {
// ok we have a consumer key pair now look into the OAuth stuff
if ((!$otoken) && (!$osecret)) {
@ -330,17 +330,17 @@ function twitter_settings(App $a, &$s)
$connection = new TwitterOAuth($ckey, $csecret);
try {
$result = $connection->oauth('oauth/request_token', ['oauth_callback' => 'oob']);
$s .= '<p>' . L10n::t('At this Friendica instance the Twitter addon was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your <strong>public</strong> posts will be posted to Twitter.') . '</p>';
$s .= '<a href="' . $connection->url('oauth/authorize', ['oauth_token' => $result['oauth_token']]) . '" target="_twitter"><img src="addon/twitter/lighter.png" alt="' . L10n::t('Log in with Twitter') . '"></a>';
$s .= '<p>' . DI::l10n()->t('At this Friendica instance the Twitter addon was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your <strong>public</strong> posts will be posted to Twitter.') . '</p>';
$s .= '<a href="' . $connection->url('oauth/authorize', ['oauth_token' => $result['oauth_token']]) . '" target="_twitter"><img src="addon/twitter/lighter.png" alt="' . DI::l10n()->t('Log in with Twitter') . '"></a>';
$s .= '<div id="twitter-pin-wrapper">';
$s .= '<label id="twitter-pin-label" for="twitter-pin">' . L10n::t('Copy the PIN from Twitter here') . '</label>';
$s .= '<label id="twitter-pin-label" for="twitter-pin">' . DI::l10n()->t('Copy the PIN from Twitter here') . '</label>';
$s .= '<input id="twitter-pin" type="text" name="twitter-pin" />';
$s .= '<input id="twitter-token" type="hidden" name="twitter-token" value="' . $result['oauth_token'] . '" />';
$s .= '<input id="twitter-token2" type="hidden" name="twitter-token2" value="' . $result['oauth_token_secret'] . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="twitter-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="twitter-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
} catch (TwitterOAuthException $e) {
$s .= '<p>' . L10n::t('An error occured: ') . $e->getMessage() . '</p>';
$s .= '<p>' . DI::l10n()->t('An error occured: ') . $e->getMessage() . '</p>';
}
} else {
/* * *
@ -357,8 +357,8 @@ function twitter_settings(App $a, &$s)
property_exists($details, 'description') &&
property_exists($details, 'profile_image_url')) {
$s .= '<div id="twitter-info" >
<p>' . L10n::t('Currently connected to: ') . '<a href="https://twitter.com/' . $details->screen_name . '" target="_twitter">' . $details->screen_name . '</a>
<button type="submit" name="twitter-disconnect" value="1">' . L10n::t('Disconnect') . '</button>
<p>' . DI::l10n()->t('Currently connected to: ') . '<a href="https://twitter.com/' . $details->screen_name . '" target="_twitter">' . $details->screen_name . '</a>
<button type="submit" name="twitter-disconnect" value="1">' . DI::l10n()->t('Disconnect') . '</button>
</p>
<p id="twitter-info-block">
<a href="https://twitter.com/' . $details->screen_name . '" target="_twitter"><img id="twitter-avatar" src="' . $details->profile_image_url . '" /></a>
@ -374,27 +374,27 @@ function twitter_settings(App $a, &$s)
$s .= '<div class="clear"></div>';
$s .= Renderer::replaceMacros($field_checkbox, [
'$field' => ['twitter-enable', L10n::t('Allow posting to Twitter'), $enabled, L10n::t('If enabled all your <strong>public</strong> postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.')]
'$field' => ['twitter-enable', DI::l10n()->t('Allow posting to Twitter'), $enabled, DI::l10n()->t('If enabled all your <strong>public</strong> postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.')]
]);
if ($a->user['hidewall']) {
$s .= '<p>' . L10n::t('<strong>Note</strong>: Due to your privacy settings (<em>Hide your profile details from unknown viewers?</em>) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '</p>';
$s .= '<p>' . DI::l10n()->t('<strong>Note</strong>: Due to your privacy settings (<em>Hide your profile details from unknown viewers?</em>) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '</p>';
}
$s .= Renderer::replaceMacros($field_checkbox, [
'$field' => ['twitter-default', L10n::t('Send public postings to Twitter by default'), $defenabled, '']
'$field' => ['twitter-default', DI::l10n()->t('Send public postings to Twitter by default'), $defenabled, '']
]);
$s .= Renderer::replaceMacros($field_checkbox, [
'$field' => ['twitter-mirror', L10n::t('Mirror all posts from twitter that are no replies'), $mirrorenabled, '']
'$field' => ['twitter-mirror', DI::l10n()->t('Mirror all posts from twitter that are no replies'), $mirrorenabled, '']
]);
$s .= Renderer::replaceMacros($field_checkbox, [
'$field' => ['twitter-import', L10n::t('Import the remote timeline'), $importenabled, '']
'$field' => ['twitter-import', DI::l10n()->t('Import the remote timeline'), $importenabled, '']
]);
$s .= Renderer::replaceMacros($field_checkbox, [
'$field' => ['twitter-create_user', L10n::t('Automatically create contacts'), $create_userenabled, L10n::t('This will automatically create a contact in Friendica as soon as you receive a message from an existing contact via the Twitter network. If you do not enable this, you need to manually add those Twitter contacts in Friendica from whom you would like to see posts here. However if enabled, you cannot merely remove a twitter contact from the Friendica contact list, as it will recreate this contact when they post again.')]
'$field' => ['twitter-create_user', DI::l10n()->t('Automatically create contacts'), $create_userenabled, DI::l10n()->t('This will automatically create a contact in Friendica as soon as you receive a message from an existing contact via the Twitter network. If you do not enable this, you need to manually add those Twitter contacts in Friendica from whom you would like to see posts here. However if enabled, you cannot merely remove a twitter contact from the Friendica contact list, as it will recreate this contact when they post again.')]
]);
$s .= '<div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="twitter-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="twitter-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div>';
} catch (TwitterOAuthException $e) {
$s .= '<p>' . L10n::t('An error occured: ') . $e->getMessage() . '</p>';
$s .= '<p>' . DI::l10n()->t('An error occured: ') . $e->getMessage() . '</p>';
}
}
}
@ -719,7 +719,7 @@ function twitter_addon_admin_post(App $a)
$consumersecret = !empty($_POST['consumersecret']) ? Strings::escapeTags(trim($_POST['consumersecret'])) : '';
Config::set('twitter', 'consumerkey', $consumerkey);
Config::set('twitter', 'consumersecret', $consumersecret);
info(L10n::t('Settings updated.') . EOL);
info(DI::l10n()->t('Settings updated.') . EOL);
}
function twitter_addon_admin(App $a, &$o)
@ -727,10 +727,10 @@ function twitter_addon_admin(App $a, &$o)
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/twitter/");
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$submit' => DI::l10n()->t('Save Settings'),
// name, label, value, help, [extra values]
'$consumerkey' => ['consumerkey', L10n::t('Consumer key'), Config::get('twitter', 'consumerkey'), ''],
'$consumersecret' => ['consumersecret', L10n::t('Consumer secret'), Config::get('twitter', 'consumersecret'), ''],
'$consumerkey' => ['consumerkey', DI::l10n()->t('Consumer key'), Config::get('twitter', 'consumerkey'), ''],
'$consumersecret' => ['consumersecret', DI::l10n()->t('Consumer secret'), Config::get('twitter', 'consumersecret'), ''],
]);
}

View file

@ -53,10 +53,10 @@ function viewsrc_item_photo_menu(&$a, &$b)
$item_id = $b['item']['id'];
}
$b['menu'] = array_merge([L10n::t('View Source') => DI::baseUrl()->get() . '/viewsrc/'. $item_id], $b['menu']);
$b['menu'] = array_merge([DI::l10n()->t('View Source') => DI::baseUrl()->get() . '/viewsrc/'. $item_id], $b['menu']);
//if((! local_user()) || (local_user() != $b['item']['uid']))
// return;
//$b['menu'] = array_merge(array(L10n::t('View Source') => $a->getBaseURL() . '/viewsrc/'. $b['item']['id']), $b['menu']);
//$b['menu'] = array_merge(array(DI::l10n()->t('View Source') => $a->getBaseURL() . '/viewsrc/'. $b['item']['id']), $b['menu']);
}

View file

@ -22,20 +22,20 @@ function webrtc_uninstall() {
}
function webrtc_app_menu($a,&$b) {
$b['app_menu'][] = '<div class="app-title"><a href="webrtc">' . L10n::t('WebRTC Videochat') . '</a></div>';
$b['app_menu'][] = '<div class="app-title"><a href="webrtc">' . DI::l10n()->t('WebRTC Videochat') . '</a></div>';
}
function webrtc_addon_admin (&$a, &$o) {
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/webrtc/" );
$o = Renderer::replaceMacros( $t, [
'$submit' => L10n::t('Save Settings'),
'$webrtcurl' => ['webrtcurl', L10n::t('WebRTC Base URL'), Config::get('webrtc','webrtcurl' ), L10n::t('Page your users will create a WebRTC chat room on. For example you could use https://live.mayfirst.org .')],
'$submit' => DI::l10n()->t('Save Settings'),
'$webrtcurl' => ['webrtcurl', DI::l10n()->t('WebRTC Base URL'), Config::get('webrtc','webrtcurl' ), DI::l10n()->t('Page your users will create a WebRTC chat room on. For example you could use https://live.mayfirst.org .')],
]);
}
function webrtc_addon_admin_post (&$a) {
$url = (!empty($_POST['webrtcurl']) ? Strings::escapeTags(trim($_POST['webrtcurl'])) : '');
Config::set('webrtc', 'webrtcurl', $url);
info(L10n::t('Settings updated.'). EOL);
info(DI::l10n()->t('Settings updated.'). EOL);
}
function webrtc_module() {
@ -49,10 +49,10 @@ function webrtc_content(&$a) {
$webrtcurl = Config::get('webrtc','webrtcurl');
/* embedd the landing page in an iframe */
$o .= '<h2>'.L10n::t('Video Chat').'</h2>';
$o .= '<p>'.L10n::t('WebRTC is a video and audio conferencing tool that works with Firefox (version 21 and above) and Chrome/Chromium (version 25 and above). Just create a new chat room and send the link to someone you want to chat with.').'</p>';
$o .= '<h2>'.DI::l10n()->t('Video Chat').'</h2>';
$o .= '<p>'.DI::l10n()->t('WebRTC is a video and audio conferencing tool that works with Firefox (version 21 and above) and Chrome/Chromium (version 25 and above). Just create a new chat room and send the link to someone you want to chat with.').'</p>';
if ($webrtcurl == '') {
$o .= '<p>'.L10n::t('Please contact your friendica admin and send a reminder to configure the WebRTC addon.').'</p>';
$o .= '<p>'.DI::l10n()->t('Please contact your friendica admin and send a reminder to configure the WebRTC addon.').'</p>';
} else {
$o .= '<iframe src="'.$webrtcurl.'" width="600px" height="600px"></iframe>';
}

View file

@ -48,7 +48,7 @@ function friendheader_widget_content(&$a, $conf)
</style>";
$o .= _abs_url(HTML::contactBlock());
$o .= "<a href='".DI::baseUrl()->get().'/profile/'.$a->profile['nickname']."' target=new>". L10n::t('Get added to this list!') ."</a>";
$o .= "<a href='".DI::baseUrl()->get().'/profile/'.$a->profile['nickname']."' target=new>". DI::l10n()->t('Get added to this list!') ."</a>";
return $o;
}

View file

@ -50,6 +50,6 @@ function friends_widget_content(&$a, $conf)
</style>";
$o .= _abs_url(HTML::contactBlock());
$o .= "<a href='".DI::baseUrl()->get().'/profile/'.$a->profile['nickname']."'>". L10n::t('Connect on Friendica!') ."</a>";
$o .= "<a href='".DI::baseUrl()->get().'/profile/'.$a->profile['nickname']."'>". DI::l10n()->t('Connect on Friendica!') ."</a>";
return $o;
}

View file

@ -61,11 +61,11 @@ function widgets_settings(&$a,&$o) {
# $t = file_get_contents( dirname(__file__). "/settings.tpl" );
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/widgets/");
$o .= Renderer::replaceMacros($t, [
'$submit' => L10n::t('Generate new key'),
'$submit' => DI::l10n()->t('Generate new key'),
'$title' => "Widgets",
'$label' => L10n::t('Widgets key'),
'$label' => DI::l10n()->t('Widgets key'),
'$key' => $key,
'$widgets_h' => L10n::t('Widgets available'),
'$widgets_h' => DI::l10n()->t('Widgets available'),
'$widgets' => $widgets,
]);
@ -126,7 +126,7 @@ function widgets_content(&$a) {
if (isset($_GET['p']) && local_user()==$conf['uid'] ) {
$o .= "<style>.f9k_widget { float: left;border:1px solid black; }</style>";
$o .= "<h1>Preview Widget</h1>";
$o .= '<a href="'.DI::baseUrl()->get().'/settings/addon">'. L10n::t("Addon Settings") .'</a>';
$o .= '<a href="'.DI::baseUrl()->get().'/settings/addon">'. DI::l10n()->t("Addon Settings") .'</a>';
$o .= "<h4>".call_user_func($a->argv[1].'_widget_name')."</h4>";
$o .= call_user_func($a->argv[1].'_widget_help');

View file

@ -93,7 +93,7 @@ function windowsphonepush_settings_post($a, $post)
DI::pConfig()->set(local_user(), 'windowsphonepush', 'senditemtext', intval($_POST['windowsphonepush-senditemtext']));
info(L10n::t('WindowsPhonePush settings updated.') . EOL);
info(DI::l10n()->t('WindowsPhonePush settings updated.') . EOL);
}
/* Called from the Addon Setting form.
@ -119,20 +119,20 @@ function windowsphonepush_settings(&$a, &$s)
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . L10n::t('WindowsPhonePush Settings') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('WindowsPhonePush Settings') . '</h3>';
$s .= '<div id="windowsphonepush-enable-wrapper">';
$s .= '<label id="windowsphonepush-enable-label" for="windowsphonepush-enable-chk">' . L10n::t('Enable WindowsPhonePush Addon') . '</label>';
$s .= '<label id="windowsphonepush-enable-label" for="windowsphonepush-enable-chk">' . DI::l10n()->t('Enable WindowsPhonePush Addon') . '</label>';
$s .= '<input id="windowsphonepush-enable-chk" type="checkbox" name="windowsphonepush" value="1" ' . $checked_enabled . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="windowsphonepush-senditemtext-wrapper">';
$s .= '<label id="windowsphonepush-senditemtext-label" for="windowsphonepush-senditemtext-chk">' . L10n::t('Push text of new item') . '</label>';
$s .= '<label id="windowsphonepush-senditemtext-label" for="windowsphonepush-senditemtext-chk">' . DI::l10n()->t('Push text of new item') . '</label>';
$s .= '<input id="windowsphonepush-senditemtext-chk" type="checkbox" name="windowsphonepush-senditemtext" value="1" ' . $checked_senditemtext . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button - enable und senditemtext can be changed by the user */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="windowsphonepush-submit" name="windowsphonepush-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="windowsphonepush-submit" name="windowsphonepush-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div><div class="clear"></div>';
/* provide further read-only information concerning the addon (useful for */
$s .= '<div id="windowsphonepush-device_url-wrapper">';

View file

@ -54,7 +54,7 @@ function wppost_jot_nets(\Friendica\App &$a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'wppost_enable',
L10n::t('Post to Wordpress'),
DI::l10n()->t('Post to Wordpress'),
DI::pConfig()->get(local_user(),'wppost','post_by_default')
]
];
@ -95,54 +95,54 @@ function wppost_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<span id="settings_wppost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_wppost_expanded\'); openClose(\'settings_wppost_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/wordpress.png" /><h3 class="connector">'. L10n::t('Wordpress Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/wordpress.png" /><h3 class="connector">'. DI::l10n()->t('Wordpress Export').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_wppost_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_wppost_expanded\'); openClose(\'settings_wppost_inflated\');">';
$s .= '<img class="connector'.$css.'" src="images/wordpress.png" /><h3 class="connector">'. L10n::t('Wordpress Export').'</h3>';
$s .= '<img class="connector'.$css.'" src="images/wordpress.png" /><h3 class="connector">'. DI::l10n()->t('Wordpress Export').'</h3>';
$s .= '</span>';
$s .= '<div id="wppost-enable-wrapper">';
$s .= '<label id="wppost-enable-label" for="wppost-checkbox">' . L10n::t('Enable WordPress Post Addon') . '</label>';
$s .= '<label id="wppost-enable-label" for="wppost-checkbox">' . DI::l10n()->t('Enable WordPress Post Addon') . '</label>';
$s .= '<input id="wppost-checkbox" type="checkbox" name="wppost" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="wppost-username-wrapper">';
$s .= '<label id="wppost-username-label" for="wppost-username">' . L10n::t('WordPress username') . '</label>';
$s .= '<label id="wppost-username-label" for="wppost-username">' . DI::l10n()->t('WordPress username') . '</label>';
$s .= '<input id="wppost-username" type="text" name="wp_username" value="' . $wp_username . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="wppost-password-wrapper">';
$s .= '<label id="wppost-password-label" for="wppost-password">' . L10n::t('WordPress password') . '</label>';
$s .= '<label id="wppost-password-label" for="wppost-password">' . DI::l10n()->t('WordPress password') . '</label>';
$s .= '<input id="wppost-password" type="password" name="wp_password" value="' . $wp_password . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="wppost-blog-wrapper">';
$s .= '<label id="wppost-blog-label" for="wppost-blog">' . L10n::t('WordPress API URL') . '</label>';
$s .= '<label id="wppost-blog-label" for="wppost-blog">' . DI::l10n()->t('WordPress API URL') . '</label>';
$s .= '<input id="wppost-blog" type="text" name="wp_blog" value="' . $wp_blog . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="wppost-bydefault-wrapper">';
$s .= '<label id="wppost-bydefault-label" for="wppost-bydefault">' . L10n::t('Post to WordPress by default') . '</label>';
$s .= '<label id="wppost-bydefault-label" for="wppost-bydefault">' . DI::l10n()->t('Post to WordPress by default') . '</label>';
$s .= '<input id="wppost-bydefault" type="checkbox" name="wp_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="wppost-backlink-wrapper">';
$s .= '<label id="wppost-backlink-label" for="wppost-backlink">' . L10n::t('Provide a backlink to the Friendica post') . '</label>';
$s .= '<label id="wppost-backlink-label" for="wppost-backlink">' . DI::l10n()->t('Provide a backlink to the Friendica post') . '</label>';
$s .= '<input id="wppost-backlink" type="checkbox" name="wp_backlink" value="1" ' . $back_checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="wppost-backlinktext-wrapper">';
$s .= '<label id="wppost-backlinktext-label" for="wp_backlink_text">' . L10n::t('Text for the backlink, e.g. Read the original post and comment stream on Friendica.') . '</label>';
$s .= '<label id="wppost-backlinktext-label" for="wp_backlink_text">' . DI::l10n()->t('Text for the backlink, e.g. Read the original post and comment stream on Friendica.') . '</label>';
$s .= '<input id="wppost-backlinktext" type="text" name="wp_backlink_text" value="'. $wp_backlink_text.'" ' . $wp_backlink_text . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="wppost-shortcheck-wrapper">';
$s .= '<label id="wppost-shortcheck-label" for="wppost-shortcheck">' . L10n::t("Don't post messages that are too short") . '</label>';
$s .= '<label id="wppost-shortcheck-label" for="wppost-shortcheck">' . DI::l10n()->t("Don't post messages that are too short") . '</label>';
$s .= '<input id="wppost-shortcheck" type="checkbox" name="wp_shortcheck" value="1" '.$shortcheck_checked.'/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="wppost-submit" name="wppost-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="wppost-submit" name="wppost-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}
@ -244,7 +244,7 @@ function wppost_send(&$a, &$b)
$wp_blog = DI::pConfig()->get($b['uid'],'wppost','wp_blog');
$wp_backlink_text = DI::pConfig()->get($b['uid'],'wppost','wp_backlink_text');
if ($wp_backlink_text == '') {
$wp_backlink_text = L10n::t('Read the orig­i­nal post and com­ment stream on Friendica');
$wp_backlink_text = DI::l10n()->t('Read the orig­i­nal post and com­ment stream on Friendica');
}
if ($wp_username && $wp_password && $wp_blog) {
@ -302,7 +302,7 @@ function wppost_send(&$a, &$b)
}
}
$title = '<title>' . (($wptitle) ? $wptitle : L10n::t('Post from Friendica')) . '</title>';
$title = '<title>' . (($wptitle) ? $wptitle : DI::l10n()->t('Post from Friendica')) . '</title>';
$post = BBCode::convert($b['body'], false, 4);
// If a link goes to youtube then remove the stuff around it. Wordpress detects youtube links and embeds it

View file

@ -41,7 +41,7 @@ function xmpp_addon_settings_post()
DI::pConfig()->set(local_user(), 'xmpp', 'individual', $_POST['xmpp_individual'] ?? false);
DI::pConfig()->set(local_user(), 'xmpp', 'bosh_proxy', $_POST['xmpp_bosh_proxy'] ?? '');
info(L10n::t('XMPP settings updated.') . EOL);
info(DI::l10n()->t('XMPP settings updated.') . EOL);
}
function xmpp_addon_settings(App $a, &$s)
@ -66,26 +66,26 @@ function xmpp_addon_settings(App $a, &$s)
/* Add some HTML to the existing form */
$s .= '<span id="settings_xmpp_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_xmpp_expanded\'); openClose(\'settings_xmpp_inflated\');">';
$s .= '<h3>' . L10n::t('XMPP-Chat (Jabber)') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('XMPP-Chat (Jabber)') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_xmpp_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_xmpp_expanded\'); openClose(\'settings_xmpp_inflated\');">';
$s .= '<h3>' . L10n::t('XMPP-Chat (Jabber)') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('XMPP-Chat (Jabber)') . '</h3>';
$s .= '</span>';
$s .= '<div id="xmpp-settings-wrapper">';
$s .= '<label id="xmpp-enabled-label" for="xmpp-enabled">' . L10n::t('Enable Webchat') . '</label>';
$s .= '<label id="xmpp-enabled-label" for="xmpp-enabled">' . DI::l10n()->t('Enable Webchat') . '</label>';
$s .= '<input id="xmpp-enabled" type="checkbox" name="xmpp_enabled" value="1" ' . $enabled_checked . '/>';
$s .= '<div class="clear"></div>';
if (Config::get("xmpp", "central_userbase")) {
$s .= '<label id="xmpp-individual-label" for="xmpp-individual">' . L10n::t('Individual Credentials') . '</label>';
$s .= '<label id="xmpp-individual-label" for="xmpp-individual">' . DI::l10n()->t('Individual Credentials') . '</label>';
$s .= '<input id="xmpp-individual" type="checkbox" name="xmpp_individual" value="1" ' . $individual_checked . '/>';
$s .= '<div class="clear"></div>';
}
if (!Config::get("xmpp", "central_userbase") || DI::pConfig()->get(local_user(), "xmpp", "individual")) {
$s .= '<label id="xmpp-bosh-proxy-label" for="xmpp-bosh-proxy">' . L10n::t('Jabber BOSH host') . '</label>';
$s .= '<label id="xmpp-bosh-proxy-label" for="xmpp-bosh-proxy">' . DI::l10n()->t('Jabber BOSH host') . '</label>';
$s .= ' <input id="xmpp-bosh-proxy" type="text" name="xmpp_bosh_proxy" value="' . $bosh_proxy . '" />';
$s .= '<div class="clear"></div>';
}
@ -94,7 +94,7 @@ function xmpp_addon_settings(App $a, &$s)
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="xmpp-settings-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="xmpp-settings-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}
function xmpp_login()
@ -110,9 +110,9 @@ function xmpp_addon_admin(App $a, &$o)
$t = Renderer::getMarkupTemplate('admin.tpl', 'addon/xmpp/');
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$bosh_proxy' => ['bosh_proxy', L10n::t('Jabber BOSH host'), Config::get('xmpp', 'bosh_proxy'), ''],
'$central_userbase' => ['central_userbase', L10n::t('Use central userbase'), Config::get('xmpp', 'central_userbase'), L10n::t('If enabled, users will automatically login to an ejabberd server that has to be installed on this machine with synchronized credentials via the "auth_ejabberd.php" script.')],
'$submit' => DI::l10n()->t('Save Settings'),
'$bosh_proxy' => ['bosh_proxy', DI::l10n()->t('Jabber BOSH host'), Config::get('xmpp', 'bosh_proxy'), ''],
'$central_userbase' => ['central_userbase', DI::l10n()->t('Use central userbase'), Config::get('xmpp', 'central_userbase'), DI::l10n()->t('If enabled, users will automatically login to an ejabberd server that has to be installed on this machine with synchronized credentials via the "auth_ejabberd.php" script.')],
]);
}
@ -124,7 +124,7 @@ function xmpp_addon_admin_post()
Config::set('xmpp', 'bosh_proxy', $bosh_proxy);
Config::set('xmpp', 'central_userbase', $central_userbase);
info(L10n::t('Settings updated.') . EOL);
info(DI::l10n()->t('Settings updated.') . EOL);
}
function xmpp_script(App $a)