MiniMax M3 · Balanced
feature-localization-fallbacks-server-side-discourse-cursor
Discourse · Ruby · S · 30–99 lines · 6 files
The normal review, with one generalist agent. Judge: Claude Haiku 5.5.
- Gold bugs found
- 0 of 2
- Comments published
- 1
- Comments matching a bug
- 0
- Comments not matching
- 1
- Cost of this PR
- $0.146
Published comments (1)
mediumperformanceconfig/initializers/i18n.rb:13-18
FallbackLocaleList#[] mixes String and Symbol, defeating uniq — `Array#uniq` can't deduplicate the mixed `String`/`Symbol` identifiers returned here, so `I18n.ensure_loaded!` parses the same `\.en\.yml$` files and merges into `@translations[:en]` twice on every boot. Normalize with `locale.to_sym` before the `uniq.compact` so each locale loads only once.
Gold bugs found (0)
None.
Gold bugs missed (2)
mediumFallback locale catalogs are only loaded in the controller's set_locale filter, while translate loads just the current locale, so translations outside requests (jobs, mailers) cannot fall back to the site default or English.
mediumThe translation cache key does not include the site or its default locale, but fallback results now depend on SiteSetting.default_locale, so multisite processes or a changed default locale serve stale fallback translations.