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

This commit is contained in:
nupplaPhil 2020-01-18 20:52:33 +01:00
parent 1eb23e3667
commit 48fecb9a40
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
71 changed files with 721 additions and 721 deletions

View file

@ -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 .= '<span id="settings_xmpp_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_xmpp_expanded\'); openClose(\'settings_xmpp_inflated\');">';
$s .= '<h3>' . L10n::t('XMPP-Chat (Jabber)') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('XMPP-Chat (Jabber)') . '</h3>';
$s .= '</span>';
$s .= '<div id="settings_xmpp_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_xmpp_expanded\'); openClose(\'settings_xmpp_inflated\');">';
$s .= '<h3>' . L10n::t('XMPP-Chat (Jabber)') . '</h3>';
$s .= '<h3>' . DI::l10n()->t('XMPP-Chat (Jabber)') . '</h3>';
$s .= '</span>';
$s .= '<div id="xmpp-settings-wrapper">';
$s .= '<label id="xmpp-enabled-label" for="xmpp-enabled">' . L10n::t('Enable Webchat') . '</label>';
$s .= '<label id="xmpp-enabled-label" for="xmpp-enabled">' . DI::l10n()->t('Enable Webchat') . '</label>';
$s .= '<input id="xmpp-enabled" type="checkbox" name="xmpp_enabled" value="1" ' . $enabled_checked . '/>';
$s .= '<div class="clear"></div>';
if (Config::get("xmpp", "central_userbase")) {
$s .= '<label id="xmpp-individual-label" for="xmpp-individual">' . L10n::t('Individual Credentials') . '</label>';
$s .= '<label id="xmpp-individual-label" for="xmpp-individual">' . DI::l10n()->t('Individual Credentials') . '</label>';
$s .= '<input id="xmpp-individual" type="checkbox" name="xmpp_individual" value="1" ' . $individual_checked . '/>';
$s .= '<div class="clear"></div>';
}
if (!Config::get("xmpp", "central_userbase") || DI::pConfig()->get(local_user(), "xmpp", "individual")) {
$s .= '<label id="xmpp-bosh-proxy-label" for="xmpp-bosh-proxy">' . L10n::t('Jabber BOSH host') . '</label>';
$s .= '<label id="xmpp-bosh-proxy-label" for="xmpp-bosh-proxy">' . DI::l10n()->t('Jabber BOSH host') . '</label>';
$s .= ' <input id="xmpp-bosh-proxy" type="text" name="xmpp_bosh_proxy" value="' . $bosh_proxy . '" />';
$s .= '<div class="clear"></div>';
}
@ -94,7 +94,7 @@ function xmpp_addon_settings(App $a, &$s)
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="xmpp-settings-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="xmpp-settings-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
}
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)