Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Nov 12, 2025

Summary by CodeRabbit

  • Documentation
    • Added a new Solid.js example project demonstrating TanStack Router integration with Paraglide internationalization support, including English and German localized routes, URL-based locale switching, and type-safe routing patterns with translated navigation.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

This PR adds a complete Solid.js example project demonstrating TanStack Router integration with Paraglide i18n. It includes route definitions for home and about pages, locale-based URL rewriting, generated routing artifacts, build configuration, and English/German message translations.

Changes

Cohort / File(s) Summary
Project Configuration
examples/solid/i18n-paraglide/package.json, examples/solid/i18n-paraglide/tsconfig.json, examples/solid/i18n-paraglide/vite.config.ts
Package metadata, TypeScript config for Solid.js, and Vite setup with Paraglide, TanStack Router, Tailwind, and Solid plugins including URL localization patterns and locale detection strategy.
IDE & Build Metadata
examples/solid/i18n-paraglide/.gitignore, examples/solid/i18n-paraglide/.vscode/settings.json
.gitignore patterns for node_modules, dist, .env, and local files; VSCode settings to exclude and make routeTree.gen.ts readonly.
HTML & Public Assets
examples/solid/i18n-paraglide/index.html, examples/solid/i18n-paraglide/public/manifest.json, examples/solid/i18n-paraglide/public/robots.txt
HTML entry point with Solid app root, PWA manifest with icons and metadata, and robots.txt allowing all agents.
i18n Setup
examples/solid/i18n-paraglide/project.inlang/*, examples/solid/i18n-paraglide/messages/*
Inlang project config with base locale "en", locales ["en", "de"], plugin modules, and .gitignore; English and German JSON message files with translations for example_message, hello_about, home_page, and about_page.
Route Definitions
examples/solid/i18n-paraglide/src/routes/__root.tsx, examples/solid/i18n-paraglide/src/routes/index.tsx, examples/solid/i18n-paraglide/src/routes/about.tsx
Root route with beforeLoad locale setup and redirect logic, header with navigation and locale switcher; index and about routes rendering i18n messages.
Application Core
examples/solid/i18n-paraglide/src/main.tsx, examples/solid/i18n-paraglide/src/routeTree.gen.ts, examples/solid/i18n-paraglide/src/styles.css
Router initialization with deLocalized URL rewriting, generated type-safe route tree with FileRoute interfaces, and Tailwind CSS import.
Documentation
examples/solid/i18n-paraglide/README.md
Getting started, Vite plugin integration guide, URL rewriting examples, beforeLoad hook usage, and type-safe translated pathnames utility.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Router
    participant beforeLoad Hook
    participant Locale Storage
    participant App Render

    User->>Router: Navigate to URL with locale prefix (e.g., /de/about)
    Router->>beforeLoad Hook: Execute beforeLoad
    beforeLoad Hook->>Locale Storage: getLocale() from URL/cookie
    beforeLoad Hook->>beforeLoad Hook: shouldRedirect()?
    alt Redirect needed
        beforeLoad Hook->>Router: redirect({ to: newUrl })
        Router->>User: Redirect to target URL
    else No redirect
        beforeLoad Hook->>Router: Continue navigation
    end
    Router->>App Render: Render route with locale context
    App Render->>Locale Storage: Access m (message module)
    App Render->>User: Display localized content
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • File count & scope: 23+ new files forming a complete example project; consider reviewing route definitions and main.tsx for router setup correctness and localization flow.
  • Attention areas:
    • src/main.tsx — Router initialization with deLocalizeUrl/localizeUrl logic and Register module augmentation
    • src/routeTree.gen.ts — Generated route tree structure and FileRoute type interfaces (verify generation correctness)
    • src/routes/__root.tsx — beforeLoad hook locale handling and redirect logic
    • vite.config.ts — Paraglide plugin configuration, URL localization patterns, and locale detection strategy
    • project.inlang/settings.json — i18n module configuration and locale mappings

Possibly related PRs

Suggested labels

documentation

Suggested reviewers

  • schiller-manuel

Poem

🐰 A bunny hops through locale gates,
Routes weaving German, English fates,
Paraglide whispers translations true,
Solid paths in delocalized hue!
TanStack magic, i18n delight—
An example shines, perfectly right!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new i18n (internationalization) example using Paraglide for SolidJS/TanStack Router.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch i18n-paraglide-solid-router

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 and usage tips.

@birkskyum birkskyum force-pushed the i18n-paraglide-solid-router branch from d2b7e83 to bf61f6e Compare November 12, 2025 19:18
@nx-cloud
Copy link

nx-cloud bot commented Nov 12, 2025

View your CI Pipeline Execution ↗ for commit 44b4691

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 1m 4s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-12 19:22:14 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 12, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5844

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5844

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5844

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5844

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5844

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5844

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5844

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5844

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5844

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5844

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5844

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5844

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5844

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5844

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5844

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5844

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5844

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5844

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5844

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5844

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5844

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5844

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5844

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@5844

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5844

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5844

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5844

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5844

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5844

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5844

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5844

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5844

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5844

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5844

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5844

commit: 44b4691

@birkskyum birkskyum merged commit 7492e6c into main Nov 12, 2025
5 of 6 checks passed
@birkskyum birkskyum deleted the i18n-paraglide-solid-router branch November 12, 2025 19:24
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
examples/solid/i18n-paraglide/index.html (1)

9-11: Minor: Update the meta description.

Line 10 contains a generic template description ("Web site created using create-tsrouter-app"). Consider updating it to better reflect this example, e.g., "TanStack Router example with Paraglide i18n integration".

examples/solid/i18n-paraglide/src/main.tsx (1)

9-21: Verify defaultPreloadStaleTime: 0 is intentional.

Setting defaultPreloadStaleTime to 0 causes preloaded data to be immediately stale, triggering refetches on every navigation. This is quite aggressive for an example and may not demonstrate best practices.

Consider whether a higher value (e.g., 5000 for 5 seconds) would be more appropriate for demonstrating typical usage patterns.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5c7133 and 44b4691.

⛔ Files ignored due to path filters (5)
  • examples/solid/i18n-paraglide/public/favicon.ico is excluded by !**/*.ico
  • examples/solid/i18n-paraglide/public/logo192.png is excluded by !**/*.png
  • examples/solid/i18n-paraglide/public/logo512.png is excluded by !**/*.png
  • examples/solid/i18n-paraglide/src/logo.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (20)
  • examples/solid/i18n-paraglide/.gitignore (1 hunks)
  • examples/solid/i18n-paraglide/.vscode/settings.json (1 hunks)
  • examples/solid/i18n-paraglide/README.md (1 hunks)
  • examples/solid/i18n-paraglide/index.html (1 hunks)
  • examples/solid/i18n-paraglide/messages/de.json (1 hunks)
  • examples/solid/i18n-paraglide/messages/en.json (1 hunks)
  • examples/solid/i18n-paraglide/package.json (1 hunks)
  • examples/solid/i18n-paraglide/project.inlang/.gitignore (1 hunks)
  • examples/solid/i18n-paraglide/project.inlang/project_id (1 hunks)
  • examples/solid/i18n-paraglide/project.inlang/settings.json (1 hunks)
  • examples/solid/i18n-paraglide/public/manifest.json (1 hunks)
  • examples/solid/i18n-paraglide/public/robots.txt (1 hunks)
  • examples/solid/i18n-paraglide/src/main.tsx (1 hunks)
  • examples/solid/i18n-paraglide/src/routeTree.gen.ts (1 hunks)
  • examples/solid/i18n-paraglide/src/routes/__root.tsx (1 hunks)
  • examples/solid/i18n-paraglide/src/routes/about.tsx (1 hunks)
  • examples/solid/i18n-paraglide/src/routes/index.tsx (1 hunks)
  • examples/solid/i18n-paraglide/src/styles.css (1 hunks)
  • examples/solid/i18n-paraglide/tsconfig.json (1 hunks)
  • examples/solid/i18n-paraglide/vite.config.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • examples/solid/i18n-paraglide/src/routes/__root.tsx
  • examples/solid/i18n-paraglide/src/routes/about.tsx
  • examples/solid/i18n-paraglide/src/routes/index.tsx
  • examples/solid/i18n-paraglide/src/routeTree.gen.ts
  • examples/solid/i18n-paraglide/vite.config.ts
  • examples/solid/i18n-paraglide/src/main.tsx
**/src/routes/**

📄 CodeRabbit inference engine (AGENTS.md)

Place file-based routes under src/routes/ directories

Files:

  • examples/solid/i18n-paraglide/src/routes/__root.tsx
  • examples/solid/i18n-paraglide/src/routes/about.tsx
  • examples/solid/i18n-paraglide/src/routes/index.tsx
examples/{react,solid}/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep example applications under examples/react/ and examples/solid/

Files:

  • examples/solid/i18n-paraglide/src/routes/__root.tsx
  • examples/solid/i18n-paraglide/public/robots.txt
  • examples/solid/i18n-paraglide/package.json
  • examples/solid/i18n-paraglide/src/routes/about.tsx
  • examples/solid/i18n-paraglide/project.inlang/project_id
  • examples/solid/i18n-paraglide/README.md
  • examples/solid/i18n-paraglide/index.html
  • examples/solid/i18n-paraglide/src/routes/index.tsx
  • examples/solid/i18n-paraglide/public/manifest.json
  • examples/solid/i18n-paraglide/project.inlang/settings.json
  • examples/solid/i18n-paraglide/messages/de.json
  • examples/solid/i18n-paraglide/src/routeTree.gen.ts
  • examples/solid/i18n-paraglide/vite.config.ts
  • examples/solid/i18n-paraglide/tsconfig.json
  • examples/solid/i18n-paraglide/src/styles.css
  • examples/solid/i18n-paraglide/src/main.tsx
  • examples/solid/i18n-paraglide/messages/en.json
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

Use workspace:* protocol for internal dependencies in package.json files

Files:

  • examples/solid/i18n-paraglide/package.json
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Applied to files:

  • examples/solid/i18n-paraglide/src/routes/__root.tsx
  • examples/solid/i18n-paraglide/package.json
  • examples/solid/i18n-paraglide/src/routes/about.tsx
  • examples/solid/i18n-paraglide/README.md
  • examples/solid/i18n-paraglide/src/routes/index.tsx
  • examples/solid/i18n-paraglide/src/routeTree.gen.ts
  • examples/solid/i18n-paraglide/src/main.tsx
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories

Applied to files:

  • examples/solid/i18n-paraglide/package.json
  • examples/solid/i18n-paraglide/src/routeTree.gen.ts
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.

Applied to files:

  • examples/solid/i18n-paraglide/package.json
  • examples/solid/i18n-paraglide/src/routeTree.gen.ts
  • examples/solid/i18n-paraglide/src/main.tsx
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-plugin/** : Use unplugin for universal bundler plugins in the router-plugin package

Applied to files:

  • examples/solid/i18n-paraglide/package.json
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/src/routes/** : Place file-based routes under src/routes/ directories

Applied to files:

  • examples/solid/i18n-paraglide/src/routes/about.tsx
  • examples/solid/i18n-paraglide/src/routes/index.tsx
  • examples/solid/i18n-paraglide/src/routeTree.gen.ts
📚 Learning: 2025-10-14T18:59:33.990Z
Learnt from: FatahChan
Repo: TanStack/router PR: 5475
File: e2e/react-start/basic-prerendering/src/routes/redirect/$target/via-beforeLoad.tsx:8-0
Timestamp: 2025-10-14T18:59:33.990Z
Learning: In TanStack Router e2e test files, when a route parameter is validated at the route level (e.g., using zod in validateSearch or param validation), switch statements on that parameter do not require a default case, as the validation ensures only expected values will reach the switch.

Applied to files:

  • examples/solid/i18n-paraglide/README.md
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 5330
File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61
Timestamp: 2025-10-01T18:31:35.420Z
Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.

Applied to files:

  • examples/solid/i18n-paraglide/src/routes/index.tsx
  • examples/solid/i18n-paraglide/.vscode/settings.json
  • examples/solid/i18n-paraglide/src/routeTree.gen.ts
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.

Applied to files:

  • examples/solid/i18n-paraglide/src/routes/index.tsx
  • examples/solid/i18n-paraglide/.vscode/settings.json
  • examples/solid/i18n-paraglide/src/routeTree.gen.ts
  • examples/solid/i18n-paraglide/src/main.tsx
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase

Applied to files:

  • examples/solid/i18n-paraglide/tsconfig.json
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/

Applied to files:

  • examples/solid/i18n-paraglide/src/main.tsx
📚 Learning: 2025-10-01T18:30:26.591Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 5330
File: packages/router-core/src/router.ts:2231-2245
Timestamp: 2025-10-01T18:30:26.591Z
Learning: In `packages/router-core/src/router.ts`, the `resolveRedirect` method intentionally strips the router's origin from redirect URLs when they match (e.g., `https://foo.com/bar` → `/bar` for same-origin redirects) while preserving the full URL for cross-origin redirects. This logic should not be removed or simplified to use `location.publicHref` directly.

Applied to files:

  • examples/solid/i18n-paraglide/src/main.tsx
🧬 Code graph analysis (3)
examples/solid/i18n-paraglide/src/routes/__root.tsx (2)
examples/solid/i18n-paraglide/src/routes/about.tsx (1)
  • Route (4-6)
examples/solid/i18n-paraglide/src/routes/index.tsx (1)
  • Route (4-6)
examples/solid/i18n-paraglide/src/routes/about.tsx (2)
examples/solid/i18n-paraglide/src/routes/__root.tsx (1)
  • Route (10-64)
examples/solid/i18n-paraglide/src/routes/index.tsx (1)
  • Route (4-6)
examples/solid/i18n-paraglide/src/routes/index.tsx (2)
examples/solid/i18n-paraglide/src/routes/__root.tsx (1)
  • Route (10-64)
examples/solid/i18n-paraglide/src/routes/about.tsx (1)
  • Route (4-6)
🪛 LanguageTool
examples/solid/i18n-paraglide/README.md

[grammar] ~139-~139: Use a hyphen to join words.
Context: ...to the Paraglide Vite plguin. ## Server side rendering For server side renderin...

(QB_NEW_EN_HYPHEN)


[grammar] ~141-~141: Use a hyphen to join words.
Context: ...n. ## Server side rendering For server side rendering, check out the [TanStack ...

(QB_NEW_EN_HYPHEN)

🪛 markdownlint-cli2 (0.18.1)
examples/solid/i18n-paraglide/README.md

3-3: Link text should be descriptive

(MD059, descriptive-link-text)


22-22: Hard tabs
Column: 1

(MD010, no-hard-tabs)


25-25: Hard tabs
Column: 2

(MD010, no-hard-tabs)


26-26: Hard tabs
Column: 2

(MD010, no-hard-tabs)


27-27: Hard tabs
Column: 2

(MD010, no-hard-tabs)


28-28: Hard tabs
Column: 2

(MD010, no-hard-tabs)


29-29: Hard tabs
Column: 1

(MD010, no-hard-tabs)

🔇 Additional comments (21)
examples/solid/i18n-paraglide/.gitignore (1)

1-9: LGTM!

Standard and appropriate ignore patterns for a Solid.js + Vite example project. The .gitignore properly excludes build artifacts, node_modules, environment files, and example-specific artifacts like .tanstack and .nitro.

examples/solid/i18n-paraglide/project.inlang/.gitignore (1)

1-1: LGTM!

Appropriately ignores the Inlang cache directory, which is a standard practice for Inlang project configurations.

examples/solid/i18n-paraglide/public/robots.txt (1)

1-3: LGTM!

Standard robots.txt with correct syntax allowing all user agents.

examples/solid/i18n-paraglide/project.inlang/project_id (1)

1-1: Verify intent: Is this project ID shareable or organization-specific?

The project ID appears to be a specific identifier. Please clarify whether this is a generic, shareable example ID suitable for a public repository, or an organization-specific credential that should be templated or excluded.

examples/solid/i18n-paraglide/messages/de.json (1)

1-7: LGTM!

Properly formatted German i18n messages with correct schema reference and translations aligned with the configured locales.

examples/solid/i18n-paraglide/public/manifest.json (1)

1-25: LGTM!

Standard PWA manifest with appropriate icons, display mode, and theme configuration.

examples/solid/i18n-paraglide/.vscode/settings.json (1)

1-11: LGTM!

Correctly excludes the autogenerated routeTree.gen.ts from file watchers, search, and marks it readonly—best practice for generated artifacts.

examples/solid/i18n-paraglide/tsconfig.json (1)

1-30: LGTM!

Comprehensive TypeScript configuration with strict mode enabled throughout, proper Solid.js JSX settings, and modern bundler-mode setup. Aligns with strict-mode requirements. Based on learnings

examples/solid/i18n-paraglide/src/styles.css (1)

1-1: Verify Tailwind version in package.json.

The @import 'tailwindcss'; syntax is correct for Tailwind CSS v4+, which is a breaking change from v3. Please ensure package.json specifies Tailwind v4 or later. Per library documentation

examples/solid/i18n-paraglide/src/main.tsx (3)

1-6: LGTM!

Imports are correctly structured for a Solid.js + TanStack Router + Paraglide i18n setup.


24-28: LGTM!

Module augmentation correctly registers the router instance for type safety, following TanStack Router best practices.


30-34: LGTM!

The rendering logic correctly guards against double-rendering with the innerHTML check, which is useful for HMR scenarios in development.

examples/solid/i18n-paraglide/src/routes/about.tsx (2)

1-6: LGTM!

Route definition follows TanStack Router conventions correctly.


8-10: LGTM!

Component demonstrates i18n message rendering correctly.

examples/solid/i18n-paraglide/src/routes/__root.tsx (3)

1-8: LGTM!

Imports are appropriate for the root route with i18n functionality.


10-19: LGTM!

The beforeLoad hook correctly handles locale initialization and redirect logic:

  • Sets the lang attribute for accessibility and SEO
  • Uses the correct throw redirect() pattern for TanStack Router

20-63: LGTM!

Component correctly implements:

  • Navigation with active state styling
  • Locale switcher using Tailwind v4 syntax with data attributes
  • Proper outlet rendering for child routes

The Tailwind v4 attribute selector syntax on line 49 is correct for styling based on data-active-locale state.

examples/solid/i18n-paraglide/vite.config.ts (3)

1-10: LGTM!

Imports are correctly structured for the Vite + Solid + TanStack Router + i18n setup.


11-40: LGTM!

Paraglide plugin configuration is well-structured:

  • URL patterns correctly ordered (specific routes before catch-all)
  • Localization strategy appropriately prioritizes URL-based locale detection
  • German route translations are accurate (/de/ueber for "about")

41-49: LGTM!

Plugin configuration and path alias are correctly set up:

  • Plugins in proper order (TanStack Router before Solid)
  • Auto code splitting enabled for optimization
  • Standard path alias convention
examples/solid/i18n-paraglide/src/routeTree.gen.ts (1)

1-77: Autogenerated file - no review needed.

This file is automatically generated by TanStack Router and should not be manually modified. Based on learnings.

Comment on lines +13 to +16
"@tailwindcss/vite": "^4.1.13",
"@tanstack/solid-router": "^1.135.2",
"@tanstack/router-plugin": "^1.135.2",
"solid-js": "^1.9.10",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use workspace protocol for internal TanStack deps

Per our package guidelines, internal TanStack dependencies should reference the workspace build to avoid version skew with the monorepo. Please swap these caret ranges to workspace:*.

-    "@tanstack/solid-router": "^1.135.2",
-    "@tanstack/router-plugin": "^1.135.2",
+    "@tanstack/solid-router": "workspace:*",
+    "@tanstack/router-plugin": "workspace:*",
📝 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
"@tailwindcss/vite": "^4.1.13",
"@tanstack/solid-router": "^1.135.2",
"@tanstack/router-plugin": "^1.135.2",
"solid-js": "^1.9.10",
"@tailwindcss/vite": "^4.1.13",
"@tanstack/solid-router": "workspace:*",
"@tanstack/router-plugin": "workspace:*",
"solid-js": "^1.9.10",
🤖 Prompt for AI Agents
In examples/solid/i18n-paraglide/package.json around lines 13 to 16, the two
internal TanStack deps "@tanstack/solid-router" and "@tanstack/router-plugin"
are pinned as caret ranges; change their version strings to use the workspace
protocol ("workspace:*") so the package references the monorepo build instead of
external versions—update both entries to "workspace:*" and keep the other
dependencies unchanged.

Comment on lines +16 to +30
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { tanstackRouter } from '@tanstack/router-plugin/vite'
+import { paraglideVitePlugin } from "@inlang/paraglide-js";

export default defineConfig({
plugins: [
tanstackRouter({ target: 'react', autoCodeSplitting: true }),
react(),
+ paraglideVitePlugin({
+ project: "./project.inlang",
+ outdir: "./app/paraglide",
+ }),
],
});
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix Solid example snippet to use Solid tooling

The snippet imports @vitejs/plugin-react and sets the router plugin target to 'react', which will break for anyone following this Solid-based example. Please switch the instructions to the Solid equivalents so readers get a working setup.

-import react from '@vitejs/plugin-react'
+import solid from 'vite-plugin-solid'
 import { tanstackRouter } from '@tanstack/router-plugin/vite'
 import { paraglideVitePlugin } from "@inlang/paraglide-js";
 
 export default defineConfig({
-	plugins: [
-    tanstackRouter({ target: 'react', autoCodeSplitting: true }),
-    react(),
-		paraglideVitePlugin({
-			project: "./project.inlang",
-			outdir: "./app/paraglide",
-		}),
-	],
+  plugins: [
+    tanstackRouter({ target: 'solid', autoCodeSplitting: true }),
+    solid(),
+    paraglideVitePlugin({
+      project: "./project.inlang",
+      outdir: "./app/paraglide",
+    }),
+  ],
 });
📝 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
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { tanstackRouter } from '@tanstack/router-plugin/vite'
+import { paraglideVitePlugin } from "@inlang/paraglide-js";
export default defineConfig({
plugins: [
tanstackRouter({ target: 'react', autoCodeSplitting: true }),
react(),
+ paraglideVitePlugin({
+ project: "./project.inlang",
+ outdir: "./app/paraglide",
+ }),
],
});
import { defineConfig } from 'vite'
import solid from 'vite-plugin-solid'
import { tanstackRouter } from '@tanstack/router-plugin/vite'
import { paraglideVitePlugin } from "@inlang/paraglide-js";
export default defineConfig({
plugins: [
tanstackRouter({ target: 'solid', autoCodeSplitting: true }),
solid(),
paraglideVitePlugin({
project: "./project.inlang",
outdir: "./app/paraglide",
}),
],
});
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

22-22: Hard tabs
Column: 1

(MD010, no-hard-tabs)


25-25: Hard tabs
Column: 2

(MD010, no-hard-tabs)


26-26: Hard tabs
Column: 2

(MD010, no-hard-tabs)


27-27: Hard tabs
Column: 2

(MD010, no-hard-tabs)


28-28: Hard tabs
Column: 2

(MD010, no-hard-tabs)


29-29: Hard tabs
Column: 1

(MD010, no-hard-tabs)

})
```

And import into the Paraglide Vite plguin.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Correct typo in plugin reference

"plguin" should be "plugin" so the documentation reads cleanly.

🤖 Prompt for AI Agents
examples/solid/i18n-paraglide/README.md around line 137: fix the typo "plguin"
to "plugin" so the sentence reads "And import into the Paraglide Vite plugin." —
update the README.md at that line to correct the spelling.

roduyemi pushed a commit to roduyemi/oss-router that referenced this pull request Nov 19, 2025
* docs(solid-router): i18n paraglide example

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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.

2 participants