DeepSeek V4 Pro · 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 Opus 5.5.
- Gold bugs found
- 1 of 3
- Comments published
- 2
- Comments matching a bug
- 1
- Comments not matching
- 1
- Cost of this PR
- $1.153
Published comments (2)
I18n fallback locales not loaded outside controllers — Fallback locales are never loaded in background jobs and mailers, so missing keys return `MissingTranslation` instead of falling back to the site default or English. Load the fallback chain inside `I18n.translate`/`load_locale`, or call `ensure_loaded!` in those contexts rather than only in the controller before_filter.
I18n.locale with regex metacharacters causes RegexpError in fallback loading — A user setting a locale with regex metacharacters like `(` causes an unhandled `RegexpError` and a 500 on every request because `ensure_loaded!` interpolates `I18n.locale` into a regex. Validate `locale` against `LocaleSiteSetting.supported_locales` before it reaches the fallback loading path.