DeepSeek V4.1 Flash · Heavy
feature-localization-fallbacks-server-side-discourse-cursor
Discourse · Ruby · S · 30–99 lines · 6 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Haiku 5.5.
- Gold bugs found
- 2 of 2
- Comments published
- 3
- Comments matching a bug
- 2
- Comments not matching
- 1
- Cost of this PR
- $0.263
Published comments (3)
Fallback chain isn't loaded for non-request translations; misses are cached — Translations outside a request (jobs, mailers, rake tasks) resolve the fallback chain against a locale that `load_locale` never loaded, raising `MissingTranslation`. Load the whole `I18n.fallbacks` chain inside `I18n.translate`/`load_locale` instead of relying on the controller filter.
I18n fallback lookup raises when SiteSetting is unavailable — `FallbackLocaleList#[]` runs on every `I18n.t` and reads `SiteSetting.default_locale`, which queries the DB and raises in boot/rake paths when it's unavailable. Guard the lookup with a rescue that falls back to `:en`, or resolve the site locale once outside the per-call chain.
Translation cache key ignores fallback site default locale — Fallback results now depend on `SiteSetting.default_locale`, but the cache key in `translate_accelerator.rb` omits it and nothing calls `I18n.reload!` on settings changes, so stale languages persist after an admin updates `default_locale`. Include the site default locale in the cache key or clear the cache on `site_setting_saved`.
Gold bugs found (2)
Gold bugs missed (0)
None.