diff --git a/advancedcontentfilter/advancedcontentfilter.php b/advancedcontentfilter/advancedcontentfilter.php index 26227c21f..415cf48c1 100644 --- a/advancedcontentfilter/advancedcontentfilter.php +++ b/advancedcontentfilter/advancedcontentfilter.php @@ -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 .= <<

$advancedcontentfilter

@@ -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); diff --git a/advancedcontentfilter/src/middlewares.php b/advancedcontentfilter/src/middlewares.php index 32e8cb99f..f5c90fa63 100644 --- a/advancedcontentfilter/src/middlewares.php +++ b/advancedcontentfilter/src/middlewares.php @@ -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')); }; }; diff --git a/blackout/blackout.php b/blackout/blackout.php index 72c2f62c5..6f951e26a 100644 --- a/blackout/blackout.php +++ b/blackout/blackout.php @@ -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 %s and it will end %s.", $mystart, $myend); + $adminnote = DI::l10n()->t("Please double check that the current settings for the blackout. Begin will be %s and it will end %s.", $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 YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm 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 YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.")], + '$enddate' => ["enddate", DI::l10n()->t("End of the Blackout"), $myend, ""], '$adminnote' => $adminnote, - '$aboutredirect' => L10n::t("Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."), + '$aboutredirect' => DI::l10n()->t("Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."), ]); } function blackout_addon_admin_post (&$a) { diff --git a/blockbot/blockbot.php b/blockbot/blockbot.php index 8a27f402b..b21b4e958 100644 --- a/blockbot/blockbot.php +++ b/blockbot/blockbot.php @@ -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) { diff --git a/blockem/blockem.php b/blockem/blockem.php index 235381fa8..af2b03328 100644 --- a/blockem/blockem.php +++ b/blockem/blockem.php @@ -52,20 +52,20 @@ function blockem_addon_settings (App $a, &$s) } $s .= ''; - $s .= '

' . L10n::t('Blockem') . '

'; + $s .= '

' . DI::l10n()->t('Blockem') . '

'; $s .= '
'; $s .= ''; + $s .= '
'; 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(); } diff --git a/blogger/blogger.php b/blogger/blogger.php index 18a1b8eac..287ad1ae1 100644 --- a/blogger/blogger.php +++ b/blogger/blogger.php @@ -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 .= ''; - $s .= '

'. L10n::t('Blogger Export').'

'; + $s .= '

'. DI::l10n()->t('Blogger Export').'

'; $s .= '
'; $s .= ''; + $s .= '
'; } @@ -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 = '' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . ''; + $title = '' . (($b['title']) ? $b['title'] : DI::l10n()->t('Post from Friendica')) . ''; $post = $title . BBCode::convert($b['body']); $post = XML::escape($post); diff --git a/buffer/buffer.php b/buffer/buffer.php index 667eac309..08b3020b6 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -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 = 'Connect to Buffer!'; } else { Logger::log("buffer_connect: authenticated"); - $o = L10n::t("You are now authenticated to buffer. "); - $o .= '
' . L10n::t("return to the connector page") . ''; + $o = DI::l10n()->t("You are now authenticated to buffer. "); + $o .= '
' . DI::l10n()->t("return to the connector page") . ''; 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 .= ''; - $s .= '

'. L10n::t('Buffer Export').'

'; + $s .= '

'. DI::l10n()->t('Buffer Export').'

'; $s .= '
'; $s .= ''; } diff --git a/buglink/buglink.php b/buglink/buglink.php index d8253d983..3e9bae172 100644 --- a/buglink/buglink.php +++ b/buglink/buglink.php @@ -22,5 +22,5 @@ function buglink_uninstall() function buglink_active(App $a, &$b) { - $b .= ''; + $b .= ''; } diff --git a/catavatar/catavatar.php b/catavatar/catavatar.php index 49c6cc423..321274897 100644 --- a/catavatar/catavatar.php +++ b/catavatar/catavatar.php @@ -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; } diff --git a/cookienotice/cookienotice.php b/cookienotice/cookienotice.php index bad867e79..e796350f3 100644 --- a/cookienotice/cookienotice.php +++ b/cookienotice/cookienotice.php @@ -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('Configure your cookie usage notice. 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('Configure your cookie usage notice. 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__); diff --git a/curweather/curweather.php b/curweather/curweather.php index 6b6f8e902..6645a46bd 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -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. Berlin,DE or 14476,DE.') ], - '$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. Berlin,DE or 14476,DE.') ], + '$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')] ]); } diff --git a/diaspora/diaspora.php b/diaspora/diaspora.php index bf3cae2b9..25c6777ca 100644 --- a/diaspora/diaspora.php +++ b/diaspora/diaspora.php @@ -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 .= ''; - $s .= '

