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

This commit is contained in:
nupplaPhil 2020-01-18 20:52:34 +01:00
parent af88c2daa3
commit 5dfee31108
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
175 changed files with 2841 additions and 2841 deletions

View file

@ -49,7 +49,7 @@ class Details extends BaseAdminModule
$addon = $a->argv[2];
$addon = Strings::sanitizeFilePathItem($addon);
if (!is_file("addon/$addon/$addon.php")) {
notice(L10n::t('Addon not found.'));
notice(DI::l10n()->t('Addon not found.'));
Addon::uninstall($addon);
DI::baseUrl()->redirect('admin/addons');
}
@ -60,10 +60,10 @@ class Details extends BaseAdminModule
// Toggle addon status
if (Addon::isEnabled($addon)) {
Addon::uninstall($addon);
info(L10n::t('Addon %s disabled.', $addon));
info(DI::l10n()->t('Addon %s disabled.', $addon));
} else {
Addon::install($addon);
info(L10n::t('Addon %s enabled.', $addon));
info(DI::l10n()->t('Addon %s enabled.', $addon));
}
Addon::saveEnabledList();
@ -74,10 +74,10 @@ class Details extends BaseAdminModule
// display addon details
if (Addon::isEnabled($addon)) {
$status = 'on';
$action = L10n::t('Disable');
$action = DI::l10n()->t('Disable');
} else {
$status = 'off';
$action = L10n::t('Enable');
$action = DI::l10n()->t('Enable');
}
$readme = null;
@ -97,18 +97,18 @@ class Details extends BaseAdminModule
$t = Renderer::getMarkupTemplate('admin/addons/details.tpl');
return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'),
'$page' => L10n::t('Addons'),
'$toggle' => L10n::t('Toggle'),
'$settings' => L10n::t('Settings'),
'$title' => DI::l10n()->t('Administration'),
'$page' => DI::l10n()->t('Addons'),
'$toggle' => DI::l10n()->t('Toggle'),
'$settings' => DI::l10n()->t('Settings'),
'$baseurl' => DI::baseUrl()->get(true),
'$addon' => $addon,
'$status' => $status,
'$action' => $action,
'$info' => Addon::getInfo($addon),
'$str_author' => L10n::t('Author: '),
'$str_maintainer' => L10n::t('Maintainer: '),
'$str_author' => DI::l10n()->t('Author: '),
'$str_maintainer' => DI::l10n()->t('Maintainer: '),
'$admin_form' => $admin_form,
'$function' => 'addons',

View file

@ -28,11 +28,11 @@ class Index extends BaseAdminModule
$addon = $_GET['addon'] ?? '';
if (Addon::isEnabled($addon)) {
Addon::uninstall($addon);
info(L10n::t('Addon %s disabled.', $addon));
info(DI::l10n()->t('Addon %s disabled.', $addon));
} elseif (Addon::install($addon)) {
info(L10n::t('Addon %s enabled.', $addon));
info(DI::l10n()->t('Addon %s enabled.', $addon));
} else {
info(L10n::t('Addon %s failed to install.', $addon));
info(DI::l10n()->t('Addon %s failed to install.', $addon));
}
break;
@ -46,15 +46,15 @@ class Index extends BaseAdminModule
$t = Renderer::getMarkupTemplate('admin/addons/index.tpl');
return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'),
'$page' => L10n::t('Addons'),
'$submit' => L10n::t('Save Settings'),
'$reload' => L10n::t('Reload active addons'),
'$title' => DI::l10n()->t('Administration'),
'$page' => DI::l10n()->t('Addons'),
'$submit' => DI::l10n()->t('Save Settings'),
'$reload' => DI::l10n()->t('Reload active addons'),
'$baseurl' => DI::baseUrl()->get(true),
'$function' => 'addons',
'$addons' => $addons,
'$pcount' => count($addons),
'$noplugshint' => L10n::t('There are currently no addons available on your node. You can find the official addon repository at %1$s and might find other interesting addons in the open addon registry at %2$s', 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'),
'$noplugshint' => DI::l10n()->t('There are currently no addons available on your node. You can find the official addon repository at %1$s and might find other interesting addons in the open addon registry at %2$s', 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'),
'$form_security_token' => parent::getFormSecurityToken('admin_addons'),
]);
}