0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 05:42:36 +08:00
discourse/plugins/discourse-ai/app
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
..
controllers FEATURE: Show progress of other translation targets in the AI translation admin page (#41983) 2026-07-24 12:24:51 +08:00
helpers/discourse_ai/ai_bot
jobs FEATURE: Add locale-aware AI summaries (#41893) 2026-07-22 17:31:38 +10:00
mailers
models FEATURE: Add locale-aware AI summaries (#41893) 2026-07-22 17:31:38 +10:00
serializers DEV: Make AI context compaction global (#41317) 2026-07-14 18:41:37 -03:00
services FEATURE: Add locale-aware AI summaries (#41893) 2026-07-22 17:31:38 +10:00
views DEV: AI persona to agent migration (#38319) 2026-03-10 15:59:45 +11:00