From 513e7f3851880965dfaa900cf48eef804293b4e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 8 Jan 2023 19:36:56 +0100 Subject: [PATCH] Use name "project" instead of "device" everywhere in the frontend --- src/Form/Filters/AttachmentFilterType.php | 2 +- src/Form/Filters/LogFilterType.php | 2 +- src/Services/ElementTypeNameGenerator.php | 2 +- src/Services/Trees/ToolsTreeBuilder.php | 2 +- src/Services/Trees/TreeViewGenerator.php | 2 +- templates/AdminPages/DeviceAdmin.html.twig | 6 ++-- templates/Parts/info/show_part_info.html.twig | 2 +- templates/Projects/info/_info_card.html.twig | 2 +- templates/components/tree_macros.html.twig | 2 +- templates/helper.twig | 2 +- translations/messages.de.xlf | 36 +++++++++---------- translations/messages.en.xlf | 34 +++++++++--------- 12 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/Form/Filters/AttachmentFilterType.php b/src/Form/Filters/AttachmentFilterType.php index 6ef03220..57967be7 100644 --- a/src/Form/Filters/AttachmentFilterType.php +++ b/src/Form/Filters/AttachmentFilterType.php @@ -80,7 +80,7 @@ class AttachmentFilterType extends AbstractType 'attachment_type.label' => AttachmentTypeAttachment::class, 'category.label' => CategoryAttachment::class, 'currency.label' => CurrencyAttachment::class, - 'device.label' => ProjectAttachment::class, + 'project.label' => ProjectAttachment::class, 'footprint.label' => FootprintAttachment::class, 'group.label' => GroupAttachment::class, 'label_profile.label' => LabelAttachment::class, diff --git a/src/Form/Filters/LogFilterType.php b/src/Form/Filters/LogFilterType.php index a7705294..37129e04 100644 --- a/src/Form/Filters/LogFilterType.php +++ b/src/Form/Filters/LogFilterType.php @@ -137,7 +137,7 @@ class LogFilterType extends AbstractType 'attachment.label' => AbstractLogEntry::targetTypeClassToID(Attachment::class), 'attachment_type.label' => AbstractLogEntry::targetTypeClassToID(AttachmentType::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), 'footprint.label' => AbstractLogEntry::targetTypeClassToID(Footprint::class), 'group.label' => AbstractLogEntry::targetTypeClassToID(Group::class), diff --git a/src/Services/ElementTypeNameGenerator.php b/src/Services/ElementTypeNameGenerator.php index c64bdefc..adee61ad 100644 --- a/src/Services/ElementTypeNameGenerator.php +++ b/src/Services/ElementTypeNameGenerator.php @@ -60,7 +60,7 @@ class ElementTypeNameGenerator Attachment::class => $this->translator->trans('attachment.label'), Category::class => $this->translator->trans('category.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'), Footprint::class => $this->translator->trans('footprint.label'), Manufacturer::class => $this->translator->trans('manufacturer.label'), diff --git a/src/Services/Trees/ToolsTreeBuilder.php b/src/Services/Trees/ToolsTreeBuilder.php index 48a8d660..596d020d 100644 --- a/src/Services/Trees/ToolsTreeBuilder.php +++ b/src/Services/Trees/ToolsTreeBuilder.php @@ -158,7 +158,7 @@ class ToolsTreeBuilder } if ($this->security->isGranted('read', new Project())) { $nodes[] = (new TreeViewNode( - $this->translator->trans('tree.tools.edit.devices'), + $this->translator->trans('tree.tools.edit.projects'), $this->urlGenerator->generate('device_new') ))->setIcon('fa-fw fa-treeview fa-solid fa-archive'); } diff --git a/src/Services/Trees/TreeViewGenerator.php b/src/Services/Trees/TreeViewGenerator.php index 3bba2acf..bc66ba47 100644 --- a/src/Services/Trees/TreeViewGenerator.php +++ b/src/Services/Trees/TreeViewGenerator.php @@ -162,7 +162,7 @@ class TreeViewGenerator case Supplier::class: return $this->translator->trans('supplier.labelp'); case Project::class: - return $this->translator->trans('device.labelp'); + return $this->translator->trans('project.labelp'); default: return $this->translator->trans('tree.root_node.text'); } diff --git a/templates/AdminPages/DeviceAdmin.html.twig b/templates/AdminPages/DeviceAdmin.html.twig index f21c685a..7e372b28 100644 --- a/templates/AdminPages/DeviceAdmin.html.twig +++ b/templates/AdminPages/DeviceAdmin.html.twig @@ -3,15 +3,15 @@ {# @var entity App\Entity\ProjectSystem\Project #} {% block card_title %} - {% trans %}device.caption{% endtrans %} + {% trans %}project.caption{% endtrans %} {% endblock %} {% block edit_title %} - {% trans %}device.edit{% endtrans %}: {{ entity.name }} + {% trans %}project.edit{% endtrans %}: {{ entity.name }} {% endblock %} {% block new_title %} - {% trans %}device.new{% endtrans %} + {% trans %}project.new{% endtrans %} {% endblock %} {% block additional_pills %} diff --git a/templates/Parts/info/show_part_info.html.twig b/templates/Parts/info/show_part_info.html.twig index ad8d9dc9..9df5e3f6 100644 --- a/templates/Parts/info/show_part_info.html.twig +++ b/templates/Parts/info/show_part_info.html.twig @@ -98,7 +98,7 @@ diff --git a/templates/Projects/info/_info_card.html.twig b/templates/Projects/info/_info_card.html.twig index 898aa6b8..57494026 100644 --- a/templates/Projects/info/_info_card.html.twig +++ b/templates/Projects/info/_info_card.html.twig @@ -12,7 +12,7 @@ {% else %} {{ helper.entity_icon(project, "me-1") }} {% endif %} - {% trans %}device.label{% endtrans %}: {{ project.name }} + {% trans %}project.label{% endtrans %}: {{ project.name }}
diff --git a/templates/components/tree_macros.html.twig b/templates/components/tree_macros.html.twig index db4ce4cb..4d0846f6 100644 --- a/templates/components/tree_macros.html.twig +++ b/templates/components/tree_macros.html.twig @@ -6,7 +6,7 @@ ['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')], ['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], ] %} diff --git a/templates/helper.twig b/templates/helper.twig index 25ebb110..27f06f59 100644 --- a/templates/helper.twig +++ b/templates/helper.twig @@ -96,7 +96,7 @@ "attachment_type": ["fa-solid fa-file-alt", "attachment_type.label"], "category": ["fa-solid fa-tags", "category.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"], "group": ["fa-solid fa-users", "group.label"], "label_profile": ["fa-solid fa-qrcode", "label_profile.label"], diff --git a/translations/messages.de.xlf b/translations/messages.de.xlf index bf2618bc..cd1afa00 100644 --- a/translations/messages.de.xlf +++ b/translations/messages.de.xlf @@ -147,35 +147,35 @@ Neue Währung - + Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4 Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4 templates\AdminPages\DeviceAdmin.html.twig:4 - device.caption - Baugruppen + project.caption + Projekte - + Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:8 new - device.edit - Bearbeite Baugruppe + project.edit + Bearbeite Projekt - + Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:12 new - device.new - Neue Baugruppe + project.new + Neues Projekt @@ -4094,7 +4094,7 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr Los! - + Part-DB1\templates\_sidebar.html.twig:37 Part-DB1\templates\_sidebar.html.twig:12 @@ -4106,8 +4106,8 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr templates\base.html.twig:230 - device.labelp - Baugruppen + project.labelp + Projekte @@ -6024,14 +6024,14 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr Ahangstyp - + Part-DB1\src\Services\ElementTypeNameGenerator.php:82 Part-DB1\src\Services\ElementTypeNameGenerator.php:82 - device.label - Baugruppe + project.label + Projekt @@ -6214,15 +6214,15 @@ Wenn Sie dies fehlerhafterweise gemacht haben oder ein Computer nicht mehr vertr Kategorien - + Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:161 Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:138 src\Services\ToolsTreeBuilder.php:66 - tree.tools.edit.devices - Baugruppen + tree.tools.edit.projects + Projekte diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index a601b8a1..ea8a8ef7 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -147,35 +147,35 @@ New currency - + Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4 Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:4 templates\AdminPages\DeviceAdmin.html.twig:4 - device.caption - Device + project.caption + Project - + Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:8 new - device.edit - Edit device + project.edit + Edit project - + Part-DB1\templates\AdminPages\DeviceAdmin.html.twig:12 new - device.new - New device + project.new + New project @@ -4095,7 +4095,7 @@ If you have done this incorrectly or if a computer is no longer trusted, you can Go! - + Part-DB1\templates\_sidebar.html.twig:37 Part-DB1\templates\_sidebar.html.twig:12 @@ -4107,8 +4107,8 @@ If you have done this incorrectly or if a computer is no longer trusted, you can templates\base.html.twig:230 - device.labelp - Devices + project.labelp + Projects @@ -6025,13 +6025,13 @@ If you have done this incorrectly or if a computer is no longer trusted, you can Attachment type - + Part-DB1\src\Services\ElementTypeNameGenerator.php:82 Part-DB1\src\Services\ElementTypeNameGenerator.php:82 - device.label + project.label Project @@ -6215,15 +6215,15 @@ If you have done this incorrectly or if a computer is no longer trusted, you can Categories - + Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:161 Part-DB1\src\Services\Trees\ToolsTreeBuilder.php:138 src\Services\ToolsTreeBuilder.php:66 - tree.tools.edit.devices - Devices + tree.tools.edit.projects + Projects