Move L10n::t() calls to DI::l10n()->t() calls
parent
1eb23e3667
commit
48fecb9a40
|
@ -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);
|
||||
|
|
|
@ -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'));
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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>';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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>';
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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__);
|
||||
|
||||
|
|
|
@ -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 °C or °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 °C or °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')]
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -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>';
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -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>';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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),
|
||||
]);
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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')
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -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']);
|
||||
}
|
||||
|
|
|
@ -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() |