Skip to content

docs: improve route disable guide - #4120

Open
BobbieGoede wants to merge 1 commit into
mainfrom
docs/ignoring-localized-routes-scope
Open

docs: improve route disable guide#4120
BobbieGoede wants to merge 1 commit into
mainfrom
docs/ignoring-localized-routes-scope

Conversation

@BobbieGoede

@BobbieGoede BobbieGoede commented Aug 2, 2026

Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

This is a gap in our documentation, right now it's unclear that disabling i18n through the meta property or other custom route configuration that this only disables route localization and that i18n is otherwise functioning as normal on such a page.

The documentation is generated, maybe it's a bit too verbose in its current state, so might iterate before merging.

Summary by CodeRabbit

  • Documentation

    • Clarified how disabling localized routes affects URLs, translations, navigation, locale switching, redirects, metadata, and browser-language detection.
    • Added configuration guidance for disabling localization across route groups, including hook ordering and supported route metadata.
  • Bug Fixes

    • Confirmed that routes marked as non-localized retain translated page content while keeping their URLs unchanged.

@BobbieGoede BobbieGoede self-assigned this Aug 2, 2026
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The documentation updates heading levels and describes the effects of disabling localized routes. It also documents route-group configuration through the pages:extend hook. The fixture now renders a translated message, and the routing test verifies French content on an unlocalized route.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary documentation change: improving the guide for disabling localized routes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/ignoring-localized-routes-scope

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/content/docs/02.guide/04.ignoring-localized-routes.md`:
- Around line 108-110: Update the page.path condition in the localized-route
example to match /account as a path segment, not merely as a string prefix,
while continuing to match /login and valid /account subroutes without affecting
paths such as /accounting or /account-settings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d4453f0-d339-448b-a833-d15c500b05ed

📥 Commits

Reviewing files that changed from the base of the PR and between a0b2db7 and 0ea71a1.

📒 Files selected for processing (3)
  • docs/content/docs/02.guide/04.ignoring-localized-routes.md
  • specs/fixtures/basic/pages/define-i18n-route-false.vue
  • specs/routing_strategies/prefix.spec.ts

Comment on lines +108 to +110
if (page.path.startsWith('/account') || page.path === '/login') {
page.meta ??= {}
page.meta.i18n = false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Match the /account path by segment.

page.path.startsWith('/account') also matches /accounting and /account-settings. This example can disable localization for routes outside the documented /account section.

Proposed fix
-        if (page.path.startsWith('/account') || page.path === '/login') {
+        if (
+          page.path === '/account' ||
+          page.path.startsWith('/account/') ||
+          page.path === '/login'
+        ) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (page.path.startsWith('/account') || page.path === '/login') {
page.meta ??= {}
page.meta.i18n = false
if (
page.path === '/account' ||
page.path.startsWith('/account/') ||
page.path === '/login'
) {
page.meta ??= {}
page.meta.i18n = false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/content/docs/02.guide/04.ignoring-localized-routes.md` around lines 108
- 110, Update the page.path condition in the localized-route example to match
/account as a path segment, not merely as a string prefix, while continuing to
match /login and valid /account subroutes without affecting paths such as
/accounting or /account-settings.

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