Implementiere bevorzugte Sprachauswahl und Datenquellen-Synonyme

Die Spracheinstellungen/System-Settings wurden um die Möglichkeit ergänzt, bevorzugte Sprachen für die Dropdown-Menüs festzulegen. Zudem wurde ein Datenquellen-Synonymsystem implementiert, um benutzerfreundlichere Bezeichnungen anzuzeigen und zu personalisieren.
This commit is contained in:
Marcel Diegelmann 2025-10-15 12:33:05 +02:00
parent e53b72a8d1
commit 68e7ffa452
34 changed files with 648 additions and 44 deletions

View file

@ -0,0 +1,37 @@
<?php
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2024 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace App\Settings\SystemSettings;
enum PreferredLocales: string
{
case EN = 'en';
case DE = 'de';
case IT = 'it';
case FR = 'fr';
case RU = 'ru';
case JA = 'ja';
case CS = 'cs';
case DA = 'da';
case ZH = 'zh';
case PL = 'pl';
}

View file

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace App\Settings\SystemSettings;
use Jbtronics\SettingsBundle\Settings\EmbeddedSettings;
use App\Settings\BehaviorSettings\DataSourceSynonymsSettings;
use Jbtronics\SettingsBundle\Settings\Settings;
use Symfony\Component\Translation\TranslatableMessage as TM;
@ -33,6 +34,9 @@ class SystemSettings
#[EmbeddedSettings()]
public ?LocalizationSettings $localization = null;
#[EmbeddedSettings]
public ?DataSourceSynonymsSettings $dataSourceSynonyms = null;
#[EmbeddedSettings()]
public ?CustomizationSettings $customization = null;