fix: localize filter facet names when expanding "See more" - #1647
Open
rdahis wants to merge 1 commit into
Open
Conversation
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.
rdahis
force-pushed
the
fix/filter-menu-locale-main
branch
from
August 14, 2026 03:15
b0fde2e to
88acb4c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 callsgetMoreFacetSearchDatasets(the/facet_values/endpoint), which omitted the locale — so the backend fell back to its default (Portuguese).Fix
Thread the router
localefromCheckboxFilterAccordionthrough togetMoreFacetSearchDatasets, which now appends&locale=…when present. Same locale source (useRouter().locale) the search page already uses. OnlyFilterAccordioncalls this function.🤖 Generated with Claude Code