'. L10n::t('Diaspora Export').'

'; + $s .= '

'. DI::l10n()->t('Diaspora Export').'

'; $s .= '
'; $s .= '
'; /* provide a submit button */ - $s .= '
'; + $s .= '
'; } diff --git a/discourse/discourse.php b/discourse/discourse.php index f53db17cf..c0c322ce5 100644 --- a/discourse/discourse.php +++ b/discourse/discourse.php @@ -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'), ]); } diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index 975d703ed..456737143 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -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 .= ''; - $s .= '

'. L10n::t("Dreamwidth Export").'

'; + $s .= '

'. DI::l10n()->t("Dreamwidth Export").'

'; $s .= '
'; $s .= ''; + $s .= '
'; } diff --git a/forumdirectory/forumdirectory.php b/forumdirectory/forumdirectory.php index b5ec0d1cd..9609ba2d8 100644 --- a/forumdirectory/forumdirectory.php +++ b/forumdirectory/forumdirectory.php @@ -36,7 +36,7 @@ function forumdirectory_module() function forumdirectory_app_menu(App $a, array &$b) { - $b['app_menu'][] = '
' . L10n::t('Forum Directory') . '
'; + $b['app_menu'][] = '
' . DI::l10n()->t('Forum Directory') . '
'; } 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), ]); diff --git a/fromapp/fromapp.php b/fromapp/fromapp.php index a796920d6..77cf1d7e8 100644 --- a/fromapp/fromapp.php +++ b/fromapp/fromapp.php @@ -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 .= ''; - $s .= '

' . L10n::t('FromApp Settings') . '

'; + $s .= '

' . DI::l10n()->t('FromApp Settings') . '

'; $s .= '
'; $s .= ''; + $s .= '
'; } function fromapp_post_hook(&$a, &$item) diff --git a/geocoordinates/geocoordinates.php b/geocoordinates/geocoordinates.php index 77bfa8e6e..9531653ef 100644 --- a/geocoordinates/geocoordinates.php +++ b/geocoordinates/geocoordinates.php @@ -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); } diff --git a/geonames/geonames.php b/geonames/geonames.php index 6e2ee95ec..bd6a638ef 100644 --- a/geonames/geonames.php +++ b/geonames/geonames.php @@ -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') ]); } diff --git a/gnot/gnot.php b/gnot/gnot.php index 128b37dd7..c39c7f269 100644 --- a/gnot/gnot.php +++ b/gnot/gnot.php @@ -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']); } diff --git a/gravatar/gravatar.php b/gravatar/gravatar.php index 68083b386..f1f93b48e 100644 --- a/gravatar/gravatar.php +++ b/gravatar/gravatar.php @@ -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 = '
' .L10n::t('Information') .'

' .L10n::t('Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'



'; + $o = '
' .DI::l10n()->t('Information') .'

' .DI::l10n()->t('Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'



'; } // output Gravatar settings $o .= ''; $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); } diff --git a/group_text/group_text.php b/group_text/group_text.php index 07ad8102d..7ccacd92b 100644 --- a/group_text/group_text.php +++ b/group_text/group_text.php @@ -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 .= '
'; - $s .= '

' . L10n::t('Group Text') . '

'; + $s .= '

' . DI::l10n()->t('Group Text') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; /* provide a submit button */ - $s .= '
'; + $s .= '
'; } diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php index 58ba1cf9e..37dfa68ab 100644 --- a/ifttt/ifttt.php +++ b/ifttt/ifttt.php @@ -53,35 +53,35 @@ function ifttt_settings(App $a, &$s) } $s .= ''; - $s .= '

' . L10n::t('IFTTT Mirror') . '

'; + $s .= '

' . DI::l10n()->t('IFTTT Mirror') . '

'; $s .= '
'; $s .= ''; } diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index 02770ce06..89e538523 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -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 .= ''; - $s .= '

