tractatus/public/js/admin
TheFlow 8528fd079b feat(translation): complete DeepL translation workflow
Frontend:
- Add translate button click handler in submission-modal-enhanced.js
- Display loading state during translation ( Translating...)
- Update French textarea with translated content
- Auto-update word counts after translation
- Show success message with DeepL attribution

Backend:
- Add POST /api/submissions/:id/translate endpoint
- Integrate Translation.service (DeepL)
- Save translations to SubmissionTracking.documents
- Mark translations as 'translatedBy: deepl', 'approved: false'
- Return translated text with caching metadata

Complete Translation Flow:
1. User clicks 'Translate EN → FR' button
2. Frontend sends English text to /api/submissions/:id/translate
3. Backend calls DeepL API via Translation.service
4. Translation cached for 24 hours
5. Result saved to submission.documents[docType].versions[]
6. French textarea populated with translation
7. User can review/edit before saving submission

Next: Configure DEEPL_API_KEY in .env to enable translations
2025-10-24 11:22:50 +13:00
..
analytics.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
audit-analytics.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
auth-check.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
blog-curation-enhanced.js fix(admin): force fresh API requests to prevent cached 500 errors 2025-10-24 11:02:43 +13:00
blog-curation.js fix(admin): force fresh API requests to prevent cached 500 errors 2025-10-24 11:02:43 +13:00
blog-validation.js feat(admin): add standalone submission package modal support 2025-10-24 11:06:22 +13:00
calendar.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
case-moderation.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
claude-md-migrator.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
dashboard.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
hooks-dashboard.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
login.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
media-triage.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
newsletter-management.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
project-editor.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
project-manager.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
project-selector.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
rule-editor.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
rule-manager.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
submission-modal-enhanced.js feat(translation): complete DeepL translation workflow 2025-10-24 11:22:50 +13:00
submission-modal-old.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00