feat(translation): add model, config, task, API, and UI for default document language translation
- Add detected_language, default_language_text, default_language_code columns to FileRecord
- Add default_document_language column to UserProfile
- Add DEFAULT_DOCUMENT_LANGUAGE config setting (defaults to "en")
- Create translate_to_default_language Celery task
- Integrate translation trigger into embed_metadata_into_pdf pipeline
- Add /api/files/{id}/translate and /api/files/{id}/translation/default API endpoints
- Add /files/{id}/text/default-language view endpoint
- Update file_view.html with translation sections (default language, on-the-fly)
- Add translation keys to en.json
- Create Alembic migration 036
- Update .env.demo
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -1731,5 +1731,21 @@
|
||||
"upload.uploading": "Uploading...",
|
||||
"upload.url_description": "Enter a direct link to a file (PDF, Office documents, or images)",
|
||||
"upload.url_label": "File URL",
|
||||
"upload.url_placeholder": "https://example.com/document.pdf"
|
||||
"upload.url_placeholder": "https://example.com/document.pdf",
|
||||
|
||||
"translation.default_language_version": "Default Language Version",
|
||||
"translation.detected_language": "Detected language",
|
||||
"translation.show_text": "Show text",
|
||||
"translation.hide_text": "Hide text",
|
||||
"translation.copy": "Copy",
|
||||
"translation.load_translation": "Load translation",
|
||||
"translation.translate_to": "Translate to Another Language",
|
||||
"translation.select_language": "Select language…",
|
||||
"translation.translate_btn": "Translate",
|
||||
"translation.translating": "Translating…",
|
||||
"translation.no_translation": "No translation available yet — it may still be processing",
|
||||
"translation.translated_to": "Translated to",
|
||||
"translation.translation_failed": "Translation failed",
|
||||
"translation.select_target": "Please select a target language.",
|
||||
"translation.copied": "Copied!"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user