Use name "project" instead of "device" everywhere in the frontend

This commit is contained in:
Jan Böhmer 2023-01-08 19:36:56 +01:00
parent 897ea72bd0
commit 513e7f3851
12 changed files with 47 additions and 47 deletions

View file

@ -80,7 +80,7 @@ class AttachmentFilterType extends AbstractType
'attachment_type.label' => AttachmentTypeAttachment::class, 'attachment_type.label' => AttachmentTypeAttachment::class,
'category.label' => CategoryAttachment::class, 'category.label' => CategoryAttachment::class,
'currency.label' => CurrencyAttachment::class, 'currency.label' => CurrencyAttachment::class,
'device.label' => ProjectAttachment::class, 'project.label' => ProjectAttachment::class,
'footprint.label' => FootprintAttachment::class, 'footprint.label' => FootprintAttachment::class,
'group.label' => GroupAttachment::class, 'group.label' => GroupAttachment::class,
'label_profile.label' => LabelAttachment::class, 'label_profile.label' => LabelAttachment::class,

View file

@ -137,7 +137,7 @@ class LogFilterType extends AbstractType
'attachment.label' => AbstractLogEntry::targetTypeClassToID(Attachment::class), 'attachment.label' => AbstractLogEntry::targetTypeClassToID(Attachment::class),
'attachment_type.label' => AbstractLogEntry::targetTypeClassToID(AttachmentType::class), 'attachment_type.label' => AbstractLogEntry::targetTypeClassToID(AttachmentType::class),
'category.label' => AbstractLogEntry::targetTypeClassToID(Category::class), 'category.label' => AbstractLogEntry::targetTypeClassToID(Category::class),
'device.label' => AbstractLogEntry::targetTypeClassToID(Project::class), 'project.label' => AbstractLogEntry::targetTypeClassToID(Project::class),
'device_part.label' => AbstractLogEntry::targetTypeClassToID(ProjectBOMEntry::class), 'device_part.label' => AbstractLogEntry::targetTypeClassToID(ProjectBOMEntry::class),
'footprint.label' => AbstractLogEntry::targetTypeClassToID(Footprint::class), 'footprint.label' => AbstractLogEntry::targetTypeClassToID(Footprint::class),
'group.label' => AbstractLogEntry::targetTypeClassToID(Group::class), 'group.label' => AbstractLogEntry::targetTypeClassToID(Group::class),

View file

@ -60,7 +60,7 @@ class ElementTypeNameGenerator
Attachment::class => $this->translator->trans('attachment.label'), Attachment::class => $this->translator->trans('attachment.label'),
Category::class => $this->translator->trans('category.label'), Category::class => $this->translator->trans('category.label'),
AttachmentType::class => $this->translator->trans('attachment_type.label'), AttachmentType::class => $this->translator->trans('attachment_type.label'),
Project::class => $this->translator->trans('device.label'), Project::class => $this->translator->trans('project.label'),
ProjectBOMEntry::class => $this->translator->trans('project_bom_entry.label'), ProjectBOMEntry::class => $this->translator->trans('project_bom_entry.label'),
Footprint::class => $this->translator->trans('footprint.label'), Footprint::class => $this->translator->trans('footprint.label'),
Manufacturer::class => $this->translator->trans('manufacturer.label'), Manufacturer::class => $this->translator->trans('manufacturer.label'),

View file

@ -158,7 +158,7 @@ class ToolsTreeBuilder
} }
if ($this->security->isGranted('read', new Project())) { if ($this->security->isGranted('read', new Project())) {
$nodes[] = (new TreeViewNode( $nodes[] = (new TreeViewNode(
$this->translator->trans('tree.tools.edit.devices'), $this->translator->trans('tree.tools.edit.projects'),
$this->urlGenerator->generate('device_new') $this->urlGenerator->generate('device_new')
))->setIcon('fa-fw fa-treeview fa-solid fa-archive'); ))->setIcon('fa-fw fa-treeview fa-solid fa-archive');
} }

View file

@ -162,7 +162,7 @@ class TreeViewGenerator
case Supplier::class: case Supplier::class:
return $this->translator->trans('supplier.labelp'); return $this->translator->trans('supplier.labelp');
case Project::class: case Project::class:
return $this->translator->trans('device.labelp'); return $this->translator->trans('project.labelp');
default: default:
return $this->translator->trans('tree.root_node.text'); return $this->translator->trans('tree.root_node.text');
} }

View file

@ -3,15 +3,15 @@
{# @var entity App\Entity\ProjectSystem\Project #} {# @var entity App\Entity\ProjectSystem\Project #}
{% block card_title %} {% block card_title %}
<i class="fas fa-archive fa-fw"></i> {% trans %}device.caption{% endtrans %} <i class="fas fa-archive fa-fw"></i> {% trans %}project.caption{% endtrans %}
{% endblock %} {% endblock %}
{% block edit_title %} {% block edit_title %}
{% trans %}device.edit{% endtrans %}: {{ entity.name }} {% trans %}project.edit{% endtrans %}: {{ entity.name }}
{% endblock %} {% endblock %}
{% block new_title %} {% block new_title %}
{% trans %}device.new{% endtrans %} {% trans %}project.new{% endtrans %}
{% endblock %} {% endblock %}
{% block additional_pills %} {% block additional_pills %}

View file

@ -98,7 +98,7 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" id="projects-tab" data-bs-toggle="tab" href="#projects" role="tab"> <a class="nav-link" id="projects-tab" data-bs-toggle="tab" href="#projects" role="tab">
<i class="fas fa-archive fa-fw"></i> <i class="fas fa-archive fa-fw"></i>
{% trans %}device.labelp{% endtrans %} {% trans %}project.labelp{% endtrans %}
<span class="badge bg-secondary">{{ part.projectBomEntries | length }}</span> <span class="badge bg-secondary">{{ part.projectBomEntries | length }}</span>
</a> </a>
</li> </li>

View file

@ -12,7 +12,7 @@
{% else %} {% else %}
{{ helper.entity_icon(project, "me-1") }} {{ helper.entity_icon(project, "me-1") }}
{% endif %} {% endif %}
{% trans %}device.label{% endtrans %}:&nbsp;<b>{{ project.name }}</b> {% trans %}project.label{% endtrans %}:&nbsp;<b>{{ project.name }}</b>
</button> </button>
</div> </div>
<div id="entityInfo" class="accordion-collapse collapse show" data-bs-parent="#listAccordion"> <div id="entityInfo" class="accordion-collapse collapse show" data-bs-parent="#listAccordion">

View file

@ -6,7 +6,7 @@
['footprints', path('tree_footprint_root'), 'footprint.labelp', is_granted('@footprints.read') and is_granted('@parts.read')], ['footprints', path('tree_footprint_root'), 'footprint.labelp', is_granted('@footprints.read') and is_granted('@parts.read')],
['manufacturers', path('tree_manufacturer_root'), 'manufacturer.labelp', is_granted('@manufacturers.read') and is_granted('@parts.read')], ['manufacturers', path('tree_manufacturer_root'), 'manufacturer.labelp', is_granted('@manufacturers.read') and is_granted('@parts.read')],
['suppliers', path('tree_supplier_root'), 'supplier.labelp', is_granted('@suppliers.read') and is_granted('@parts.read')], ['suppliers', path('tree_supplier_root'), 'supplier.labelp', is_granted('@suppliers.read') and is_granted('@parts.read')],
['devices', path('tree_device_root'), 'device.labelp', is_granted('@devices.read')], ['devices', path('tree_device_root'), 'project.labelp', is_granted('@devices.read')],
['tools', path('tree_tools'), 'tools.label', true], ['tools', path('tree_tools'), 'tools.label', true],
] %} ] %}

View file

@ -96,7 +96,7 @@
"attachment_type": ["fa-solid fa-file-alt", "attachment_type.label"], "attachment_type": ["fa-solid fa-file-alt", "attachment_type.label"],
"category": ["fa-solid fa-tags", "category.label"], "category": ["fa-solid fa-tags", "category.label"],
"currency": ["fa-solid fa-coins", "currency.label"], "currency": ["fa-solid fa-coins", "currency.label"],
"device": ["fa-solid fa-archive", "device.label"], "device": ["fa-solid fa-archive", "project.label"],
"footprint": ["fa-solid fa-microchip", "footprint.label"], "footprint": ["fa-solid fa-microchip", "footprint.label"],
"group": ["fa-solid fa-users", "group.label"], "group": ["fa-solid fa-users", "group.label"],
"label_profile": ["fa-solid fa-qrcode", "label_profile.label"], "label_profile": ["fa-solid fa-qrcode", "label_profile.label"],

View file

