Skip to content

Conversation

@brunoamui
Copy link
Collaborator

Summary

  • Reproduced sidebar locale drop (PT/ES link click sent to EN) using Netlify preview
  • Determined client-side navigation was losing locale: Link forced locale={false} and router.push lacked locale option
  • Implemented fix: pass current locale to Link and router.push so hrefs and navigation stay localized

Details

  • Observed: clicking sidebar items in PT (e.g., ‘Enviar os meios de pagamento…’) navigated to /en/... and . URLs in DOM looked localized initially but client navigation switched to default locale.
  • Diagnosis: In @vtexdocs/components/src/components/sidebar-elements/index.tsx the Link used and router.push was called without LANG="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_CTYPE="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_ALL=, triggering Next.js default locale fallback.
  • Fix: use on the sidebar Link and pass to router.push (keeping href consistent). This preserves /pt or /es during client-side navigation and avoids fallback to EN.

Testing

  • Manual: Clicked PT sidebar links (Omnichannel settings -> Como usar o app Carrinho Compartilhável -> Enviar os meios de pagamento...) and confirmed navigation stayed under /pt with .

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: ['release-no', 'release-auto', 'release-patch', 'release-minor', 'release-major']

@brunoamui brunoamui added the release-patch Patch version bump label Jan 20, 2026
@brunoamui brunoamui merged commit eb40ddb into main Jan 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-patch Patch version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants