Skip to content

Commit

Permalink
Fix translations for the result tabs (#16) (#17)
Browse files Browse the repository at this point in the history
Co-authored-by: Balázs Reé <ree@greenfinity.hu>
  • Loading branch information
reekitconcept and reebalazs authored Feb 20, 2024
1 parent 1e9587d commit 361e6ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions news/16.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix translations for the result tabs @reebalazs
10 changes: 3 additions & 7 deletions src/components/theme/SolrSearch/SearchTabs.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FormattedMessage } from 'react-intl';
import messages from './solr-facets-i18n';
import { useIntl } from 'react-intl';

export const SearchTabs = ({ groupSelect, setGroupSelect, facetGroups }) => {
facetGroups = facetGroups || [];
const intl = useIntl();
return (
<div className="searchTabs ui top attached tabular menu">
{facetGroups.map(([label, counter], index) => {
Expand All @@ -22,11 +22,7 @@ export const SearchTabs = ({ groupSelect, setGroupSelect, facetGroups }) => {
}
>
<span>
{messages[label] ? (
<FormattedMessage {...messages[label]} />
) : (
label
)}
{intl.formatMessage({ id: label, defaultMessage: label })}
<span
className={
'searchCounter ui circular label ' +
Expand Down

0 comments on commit 361e6ac

Please sign in to comment.