diff --git a/docutranslate/__init__.py b/docutranslate/__init__.py index 1a8853e..dbdd5e2 100644 --- a/docutranslate/__init__.py +++ b/docutranslate/__init__.py @@ -1,3 +1,3 @@ # SPDX-FileCopyrightText: 2025 QinHan # SPDX-License-Identifier: MPL-2.0 -__version__="1.4.4" \ No newline at end of file +__version__="1.4.5" \ No newline at end of file diff --git a/docutranslate/static/i18nData.json b/docutranslate/static/i18nData.json index 9212f47..8c39cb8 100644 --- a/docutranslate/static/i18nData.json +++ b/docutranslate/static/i18nData.json @@ -6,14 +6,15 @@ "workflowTitle": "选择工作流", "workflowOptionMarkdown": "转Markdown再翻译 (.pdf/.md/.png等)", "workflowOptionTxt": "纯文本翻译 (.txt)", - "workflowOptionJson": "JSON翻译 (.json)", + "workflowOptionEpub": "EPUB翻译 (.epub)", "workflowOptionDocx": "DOCX翻译 (.docx)", "workflowOptionXlsx": "XLSX翻译 (.xlsx/.csv)", "workflowOptionSrt": "SRT字幕翻译 (.srt)", - "workflowOptionEpub": "EPUB翻译 (.epub)", - "workflowOptionHtml": "HTML翻译 (.html)", "workflowOptionAss": "ASS字幕翻译 (.ass)", + "workflowOptionJson": "JSON翻译 (.json)", + "workflowOptionHtml": "HTML翻译 (.html)", "autoWorkflowLabel": "自动选择工作流", + "txtSettingsTitleText": "TXT翻译选项", "insertModeLabel": "插入模式", "insertModeReplace": "替换原文 (Replace)", "insertModeAppend": "附加到原文后 (Append)", @@ -22,20 +23,28 @@ "separatorLabel": "分隔符", "separatorPlaceholderSimple": "例如: \\n---\\n", "separatorHelp": "当插入模式为附加或前置时,用于分隔原文和译文的字符。\\n 代表换行。", - "separatorHelpAss": "当插入模式为附加或前置时,用于分隔原文和译文的字符。\\N 是ASS格式的换行符。\n", + "docxSettingsTitleText": "DOCX翻译选项", "insertModeHelpDocx": "选择如何将翻译后的文本插入。", "separatorPlaceholder": "例如: \\n---翻译---\\n", + "xlsxSettingsTitleText": "XLSX翻译选项", "insertModeHelpXlsx": "选择如何将翻译后的文本插入到单元格中。", "xlsxTranslateRegionsLabel": "翻译区域 (可选)", "xlsxTranslateRegionsPlaceholder": "每行一个区域, 例如:Sheet1!A1:B10(不指定表名则对所有表生效)", + "srtSettingsTitleText": "SRT翻译选项", "insertModeHelpSrt": "选择如何将翻译后的文本插入。", + "epubSettingsTitleText": "EPUB翻译选项", "insertModeHelpEpub": "选择如何将翻译后的文本插入。", + "htmlSettingsTitleText": "HTML翻译选项", "insertModeHelpHtml": "选择如何将翻译后的文本插入。", - "separatorPlaceholderAss": "例如: \\N (换行符)", + "assSettingsTitleText": "ASS翻译选项", "insertModeHelpAss": "选择如何将翻译后的文本插入。", + "separatorPlaceholderAss": "例如: \\N (换行符)", + "separatorHelpAss": "当插入模式为附加或前置时,用于分隔原文和译文的字符。\\N 是ASS格式的换行符。", + "jsonSettingsTitleText": "JSON路径配置", "jsonPathLabel": "需要翻译的JSON路径", "jsonPathPlaceholder": "每行一个路径, 例如:\n$.name\n$.*", "jsonPathHelp": "采用jsonpath-ng的路径选择语法,每一行表示一个json路径。 将翻译路径匹配对象内的所有字符串", + "parsingSettingsTitleText": "解析配置", "parsingEngineLabel": "解析引擎", "parsingEngineHelp": "如果上传的文件本身是.md格式,此项可不选。", "getMineruTokenTitle": "获取Mineru Token", @@ -46,15 +55,17 @@ "modelVersionHelp": "mineru VLM是更新的内测模型。", "formulaOcrLabel": "公式识别", "codeOcrLabel": "代码识别", + "aiSettingsTitleText": "翻译模型", "skipTranslationLabel": "跳过翻译", "platformLabel": "选择平台", "platformCustom": "自定义接口", "baseUrlLabel": "API 地址 (Base URL)", - "baseUrlPlaceholder": "OpenAi兼容地址", + "baseUrlPlaceholder": "OpenAI兼容地址", "getApiKeyTitle": "获取API Key", "apiKeyPlaceholder": "请输入您的API Key", "modelIdLabel": "选择模型", "modelIdPlaceholder": "例如: gpt-4o, glm-4", + "translationSettingsTitleText": "翻译配置", "targetLanguageLabel": "目标语言", "targetLanguageCustom": "其它 (自定义)", "customLangPlaceholder": "请输入目标语言, 例如: Italian", @@ -78,7 +89,7 @@ "glossaryGenConfigLabel": "生成术语表配置", "glossaryGenConfigSame": "与翻译配置相同", "glossaryGenConfigCustom": "自定义", - "githubInfo": "GitHub主页(欢迎star❤):
https://github.com/xunbu/docutranslate", + "githubInfo": "GitHub主页(欢迎star❤):
https://github.com/xunbu/docutranslate", "qqGroupInfo": "交流QQ群: 1047781902", "taskListTitle": "任务列表", "newTaskBtn": "新建任务", @@ -87,7 +98,7 @@ "taskCardIdPlaceholder": "等待提交...", "taskCardFileDrop": "点击或拖拽文件到此处", "taskCardFileSelected": "文件已选择", - "taskCardFilenameLabel": "文件名: ", + "taskCardFilenameLabel": "文件名:", "taskCardLogLabel": "日志", "taskCardStatusWaiting": "等待上传文件...", "taskCardPreviewBtn": "预览", @@ -105,7 +116,7 @@ "closeBtn": "关闭", "downloadBtn": "下载", "tutorialModalTitle": "使用教程", - "tutorialModalBody": "

