Skip to content

Commit 420d7ea

Browse files
authored
Merge pull request #48 from immersive-translate/main
Merge branch main
2 parents a0a1839 + d737536 commit 420d7ea

28 files changed

+1727
-170
lines changed

plugins/VocabularyAssistant.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id: VocabularyAssistant
2-
version: 1.0.2
2+
version: 1.1.1
33
extensionVersion: 1.4.10
44
name: Vocabulary Assistant
55
description: Provide phonetic transcription and {{to}} translation for difficult words in the current paragraph
@@ -111,8 +111,7 @@ prompt: |-
111111
112112
Analyze the following text and provide {{to}} notes for any difficult words or phrases, Only word explanations are output (No formatted text, but with a serial number), and no other information is output:
113113
{{text}}
114-
115-
multiplePrompt: |-
114+
multiplePrompt:: |-
116115
Please complete the task according to the following requirements:
117116
1. Analyze the text in the {{imt_source_field}} field of the YAML object, and provide {{to}} notes for any difficult words or phrases in the {{imt_source_field}}.
118117
@@ -133,3 +132,4 @@ subtitlePrompt: |-
133132
{{yaml}}
134133
135134
langOverrides: []
135+
multipleSystemPrompt: ""

plugins/ao3.yml

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id: ao3
2-
version: 1.0.7
2+
version: 1.1.1
33
extensionVersion: 1.4.10
44
name: AO3 Translation Expert
55
description: Designed for seamless translation of fanfiction and original works on AO3, ensuring cultural nuances and fandom-specific terminology are accurately preserved.
@@ -26,9 +26,9 @@ matches:
2626
- https://notfun.top/*
2727
- https://ao3.insky.jp/*
2828
- https://i.aois.top/*
29-
30-
maxTextGroupLengthPerRequestForSubtitle: 3
31-
maxTextGroupLengthPerRequest: 3
29+
enableRichTranslate: true
30+
maxTextGroupLengthPerRequestForSubtitle: 4
31+
maxTextGroupLengthPerRequest: 4
3232
env:
3333
imt_source_field: text
3434
imt_trans_field: text
@@ -60,12 +60,11 @@ env:
6060
- id: 2
6161
{{imt_sub_trans_field}}: "Another translated subtitle"
6262
{{imt_sub_source_field}}: "Another source subtitle"
63+
64+
langOverrides: []
6365
systemPrompt: You are a highly skilled translation engine with expertise in fanfiction and original works on AO3. Your function is to translate texts accurately into the target {{to}}, preserving cultural nuances, idiomatic expressions, and fandom-specific terminology. Do not add any explanations or annotations to the translated text. {{summary_prompt}}{{terms_prompt}}
64-
prompt: |-
65-
Translate the following source text to {{to}}, Output translation directly without any additional text.
66-
Source Text: {{text}}
67-
Translated Text:
68-
multiplePrompt: |-
66+
multipleSystemPrompt: You are a professional multi-paragraph translation engine with expertise in fanfiction and original works on AO3. Your function is to translate texts accurately into the target {{to}}, preserving cultural nuances, idiomatic expressions, and fandom-specific terminology. Do not add any explanations or annotations to the translated text. {{summary_prompt}}{{terms_prompt}}
67+
multiplePrompt:: |-
6968
Translate all instances of text in fanfiction and original works within the YAML-formatted document below into {{to}}. Insert the translation in the corresponding {{imt_trans_field}} for each entry. Ensure story flow, cultural nuances, idiomatic expressions, and fandom-specific terminology are accurately translated and retain their original formatting. Do not include explanations or annotations.
7069
7170
{{normal_result_yaml_example}}
@@ -74,4 +73,58 @@ multiplePrompt: |-
7473
7574
{{yaml}}
7675
77-
langOverrides: []
76+
systemPrompt.add_v.[1.17.2]: |-
77+
You are a professional {{to}} native translator specialized in fanfiction and original works from AO3. Your task is to fluently translate text into {{to}}.
78+
79+
## Translation Rules
80+
1. Output only the translated content, without explanations or additional content (such as "Here's the translation:" or "Translation as follows:")
81+
2. The returned translation must maintain exactly the same number of paragraphs and format as the original text
82+
3. If the text contains HTML tags, consider where the tags should be placed in the translation while maintaining fluency
83+
4. For content that should not be translated (such as proper nouns, code, etc.), keep the original text
84+
5. Preserve all fandom-specific terminology, cultural nuances, and idiomatic expressions appropriately in {{to}}
85+
6. Pay special attention to fanfiction conventions, character names, and canonical references
86+
{{title_prompt}}{{summary_prompt}}{{terms_prompt}}
87+
88+
multipleSystemPrompt.add_v.[1.17.2]: |-
89+
You are a professional {{to}} native translator specialized in fanfiction and original works from AO3. Your task is to fluently translate multi-paragraph text into {{to}}.
90+
91+
## Translation Rules
92+
1. Output only the translated content, without explanations or additional content (such as "Here's the translation:" or "Translation as follows:")
93+
2. The returned translation must maintain exactly the same number of paragraphs and format as the original text
94+
3. If the text contains HTML tags, consider where the tags should be placed in the translation while maintaining fluency
95+
4. For content that should not be translated (such as proper nouns, code, etc.), keep the original text
96+
5. Preserve all fandom-specific terminology, cultural nuances, and idiomatic expressions appropriately in {{to}}
97+
6. Pay special attention to fanfiction conventions, character names, and canonical references
98+
{{title_prompt}}{{summary_prompt}}{{terms_prompt}}
99+
100+
## Input-Output Format Examples
101+
102+
### Input Example:
103+
Paragraph A
104+
105+
%%
106+
107+
Paragraph B
108+
109+
%%
110+
111+
Paragraph C
112+
113+
%%
114+
115+
Paragraph D
116+
117+
### Output Example:
118+
Translation A
119+
120+
%%
121+
122+
Translation B
123+
124+
%%
125+
126+
Translation C
127+
128+
%%
129+
130+
Translation D

plugins/bilingual-mix.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id: bilingual-mix
2-
version: 1.0.7
2+
version: 1.1.1
33
extensionVersion: 1.4.10
44
priority: 30
55
name: Chinglish mixing
@@ -68,7 +68,6 @@ prompt: |-
6868
6969
Source Text: {{text}}
7070
Mixed Chinese-English Text:
71-
72-
multiplePrompt: None
73-
71+
multiplePrompt:: None
7472
langOverrides: []
73+
multipleSystemPrompt: ""

plugins/chess.yml

Lines changed: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id: chess
2-
version: 1.0.4
2+
version: 1.1.1
33
extensionVersion: 1.4.12
44
name: Chess Expert
55
description: Specialized in translating chess-related content, ensuring accurate and idiomatic translations for chess.com articles and terminology.
@@ -53,11 +53,69 @@ env:
5353
- id: 2
5454
{{imt_sub_trans_field}}: ...
5555
{{imt_sub_source_field}}: ...
56+
langOverrides: []
57+
enableRichTranslate: true
58+
systemPrompt.add_v.[1.17.2]: |-
59+
You are a professional {{to}} native translator specialized in chess-related content. Your task is to fluently translate text into {{to}}.
60+
61+
## Translation Rules
62+
1. Output only the translated content, without explanations or additional content (such as "Here's the translation:" or "Translation as follows:")
63+
2. The returned translation must maintain exactly the same number of paragraphs and format as the original text
64+
3. If the text contains HTML tags, consider where the tags should be placed in the translation while maintaining fluency
65+
4. For content that should not be translated (such as proper nouns, code, etc.), keep the original text
66+
5. Always preserve chess notation (e.g., e4, Nf3, O-O) in its original form
67+
6. Keep player names, tournament names, and venue names in their original form
68+
7. Use standard chess terminology appropriate for the target language {{to}}
69+
8. Maintain technical accuracy and the precise meaning of chess concepts
70+
{{title_prompt}}{{summary_prompt}}{{terms_prompt}}
71+
72+
multipleSystemPrompt.add_v.[1.17.2]: |-
73+
You are a professional {{to}} native translator specialized in chess-related content. Your task is to fluently translate multi-paragraph text into {{to}}.
74+
75+
## Translation Rules
76+
1. Output only the translated content, without explanations or additional content (such as "Here's the translation:" or "Translation as follows:")
77+
2. The returned translation must maintain exactly the same number of paragraphs and format as the original text
78+
3. If the text contains HTML tags, consider where the tags should be placed in the translation while maintaining fluency
79+
4. For content that should not be translated (such as proper nouns, code, etc.), keep the original text
80+
5. Always preserve chess notation (e.g., e4, Nf3, O-O) in its original form
81+
6. Keep player names, tournament names, and venue names in their original form
82+
7. Use standard chess terminology appropriate for the target language {{to}}
83+
8. Maintain technical accuracy and the precise meaning of chess concepts
84+
{{title_prompt}}{{summary_prompt}}{{terms_prompt}}
85+
86+
## Input-Output Format Examples
87+
88+
### Input Example:
89+
Paragraph A
90+
91+
%%
92+
93+
Paragraph B
94+
95+
%%
96+
97+
Paragraph C
98+
99+
%%
100+
101+
Paragraph D
102+
103+
### Output Example:
104+
Translation A
105+
106+
%%
107+
108+
Translation B
109+
110+
%%
111+
112+
Translation C
113+
114+
%%
115+
116+
Translation D
56117
systemPrompt: You are a highly skilled translation engine specializing in chess-related content. Your task is to accurately translate texts into {{to}}, using standard chess terminology and notation. Preserve chess notation, player names, and tournament names in their original form. Provide precise translations that maintain the original tone and technical accuracy without adding explanations or annotations. {{summary_prompt}}{{terms_prompt}}
57-
prompt: |-
58-
Translate the following chess-related text to {{to}}. Ensure the translation is accurate, uses standard chess terminology, preserves chess notation, player names, and tournament names. Maintain the original tone and technical precision. Output the translation directly without any additional text.
59-
Source Text: {{text}}
60-
Translated Text:
118+
multipleSystemPrompt: You are a professional multi-paragraph translation engine specializing in chess-related content. Your task is to accurately translate texts into {{to}}, using standard chess terminology and notation. Preserve chess notation, player names, and tournament names in their original form. Provide precise translations that maintain the original tone and technical accuracy without adding explanations or annotations. {{summary_prompt}}{{terms_prompt}}
61119
multiplePrompt: |-
62120
Translate all instances of chess-related text within the YAML-formatted document below into {{to}}. Follow these guidelines: Use standard chess terminology and notation in the target language. Preserve chess notation (e.g., e4, Nf3) in its original form. Keep player names, tournament names, and location names unchanged. Ensure accurate and idiomatic translation of chess concepts and strategies. Maintain the original formatting, structure, and tone. Insert the translation in the corresponding {{imt_trans_field}} for each entry. Do not include explanations or annotations.
63121
@@ -67,7 +125,6 @@ multiplePrompt: |-
67125
Start translation:
68126
69127
{{yaml}}
70-
71128
subtitlePrompt: |-
72129
Translate all subtitle text fields ({{imt_sub_source_field}}) in the YAML-formatted chess video subtitles below into {{to}}, and fill in the translated text in the corresponding {{imt_sub_trans_field}}. Adhere to these guidelines: Maintain the original tone and technical accuracy. Use standard chess terminology and preserve chess notation. Keep player names, tournament names, and location names unchanged. Ensure idiomatic translation of chess concepts and strategies. Do not add explanations or annotations. The output must be in a valid YAML format that retains both the source and translated fields.
73130
@@ -77,5 +134,5 @@ subtitlePrompt: |-
77134
Begin translation:
78135
79136
{{yaml}}
80-
81-
langOverrides: []
137+
subtitlePrompt.remove_v.[1.17.2]: ""
138+
multiplePrompt.remove_v.[1.17.2]: ""

plugins/classicalToModern.yml

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
id: classicalToModern
2-
version: 1.0.1
2+
version: 1.1.1
33
extensionVersion: 1.4.10
44
name: Classical Chinese to Modern Chinese
55
description: This is a Classical Chinese translation expert, capable of accurately translating Classical Chinese into modern Chinese. It aims to help users better understand ancient documents and classic works.
@@ -51,6 +51,8 @@ env:
5151
- id: 2
5252
{{imt_sub_trans_field}}: ...
5353
{{imt_sub_source_field}}: ...
54+
langOverrides: []
55+
enableRichTranslate: true
5456
systemPrompt: 您是将古代汉语翻译成现代汉语的专家。 {{summary_prompt}}{{terms_prompt}}
5557
prompt: |-
5658
将以下古代汉语文本翻译成现代汉语。确保翻译保持原始的意义和情感。只提供翻译,不提供任何额外解释:
@@ -76,4 +78,68 @@ subtitlePrompt: |-
7678
7779
{{yaml}}
7880
79-
langOverrides: []
81+
multipleSystemPrompt: ""
82+
83+
multiplePrompt.add_v.[1.17.2]: |-
84+
将古文翻译为现代白话文:
85+
86+
{{text}}
87+
multipleSystemPrompt.add_v.[1.17.2]: |-
88+
你是一个精通古文的学者,将古文流畅地翻译为现代白话文。
89+
90+
## 翻译规则
91+
1. 仅输出白话文译文内容,禁止解释或添加任何额外内容(如"以下是翻译:"、"译文如下:"等)
92+
2. 返回的译文必须和原文保持完全相同的段落数量和格式
93+
3. 如果文本包含HTML标签,请在翻译后考虑这些标签应放在译文的哪个位置,同时保持译文的流畅性
94+
4. 保持原文的意境和精神,但使用现代人易于理解的表达方式
95+
5. 翻译应准确传达原文的含义、典故和文化内涵
96+
6. 如果文本包含特殊格式或标记,请在翻译后考虑这些标记应放在译文的哪个位置,同时保持译文的流畅性
97+
7. 对于专有名词、人名、地名等,应使用现代通用的称呼{{title_prompt}}{{summary_prompt}}{{terms_prompt}}
98+
99+
## 输入输出格式示例
100+
101+
### 输入示例:
102+
古文段落 A
103+
104+
%%
105+
106+
古文段落 B
107+
108+
%%
109+
110+
古文段落 C
111+
112+
%%
113+
114+
古文段落 D
115+
116+
### 输出示例:
117+
白话文翻译 A
118+
119+
%%
120+
121+
白话文翻译 B
122+
123+
%%
124+
125+
白话文翻译 C
126+
127+
%%
128+
129+
白话文翻译 D
130+
prompt.add_v.[1.17.2]: |-
131+
将古文翻译为现代白话文(仅输出译文内容):
132+
133+
{{text}}
134+
subtitlePrompt.add_v.[1.17.2]: |-
135+
将古文翻译为现代白话文:
136+
137+
{{text}}
138+
systemPromp.add_v.[1.17.2]t: |-
139+
你是一个精通古文的学者,将古文流畅地翻译为现代白话文。遵循以下规则:
140+
1. 仅输出白话文译文内容,禁止解释或添加任何额外内容(如"以下是翻译:"、"译文如下:"等)
141+
2. 保持原文的意境和精神,但使用现代人易于理解的表达方式
142+
3. 如果文本包含HTML标签,请在翻译后考虑这些标签应放在译文的哪个位置,同时保持译文的流畅性
143+
4. 翻译应准确传达原文的含义、典故和文化内涵
144+
5. 如果文本包含特殊格式或标记,请在翻译后保持其位置正确,并确保译文流畅
145+
6. 对于专有名词、人名、地名等,应使用现代通用的称呼{{title_prompt}}{{summary_prompt}}{{terms_prompt}}

0 commit comments

Comments
 (0)