@ -147,35 +147,35 @@
<target>Neue Währung</target> <target>Neue Währung</target>
</segment> </segment>
</unit> </unit>
<unit id="tlgOYB5" name="device.caption"> <unit id="tlgOYB5" name="project.caption">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4</note> <note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4</note>
<note priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4</note> <note priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4</note>
<note priority="1">templates\AdminPages\DeviceAdmin.html.twig:4</note> <note priority="1">templates\AdminPages\DeviceAdmin.html.twig:4</note>
</notes> </notes>
<segment state="translated"> <segment state="translated">
<source>device.caption</source> <source>project.caption</source>
<target>Baugruppen</target> <target>Projekte</target>
</segment> </segment>
</unit> </unit>
<unit id="fu1Uc_k" name="device.edit"> <unit id="fu1Uc_k" name="project.edit">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:8</note> <note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:8</note>
<note category="state" priority="1">new</note> <note category="state" priority="1">new</note>
</notes> </notes>
<segment state="translated"> <segment state="translated">
<source>device.edit</source> <source>project.edit</source>
<target>Bearbeite Baugruppe</target> <target>Bearbeite Projekt</target>
</segment> </segment>
</unit> </unit>
<unit id="2z6Gm_r" name="device.new"> <unit id="2z6Gm_r" name="project.new">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:12</note> <note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:12</note>
<note category="state" priority="1">new</note> <note category="state" priority="1">new</note>
</notes> </notes>
<segment state="translated"> <segment state="translated">
<source>device.new</source> <source>project.new</source>
<target>Neue Baugruppe</target> <target>Neues Projekt</target>
</segment> </segment>
</unit> </unit>
<unit id="lQ8QeGr" name="search.placeholder"> <unit id="lQ8QeGr" name="search.placeholder">
@ -4094,7 +4094,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr
<target>Los!</target> <target>Los!</target>
</segment> </segment>
</unit> </unit>
<unit id="g6tt4u1" name="device.labelp"> <unit id="g6tt4u1" name="project.labelp">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\templates\_sidebar.html.twig:37</note> <note category="file-source" priority="1">Part-DB1\templates\_sidebar.html.twig:37</note>
<note category="file-source" priority="1">Part-DB1\templates\_sidebar.html.twig:12</note> <note category="file-source" priority="1">Part-DB1\templates\_sidebar.html.twig:12</note>
@ -4106,8 +4106,8 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr
<note priority="1">templates\base.html.twig:230</note> <note priority="1">templates\base.html.twig:230</note>
</notes> </notes>
<segment state="translated"> <segment state="translated">
<source>device.labelp</source> <source>project.labelp</source>
<target>Baugruppen</target> <target>Projekte</target>
</segment> </segment>
</unit> </unit>
<unit id="Kw3N1AA" name="actions"> <unit id="Kw3N1AA" name="actions">
@ -6024,14 +6024,14 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr
<target>Ahangstyp</target> <target>Ahangstyp</target>
</segment> </segment>
</unit> </unit>
<unit id="uR5eAkv" name="device.label"> <unit id="uR5eAkv" name="project.label">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\src\Services\ElementTypeNameGenerator.php:82</note> <note category="file-source" priority="1">Part-DB1\src\Services\ElementTypeNameGenerator.php:82</note>
<note priority="1">Part-DB1\src\Services\ElementTypeNameGenerator.php:82</note> <note priority="1">Part-DB1\src\Services\ElementTypeNameGenerator.php:82</note>
</notes> </notes>
<segment state="translated"> <segment state="translated">
<source>device.label</source> <source>project.label</source>
<target>Baugruppe</target> <target>Projekt</target>
</segment> </segment>
</unit> </unit>
<unit id="QPnDbnv" name="measurement_unit.label"> <unit id="QPnDbnv" name="measurement_unit.label">
@ -6214,15 +6214,15 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr
<target>Kategorien</target> <target>Kategorien</target>
</segment> </segment>
</unit> </unit>
<unit id="b2pLmAq" name="tree.tools.edit.devices"> <unit id="b2pLmAq" name="tree.tools.edit.projects">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:161</note> <note category="file-source" priority="1">Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:161</note>
<note priority="1">Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:138</note> <note priority="1">Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:138</note>
<note priority="1">src\Services\ToolsTreeBuilder.php:66</note> <note priority="1">src\Services\ToolsTreeBuilder.php:66</note>
</notes> </notes>
<segment state="translated"> <segment state="translated">
<source>tree.tools.edit.devices</source> <source>tree.tools.edit.projects</source>
<target>Baugruppen</target> <target>Projekte</target>
</segment> </segment>
</unit> </unit>
<unit id="BFfweU_" name="tree.tools.edit.suppliers"> <unit id="BFfweU_" name="tree.tools.edit.suppliers">

View file

