Skip to content

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

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

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

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)
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