mirror of
https://github.com/friendica/friendica
synced 2025-04-19 06:30:10 +00:00
Move L10n::t() calls to DI::l10n()->t() calls
This commit is contained in:
parent
af88c2daa3
commit
5dfee31108
175 changed files with 2841 additions and 2841 deletions
|
@ -30,7 +30,7 @@ class DBSync extends BaseAdminModule
|
|||
if (intval($curr) == $update) {
|
||||
Config::set('system', 'build', intval($curr) + 1);
|
||||
}
|
||||
info(L10n::t('Update has been marked successful') . EOL);
|
||||
info(DI::l10n()->t('Update has been marked successful') . EOL);
|
||||
}
|
||||
DI::baseUrl()->redirect('admin/dbsync');
|
||||
}
|
||||
|
@ -40,11 +40,11 @@ class DBSync extends BaseAdminModule
|
|||
// @TODO Seems like a similar logic like Update::check()
|
||||
$retval = DBStructure::update($a->getBasePath(), false, true);
|
||||
if ($retval === '') {
|
||||
$o .= L10n::t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "<br />";
|
||||
$o .= DI::l10n()->t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "<br />";
|
||||
Config::set('database', 'last_successful_update', DB_UPDATE_VERSION);
|
||||
Config::set('database', 'last_successful_update_time', time());
|
||||
} else {
|
||||
$o .= L10n::t("Executing of database structure update %s failed with error: %s", DB_UPDATE_VERSION, $retval) . "<br />";
|
||||
$o .= DI::l10n()->t("Executing of database structure update %s failed with error: %s", DB_UPDATE_VERSION, $retval) . "<br />";
|
||||
}
|
||||
if ($a->argv[2] === 'check') {
|
||||
return $o;
|
||||
|
@ -61,15 +61,15 @@ class DBSync extends BaseAdminModule
|
|||
$retval = $func();
|
||||
|
||||
if ($retval === Update::FAILED) {
|
||||
$o .= L10n::t("Executing %s failed with error: %s", $func, $retval);
|
||||
$o .= DI::l10n()->t("Executing %s failed with error: %s", $func, $retval);
|
||||
} elseif ($retval === Update::SUCCESS) {
|
||||
$o .= L10n::t('Update %s was successfully applied.', $func);
|
||||
$o .= DI::l10n()->t('Update %s was successfully applied.', $func);
|
||||
Config::set('database', $func, 'success');
|
||||
} else {
|
||||
$o .= L10n::t('Update %s did not return a status. Unknown if it succeeded.', $func);
|
||||
$o .= DI::l10n()->t('Update %s did not return a status. Unknown if it succeeded.', $func);
|
||||
}
|
||||
} else {
|
||||
$o .= L10n::t('There was no additional update function %s that needed to be called.', $func) . "<br />";
|
||||
$o .= DI::l10n()->t('There was no additional update function %s that needed to be called.', $func) . "<br />";
|
||||
Config::set('database', $func, 'success');
|
||||
}
|
||||
|
||||
|
@ -89,16 +89,16 @@ class DBSync extends BaseAdminModule
|
|||
if (!count($failed)) {
|
||||
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('admin/dbsync/structure_check.tpl'), [
|
||||
'$base' => DI::baseUrl()->get(true),
|
||||
'$banner' => L10n::t('No failed updates.'),
|
||||
'$check' => L10n::t('Check database structure'),
|
||||
'$banner' => DI::l10n()->t('No failed updates.'),
|
||||
'$check' => DI::l10n()->t('Check database structure'),
|
||||
]);
|
||||
} else {
|
||||
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('admin/dbsync/failed_updates.tpl'), [
|
||||
'$base' => DI::baseUrl()->get(true),
|
||||
'$banner' => L10n::t('Failed Updates'),
|
||||
'$desc' => L10n::t('This does not include updates prior to 1139, which did not return a status.'),
|
||||
'$mark' => L10n::t("Mark success \x28if update was manually applied\x29"),
|
||||
'$apply' => L10n::t('Attempt to execute this update step automatically'),
|
||||
'$banner' => DI::l10n()->t('Failed Updates'),
|
||||
'$desc' => DI::l10n()->t('This does not include updates prior to 1139, which did not return a status.'),
|
||||
'$mark' => DI::l10n()->t("Mark success \x28if update was manually applied\x29"),
|
||||
'$apply' => DI::l10n()->t('Attempt to execute this update step automatically'),
|
||||
'$failed' => $failed
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue