Skip to content

Commit

Permalink
Better tab label for unknown elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Lehmann committed Mar 14, 2024
1 parent 922fcc9 commit 4ab0836
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Classes/Controller/WizardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ protected function disableWizardsHavingNoResults(array $wizardItems): array
protected function appendUnknownContentTypes(array $wizardItems): array
{
if ($this->unknownContentTypes !== [] && $this->getBackendUser()->isAdmin()) {
$wizardItems['unknown']['header'] = '?';
$wizardItems['unknown']['header'] = 'unknown';
foreach ($this->unknownContentTypes as $no => $unknownContentType) {
$filterParts = [];
foreach ($unknownContentType as $fieldName => $fieldValue) {
Expand Down
8 changes: 8 additions & 0 deletions Resources/Private/Language/de.locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
<source>Records</source>
<target>Datensätze</target>
</trans-unit>
<trans-unit id="wizard_tab_unknown" resname="wizard_tab_unknown">
<source>Unknown</source>
<target>Unbekannte Elemente</target>
</trans-unit>
<trans-unit id="wizard_tab_unknown_description" resname="wizard_tab_unknown_description">
<source>These elements could not be displayed, are typically outdated and should be edited.</source>
<target>Diese Elemente können nicht dargestellt werden, sind typischerweise veraltet und sollten bearbeitet werden.</target>
</trans-unit>
<trans-unit id="wizard_error_message" resname="wizard_error_message">
<source>Nothing found. Probably the page id was configured incorrectly.</source>
<target>Nichts gefunden. Wahrscheinlich ist die Seiten-Id falsch konfiguriert.</target>
Expand Down
6 changes: 6 additions & 0 deletions Resources/Private/Language/locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
<trans-unit id="wizard_tab_records" resname="wizard_tab_records">
<source>Records</source>
</trans-unit>
<trans-unit id="wizard_tab_unknown" resname="wizard_tab_unknown">
<source>Unknown elements</source>
</trans-unit>
<trans-unit id="wizard_tab_unknown_description" resname="wizard_tab_unknown_description">
<source>These elements could not be displayed, are typically outdated and should be edited.</source>
</trans-unit>
<trans-unit id="wizard_error_message" resname="wizard_error_message">
<source>Nothing found. Probably the page id was configured incorrectly.</source>
</trans-unit>
Expand Down
7 changes: 5 additions & 2 deletions Resources/Private/Templates/Wizard.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
<ul class="nav nav-tabs t3js-tabs" role="tablist" id="tabs-{tabsMenuId}" data-store-last-tab="1">
<f:for each="{tabsMenuItems}" as="item" iteration="iteration">
<li role="presentation" class="t3js-tabmenu-item nav-item">
<a href="#{tabsMenuId}-{iteration.cycle}" class="nav-link {f:if(condition: '{iteration.cycle} == 1', then: ' active')}" aria-controls="{tabsMenuId}-{iteration.cycle}" role="tab" data-bs-toggle="tab">
{item.label}
<a href="#{tabsMenuId}-{iteration.cycle}" class="nav-link {f:if(condition: '{iteration.cycle} == 1', then: ' active')}" aria-controls="{tabsMenuId}-{iteration.cycle}" role="tab" data-bs-toggle="tab" title="{f:if(condition: '{item.label} == \'unknown\'', then: '{f:translate(key: \'wizard_tab_unknown_description\', extensionName: \'pagetreefilter\')}')}">
<f:if condition="{item.label} == 'unknown'">
<f:then><f:translate key="wizard_tab_unknown" extensionName="pagetreefilter"/> <core:icon identifier="actions-exclamation-triangle" alternativeMarkupIdentifier="inline" /></f:then>
<f:else>{item.label}</f:else>
</f:if>
</a>
</li>
</f:for>
Expand Down

0 comments on commit 4ab0836

Please sign in to comment.