视频教程可以在B站搜索 docutranslate 获取。

欢迎使用 DocuTranslate!请按照以下步骤完成文档翻译:

  1. 选择工作流

    首先,在配置面板顶部选择您需要的翻译流程。不同的工作流适用于不同类型的文件:

    新增功能: \"自动选择工作流\"开关已默认开启。您只需上传文件,系统会自动为您匹配合适的工作流,简化操作。
  2. 配置参数

    根据您选择的工作流,完成相应的配置。所有配置项都会自动保存在您的浏览器中。

  3. 上传文件

    在右侧的任务列表中,点击或拖拽您的文档到文件上传区域。

  4. 开始翻译

    文件选择成功后,点击任务卡片右下角的 开始翻译 按钮。系统将开始处理任务,您可以在日志区域查看实时进度。

  5. 查看与下载

    翻译完成后,任务卡片下方会出现操作按钮:

提示: 所有配置都会自动保存在您的浏览器本地,方便下次使用。
", + "tutorialModalBody": "

视频教程可以在B站搜索 docutranslate 获取。

欢迎使用 DocuTranslate!请按照以下步骤完成文档翻译:

  1. 第一步:选择工作流

    在左侧配置面板的顶部,首先选择最适合您文件类型的处理流程。

    提示: 默认已开启“自动选择工作流”。您只需上传文件,系统会自动为您匹配合适的工作流,简化操作。

  2. 第二步:配置参数

    选择工作流后,下方会显示相关的配置选项。请依次完成设置(所有配置都会自动保存在您的浏览器中):

    A. 工作流特定选项 (根据您第一步的选择出现):

    B. 通用选项 (适用于所有工作流):

  3. 第三步:上传文件

    在右侧的任务列表中,点击或拖拽您的文档到文件上传区域。

  4. 第四步:开始翻译

    文件选择成功后,点击任务卡片右下角的 开始翻译 按钮。系统将开始处理任务,您可以在日志区域查看实时进度。

  5. 第五步:查看与下载

    翻译完成后,任务卡片下方会出现操作按钮:

重要提示: 所有配置都会自动保存在您的浏览器本地,方便下次使用。
", "tutorialUnderstandBtn": "我明白了", "contributorsModalTitle": "感谢贡献", "contributorsPara1": "DocuTranslate是一个开源项目!大家的需求与使用是项目进步的动力。", @@ -121,135 +132,135 @@ "init_i18n_failed_alert": "加载界面翻译资源失败,请检查网络连接或联系管理员。", "init_failed_alert": "初始化失败,无法连接到后端服务。请检查服务是否运行或刷新页面。", "glossaryEmpty": "术语表为空。", - "parsingSettingsTitleText": "解析配置", - "txtSettingsTitleText": "TXT翻译选项", - "jsonSettingsTitleText": "JSON路径配置", - "xlsxSettingsTitleText": "XLSX翻译选项", - "docxSettingsTitleText": "DOCX翻译选项", - "srtSettingsTitleText": "SRT翻译选项", - "epubSettingsTitleText": "EPUB翻译选项", - "htmlSettingsTitleText": "HTML翻译选项", - "assSettingsTitleText": "ASS翻译选项", - "aiSettingsTitleText": "翻译模型", - "translationSettingsTitleText": "翻译配置", - "engineOptionIdentity": "已经是markdown格式", - "engineOptionMineru": "minerU", - "engineOptionDocling": "docling", - "status_selectFileFirst": "请先选择文件!", + "engineOptionIdentity": "已经是Markdown格式", + "engineOptionMineru": "Mineru", + "engineOptionDocling": "Docling", + "status_selectFileFirst": "请先选择一个文件!", "status_fillRequired": "请填写所有必填项!", - "btn_initializing": "初始化中...", + "btn_initializing": "初始化...", "status_encodingAndSubmitting": "文件编码与提交中...", - "status_requestOk": "请求成功,任务已开始", "btn_cancelTranslation": "取消翻译", + "status_requestOk": "请求成功,任务已开始。", "status_requestFail": "请求失败", - "status_initFail": "初始化失败", + "status_initFail": "任务初始化失败", "status_cancelling": "取消中...", - "status_cancelSent": "取消请求已发送", + "status_cancelSent": "取消请求已发送。", "status_cancelFail": "取消失败", "status_gettingStatus": "获取状态中...", "btn_reTranslate": "重新翻译", - "status_updateError": "更新状态失败", - "pdf_preparing": "正在准备PDF...", - "pdf_print_failed": "打印PDF失败,请尝试手动下载HTML并使用浏览器打印。", - "pdf_fetch_failed": "获取翻译内容失败,无法生成PDF。", - "preview_bilingual": "双语预览", - "preview_translatedOnly": "仅译文预览", + "status_updateError": "状态更新出错。", + "admin_tasklist_failed": "管理员模式:加载任务列表失败。", "preview_loading": "加载预览中...", "preview_cantReadOriginal": "无法读取原文文件内容进行预览。", "preview_cantPreviewType": "无法预览此文件类型", - "preview_noOriginalCache": "页面刷新后无法获取原文,请重新上传文件以预览。", - "preview_loadFailed": "加载预览失败", - "admin_tasklist_failed": "管理员模式:加载任务列表失败。" + "preview_noOriginalCache": "无原文缓存可供预览。", + "preview_loadFailed": "加载预览失败。", + "pdf_preparing": "正在准备PDF以便打印...", + "pdf_print_failed": "调用打印功能失败。请尝试手动右键点击预览内容并选择打印。", + "pdf_fetch_failed": "获取预览内容失败,无法生成PDF。", + "preview_bilingual": "双语对照预览", + "preview_translatedOnly": "仅译文预览" }, "en": { "pageTitle": "DocuTranslate - Interactive Document Translation", "tutorialBtn": "Tutorial", "projectContributeBtn": "Contribute", "workflowTitle": "Select Workflow", - "workflowOptionMarkdown": "Convert to Markdown then Translate (.pdf/.md/.png etc.)", + "workflowOptionMarkdown": "To Markdown then Translate (.pdf/.md/.png, etc.)", "workflowOptionTxt": "Plain Text Translation (.txt)", - "workflowOptionJson": "JSON Translation (.json)", + "workflowOptionEpub": "EPUB Translation (.epub)", "workflowOptionDocx": "DOCX Translation (.docx)", "workflowOptionXlsx": "XLSX Translation (.xlsx/.csv)", "workflowOptionSrt": "SRT Subtitle Translation (.srt)", - "workflowOptionEpub": "EPUB Translation (.epub)", - "workflowOptionHtml": "HTML Translation (.html)", "workflowOptionAss": "ASS Subtitle Translation (.ass)", - "autoWorkflowLabel": "Auto-select Workflow", + "workflowOptionJson": "JSON Translation (.json)", + "workflowOptionHtml": "HTML Translation (.html)", + "autoWorkflowLabel": "Auto-select workflow", + "txtSettingsTitleText": "TXT Translation Options", "insertModeLabel": "Insert Mode", - "insertModeReplace": "Replace Original (Replace)", - "insertModeAppend": "Append to Original (Append)", - "insertModePrepend": "Prepend to Original (Prepend)", - "insertModeHelpTxt": "Choose how to insert the translated text.", + "insertModeReplace": "Replace Original", + "insertModeAppend": "Append to Original", + "insertModePrepend": "Prepend to Original", + "insertModeHelpTxt": "Choose how the translated text should be inserted.", "separatorLabel": "Separator", "separatorPlaceholderSimple": "e.g., \\n---\\n", - "separatorHelp": "Separator between original and translated text when using Append or Prepend mode. \\n represents a newline.", - "separatorHelpAss": "Separator between original and translated text when using Append or Prepend mode. \\N represents a newline in ass.", - "insertModeHelpDocx": "Choose how to insert the translated text.", - "separatorPlaceholder": "e.g., \\n---Translated---\\n", - "insertModeHelpXlsx": "Choose how to insert the translated text into cells.", + "separatorHelp": "Characters to separate original and translated text in 'Append' or 'Prepend' mode. \\n represents a newline.", + "docxSettingsTitleText": "DOCX Translation Options", + "insertModeHelpDocx": "Choose how the translated text should be inserted.", + "separatorPlaceholder": "e.g., \\n---translation---\\n", + "xlsxSettingsTitleText": "XLSX Translation Options", + "insertModeHelpXlsx": "Choose how the translated text should be inserted into cells.", "xlsxTranslateRegionsLabel": "Translate Regions (Optional)", "xlsxTranslateRegionsPlaceholder": "One region per line, e.g., Sheet1!A1:B10 (applies to all sheets if sheet name is omitted)", - "insertModeHelpSrt": "Choose how to insert the translated text.", - "insertModeHelpEpub": "Choose how to insert the translated text.", - "insertModeHelpHtml": "Choose how to insert the translated text.", - "separatorPlaceholderAss": "e.g., \\N (newline character)", - "insertModeHelpAss": "Choose how to insert the translated text.", + "srtSettingsTitleText": "SRT Translation Options", + "insertModeHelpSrt": "Choose how the translated text should be inserted.", + "epubSettingsTitleText": "EPUB Translation Options", + "insertModeHelpEpub": "Choose how the translated text should be inserted.", + "htmlSettingsTitleText": "HTML Translation Options", + "insertModeHelpHtml": "Choose how the translated text should be inserted.", + "assSettingsTitleText": "ASS Translation Options", + "insertModeHelpAss": "Choose how the translated text should be inserted.", + "separatorPlaceholderAss": "e.g., \\N (newline)", + "separatorHelpAss": "Characters to separate original and translated text in 'Append' or 'Prepend' mode. \\N is the newline character in ASS format.", + "jsonSettingsTitleText": "JSON Path Configuration", "jsonPathLabel": "JSON Paths to Translate", "jsonPathPlaceholder": "One path per line, e.g.:\n$.name\n$.*", "jsonPathHelp": "Uses jsonpath-ng syntax. Each line represents a JSON path. All strings within the matched objects will be translated.", + "parsingSettingsTitleText": "Parsing Configuration", "parsingEngineLabel": "Parsing Engine", - "parsingEngineHelp": "If the uploaded file is already in .md format, this can be skipped.", + "parsingEngineHelp": "If the uploaded file is already in .md format, this can be left unselected.", "getMineruTokenTitle": "Get Mineru Token", "mineruTokenPlaceholder": "Required when using the Mineru engine", "modelVersionLabel": "Mineru Model Version", "modelVersionVlm": "VLM", "modelVersionPipline": "Pipeline", - "modelVersionHelp": "Mineru VLM is a newer model in internal testing.", + "modelVersionHelp": "Mineru VLM is a newer, internal test model.", "formulaOcrLabel": "Formula Recognition", "codeOcrLabel": "Code Recognition", + "aiSettingsTitleText": "Translation Model", "skipTranslationLabel": "Skip Translation", "platformLabel": "Select Platform", "platformCustom": "Custom Endpoint", - "baseUrlLabel": "API Address (Base URL)", - "baseUrlPlaceholder": "OpenAI-Compatible Address", + "baseUrlLabel": "API Base URL", + "baseUrlPlaceholder": "OpenAI-compatible URL", "getApiKeyTitle": "Get API Key", "apiKeyPlaceholder": "Enter your API Key", "modelIdLabel": "Select Model", "modelIdPlaceholder": "e.g., gpt-4o, glm-4", + "translationSettingsTitleText": "Translation Configuration", "targetLanguageLabel": "Target Language", "targetLanguageCustom": "Other (Custom)", "customLangPlaceholder": "Enter target language, e.g., Italian", "thinkingModeLabel": "Thinking Mode", - "thinkingModeTooltip": "Sets whether the mixed-inference model should 'think'. Currently supported by Zhipu's glm4.5 series, Volcengine's seed1.6 series, SiliconFlow platform, and Google's Gemini series. Disabling 'think' is recommended.", + "thinkingModeTooltip": "Sets whether the hybrid inference model should 'think'. Supported models include Zhipu's glm4.5 series, Volcengine's seed1.6 series, SiliconFlow platform, and Google's Gemini series. Disabling is recommended.", "thinkingModeEnable": "Enable", "thinkingModeDisable": "Disable (Recommended)", "thinkingModeDefault": "Default", "customPromptLabel": "Custom Prompt", - "customPromptPlaceholder": "Optional, e.g., 'Do not translate personal names'", + "customPromptPlaceholder": "Optional, e.g., 'Do not translate proper nouns'", "chunkSizeLabel": "Chunk Size", "resetBtn": "Reset", "concurrentLabel": "Concurrency", "retryLabel": "Retry Count", "glossaryGenTitle": "Glossary", "glossaryLabel": "Glossary (Optional)", - "glossaryHelp": "Select one or more CSV files. Files must contain 'src' and 'dst' headers, representing source and destination text respectively.", + "glossaryHelp": "Select one or more CSV files. Files must have 'src' and 'dst' columns for source and destination terms.", "viewGlossaryBtn": "View Glossary", "clearGlossaryBtn": "Clear", "glossaryGenEnableLabel": "Auto-generate Glossary", "glossaryGenConfigLabel": "Glossary Generation Config", "glossaryGenConfigSame": "Same as Translation Config", "glossaryGenConfigCustom": "Custom", - "githubInfo": "GitHub Homepage (Stars are welcome❤):
https://github.com/xunbu/docutranslate", - "qqGroupInfo": "QQ Group: 1047781902", + "githubInfo": "GitHub Homepage (stars❤ welcome):
https://github.com/xunbu/docutranslate", + "qqGroupInfo": "QQ Group for discussions: 1047781902", "taskListTitle": "Task List", "newTaskBtn": "New Task", "noTaskPlaceholder": "No tasks yet. Click 'New Task' to get started!", "taskCardIdLabel": "Task ID", "taskCardIdPlaceholder": "Waiting for submission...", "taskCardFileDrop": "Click or drag file here", - "taskCardFileSelected": "File Selected", - "taskCardFilenameLabel": "Filename: ", + "taskCardFileSelected": "File selected", + "taskCardFilenameLabel": "Filename:", "taskCardLogLabel": "Log", "taskCardStatusWaiting": "Waiting for file upload...", "taskCardPreviewBtn": "Preview", @@ -257,24 +268,24 @@ "taskCardAttachmentBtn": "Attachments", "taskCardStartBtn": "Start Translation", "downloadMdEmbedded": "Markdown (Embedded Images)", - "downloadMdZip": "Markdown (Zip)", + "downloadMdZip": "Markdown (.zip)", "downloadAss": "ASS", "previewTitle": "Preview", "previewBilingualBtn": "Bilingual", "previewTranslatedOnlyBtn": "Translated Only", "previewOriginal": "Original", - "previewTranslated": "Translated", + "previewTranslated": "Translation", "closeBtn": "Close", "downloadBtn": "Download", "tutorialModalTitle": "Tutorial", - "tutorialModalBody": "

Video tutorials can be found by searching for docutranslate on Bilibili.

Welcome to DocuTranslate! Please follow these steps to translate your documents:

  1. Select Workflow

    First, select your desired translation process at the top of the settings panel. Different workflows are suitable for different file types:

    New Feature: The 'Auto-select Workflow' switch is now enabled by default. Simply upload your file, and the system will automatically match it with the appropriate workflow to simplify the process.
  2. Configure Parameters

    Configure the settings according to your chosen workflow. All settings are automatically saved in your browser.

  3. Upload File

    In the task list on the right, click or drag your document into the file upload area.

  4. Start Translation

    Once the file is successfully selected, click the Start Translation button on the bottom right of the task card. The system will begin processing the task, and you can view real-time progress in the log area.

  5. View & Download

    After the translation is complete, action buttons will appear on the task card:

Tip: All settings are automatically saved in your browser's local storage for future use.
", + "tutorialModalBody": "

Video tutorials can be found by searching for docutranslate on Bilibili.

Welcome to DocuTranslate! Please follow these steps to translate your document:

  1. Step 1: Select Workflow

    At the top of the left-hand settings panel, first choose the process that best suits your file type.

    Tip: 'Auto-select workflow' is enabled by default. Simply upload your file, and the system will automatically match it with the appropriate workflow to simplify the process.

  2. Step 2: Configure Parameters

    After selecting a workflow, the relevant configuration options will appear below. Please complete the settings in order (all configurations are automatically saved in your browser):

    A. Workflow-Specific Options (Appear based on your selection in Step 1):

    B. General Options (Apply to all workflows):

  3. Step 3: Upload File

    In the task list on the right, click or drag your document into the file upload area.

  4. Step 4: Start Translation

    Once the file is successfully selected, click the Start Translation button on the bottom right of the task card. The system will begin processing, and you can view real-time progress in the log area.

  5. Step 5: View & Download

    After the translation is complete, action buttons will appear below the task card:

Important Note: All your settings are automatically saved locally in your browser for your next visit.
", "tutorialUnderstandBtn": "I Understand", "contributorsModalTitle": "Thanks for Contributing", "contributorsPara1": "DocuTranslate is an open-source project! The community's needs and usage are the driving force behind its progress.", - "contributorsPara2": "Thank you to everyone who has sponsored the project, submitted code, provided valuable suggestions, and starred the project!", + "contributorsPara2": "Thank you to all friends who have sponsored the project, submitted code, provided valuable suggestions, and starred the project!", "contributorsWelcome": "You are welcome to contribute in the following ways:", - "contributorsGithub": "GitHub Homepage", - "contributorsPR": "Submit Pull Request", + "contributorsGithub": "GitHub Page", + "contributorsPR": "Submit a Pull Request", "contributorsIssue": "Report an Issue", "contributorsQQ": "Or contact the author via QQ group: 1047781902", "glossaryModalTitle": "Current Glossary", @@ -282,45 +293,34 @@ "glossaryTableDestination": "Destination (dst)", "init_i18n_failed_alert": "Failed to load interface translations. Please check your network connection or contact an administrator.", "init_failed_alert": "Initialization failed, could not connect to the backend service. Please ensure the service is running and refresh the page.", - "glossaryEmpty": "Glossary is empty.", - "parsingSettingsTitleText": "Parsing Config", - "txtSettingsTitleText": "TXT Translation Options", - "jsonSettingsTitleText": "JSON Path Config", - "xlsxSettingsTitleText": "XLSX Translation Options", - "docxSettingsTitleText": "DOCX Translation Options", - "srtSettingsTitleText": "SRT Translation Options", - "epubSettingsTitleText": "EPUB Translation Options", - "htmlSettingsTitleText": "HTML Translation Options", - "assSettingsTitleText": "ASS Translation Options", - "aiSettingsTitleText": "Translation Model", - "translationSettingsTitleText": "Translation Config", + "glossaryEmpty": "The glossary is empty.", "engineOptionIdentity": "Already in Markdown format", - "engineOptionMineru": "minerU", - "engineOptionDocling": "docling", + "engineOptionMineru": "Mineru", + "engineOptionDocling": "Docling", "status_selectFileFirst": "Please select a file first!", "status_fillRequired": "Please fill in all required fields!", "btn_initializing": "Initializing...", "status_encodingAndSubmitting": "Encoding and submitting file...", - "status_requestOk": "Request successful, task has started", "btn_cancelTranslation": "Cancel Translation", - "status_requestFail": "Request Failed", - "status_initFail": "Initialization Failed", + "status_requestOk": "Request successful, task started.", + "status_requestFail": "Request failed", + "status_initFail": "Task initialization failed", "status_cancelling": "Cancelling...", - "status_cancelSent": "Cancellation request sent", + "status_cancelSent": "Cancellation request sent.", "status_cancelFail": "Cancellation failed", "status_gettingStatus": "Getting status...", - "btn_reTranslate": "Re-translate", - "status_updateError": "Failed to update status", - "pdf_preparing": "Preparing PDF...", - "pdf_print_failed": "Failed to print PDF. Please try downloading the HTML manually and printing it from your browser.", - "pdf_fetch_failed": "Failed to fetch translated content, cannot generate PDF.", - "preview_bilingual": "Bilingual Preview", - "preview_translatedOnly": "Translated-Only Preview", + "btn_reTranslate": "Translate Again", + "status_updateError": "Error updating status.", + "admin_tasklist_failed": "Admin mode: Failed to load task list.", "preview_loading": "Loading preview...", - "preview_cantReadOriginal": "Could not read original file content for preview.", + "preview_cantReadOriginal": "Could not read the original file for preview.", "preview_cantPreviewType": "Cannot preview this file type", - "preview_noOriginalCache": "Original file is not available after page refresh. Please re-upload to preview.", + "preview_noOriginalCache": "No original file cached for preview.", "preview_loadFailed": "Failed to load preview.", - "admin_tasklist_failed": "Admin Mode: Failed to load task list." + "pdf_preparing": "Preparing PDF for printing...", + "pdf_print_failed": "Failed to invoke print function. Please try right-clicking the preview content and selecting 'Print'.", + "pdf_fetch_failed": "Failed to fetch preview content, cannot generate PDF.", + "preview_bilingual": "Bilingual Preview", + "preview_translatedOnly": "Translated-Only Preview" } } \ No newline at end of file diff --git a/docutranslate/static/index.html b/docutranslate/static/index.html index 075ce71..9c337f6 100644 --- a/docutranslate/static/index.html +++ b/docutranslate/static/index.html @@ -1 +1 @@ - DocuTranslate - 交互式文档翻译

