What Changed
The translation pipeline previously only translated posts and weekly reports into 3 languages (Persian, Arabic, Turkish). This release expands coverage to all 7 non-English languages supported by the dashboard, adds smart partial re-translation, and makes translated content visible to end users in real time.
7-Language Translation Pipeline
TARGET_LANGUAGES expanded from 3 to 7:
- Existing: Persian (fa), Arabic (ar), Turkish (tr)
- New: Chinese Simplified (zh), Spanish (es), French (fr), German (de)
- Smart merge: only translates missing languages, preserves existing translations
- Backfill endpoint: POST /admin/trigger-pipeline {name: translation_backfill} runs fire-and-forget via ctx.waitUntil
Locale-Aware Frontend Rendering
New localized() utility wired into content pages:
- lib/localized.ts: localized(item, field, locale) picks translation or falls back to English
- Weekly Market Intelligence listing: titles and summaries render in user's selected language
- Report detail page: title, summary, and full markdown body render locale-aware
- Automatic fallback: if translation is unavailable, English original is shown seamlessly
Admin AI Orchestrator Visibility
Translation pipeline now fully visible in the admin dashboard:
- Purple Ollama route badge and model source badge in AI logs
- 5th routing card (Ollama/Hetzner) with dedicated request count in Overview
- ollama_requests counted separately in usage stats, included in 'local' cost bucket
- Translation filter option in AI logs, Translation task in Test panel
- Translation Pipeline listed in Cron Jobs panel under AI category