Skip to content

fix: localize filter facet names when expanding "See more" - #1647

Open
rdahis wants to merge 1 commit into
mainfrom
fix/filter-menu-locale-main
Open

fix: localize filter facet names when expanding "See more"#1647
rdahis wants to merge 1 commit into
mainfrom
fix/filter-menu-locale-main

Conversation

@rdahis

@rdahis rdahis commented Aug 14, 2026

Copy link
Copy Markdown
Member

What

On the translated sites, expanding "See more" in the search side filter (themes, organizations) made the extra names appear in Portuguese instead of the localized names.

Why

The first 5 facet options are fetched through the search API, which sends &locale=…, so they are localized. The "See more" action calls getMoreFacetSearchDatasets (the /facet_values/ endpoint), which omitted the locale — so the backend fell back to its default (Portuguese).

Fix

Thread the router locale from CheckboxFilterAccordion through to getMoreFacetSearchDatasets, which now appends &locale=… when present. Same locale source (useRouter().locale) the search page already uses. Only FilterAccordion calls this function.

🤖 Generated with Claude Code

The initial facet options in the search side filter are localized via the
search API's locale param, but the "See more" call to /facet_values/ omitted
it, so expanded theme and organization names fell back to Portuguese on the
translated sites. Thread the router locale through to the facet API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant