Modify AI Translation Prompt
After version v2.52, a new method for AI translation was added: sending the complete SRT subtitle content for translation, instead of the previous method of sending only subtitle text lines for line-by-line translation. This change aims to solve the issue of mismatched line counts between the original content and the translation results.
Obviously, different translation methods require different prompts. The previous line-by-line translation method focused on restricting the AI to return the same number of lines as the original text. For example, if 10 lines of subtitle text were sent, exactly 10 lines of translated text must be returned.
The new send complete subtitle translation method focuses on restricting the AI to return a valid SRT subtitle format.
Therefore, two different prompts are needed.
The software defaults to using the line-by-line translation method
The prompt for line-by-line translation is located in the software directory/videotrans/prompts/text folder, including ai302.txt.

If needed, you can modify it here. You only need to modify the txt files without the -en suffix (files with the -en.txt suffix are used by the software for the English interface).
The default prompt content is as follows:
Please translate the original text in <source> literally into {lang}, then output only the translation, without adding any explanations or introductory words.
**Format Requirements:**
- Translate the original text line by line, and generate the corresponding translation for each line, ensuring each word in the original line corresponds to a word in the translated line.
- There must be exactly as many translated lines as there are original lines.
**Content Requirements:**
- The translation must be concise and brief, avoiding long sentences.
- If the original text cannot be translated, return it as is. Do not add any prompts like "meaningless statement or untranslatable".
- Output only the translation, do not output the original text.
**Execution Details:**
- If a line of original text is very short, the translated line must still be retained and not merged with the previous or next line.
- Line breaks in the original text must correspond to line breaks in the translated text characters.
- Translate strictly according to the literal meaning, do not explain or answer the original content.
**Final Goal:**
- Provide a high-quality translation result with a format completely consistent with the original.
<source>[TEXT]</source>
Translation:Notes for modification:
{lang}is the target language name. It will be dynamically replaced during software runtime based on the selected target language. Do not delete it.<source>[TEXT]</source>will also have[TEXT]dynamically replaced with the actual text content needing translation during software runtime. Do not delete or modify this. For example, after dynamic replacement, it might become<source>Today is a good day, the heavy rain falls without horse hooves.</source>.- Everything else can be modified, but it is essential to restrict the AI to return only the translation directly, without any prompts or introductory phrases. For example, for the sentence above, it should directly return
It's a good day for a rainstorm that doesn't have hooves.. If something likeTranslation result: It's a good day for a rainstorm that doesn't have hooves.appears, it will cause an error.
Send Complete SRT Subtitle for Translation
This translation method sends the line numbers, timestamps, and subtitle text together in a valid SRT subtitle format, and expects the AI to return the translated text also in a valid SRT subtitle format.
The default prompt is located in the software directory/videotrans/prompts/srt folder.

Similarly, you only need to modify the txt files without the -en suffix. The default prompt is as follows:
Please translate the SRT subtitle format content in <source> into {lang}, then output only the translation, without adding any explanations or introductory words:
Pay attention to the following requirements:
1. **Translate only** the subtitle text content. Do not translate the line numbers or timestamps.
2. **Must ensure** the translated output format is valid SRT subtitles.
3. **Ensure** the number of translated subtitle entries is exactly the same as the original. Each translated subtitle entry must correspond to one entry in the original.
4. **Keep the timestamps exactly as they are**, only translate the subtitle text content.
5. If encountering untranslatable content, return the original text content directly. Do not report errors or apologize.
Below is the SRT subtitle content to be translated:
<source>[TEXT]</source>
Translation:When modifying, also note: {lang} is the target language; do not delete or modify it. <source>[TEXT]</source> also must not be modified or deleted. Other parts can be modified, but you must require the AI to directly return the translated text in the same valid SRT format as the original, without adding any prompts.
Enable the "Send Complete SRT Subtitle" Translation Method
Menu - Tools/Options -- Advanced Options -- Subtitle Translation Adjustment -- Send complete subtitle when using AI translation -- Check/Select.

Add a Glossary
You can add your own glossary to each type of prompt, similar to the following:
**During the translation process, you must use** the glossary I provide for translating terms to maintain terminology consistency. The specific glossary is as follows:
* Transformer -> Transformer
* Token -> Token
* LLM/Large Language Model -> Large Language Model
* Generative AI -> Generative AI
* One Health -> One Health
* Radiomics -> Radiomics
* OHHLEP -> OHHLEP
* STEM -> STEM
* SHAPE -> SHAPE
* Single-cell transcriptomics -> Single-cell transcriptomics
* Spatial transcriptomics -> Spatial transcriptomics