mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-28 13:59:32 +00:00
Implemented the ability to set user-defined synonyms/labels for internal element types
* 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. * Anpassung aus Analyse * Entferne alten JSON-basierten Datenquellen-Synonym-Handler Die Verwaltung der Datenquellen-Synonyme wurde überarbeitet, um ein flexibleres und strukturiertes Konzept zu ermöglichen. Der bestehende JSON-basierte Ansatz wurde durch eine neue Service-basierte Architektur ersetzt, die eine bessere Handhabung und Erweiterbarkeit erlaubt. * Ermögliche Rückgabe aller möglichen Sprachoptionen in Verbindung mit den vom Nutzer freigeschalteten. * Removed unnecessary service definition The tag is applied via autoconfiguration * Use default translations for the NotBlank constraint * Started refactoring ElementTypeNameGenerator * Made ElementTypeNameGenerator class readonly * Modified form to work properly with new datastructure * Made the form more beautiful and space saving * Made synonym form even more space saving * Allow to define overrides for any element label there is * Use defined synonyms in ElementTypeNameGenerator * Use ElementTypeNameGenerator where possible * Register synonyms for element types as global translation parameters * Revert changes done to permission layout * Use new synonym system for admin page titles * Removed now unnecessary services * Reworked settings name and translation * Renamed all files to Synonyms * Removed unnecessary translations * Removed unnecessary translations * Fixed duplicate check * Renamed synoynms translations * Use our synonyms for permission translations * Fixed phpstan issue * Added tests --------- Co-authored-by: Marcel Diegelmann <marcel.diegelmann@gmail.com> Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
This commit is contained in:
parent
5e3bd26e27
commit
54f318ecac
43 changed files with 1504 additions and 335 deletions
|
|
@ -1,7 +1,7 @@
|
|||
framework:
|
||||
default_locale: 'en'
|
||||
# Just enable the locales we need for performance reasons.
|
||||
enabled_locale: '%partdb.locale_menu%'
|
||||
enabled_locale: ['en', 'de', 'it', 'fr', 'ru', 'ja', 'cs', 'da', 'zh', 'pl']
|
||||
translator:
|
||||
default_path: '%kernel.project_dir%/translations'
|
||||
fallbacks:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
form_themes: ['bootstrap_5_horizontal_layout.html.twig', 'form/extended_bootstrap_layout.html.twig', 'form/permission_layout.html.twig', 'form/filter_types_layout.html.twig']
|
||||
form_themes: ['bootstrap_5_horizontal_layout.html.twig', 'form/extended_bootstrap_layout.html.twig', 'form/permission_layout.html.twig', 'form/filter_types_layout.html.twig', 'form/synonyms_collection.html.twig']
|
||||
|
||||
paths:
|
||||
'%kernel.project_dir%/assets/css': css
|
||||
|
|
@ -20,4 +20,4 @@ twig:
|
|||
|
||||
when@test:
|
||||
twig:
|
||||
strict_variables: true
|
||||
strict_variables: true
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
|
|||
|
||||
parts: # e.g. this maps to perms_parts in User/Group database
|
||||
group: "data"
|
||||
label: "perm.parts"
|
||||
label: "{{part}}"
|
||||
operations: # Here are all possible operations are listed => the op name is mapped to bit value
|
||||
read:
|
||||
label: "perm.read"
|
||||
|
|
@ -71,7 +71,7 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
|
|||
|
||||
|
||||
storelocations: &PART_CONTAINING
|
||||
label: "perm.storelocations"
|
||||
label: "{{storage_location}}"
|
||||
group: "data"
|
||||
operations:
|
||||
read:
|
||||
|
|
@ -103,39 +103,39 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
|
|||
|
||||
footprints:
|
||||
<<: *PART_CONTAINING
|
||||
label: "perm.part.footprints"
|
||||
label: "{{footprint}}"
|
||||
|
||||
categories:
|
||||
<<: *PART_CONTAINING
|
||||
label: "perm.part.categories"
|
||||
label: "{{category}}"
|
||||
|
||||
suppliers:
|
||||
<<: *PART_CONTAINING
|
||||
label: "perm.part.supplier"
|
||||
label: "{{supplier}}"
|
||||
|
||||
manufacturers:
|
||||
<<: *PART_CONTAINING
|
||||
label: "perm.part.manufacturers"
|
||||
label: "{{manufacturer}}"
|
||||
|
||||
projects:
|
||||
<<: *PART_CONTAINING
|
||||
label: "perm.projects"
|
||||
label: "{{project}}"
|
||||
|
||||
attachment_types:
|
||||
<<: *PART_CONTAINING
|
||||
label: "perm.part.attachment_types"
|
||||
label: "{{attachment_type}}"
|
||||
|
||||
currencies:
|
||||
<<: *PART_CONTAINING
|
||||
label: "perm.currencies"
|
||||
label: "{{currency}}"
|
||||
|
||||
measurement_units:
|
||||
<<: *PART_CONTAINING
|
||||
label: "perm.measurement_units"
|
||||
label: "{{measurement_unit}}"
|
||||
|
||||
part_custom_states:
|
||||
<<: *PART_CONTAINING
|
||||
label: "perm.part_custom_states"
|
||||
label: "{{part_custom_state}}"
|
||||
|
||||
tools:
|
||||
label: "perm.part.tools"
|
||||
|
|
@ -377,4 +377,4 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
|
|||
manage_tokens:
|
||||
label: "perm.api.manage_tokens"
|
||||
alsoSet: ['access_api']
|
||||
apiTokenRole: ROLE_API_FULL
|
||||
apiTokenRole: ROLE_API_FULL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue