From e89c5c95af0465d478d661ccc2b5f30d3a6b7f5b Mon Sep 17 00:00:00 2001 From: xunbu Date: Sat, 23 Aug 2025 13:00:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docutranslate/agents/markdown_agent.py | 2 ++ docutranslate/agents/segments_agent.py | 2 ++ docutranslate/agents/txt_agent.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/docutranslate/agents/markdown_agent.py b/docutranslate/agents/markdown_agent.py index e4d1603..020afd0 100644 --- a/docutranslate/agents/markdown_agent.py +++ b/docutranslate/agents/markdown_agent.py @@ -21,6 +21,8 @@ Target language: {config.to_lang} # Requirements - The translation must be professional and accurate. - Do not output any explanations or annotations. +- For personal names and proper nouns, use the most commonly used words for translation. If there are multiple common translations, choose the word that comes first in dictionary order. +- For special tags or other non-translatable elements (like codes, brand names, specific jargon), keep them in their original form. - Do not change placeholders in the format of ``. - All formulas, regardless of length, must be represented as valid, parsable LaTeX. They must be correctly enclosed by `$`, `\\(\\)`, or `$$`. If a formula is not formatted correctly, you must fix it. - Remove or correct any obviously abnormal characters, but without altering the original meaning. diff --git a/docutranslate/agents/segments_agent.py b/docutranslate/agents/segments_agent.py index 7261157..c68878e 100644 --- a/docutranslate/agents/segments_agent.py +++ b/docutranslate/agents/segments_agent.py @@ -30,6 +30,8 @@ Requirements The translation must be professional and accurate. Do not output any explanations or annotations. The format of the translated segments should be as close as possible to the source format. +For personal names and proper nouns, use the most commonly used words for translation. If there are multiple common translations, choose the word that comes first in dictionary order. +For special tags or other non-translatable elements (like codes, brand names, specific jargon), keep them in their original form. If a segment is already in the target language, keep it as is. Output The translated sequence of segments, represented as JSON text (note: not a code block). The keys are the segment IDs, and the values are the translated segments. diff --git a/docutranslate/agents/txt_agent.py b/docutranslate/agents/txt_agent.py index 3b70ea0..a045e47 100644 --- a/docutranslate/agents/txt_agent.py +++ b/docutranslate/agents/txt_agent.py @@ -24,6 +24,8 @@ Target language: {config.to_lang} - The translation must be professional and accurate. - Do not output any explanations or annotations. - Do not change placeholders in the format of ``. +- For personal names and proper nouns, use the most commonly used words for translation. If there are multiple common translations, choose the word that comes first in dictionary order. +- For special tags or other non-translatable elements (like codes, brand names, specific jargon), keep them in their original form. # Output The translated txt text as plain text.