From 8d4aa4da56e2ddb5f53ba142c2b6a5ad49e791d0 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 13 Jul 2026 16:33:45 +0200 Subject: Set config.i18n.available_locales explicitly Rails-i18n's bundled locale data means an unset available_locales defaults to every locale it ships pluralization/date rules for -- several hundred, not the two this app actually supports. Harmless everywhere the outer route scope's own /de|en/ regex already narrowed whatever reached I18n.available_locales.include?(...), but the first code to read the list directly (Page.non_default_locales) took it at face value. Also closes a related, independently-silent gap in Page#rewrite_links_in_body, which used the same unconstrained list to decide whether a link was already locale-prefixed. --- config/application.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/application.rb b/config/application.rb index 0be3396..5ec3e8f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,6 +17,7 @@ module Cccms config.time_zone = 'Berlin' config.i18n.default_locale = :de + config.i18n.available_locales = [:de, :en] config.i18n.fallbacks = { en: [:en, :de] } config.filter_parameters += [:password, :password_confirmation] -- cgit v1.3