Kimi K3.1 Pro · 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
2
Comments matching a bug
2
Comments not matching
0
Cost of this PR
$0.987

Published comments (2)

mediumbugconfig/initializers/i18n.rb:17

Fallback cache key omits the tenant-dependent default locale — A fallback lookup can return another tenant's translation, or a stale one after the default locale changes, because the accelerator cache key ignores `SiteSetting.default_locale`. Add the fallback chain or default locale to the key in `lib/freedom_patches/translate_accelerator.rb`, or invalidate these entries when it changes.

mediumbugconfig/initializers/i18n.rb:20-24

Fallback chains stay unloaded outside ApplicationController — Missing keys can remain untranslated in `PostAlerter` and `Jobs::Base`, since only `ApplicationController#set_locale` calls `ensure_loaded!` to load `SiteSetting.default_locale` and `:en`. Load the fallback chain in the shared translation path, or update every consumer that sets or temporarily changes `I18n.locale`. **Also found in:** - `app/controllers/application_controller.rb:159-159`

Gold bugs found (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.

Gold bugs missed (0)

None.