'. L10n::t("InsaneJournal Export").'

'; + $s .= '

'. DI::l10n()->t("InsaneJournal Export").'

'; $s .= '
'; $s .= ''; + $s .= '
'; } function ijpost_settings_post(&$a, &$b) diff --git a/impressum/impressum.php b/impressum/impressum.php index 190afc2c8..5d7ebbf04 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -59,7 +59,7 @@ function impressum_load_config(\Friendica\App $a, ConfigFileLoader $loader) } function impressum_show($a,&$b) { - $b .= '

'.L10n::t('Impressum').'

'; + $b .= '

'.DI::l10n()->t('Impressum').'

'; $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 .= '

'.L10n::t('Site Owner').': '. $tmp .'
'.L10n::t('Email Address').': '.$email.'

'; + $b .= '

'.DI::l10n()->t('Site Owner').': '. $tmp .'
'.DI::l10n()->t('Email Address').': '.$email.'

'; } else { - $b .= '

'.L10n::t('Site Owner').': '. $tmp .'

'; + $b .= '

'.DI::l10n()->t('Site Owner').': '. $tmp .'

'; } if (strlen($postal)) { - $b .= '

'.L10n::t('Postal Address').'
'. $postal .'

'; + $b .= '

'.DI::l10n()->t('Postal Address').'
'. $postal .'

'; } if (strlen($notes)) { $b .= '

'.$notes.'

'; } } else { - $b .= '

'.L10n::t('The impressum addon needs to be configured!
Please add at least the owner variable to your config file. For other variables please refer to the README file of the addon.').'

'; + $b .= '

'.DI::l10n()->t('The impressum addon needs to be configured!
Please add at least the owner variable to your config file. For other variables please refer to the README file of the addon.').'

'; } } @@ -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.')], ]); } diff --git a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php index 6a4fbab76..41999a120 100644 --- a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php +++ b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php @@ -21,7 +21,7 @@ function infiniteimprobabilitydrive_uninstall() function infiniteimprobabilitydrive_app_menu($a, &$b) { - $b['app_menu'][] = '
' . L10n::t('Infinite Improbability Drive') . '
'; + $b['app_menu'][] = '
' . DI::l10n()->t('Infinite Improbability Drive') . '
'; } diff --git a/irc/irc.php b/irc/irc.php index bc26ff499..aa42a0cc1 100644 --- a/irc/irc.php +++ b/irc/irc.php @@ -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'][] = '
' . L10n::t('IRC Chatroom') . '
'; + $b['app_menu'][] = '
' . DI::l10n()->t('IRC Chatroom') . '
'; } @@ -97,7 +97,7 @@ function irc_content(&$a) { $chats = ['friendica','chat','chatback','hottub','ircbar','dateroom','debian']; - DI::page()['aside'] .= '

' . L10n::t('Popular Channels') . '

'; } diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php index 43e673406..f361d6e80 100644 --- a/libravatar/libravatar.php +++ b/libravatar/libravatar.php @@ -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 = '
' .L10n::t('Warning') .'

'; - $o .= L10n::t('Your PHP version %s is lower than the required PHP >= 5.3.', PHP_VERSION); - $o .= '
' .L10n::t('This addon is not functional on your server.') .'


'; + $o = '

' .DI::l10n()->t('Warning') .'

'; + $o .= DI::l10n()->t('Your PHP version %s is lower than the required PHP >= 5.3.', PHP_VERSION); + $o .= '
' .DI::l10n()->t('This addon is not functional on your server.') .'


'; return; } @@ -107,14 +107,14 @@ function libravatar_addon_admin(&$a, &$o) DBA::escape('gravatar') ); if (count($r)) { - $o = '

' .L10n::t('Information') .'

' .L10n::t('Gravatar addon is installed. Please disable the Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'



'; + $o = '
' .DI::l10n()->t('Information') .'

' .DI::l10n()->t('Gravatar addon is installed. Please disable the Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'



'; } // output Libravatar settings $o .= ''; $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); } diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 457343fc1..0798de686 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -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 .= '
'; - $s .= '

' . L10n::t('LiveJournal Post Settings') . '

'; + $s .= '

