even more language migration/fixing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -37,9 +37,9 @@ return [
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'standardlanguage',
|
||||
'type' => 'select',
|
||||
'default' => 'English',
|
||||
'default' => 'en',
|
||||
'option_options_method' => [
|
||||
'\\Froxlor\\User',
|
||||
'\\Froxlor\\Language',
|
||||
'getLanguages'
|
||||
],
|
||||
'save_method' => 'storeSettingField'
|
||||
|
||||
@@ -108,7 +108,7 @@ return [
|
||||
'dkim_keylength' => [
|
||||
'label' => [
|
||||
'title' => lng('dkim.dkim_keylength.title'),
|
||||
'description' => sprintf(lng('dkim.dkim_keylength.description'), Settings::Get('dkim.dkim_prefix'))
|
||||
'description' => lng('dkim.dkim_keylength.description', [Settings::Get('dkim.dkim_prefix')])
|
||||
],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_keylength',
|
||||
|
||||
@@ -39,7 +39,6 @@ use Froxlor\UI\Panel\UI;
|
||||
use Froxlor\UI\Request;
|
||||
use Froxlor\UI\Response;
|
||||
use Froxlor\Validate\Validate;
|
||||
use PDO;
|
||||
|
||||
class Ajax
|
||||
{
|
||||
|
||||
@@ -70,6 +70,13 @@ class Language
|
||||
}
|
||||
}
|
||||
|
||||
// shortcut for identifier with => [title, description]
|
||||
if (!isset(self::$lng[$identifier]) && isset(self::$lng[$identifier . '.title'])) {
|
||||
return [
|
||||
'title' => vsprintf(self::$lng[$identifier . '.title'] ?? $identifier, $arguments),
|
||||
'description' => vsprintf(self::$lng[$identifier . '.description'] ?? $identifier, $arguments),
|
||||
];
|
||||
}
|
||||
// search by identifier
|
||||
return vsprintf(self::$lng[$identifier] ?? $identifier, $arguments);
|
||||
}
|
||||
|
||||
@@ -84,20 +84,6 @@ class User
|
||||
return $returnval;
|
||||
}
|
||||
|
||||
public static function getLanguages()
|
||||
{
|
||||
$result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_LANGUAGE . "` ");
|
||||
$languages_array = [];
|
||||
|
||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
if (!isset($languages_array[$row['language']]) && !in_array($row['language'], $languages_array)) {
|
||||
$languages_array[$row['language']] = html_entity_decode($row['language']);
|
||||
}
|
||||
}
|
||||
|
||||
return $languages_array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function which updates all counters of used resources in panel_admins and panel_customers
|
||||
*
|
||||
|
||||
@@ -35,6 +35,7 @@ if (!file_exists('./userdata.inc.php')) {
|
||||
die();
|
||||
}
|
||||
require_once dirname(__DIR__) . '/lib/userdata.inc.php';
|
||||
require_once dirname(__DIR__) . '/lib/functions.php';
|
||||
require_once dirname(__DIR__) . '/lib/tables.inc.php';
|
||||
|
||||
// Return response
|
||||
|
||||
@@ -1011,9 +1011,6 @@ Vielen Dank, Ihr Administrator',
|
||||
'subject' => 'Froxlor - 2FA Code',
|
||||
],
|
||||
],
|
||||
'menu' => [
|
||||
'message' => 'Nachrichten',
|
||||
],
|
||||
'menue' => [
|
||||
'main' => [
|
||||
'main' => 'Allgemein',
|
||||
|
||||
@@ -1308,9 +1308,6 @@ Yours sincerely, your administrator',
|
||||
'subject' => 'Froxlor - 2FA Code',
|
||||
],
|
||||
],
|
||||
'menu' => [
|
||||
'message' => 'Messages',
|
||||
],
|
||||
'menue' => [
|
||||
'main' => [
|
||||
'main' => 'Main',
|
||||
|
||||
Reference in New Issue
Block a user