@ -147,35 +147,35 @@
<target>New currency</target> <target>New currency</target>
</segment> </segment>
</unit> </unit>
<unit id="tlgOYB5" name="device.caption"> <unit id="tlgOYB5" name="project.caption">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4</note> <note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4</note>
<note priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4</note> <note priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4</note>
<note priority="1">templates\AdminPages\DeviceAdmin.html.twig:4</note> <note priority="1">templates\AdminPages\DeviceAdmin.html.twig:4</note>
</notes> </notes>
<segment> <segment>
<source>device.caption</source> <source>project.caption</source>
<target>Device</target> <target>Project</target>
</segment> </segment>
</unit> </unit>
<unit id="fu1Uc_k" name="device.edit"> <unit id="fu1Uc_k" name="project.edit">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:8</note> <note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:8</note>
<note category="state" priority="1">new</note> <note category="state" priority="1">new</note>
</notes> </notes>
<segment> <segment>
<source>device.edit</source> <source>project.edit</source>
<target>Edit device</target> <target>Edit project</target>
</segment> </segment>
</unit> </unit>
<unit id="2z6Gm_r" name="device.new"> <unit id="2z6Gm_r" name="project.new">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:12</note> <note category="file-source" priority="1">Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:12</note>
<note category="state" priority="1">new</note> <note category="state" priority="1">new</note>
</notes> </notes>
<segment> <segment>
<source>device.new</source> <source>project.new</source>
<target>New device</target> <target>New project</target>
</segment> </segment>
</unit> </unit>
<unit id="lQ8QeGr" name="search.placeholder"> <unit id="lQ8QeGr" name="search.placeholder">
@ -4095,7 +4095,7 @@ If you have done this incorrectly or if a computer is no longer trusted, you can
<target>Go!</target> <target>Go!</target>
</segment> </segment>
</unit> </unit>
<unit id="g6tt4u1" name="device.labelp"> <unit id="g6tt4u1" name="project.labelp">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\templates\_sidebar.html.twig:37</note> <note category="file-source" priority="1">Part-DB1\templates\_sidebar.html.twig:37</note>
<note category="file-source" priority="1">Part-DB1\templates\_sidebar.html.twig:12</note> <note category="file-source" priority="1">Part-DB1\templates\_sidebar.html.twig:12</note>
@ -4107,8 +4107,8 @@ If you have done this incorrectly or if a computer is no longer trusted, you can
<note priority="1">templates\base.html.twig:230</note> <note priority="1">templates\base.html.twig:230</note>
</notes> </notes>
<segment> <segment>
<source>device.labelp</source> <source>project.labelp</source>
<target>Devices</target> <target>Projects</target>
</segment> </segment>
</unit> </unit>
<unit id="Kw3N1AA" name="actions"> <unit id="Kw3N1AA" name="actions">
@ -6025,13 +6025,13 @@ If you have done this incorrectly or if a computer is no longer trusted, you can
<target>Attachment type</target> <target>Attachment type</target>
</segment> </segment>
</unit> </unit>
<unit id="uR5eAkv" name="device.label"> <unit id="uR5eAkv" name="project.label">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\src\Services\ElementTypeNameGenerator.php:82</note> <note category="file-source" priority="1">Part-DB1\src\Services\ElementTypeNameGenerator.php:82</note>
<note priority="1">Part-DB1\src\Services\ElementTypeNameGenerator.php:82</note> <note priority="1">Part-DB1\src\Services\ElementTypeNameGenerator.php:82</note>
</notes> </notes>
<segment> <segment>
<source>device.label</source> <source>project.label</source>
<target>Project</target> <target>Project</target>
</segment> </segment>
</unit> </unit>
@ -6215,15 +6215,15 @@ If you have done this incorrectly or if a computer is no longer trusted, you can
<target>Categories</target> <target>Categories</target>
</segment> </segment>
</unit> </unit>
<unit id="b2pLmAq" name="tree.tools.edit.devices"> <unit id="b2pLmAq" name="tree.tools.edit.projects">
<notes> <notes>
<note category="file-source" priority="1">Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:161</note> <note category="file-source" priority="1">Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:161</note>
<note priority="1">Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:138</note> <note priority="1">Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:138</note>
<note priority="1">src\Services\ToolsTreeBuilder.php:66</note> <note priority="1">src\Services\ToolsTreeBuilder.php:66</note>
</notes> </notes>
<segment> <segment>
<source>tree.tools.edit.devices</source> <source>tree.tools.edit.projects</source>
<target>Devices</target> <target>Projects</target>
</segment> </segment>
</unit> </unit>
<unit id="BFfweU_" name="tree.tools.edit.suppliers"> <unit id="BFfweU_" name="tree.tools.edit.suppliers">