' . DI::l10n()->t('LiveJournal Post Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; /* provide a submit button */ - $s .= '
'; + $s .= '
'; } diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index d2a31e427..f85ba13c3 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -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) { diff --git a/markdown/markdown.php b/markdown/markdown.php index ce7553e05..894045feb 100644 --- a/markdown/markdown.php +++ b/markdown/markdown.php @@ -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'), ]); } diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php index 685a53b29..fd58b265a 100644 --- a/mathjax/mathjax.php +++ b/mathjax/mathjax.php @@ -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'), ]); } diff --git a/membersince/membersince.php b/membersince/membersince.php index 32edac270..65fa4cdaf 100644 --- a/membersince/membersince.php +++ b/membersince/membersince.php @@ -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>/', "\n\n\n
\n
" . L10n::t('Member since:') . "
\n
" . DateTimeFormat::local($a->profile['register_date']) . "
\n
", $b, 1); + $b = preg_replace('/<\/dl>/', "\n\n\n
\n
" . DI::l10n()->t('Member since:') . "
\n
" . DateTimeFormat::local($a->profile['register_date']) . "
\n
", $b, 1); } } diff --git a/morechoice/morechoice.php b/morechoice/morechoice.php index dea8be150..859e5de92 100644 --- a/morechoice/morechoice.php +++ b/morechoice/morechoice.php @@ -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'); } diff --git a/morepokes/morepokes.php b/morepokes/morepokes.php index 32c9c03f0..428ebdedd 100644 --- a/morepokes/morepokes.php +++ b/morepokes/morepokes.php @@ -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')]; } diff --git a/newmemberwidget/newmemberwidget.php b/newmemberwidget/newmemberwidget.php index 11e8e12e3..3ddd4694f 100644 --- a/newmemberwidget/newmemberwidget.php +++ b/newmemberwidget/newmemberwidget.php @@ -33,15 +33,15 @@ function newmemberwidget_network_mod_init ($a, $b) } $t = '
'.EOL; - $t .= '

'.L10n::t('New Member').'

'.EOL; - $t .= '' . L10n::t('Tips for New Members') . '
'.EOL; + $t .= '

'.DI::l10n()->t('New Member').'

