Following up on my original request with a concrete implementation sketch — happy to help with a PR if the direction sounds reasonable.
Problem: Category topic templates (categories.topic_template) are not localizable. The CategoryLocalization model and the Localizable concern only cover name and description, and the AI Content Localization pipeline skips templates accordingly. The composer always inserts the base-locale template, regardless of the user’s locale.
Use case: We run a bilingual (DE/EN) community on Discourse AI Content Localization with auto-translation in production. Translating posts/topics works great, but category templates for structured content — bug report forms with checklists, RSVP flows via [event] BBCode — cannot be duplicated per language, because functional BBCode must exist exactly once. The only workaround is a single template with awkward bilingual labels (“App-Version / App version:”), which hurts readability for everyone.
Proposal:
- Add a nullable
topic_templatetext column tocategory_localizations - Composer: if a localization for the user’s current locale exists, use its template; fall back to
category.topic_template - Expose/persist the field per locale in the category admin UI (next to localized name/description)
- Include
topic_templatein the AI Content Localization pipeline when translating categories (likedescription)
Migration is trivial (add_column :category_localizations, :topic_template, :text); the main work is composer selection logic and admin UI.
Alternatives considered:
- Bilingual single template (current workaround) — breaks down with functional BBCode blocks
- Theme component injecting per-locale text — fragile, no server-side validation, breaks API composers