Welcome to DocuTranslate! Follow these steps to translate your documents:
Select Workflow
First, choose the translation process you need from the top of the settings panel. Different workflows are for different file types:
Markdown-based: For translating PDF, markdown, images, etc.
Plain Text: For translating .txt and other plain text files.
JSON: For translating specific fields in .json files.
DOCX: For translating .docx files.
XLSX: For translating .xlsx spreadsheet files.
SRT Subtitle: For translating .srt subtitle files.
EPUB: For translating .epub ebook files.
New Feature: \"Auto-select workflow\" is on by default. Just upload your file, and the system will automatically pick the right workflow for you.
Configure Parameters
Based on your chosen workflow, complete the necessary settings. All settings are automatically saved in your browser.
Parsing Configuration (Only for \"Markdown-based\" workflow):
Parsing Engine: Choose an engine to convert your file (like a PDF) into a translation-friendly Markdown format. Not needed if your file is already Markdown.
Mineru Token: If you select the minerU engine, you need to enter your token here.
DOCX/XLSX/SRT/EPUB Options (For their respective workflows):
Insert Mode: Define how the translation is placed in the document. You can \"Replace\" the original, \"Append\" after it, or \"Prepend\" before it.
Separator: When using \"Append\" or \"Prepend\", this is used to separate the original and translated text.
JSON Path Configuration (Only for \"JSON\" workflow):
JSON paths to translate: Enter one JSONPath expression per line to specify which fields to translate.
E.g., $..description translates all values with the key 'description'. $.items[0].name translates the name of the first item.
Translation Model:
Platform/API Base URL/API Key/Model ID: Configure the AI translation service you want to use.
Refer to the platform's documentation for Model IDs. It's recommended to use non-inference models or mixed-inference models (with thinking turned off).
Translation Configuration:
Target Language/Custom Prompt: Specify the target language and any additional instructions.
Thinking Mode: Sets whether a mixed-inference model should 'think'. Supported for Zhipu's glm4.5 series, Alibaba's qwen3 series, VolcEngine's seed1.6 series, etc. Disabling is recommended.
Advanced Parameters:
Chunk Size/Concurrency/Temperature: The size of text chunks sent to the AI, number of concurrent requests, and creativity level. Default values usually work fine.
Upload File
In the task list on the right, click or drag your document into the file drop area.
Start Translation
Once the file is selected, click the Start Translation button on the task card. The system will start processing, and you can see real-time progress in the log area.
Review & Download
After translation is complete, action buttons will appear on the task card:
Preview: Opens a side panel for a side-by-side preview of the original and translation (for reference only).
Download: Download the translation in various formats, including PDF, DOCX, XLSX, HTML, and Markdown.
Tip: All your settings are automatically saved in your browser's local storage for your next visit.
",
+ "tutorialUnderstandBtn": "Got it",
+ "contributorsModalTitle": "Thanks for Contributing",
+ "contributorsPara1": "DocuTranslate is an open-source project! The community's needs and usage are what drive its progress.",
+ "contributorsPara2": "A huge thank you to everyone who has sponsored the project, submitted code, provided valuable feedback, and starred the repository!",
+ "contributorsWelcome": "You can contribute in the following ways:",
+ "contributorsGithub": "GitHub Page",
+ "contributorsPR": "Submit a Pull Request",
+ "contributorsIssue": "Report an Issue",
+ "contributorsQQ": "Or contact the author via QQ Group: 1047781902",
+ "status_selectFileFirst": "Please select a file first.",
+ "status_invalidWorkflow": "Invalid workflow type.",
+ "status_fillRequired": "Please fill in all required settings.",
+ "status_releasingOldTask": "Re-translating. Releasing resources for the old task.",
+ "status_encodingAndSubmitting": "Encoding file and submitting task...",
+ "status_requestOk": "Task started, now processing...",
+ "status_requestFail": "Request failed",
+ "status_initFail": "Initialization failed",
+ "status_cancelling": "Cancelling...",
+ "status_cancelSent": "Cancellation request sent.",
+ "status_cancelFail": "Failed to cancel",
+ "status_updateError": "Error updating status.",
+ "status_gettingStatus": "Getting status...",
+ "preview_loading": "
Loading translation...
",
+ "preview_loadFailed": "
Failed to load translation
",
+ "preview_cantReadOriginal": "Could not read original file content.",
+ "preview_cantPreviewType": "Cannot preview this file type directly",
+ "preview_noOriginalCache": "Original file cache not found.",
+ "preview_bilingual": "Bilingual Preview",
+ "preview_translatedOnly": "Translated Only Preview",
+ "pdf_preparing": "Preparing PDF, please wait...",
+ "pdf_print_failed": "Automatic printing failed. Please print manually from the preview.",
+ "pdf_fetch_failed": "Failed to fetch HTML content, cannot generate PDF.",
+ "init_failed_alert": "Page initialization failed. Please check if the backend service is running and refresh the page.",
+ "admin_tasklist_failed": "Could not load task list from server. Please check backend connection.",
+ "btn_startTranslation": "Start Translation",
+ "btn_initializing": "Initializing...",
+ "btn_cancelTranslation": "Cancel Translation",
+ "btn_reTranslate": "Re-translate"
+ }
+}
\ No newline at end of file
diff --git a/docutranslate/static/index.html b/docutranslate/static/index.html
index 714e95f..1de0f1e 100644
--- a/docutranslate/static/index.html
+++ b/docutranslate/static/index.html
@@ -1 +1 @@
-
DocuTranslate - 交互式文档翻译
Video tutorials can be found by searching for docutranslate
on Bilibili.
Welcome to DocuTranslate! Please follow the steps below to translate your documents:
Select Workflow
First, select the desired translation process at the top of the settings panel. Different workflows are suitable for different file types:
Convert to Markdown then Translate: Suitable for translating PDF, Markdown, image, and other files.
Plain Text Translation: For translating plain text files like .txt.
JSON Translation: For translating specific fields in .json files.
DOCX Translation: For translating .docx files.
XLSX Translation: For translating .xlsx spreadsheet files.
SRT Subtitle Translation: For translating .srt subtitle files.
EPUB Translation: For translating .epub e-book files.
New Feature: The "Auto-select workflow" switch is now enabled by default. Simply upload your file, and the system will automatically match the appropriate workflow for you, simplifying the process.
Configure Parameters
Based on your chosen workflow, complete the corresponding configuration. All settings are automatically saved in your browser.
Parsing Configuration (Only shown for "Convert to Markdown then Translate" workflow):
Parsing Engine:
Select an engine to convert your file (e.g., a PDF) into a translation-friendly Markdown format. If your file is already in Markdown format, no selection is needed.
Mineru Token: If you choose the minerU engine, you need to enter your Token here.
DOCX/XLSX/SRT/EPUB Translation Options (Shown for corresponding workflows):
Insert Mode: Defines how the translation result is placed into the document or subtitle. You can choose to "Replace" the original text, "Append" after it, or "Prepend" before it.
Separator: When "Append" or "Prepend" mode is selected, this is used to insert a separator between the original and translated text.
JSON Path Configuration (Only shown for "JSON Translation" workflow):
JSON Paths to Translate: Enter one JSONPath
expression per line to specify the fields to be translated.
For example:$..description translates all values for the key "description". $.items[0].name translates the name of the first item.
Translation Model:
Select Platform/API Address/API Key/Model ID:
Configure the AI translation service you wish to use.
For Model ID, refer to the platform's documentation. It is recommended to use non-inference models or mixed-inference models (with thinking disabled).
Translation Configuration:
Target Language/Custom Prompt: Specify the target language and additional instructions.
Thinking Mode: Sets whether a mixed-inference model should "think". This is supported by Zhipu's glm4.5 series, Alibaba Cloud's qwen3 series, and Volcengine's seed1.6 series. Disabling is recommended.
Advanced Parameters:
Chunk Size/Concurrency/Temperature: The chunk size, number of concurrent requests, and temperature sent to the AI. Default values are usually fine.
Upload File
In the task list on the right, click or drag your document into the file upload area.
Start Translation
After successfully selecting a file, click the Start Translation button in the bottom-right corner of the task card. The system will begin processing the task, and you can view real-time progress in the log area.
View & Download
Once the translation is complete, action buttons will appear at the bottom of the task card:
Preview:
Compare the original and translated text in a side panel that slides out from the right (for reference only).
Download:
Download the translation in various formats, including PDF, DOCX, XLSX, HTML, and Markdown.
Tip: All settings are automatically saved locally in your browser for your convenience.
Thanks for Contributing
DocuTranslate is an open-source project! The community's needs and usage are the driving force behind its progress.
Thank you to all the friends who have sponsored the project, submitted code, provided valuable suggestions, and starred the project!
You are welcome to contribute in the following ways: