summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-13 16:33:45 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-13 16:33:45 +0200
commit8d4aa4da56e2ddb5f53ba142c2b6a5ad49e791d0 (patch)
treecbade5db5cc06f5c533450d8b0d8ebd95c731960
parentea8ee1d35948c6adc4a377c9eb77d99b2d856932 (diff)
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.
-rw-r--r--config/application.rb1
1 files changed, 1 insertions, 0 deletions
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
17 config.time_zone = 'Berlin' 17 config.time_zone = 'Berlin'
18 18
19 config.i18n.default_locale = :de 19 config.i18n.default_locale = :de
20 config.i18n.available_locales = [:de, :en]
20 config.i18n.fallbacks = { en: [:en, :de] } 21 config.i18n.fallbacks = { en: [:en, :de] }
21 22
22 config.filter_parameters += [:password, :password_confirmation] 23 config.filter_parameters += [:password, :password_confirmation]