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

@ -25,7 +25,7 @@ class Compose extends BaseModule
require_once 'mod/item.php';
item_post(DI::app());
} else {
notice(L10n::t('Please enter a post body.'));
notice(DI::l10n()->t('Please enter a post body.'));
}
}
@ -38,7 +38,7 @@ class Compose extends BaseModule
$a = DI::app();
if ($a->getCurrentTheme() !== 'frio') {
throw new NotImplementedException(L10n::t('This feature is only available with the frio theme.'));
throw new NotImplementedException(DI::l10n()->t('This feature is only available with the frio theme.'));
}
/// @TODO Retrieve parameter from router
@ -65,7 +65,7 @@ class Compose extends BaseModule
switch ($posttype) {
case Item::PT_PERSONAL_NOTE:
$compose_title = L10n::t('Compose new personal note');
$compose_title = DI::l10n()->t('Compose new personal note');
$type = 'note';
$doesFederate = false;
$contact_allow_list = [$a->contact['id']];
@ -74,7 +74,7 @@ class Compose extends BaseModule
$group_deny_list = [];
break;
default:
$compose_title = L10n::t('Compose new post');
$compose_title = DI::l10n()->t('Compose new post');
$type = 'post';
$doesFederate = true;
@ -114,33 +114,33 @@ class Compose extends BaseModule
$tpl = Renderer::getMarkupTemplate('item/compose.tpl');
return Renderer::replaceMacros($tpl, [
'$compose_title'=> $compose_title,
'$visibility_title'=> L10n::t('Visibility'),
'$visibility_title'=> DI::l10n()->t('Visibility'),
'$id' => 0,
'$posttype' => $posttype,
'$type' => $type,
'$wall' => $wall,
'$default' => '',
'$mylink' => DI::baseUrl()->remove($a->contact['url']),
'$mytitle' => L10n::t('This is you'),
'$mytitle' => DI::l10n()->t('This is you'),
'$myphoto' => DI::baseUrl()->remove($a->contact['thumb']),
'$submit' => L10n::t('Submit'),
'$edbold' => L10n::t('Bold'),
'$editalic' => L10n::t('Italic'),
'$eduline' => L10n::t('Underline'),
'$edquote' => L10n::t('Quote'),
'$edcode' => L10n::t('Code'),
'$edimg' => L10n::t('Image'),
'$edurl' => L10n::t('Link'),
'$edattach' => L10n::t('Link or Media'),
'$prompttext' => L10n::t('Please enter a image/video/audio/webpage URL:'),
'$preview' => L10n::t('Preview'),
'$location_set' => L10n::t('Set your location'),
'$location_clear' => L10n::t('Clear the location'),
'$location_unavailable' => L10n::t('Location services are unavailable on your device'),
'$location_disabled' => L10n::t('Location services are disabled. Please check the website\'s permissions on your device'),
'$wait' => L10n::t('Please wait'),
'$placeholdertitle' => L10n::t('Set title'),
'$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? L10n::t('Categories (comma-separated list)') : ''),
'$submit' => DI::l10n()->t('Submit'),
'$edbold' => DI::l10n()->t('Bold'),
'$editalic' => DI::l10n()->t('Italic'),
'$eduline' => DI::l10n()->t('Underline'),
'$edquote' => DI::l10n()->t('Quote'),
'$edcode' => DI::l10n()->t('Code'),
'$edimg' => DI::l10n()->t('Image'),
'$edurl' => DI::l10n()->t('Link'),
'$edattach' => DI::l10n()->t('Link or Media'),
'$prompttext' => DI::l10n()->t('Please enter a image/video/audio/webpage URL:'),
'$preview' => DI::l10n()->t('Preview'),
'$location_set' => DI::l10n()->t('Set your location'),
'$location_clear' => DI::l10n()->t('Clear the location'),
'$location_unavailable' => DI::l10n()->t('Location services are unavailable on your device'),
'$location_disabled' => DI::l10n()->t('Location services are disabled. Please check the website\'s permissions on your device'),
'$wait' => DI::l10n()->t('Please wait'),
'$placeholdertitle' => DI::l10n()->t('Set title'),
'$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? DI::l10n()->t('Categories (comma-separated list)') : ''),
'$title' => $title,
'$category' => $category,
@ -153,7 +153,7 @@ class Compose extends BaseModule
'$group_deny' => implode(',', $group_deny_list),
'$jotplugins' => $jotplugins,
'$sourceapp' => L10n::t($a->sourcename),
'$sourceapp' => DI::l10n()->t($a->sourcename),
'$rand_num' => Crypto::randomDigits(12),
'$acl_selector' => ACL::getFullSelectorHTML(DI::page(), $a->user, $doesFederate, [
'allow_cid' => $contact_allow_list,