2.3 KiB
2.3 KiB
1. Translation Data Model and Persistence
- 1.1 Add translation persistence model linked to base article with language code (
en,ta,ml) - 1.2 Update database initialization/migration path to create translation storage structures
- 1.3 Add repository operations to create/read translation variants by article and language
- 1.4 Enforce no duplicate translation variant for the same article-language pair
2. Ingestion Pipeline Translation Generation
- 2.1 Extend ingestion flow to trigger Tamil and Malayalam translation generation for each new article
- 2.2 Reuse Perplexity integration for translation calls with language-specific prompts
- 2.3 Persist generated translations as linked variants during the same ingestion cycle
- 2.4 Implement graceful fallback when translation generation fails (store English base, continue cycle)
3. Language-Aware API Delivery
- 3.1 Add language selection input handling to latest-news endpoint
- 3.2 Add language selection input handling to paginated feed endpoint
- 3.3 Return translated headline/summary when available and fallback to English when missing
- 3.4 Define and implement behavior for unsupported language requests in this phase
4. Frontend Language Selector and Rendering
- 4.1 Add landing-page language selector UI with English, Tamil, and Malayalam options
- 4.2 Update hero data fetch/render flow to request and display selected language content
- 4.3 Update feed pagination fetch/render flow to request and display selected language content
- 4.4 Keep existing attribution/media rendering behavior intact across language switches
5. Preference Persistence and Returning User Behavior
- 5.1 Persist user-selected language in localStorage with cookie fallback
- 5.2 Restore persisted language on page load before initial content fetch
- 5.3 Initialize selector state and API language requests from restored preference
6. Validation and Documentation
- 6.1 Validate translation creation and retrieval for Tamil and Malayalam on new articles
- 6.2 Validate fallback behavior for missing translation variants and unsupported language input
- 6.3 Validate returning-user language persistence across browser sessions
- 6.4 Update README with multilingual behavior, language selector usage, and persistence details