0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/plugins/discourse-ai/app/controllers/discourse_ai
Natalie Tay 3507a634a5
FEATURE: Show progress of other translation targets in the AI translation admin page (#41983)
Related:
https://meta.discourse.org/t/ai-translation-progress-graph/405915/3

A more thorough translation progress screen.

Progress now covers posts, topics, categories and tags. The overview
cards show the total content in scope, how many are fully translated
across all supported locales, and how many still need language
detection.

Eligibility follows the existing translation settings, including max
age, category scope, bot content and PM settings. Tags don't have
eligibility settings, so they use the total instead.

Opening a card loads its per-locale breakdown separately, so the initial
page load doesn't also run every detail query. For each locale, content
already in that language is excluded from eligible. Pending includes
eligible content that still needs language detection.

The posts query is quite heavy, so the overview is cached together for
2h and each detail target has its own 2h cache. Relevant translation
settings are part of the cache key, and a distributed mutex prevents
duplicate detail queries when two requests miss the same cache.

**Perf note**: Calculating translation progress can be expensive on
large sites, particularly for posts. The production dataset used for
testing contained approximately 2 million posts, 2.5 million post
localizations, and 730,000 topic localizations. Post eligibility must
also inspect `raw` for the empty and maximum-length rules, so the
candidate scope cannot be answered entirely from the existing indexes.
To limit the impact we do have cache, and details are fetched only when
a card is opened, and the queries aggregate localization coverage in
bulk instead of repeatedly probing the localization indexes for every
eligible record and target locale.

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2026-07-24 12:24:51 +08:00
..
admin FEATURE: Show progress of other translation targets in the AI translation admin page (#41983) 2026-07-24 12:24:51 +08:00
ai_bot SECURITY: Shared conversations and artifacts remain accessible (#41554) 2026-07-08 14:41:02 -05:00
ai_helper FEATURE: Automatic AI captions (#41586) 2026-07-15 13:24:10 +08:00
discord DEV: Ai bot Signature verification uses different body source than action logic (#38294) 2026-03-05 16:30:05 -03:00
discover DEV: AI persona to agent migration (#38319) 2026-03-10 15:59:45 +11:00
embeddings DEV: Improve rate limiting on hyde search (#37794) 2026-02-13 17:00:00 -03:00
sentiment FEATURE: Add agent-backed sentiment classification (#40136) 2026-05-26 10:32:54 -03:00
summarization FEATURE: Add locale-aware AI summaries (#41893) 2026-07-22 17:31:38 +10:00
translation DEV: Enable Style/RedundantBegin rubocop rule (#40096) 2026-05-19 18:44:54 +02:00
ai_credits_controller.rb SECURITY: Unscoped status lookups leak restricted metadata 2026-03-19 15:21:28 +00:00
mcp_oauth_controller.rb FIX: Improve MCP OAuth callback error handling (#38889) 2026-03-27 07:34:24 +11:00
post_image_captions_controller.rb FEATURE: Dedicated image caption AI feature and agent validations (#41729) 2026-07-16 11:29:39 +08:00