mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-24 03:49:31 +00:00
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:
parent
e53b72a8d1
commit
68e7ffa452
34 changed files with 648 additions and 44 deletions
|
|
@ -6,12 +6,34 @@
|
|||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tristate permission-checkbox permission_multicheckbox" id="mulit_check_{{ form.vars.label }}">
|
||||
<label class="form-check-label" for="mulit_check_{{ form.vars.label }}">
|
||||
<b>{{ form.vars.label | trans }}</b>
|
||||
{% set dataSource = '' %}
|
||||
{% if (form.vars.label == 'perm.part.categories') %}
|
||||
{% set dataSource = 'category' %}
|
||||
{% elseif (form.vars.label == 'perm.storelocations') %}
|
||||
{% set dataSource = 'storagelocation' %}
|
||||
{% elseif (form.vars.label == 'perm.part.footprints') %}
|
||||
{% set dataSource = 'footprint' %}
|
||||
{% elseif (form.vars.label == 'perm.part.manufacturers') %}
|
||||
{% set dataSource = 'manufacturer' %}
|
||||
{% elseif (form.vars.label == 'perm.part.supplier') %}
|
||||
{% set dataSource = 'supplier' %}
|
||||
{% elseif (form.vars.label == 'perm.projects') %}
|
||||
{% set dataSource = 'project' %}
|
||||
{% endif %}
|
||||
|
||||
{% set dataSourceName = get_data_source_name(dataSource, form.vars.label) %}
|
||||
{% set translatedSource = form.vars.label|trans %}
|
||||
{% if dataSourceName != translatedSource %}
|
||||
{{ translatedSource }}
|
||||
<i class="fas fa-fw fa-info" title="{{ 'datasource.synonym'|trans({'%name%': '', '%synonym%': dataSourceName })|raw }}"></i>
|
||||
{% else %}
|
||||
{{ translatedSource }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<b>{{ form.vars.label | trans }}</b>
|
||||
<b>def{{ form.vars.label | trans }}</b>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue