Skip to content

feat(i18n): add Paraglide JS internationalization (EN/ES)#9621

Closed
dfliess wants to merge 4 commits into
rilldata:mainfrom
dfliess:i18n-upstream
Closed

feat(i18n): add Paraglide JS internationalization (EN/ES)#9621
dfliess wants to merge 4 commits into
rilldata:mainfrom
dfliess:i18n-upstream

Conversation

@dfliess

@dfliess dfliess commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Add i18n support to the Rill user-facing frontend using Paraglide JS v2 with English and Spanish locales.

Full EN/ES parity across files in web-common and web-admin. Locale detection uses cookie → user preference → base locale (English). Zero runtime cost for English users — Paraglide tree-shakes unused locales.

Framework setup:

  • @inlang/paraglide-js ^2.20.1 with Vite plugin for automatic recompilation
  • Inlang project config at web-common/project.inlang/settings.json
  • Compiled output in web-common/src/paraglide/ (locale-modules structure)
  • Flat JSON catalogs in web-common/messages/{en,es}.json

Shared components (web-common):

  • Dashboard viewer, explore, canvas, chat, time controls, filters, bookmarks
  • Alert/report forms, delivery tabs, criteria, intervals
  • Shared components: search, select, combobox, dialog, theme toggle
  • Status tables, resource actions, refresh dialogs, connectors
  • Time grain translation utilities, fully translated relative time

Cloud admin (web-admin):

  • Billing, settings, users/groups, status, alerts, reports
  • Public URLs, env variables, auth flows, embeds, GitHub integration
  • Edit session, branches, error pages, route errors

Not included: backend/API strings, email templates, web-local.

Happy to iterate on the approach based on your feedback.

Developed with the help of Claude

Checklist:

  • Covered by tests — catalog integrity test (catalog-integrity.spec.ts) verifies EN/ES key parity. No e2e UI tests — i18n is visual by nature.
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

dfliess added 4 commits June 29, 2026 09:52
Set up Paraglide JS v2 for frontend internationalization:
- Add @inlang/paraglide-js and @inlang/plugin-message-format dependencies
- Configure Vite plugin with cookie → preferredLanguage → baseLocale strategy
- Add inlang project config at web-common/project.inlang/settings.json
- Add 1732 message keys in EN/ES with full parity
- Commit compiled Paraglide output (locale-modules structure)
Instrument all user-facing strings in web-common with Paraglide messages:
- Dashboard viewer: KPI, time series, leaderboard, big numbers
- Explore: measures/dimensions dropdowns, tags, search, grain selector
- Canvas: inspector, alignment, sparkline, error states
- Chat: input, thinking block, feedback, history, sharing, error messages
- Time controls: grain names, range labels, comparisons, relative time
- Filters: dimension/measure headers, pin/required, advanced
- Bookmarks: popover, form, home bookmark, categories
- Alerts/Reports: forms, delivery tabs, criteria, intervals, snooze
- Shared components: search, select, combobox, dialog, theme toggle
- Status tables: resource tables, model actions, refresh dialogs
- Connectors: database explorer, schema entry
Instrument all user-facing strings in web-admin with Paraglide messages:
- Billing: plans, trial, payments, contact, quotas, cancel/renew dialogs
- Settings: org/project settings, branding, visibility, danger zone
- Users: members/guests/groups tabs, filters, role management, dialogs
- Status: overview, deployment, resources, tables, logs, actions
- Alerts: listing, history, metadata, create/edit dialogs
- Reports: listing, history, run now, download, export formats
- Public URLs: creation, deletion, expiration, table
- Env variables: add/edit/delete dialogs, table, filters
- Auth: login, CLI auth, device code, access request/grant/deny
- Embeds: explore embed, unsupported kind
- GitHub: connect, repo selection, pull, overwrite
- Projects: home, nav, avatar, theme, card actions, hibernation
- Edit session: commit, merge, publish, branch dialog
- Branches: status labels, table, hibernate/resume
- Error pages: user-facing error headers and bodies
- Route errors: token, dashboard, billing, org/project fetch
Persist the user's language preference (preferred_locale) server-side
so it survives across sessions. The LanguageSwitcher calls
UpdateUserPreferences to save the choice; on next login, +layout.ts
reads it from GetCurrentUser and applies it before rendering.

- Add preferred_locale column (migration 0096)
- Extend UpdateUserPreferences / GetCurrentUser proto + handler
- LanguageSwitcher: persistLocale callback via adminServiceUpdateUserPreferences
- +layout.ts: resolveInitialLocale from user preferences on load
- Set emitGitIgnore: true (Paraglide best practice)
@nishantmonu51 nishantmonu51 added Type:Feature New feature request Needs:Scoping Needs more scoping and input on-hold Size:XL Very large change: 2,000+ lines and removed on-hold labels Jun 30, 2026
@AdityaHegde

Copy link
Copy Markdown
Collaborator

Thanks for the PR @dfliess ! I have merged one of my older PR that adds paraglide. #9570

Please pull changes from main and keep only text replacements and the new language addition.

@dfliess

dfliess commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @AdityaHegde for merging the Paraglide scaffolding in #9570, I created #9635, which rebases the localization work on top of #9570's structure (correct import paths, web-common/src/lib/i18n/messages/), resolves conflicts against current main, and adds locale persistence (migration 0096, proto, Go handlers). Do you close this one in favor of the new PR?

@dfliess dfliess closed this Jul 9, 2026
@dfliess dfliess deleted the i18n-upstream branch July 9, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs:Scoping Needs more scoping and input Size:XL Very large change: 2,000+ lines Type:Feature New feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants