GLM-5.3 · 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
1 of 2
Comments published
2
Comments matching a bug
1
Comments not matching
1
Cost of this PR
$2.212

Published comments (2)

highbugconfig/initializers/i18n.rb:13-18

Fallback locale list crashes I18n.t when default_locale is nil or DB unavailable — When the settings container is empty or the DB is unreachable, `SiteSetting.default_locale` returns nil or raises, so `to_sym` crashes every `I18n.t` call — lib/tasks/db.rake already guards this exact read. Guard the read with a `:en` fallback and rescue so the list degrades instead.

mediumbugconfig/initializers/i18n.rb:12-18

Stale translation cache: fallback depends on default_locale but accelerator cache key does not — Translation results now depend on `SiteSetting.default_locale`, but the cross-request LRU cache in `translate_accelerator.rb` still keys only on key, locale, and backend, so users keep stale translations after an admin changes the default. Add `default_locale` to the cache key or clear the cache when it changes.

Gold bugs found (1)

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 (1)

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.