From 0c10fcbafc5b6b708ac983d664384a42e0b0d456 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 12:32:03 +0000 Subject: [PATCH] fix: register translate task in celery_worker and add setting metadata - Import translate_to_default_language in celery_worker.py - Add default_document_language to SETTING_METADATA in settings_service.py Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- app/celery_worker.py | 1 + app/utils/settings_service.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/app/celery_worker.py b/app/celery_worker.py index fd68c332..17110a66 100644 --- a/app/celery_worker.py +++ b/app/celery_worker.py @@ -39,6 +39,7 @@ from app.tasks.refine_text_with_gpt import refine_text_with_gpt # noqa: F401 from app.tasks.rotate_pdf_pages import rotate_pdf_pages # noqa: F401 from app.tasks.send_to_all import send_to_all_destinations # noqa: F401 from app.tasks.subscription_tasks import apply_pending_subscription_changes_all # noqa: F401 +from app.tasks.translate_to_default_language import translate_to_default_language # noqa: F401 # Import new send tasks from app.tasks.upload_to_dropbox import upload_to_dropbox # noqa: F401 diff --git a/app/utils/settings_service.py b/app/utils/settings_service.py index dceaa943..63a17fab 100644 --- a/app/utils/settings_service.py +++ b/app/utils/settings_service.py @@ -522,6 +522,19 @@ SETTING_METADATA = { "required": False, "restart_required": False, }, + # Document Translation + "default_document_language": { + "category": "AI Services", + "description": ( + "ISO 639-1 language code for the default document translation target " + "(e.g. 'en', 'de', 'fr'). Documents whose detected language differs " + "are automatically translated into this language after processing." + ), + "type": "string", + "sensitive": False, + "required": False, + "restart_required": False, + }, # OCR Engine Configuration "ocr_providers": { "category": "OCR Engines",