DocuTranslate

如果上传的文件本身是.md格式,此项可不选。
mineru VLM是更新的内测模型。

Base URL:

选择一个或多个CSV文件。文件需包含'src'和'dst'两列标题,分别代表原文和译文。

GitHub主页(欢迎star❤):
https://github.com/xunbu/docutranslate

交流QQ群: 1047781902

version:

任务列表

LOGO

当前没有任务,点击“新建任务”开始吧!

预览
原文
译文
\ No newline at end of file + DocuTranslate - 交互式文档翻译

DocuTranslate

如果上传的文件本身是.md格式,此项可不选。
mineru VLM是更新的内测模型。

Base URL:

选择一个或多个CSV文件。文件需包含'src'和'dst'两列标题,分别代表原文和译文。

GitHub主页(欢迎star❤):
https://github.com/xunbu/docutranslate

交流QQ群: 1047781902

version:

任务列表

LOGO

当前没有任务,点击“新建任务”开始吧!

预览
原文
译文
\ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 41152d9..39974ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,6 @@ dependencies = [ "markdown>=3.8.2", "pymdown-extensions>=10.16.1", "chardet>=5.2.0", - "py>=1.11.0", "pysubs2>=1.8.0", ] dynamic = ["version"] diff --git a/uv.lock b/uv.lock index 6b5909f..357e12d 100644 --- a/uv.lock +++ b/uv.lock @@ -332,7 +332,6 @@ dependencies = [ { name = "mammoth" }, { name = "markdown" }, { name = "openpyxl" }, - { name = "py" }, { name = "pymdown-extensions" }, { name = "pysubs2" }, { name = "python-docx" }, @@ -366,7 +365,6 @@ requires-dist = [ { name = "markdown", specifier = ">=3.8.2" }, { name = "opencv-python", marker = "extra == 'docling'", specifier = ">=4.11.0.86" }, { name = "openpyxl", specifier = ">=3.1.5" }, - { name = "py", specifier = ">=1.11.0" }, { name = "pymdown-extensions", specifier = ">=10.16.1" }, { name = "pysubs2", specifier = ">=1.8.0" }, { name = "python-docx", specifier = ">=1.2.0" }, @@ -1393,15 +1391,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/26/65/1070a6e3c036f39142c2820c4b52e9243246fcfc3f96239ac84472ba361e/psutil-7.1.0-cp37-abi3-win_arm64.whl", hash = "sha256:6937cb68133e7c97b6cc9649a570c9a18ba0efebed46d8c5dae4c07fa1b67a07", size = 244971 }, ] -[[package]] -name = "py" -version = "1.11.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/98/ff/fec109ceb715d2a6b4c4a85a61af3b40c723a961e8828319fbcb15b868dc/py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719", size = 207796 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f6/f0/10642828a8dfb741e5f3fbaac830550a518a775c7fff6f04a007259b0548/py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378", size = 98708 }, -] - [[package]] name = "pyclipper" version = "1.3.0.post6" diff --git a/更新日志.txt b/更新日志.txt index f4e8d2c..1187115 100644 --- a/更新日志.txt +++ b/更新日志.txt @@ -1,5 +1,12 @@ 更新日志 ---------------- +v1.4.5版 2025.9.23 +特性 +- 支持ass字幕翻译 +- 缓存先前选择的工作流 +修复 +- 修复xlsx工作流某些文件后缀不能使用的问题 +---------------- v1.4.4版 2025.9.17 修复 - 修复没有正确读取上次选择平台的问题