Skip to content

Commit

Permalink
use translations for filter tags
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-sc committed Jan 15, 2025
1 parent 38dcefd commit adc5d63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion Resources/Private/Partials/FilterBlock.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{namespace lc=Slub\LisztCommon\ViewHelpers}
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:variable name="languageFilePath">LLL:EXT:{settings.entityTypes.1.extensionName}/Resources/Private/Language/{settings.entityTypes.1.languageFile}.xlf</f:variable>

<div class="filter-block frame">
<h4 class="">{f:translate(key: '{languageFilePath}:{key}', default: '{key}')}</h4>
Expand Down
5 changes: 3 additions & 2 deletions Resources/Private/Templates/Search/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:i="http://typo3.org/ns/Quellenform/Iconpack/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:variable name="languageFilePath">LLL:EXT:{settings.entityTypes.1.extensionName}/Resources/Private/Language/{settings.entityTypes.1.languageFile}.xlf</f:variable>

<div class="searchresults-info frame">
<div class="searchresults-info-total">
Expand All @@ -18,7 +19,7 @@
<f:for each="{searchParams.filter}" key="key" as="filterParam">
<f:for each="{filterParam}" key="innerKey" as="value">
<span class="searchresults-filtertags-tag {key} filter-tag-value-{value}">
<span>{innerKey}</span>
<span>{f:translate(key: '{languageFilePath}:{key}_{innerKey}', default: '{innerKey}')}</span>
<f:link.action action="index" controller="Search" pluginName="SearchListing"
arguments="{lc:searchParams(action: 'removeFilter', searchParamsArray: searchParams, key: key, value: innerKey)}"
additionalAttributes="{type:'button'}"
Expand Down Expand Up @@ -46,7 +47,7 @@ <h5 class="offcanvas-title">{f:translate(key: 'filter_container_label', extensio
</div>
<div class="offcanvas-body">
<f:for each="{searchResults.aggregations}" key="key" as="filterGroup">
<f:render partial="FilterBlock" arguments="{key: key, filterGroup: filterGroup, searchParams: searchParams}" />
<f:render partial="FilterBlock" arguments="{key: key, filterGroup: filterGroup, searchParams: searchParams, languageFilePath: languageFilePath}" />
</f:for>
</div>
</nav>
Expand Down

0 comments on commit adc5d63

Please sign in to comment.