@@ -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 .= '';
- $s .= '
' . L10n::t('Blockem') . '
';
+ $s .= '
' . DI::l10n()->t('Blockem') . '
';
$s .= '';
$s .= '
';
- $s .= '
'. L10n::t("Hides user's content by collapsing posts. Also replaces their avatar with generic image.") . '
';
- $s .= '';
+ $s .= '
'. DI::l10n()->t("Hides user's content by collapsing posts. Also replaces their avatar with generic image.") . '
';
@@ -207,7 +207,7 @@ function buffer_settings(App $a, &$s)
$profiles = $buffer->go('/profiles');
if (is_array($profiles)) {
$s .= '
';
- $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 .= "
";
foreach ($profiles as $profile) {
if (!$profile->default)
@@ -227,7 +227,7 @@ function buffer_settings(App $a, &$s)
/* provide a submit button */
- $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 .= '
';
$s .= '';
- $s .= '
'. L10n::t('Diaspora Export').'
';
+ $s .= '
'. DI::l10n()->t('Diaspora Export').'
';
$s .= '';
if ($status) {
@@ -119,32 +119,32 @@ function diaspora_settings(App $a, &$s)
}
$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('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 .= '
' . L10n::t('Create an account at IFTTT. Create three Facebook recipes that are connected with Maker (In the form "if Facebook then Maker") with the following parameters:') . '
';
+ $s .= '
' . DI::l10n()->t('Create an account at IFTTT. Create three Facebook recipes that are connected with Maker (In the form "if Facebook then Maker") with the following parameters:') . '
'.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'][] = '
';
}
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'][] = '
';
diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php
index b92466a0f..8810ec112 100644
--- a/js_upload/js_upload.php
+++ b/js_upload/js_upload.php
@@ -32,10 +32,10 @@ function js_upload_form(App $a, array &$b)
$tpl = Renderer::getMarkupTemplate('js_upload.tpl', 'addon/js_upload');
$b['addon_text'] .= Renderer::replaceMacros($tpl, [
- '$upload_msg' => L10n::t('Select files for upload'),
- '$drop_msg' => L10n::t('Drop files here to upload'),
- '$cancel' => L10n::t('Cancel'),
- '$failed' => L10n::t('Failed'),
+ '$upload_msg' => DI::l10n()->t('Select files for upload'),
+ '$drop_msg' => DI::l10n()->t('Drop files here to upload'),
+ '$cancel' => DI::l10n()->t('Cancel'),
+ '$failed' => DI::l10n()->t('Failed'),
'$post_url' => $b['post_url'],
'$maximagesize' => intval(Config::get('system', 'maximagesize')),
]);
@@ -213,25 +213,25 @@ class qqFileUploader
function handleUpload()
{
if (!$this->file) {
- return ['error' => L10n::t('No files were uploaded.')];
+ return ['error' => DI::l10n()->t('No files were uploaded.')];
}
$size = $this->file->getSize();
if ($size == 0) {
- return ['error' => L10n::t('Uploaded file is empty')];
+ return ['error' => DI::l10n()->t('Uploaded file is empty')];
}
// if ($size > $this->sizeLimit) {
-// return array('error' => L10n::t('Uploaded file is too large'));
+// return array('error' => DI::l10n()->t('Uploaded file is too large'));
// }
$maximagesize = Config::get('system', 'maximagesize');
if (($maximagesize) && ($size > $maximagesize)) {
- return ['error' => L10n::t('Image exceeds size limit of ') . $maximagesize];
+ return ['error' => DI::l10n()->t('Image exceeds size limit of ') . $maximagesize];
}
@@ -245,7 +245,7 @@ class qqFileUploader
if ($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)) {
$these = implode(', ', $this->allowedExtensions);
- return ['error' => L10n::t('File has an invalid extension, it should be one of ') . $these . '.'];
+ return ['error' => DI::l10n()->t('File has an invalid extension, it should be one of ') . $these . '.'];
}
if ($this->file->save()) {
@@ -256,7 +256,7 @@ class qqFileUploader
];
} else {
return [
- 'error' => L10n::t('Upload was cancelled, or server error encountered'),
+ 'error' => DI::l10n()->t('Upload was cancelled, or server error encountered'),
'path' => $this->file->getPath(),
'filename' => $filename . '.' . $ext
];
diff --git a/krynn/krynn.php b/krynn/krynn.php
index 63418ebf2..0a32659ab 100644
--- a/krynn/krynn.php
+++ b/krynn/krynn.php
@@ -153,23 +153,23 @@ function krynn_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
' . L10n::t('Krynn') . '
';
+ $s .= '
' . DI::l10n()->t('Krynn') . '
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
' . L10n::t('Krynn') . '
';
+ $s .= '
' . DI::l10n()->t('Krynn') . '
';
$s .= '';
$s .= '
';
- $s .= '
' . L10n::t('Krynn Settings') . '
';
+ $s .= '
' . DI::l10n()->t('Krynn Settings') . '
';
$s .= '
';
- $s .= '';
+ $s .= '';
$s .= '';
$s .= '
';
/* provide a submit button */
- $s .= '
';
+ $s .= '
';
}
diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php
index 0293e119c..ae3b8700c 100644
--- a/langfilter/langfilter.php
+++ b/langfilter/langfilter.php
@@ -53,13 +53,13 @@ function langfilter_addon_settings(App $a, &$s)
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/langfilter/");
$s .= Renderer::replaceMacros($t, [
- '$title' => L10n::t("Language Filter"),
- '$intro' => L10n::t('This addon tries to identify the language posts are writen in. If it does not match any language specifed below, posts will be hidden by collapsing them.'),
- '$enabled' => ['langfilter_enable', L10n::t('Use the language filter'), $enable_checked, ''],
- '$languages' => ['langfilter_languages', L10n::t('Able to read'), $languages, L10n::t('List of abbreviations (iso2 codes) for languages you speak, comma separated. For example "de,it".')],
- '$minconfidence' => ['langfilter_minconfidence', L10n::t('Minimum confidence in language detection'), $minconfidence, L10n::t('Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.')],
- '$minlength' => ['langfilter_minlength', L10n::t('Minimum length of message body'), $minlength, L10n::t('Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).')],
- '$submit' => L10n::t('Save Settings'),
+ '$title' => DI::l10n()->t("Language Filter"),
+ '$intro' => DI::l10n()->t('This addon tries to identify the language posts are writen in. If it does not match any language specifed below, posts will be hidden by collapsing them.'),
+ '$enabled' => ['langfilter_enable', DI::l10n()->t('Use the language filter'), $enable_checked, ''],
+ '$languages' => ['langfilter_languages', DI::l10n()->t('Able to read'), $languages, DI::l10n()->t('List of abbreviations (iso2 codes) for languages you speak, comma separated. For example "de,it".')],
+ '$minconfidence' => ['langfilter_minconfidence', DI::l10n()->t('Minimum confidence in language detection'), $minconfidence, DI::l10n()->t('Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.')],
+ '$minlength' => ['langfilter_minlength', DI::l10n()->t('Minimum length of message body'), $minlength, DI::l10n()->t('Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).')],
+ '$submit' => DI::l10n()->t('Save Settings'),
]);
return;
@@ -100,7 +100,7 @@ function langfilter_addon_settings_post(App $a, &$b)
}
DI::pConfig()->set(local_user(), 'langfilter', 'minlength', $minlength);
- info(L10n::t('Language Filter Settings saved.') . EOL);
+ info(DI::l10n()->t('Language Filter Settings saved.') . EOL);
}
}
@@ -197,6 +197,6 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data)
}
if (!in_array($iso2, $read_languages_array)) {
- $hook_data['filter_reasons'][] = L10n::t('Filtered language: %s', ucfirst($lang));
+ $hook_data['filter_reasons'][] = DI::l10n()->t('Filtered language: %s', ucfirst($lang));
}
}
diff --git a/libertree/libertree.php b/libertree/libertree.php
index 3fa5f90dc..902442ab8 100644
--- a/libertree/libertree.php
+++ b/libertree/libertree.php
@@ -46,7 +46,7 @@ function libertree_jot_nets(App &$a, array &$jotnets_fields)
'type' => 'checkbox',
'field' => [
'libertree_enable',
- L10n::t('Post to libertree'),
+ DI::l10n()->t('Post to libertree'),
DI::pConfig()->get(local_user(), 'libertree', 'post_by_default')
]
];
@@ -80,36 +80,36 @@ function libertree_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '';
- $s .= '
'. L10n::t('libertree Export').'
';
+ $s .= '
'. DI::l10n()->t('libertree Export').'
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
'. L10n::t('libertree Export').'
';
+ $s .= '
'. DI::l10n()->t('libertree Export').'
';
$s .= '';
$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/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
'.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 .= '
' . DI::l10n()->t('Content Filter (NSFW and more)') . '
';
$s .= '';
$s .= '
';
$s .= '';
- $s .= '
' . L10n::t('Content Filter (NSFW and more)') . '
';
+ $s .= '
' . DI::l10n()->t('Content Filter (NSFW and more)') . '
';
$s .= '';
$s .= '
';
- $s .= '
' . L10n::t('This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.') . '
';
- $s .= '';
+ $s .= '
' . DI::l10n()->t('This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.') . '