'.EOL; + $t .= '' . DI::l10n()->t('Tips for New Members') . '
'.EOL; if (Config::get('newmemberwidget','linkglobalsupport', false)) { - $t .= ''.L10n::t('Global Support Forum').'
'.EOL; + $t .= ''.DI::l10n()->t('Global Support Forum').'
'.EOL; } if (Config::get('newmemberwidget','linklocalsupport', false)) { - $t .= ''.L10n::t('Local Support Forum').'
'.EOL; + $t .= ''.DI::l10n()->t('Local Support Forum').'
'.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?')." (@helpers)"], - '$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 nickname 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?')." (@helpers)"], + '$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 nickname of the local support group here (i.e. helpers)')], ]); } diff --git a/notifyall/notifyall.php b/notifyall/notifyall.php index 92a1a2e33..bf535fe14 100644 --- a/notifyall/notifyall.php +++ b/notifyall/notifyall.php @@ -32,7 +32,7 @@ function notifyall_module() {} function notifyall_addon_admin(App $a, &$o) { - $o = '
    ' . L10n::t('Send email to all members') . '
'; + $o = '
    ' . DI::l10n()->t('Send email to all members') . '
'; } @@ -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; diff --git a/notimeline/notimeline.php b/notimeline/notimeline.php index afb30fb5a..15ea32d03 100644 --- a/notimeline/notimeline.php +++ b/notimeline/notimeline.php @@ -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 .= '
'; - $s .= '

' . L10n::t('No Timeline Settings') . '

'; + $s .= '

' . DI::l10n()->t('No Timeline Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; /* provide a submit button */ - $s .= '
'; + $s .= '
'; } diff --git a/nsfw/nsfw.php b/nsfw/nsfw.php index 70a18416a..08bdcc889 100644 --- a/nsfw/nsfw.php +++ b/nsfw/nsfw.php @@ -74,24 +74,24 @@ function nsfw_addon_settings(&$a, &$s) } $s .= ''; - $s .= '

' . L10n::t('Content Filter (NSFW and more)') . '

'; + $s .= '

' . DI::l10n()->t('Content Filter (NSFW and more)') . '

'; $s .= '
'; $s .= ''; + $s .= '
'; + $s .= '
' . DI::l10n()->t('Use /expression/ to provide regular expressions') . '
'; 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); } } } diff --git a/numfriends/numfriends.php b/numfriends/numfriends.php index 1e0609bd7..f0d1713a6 100644 --- a/numfriends/numfriends.php +++ b/numfriends/numfriends.php @@ -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 .= '
'; - $s .= '

' . L10n::t('Numfriends Settings') . '

'; + $s .= '

' . DI::l10n()->t('Numfriends Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; /* provide a submit button */ - $s .= '
'; + $s .= '
'; } diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index e0287a817..307da5990 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -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')) . ''; + $cardlink .= '#map=' . $zoom . '/' . $lat . '/' . $lon . '">' . ($b['location'] ? Strings::escapeHtml($b['location']) : DI::l10n()->t('View Larger')) . ''; if (empty($b['mode'])) { $b['html'] = ''; } diff --git a/widgets/widget_friendheader.php b/widgets/widget_friendheader.php index 4d852e273..734933c87 100644 --- a/widgets/widget_friendheader.php +++ b/widgets/widget_friendheader.php @@ -48,7 +48,7 @@ function friendheader_widget_content(&$a, $conf) "; $o .= _abs_url(HTML::contactBlock()); - $o .= "profile['nickname']."' target=new>". L10n::t('Get added to this list!') .""; + $o .= "profile['nickname']."' target=new>". DI::l10n()->t('Get added to this list!') .""; return $o; } diff --git a/widgets/widget_friends.php b/widgets/widget_friends.php index 37fc30dce..c49d052dd 100644 --- a/widgets/widget_friends.php +++ b/widgets/widget_friends.php @@ -50,6 +50,6 @@ function friends_widget_content(&$a, $conf) "; $o .= _abs_url(HTML::contactBlock()); - $o .= "profile['nickname']."'>". L10n::t('Connect on Friendica!') .""; + $o .= "profile['nickname']."'>". DI::l10n()->t('Connect on Friendica!') .""; return $o; } diff --git a/widgets/widgets.php b/widgets/widgets.php index d9ecb890c..2c7aabaea 100644 --- a/widgets/widgets.php +++ b/widgets/widgets.php @@ -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 .= ""; $o .= "

Preview Widget

"; - $o .= ''. L10n::t("Addon Settings") .''; + $o .= ''. DI::l10n()->t("Addon Settings") .''; $o .= "

".call_user_func($a->argv[1].'_widget_name')."

"; $o .= call_user_func($a->argv[1].'_widget_help'); diff --git a/windowsphonepush/windowsphonepush.php b/windowsphonepush/windowsphonepush.php index 1d9dd27d9..5188ce971 100644 --- a/windowsphonepush/windowsphonepush.php +++ b/windowsphonepush/windowsphonepush.php @@ -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 .= '
'; - $s .= '

' . L10n::t('WindowsPhonePush Settings') . '

'; + $s .= '

' . DI::l10n()->t('WindowsPhonePush Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; /* provide a submit button - enable und senditemtext can be changed by the user */ - $s .= '
'; + $s .= '
'; /* provide further read-only information concerning the addon (useful for */ $s .= '
'; diff --git a/wppost/wppost.php b/wppost/wppost.php index d8d2431f1..4b1e41f79 100644 --- a/wppost/wppost.php +++ b/wppost/wppost.php @@ -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 .= ''; - $s .= '

'. L10n::t('Wordpress Export').'

'; + $s .= '

'. DI::l10n()->t('Wordpress Export').'

'; $s .= '
'; $s .= ''; + $s .= '
'; } @@ -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 = '' . (($wptitle) ? $wptitle : L10n::t('Post from Friendica')) . ''; + $title = '' . (($wptitle) ? $wptitle : DI::l10n()->t('Post from Friendica')) . ''; $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 diff --git a/xmpp/xmpp.php b/xmpp/xmpp.php index 552f5f9e5..378a4bdc0 100644 --- a/xmpp/xmpp.php +++ b/xmpp/xmpp.php @@ -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 .= ''; - $s .= '

' . L10n::t('XMPP-Chat (Jabber)') . '

'; + $s .= '

' . DI::l10n()->t('XMPP-Chat (Jabber)') . '

'; $s .= '
'; $s .= ''; } 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)