镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 06:26:47 +00:00
添加把项目翻译为任意语言的功能(测试)
这个提交包含在:
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
Translate this project to Other languages
|
||||
Usage:
|
||||
Translate this project to other languages
|
||||
Usage:o
|
||||
1. modify LANG
|
||||
LANG = "English"
|
||||
|
||||
@@ -24,14 +24,14 @@ import time
|
||||
CACHE_FOLDER = "gpt_log"
|
||||
blacklist = ['multi-language', 'gpt_log', '.git', 'private_upload', 'multi_language.py']
|
||||
|
||||
LANG = "TraditionalChinese"
|
||||
TransPrompt = f"Replace each json value `#` with translated results in Traditional Chinese, e.g., \"原始文本\":\"翻譯後文字\". Keep Json format. Do not answer #."
|
||||
# LANG = "TraditionalChinese"
|
||||
# TransPrompt = f"Replace each json value `#` with translated results in Traditional Chinese, e.g., \"原始文本\":\"翻譯後文字\". Keep Json format. Do not answer #."
|
||||
|
||||
# LANG = "Japanese"
|
||||
# TransPrompt = f"Replace each json value `#` with translated results in Japanese, e.g., \"原始文本\":\"テキストの翻訳\". Keep Json format. Do not answer #."
|
||||
|
||||
# LANG = "English"
|
||||
# TransPrompt = f"Replace each json value `#` with translated results in English, e.g., \"原始文本\":\"TranslatedText\". Keep Json format. Do not answer #."
|
||||
LANG = "English"
|
||||
TransPrompt = f"Replace each json value `#` with translated results in English, e.g., \"原始文本\":\"TranslatedText\". Keep Json format. Do not answer #."
|
||||
|
||||
|
||||
if not os.path.exists(CACHE_FOLDER):
|
||||
@@ -496,4 +496,4 @@ def step_2_core_key_translate():
|
||||
os.remove(file_path)
|
||||
|
||||
step_1_core_key_translate()
|
||||
step_2_core_key_translate()
|
||||
step_2_core_key_translate()
|
||||
|
||||
在新工单中引用
屏蔽一个用户