Skip to content

Render the dashboard in apps that don't make English available - #111

Merged
fractaledmind merged 2 commits into
mainfrom
fix/dashboard-without-english-locale
Oct 16, 2026
Merged

fractaledmind merged 2 commits into
mainfrom
fix/dashboard-without-english-locale

Conversation

@fractaledmind

Copy link
Copy Markdown
Owner

Fixes #70.

The dashboard wraps every request in I18n.with_locale(:en), because its strings (including the custom datetime.distance_in_words.short set) exist only in English. Rails enforces available locales by default, so an app with available_locales = [:fr] got I18n::InvalidLocale on every dashboard page.

The dashboard now switches to English only when the app allows :en, and otherwise keeps the app's locale. Apps with English see no change. A README note tells apps without English which translations to provide, which is what the reporter did in their workaround.

The new request test sets available_locales = [:fr] and loads the index and error pages. It fails with I18n::InvalidLocale without the fix.

🤖 Generated with Claude Code

fractaledmind and others added 2 commits October 16, 2026 12:27
The dashboard forced the :en locale, which raises I18n::InvalidLocale
when an app's available_locales leaves English out. It now keeps the
app's locale in that case. Fixes #70.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@fractaledmind
fractaledmind merged commit 4c3f785 into main Oct 16, 2026
17 checks passed
@fractaledmind
fractaledmind deleted the fix/dashboard-without-english-locale branch October 16, 2026 11:54
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.

I18n::InvalidLocale error when :en is not included in config.i18n.available_locales

1 participant