Repository navigation
fix(forms): make "also available in" language link switch language - #1102
Conversation
…nguage The link used next/link, so clicking it did a client-side transition to /<lang>/<path>. With localePrefix "never" the i18n proxy only switches the locale on a real request; the client transition just landed back on the unprefixed path in the old language. Use a plain <a> like the top bar language switcher does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Render alternate-language URLs as anchors kompassi-v2-frontend/src/components/forms/AlsoAvailableInLanguage.tsx |
The component removes the next/link import and uses plain anchors for alternate-language URLs. The localized destination and lang attribute remain. |
Priority:
Estimated code review effort: 1 (Trivial) | ~4 minutes
Change: Bug fix
Merge Risk: 
Minimal · up to 28c19
-
The language-switch links use full-page anchors as intended, so the PR is mergeable with normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
The "This form is also available in English" banner on surveys (and invitations) did nothing when clicked, while the top bar language switcher worked.
Cause: the banner used
next/link, so clicking did a client-side transition to/<lang>/<path>. With next-intllocalePrefix: "never", the locale only switches when the i18n proxy handles a real request (sets the locale cookie and redirects to the unprefixed path). The client-side transition just ended up on the same unprefixed URL in the old language.Fix: use a plain
<a>, the same as the top bar switcher inNavigationMenus.tsx.🤖 Generated with Claude Code
Summary by CodeRabbit