binary-husky commited on
Commit
76e0452
1 Parent(s): e62c0b3

添加把项目翻译为任意语言的功能(测试)

Browse files
Files changed (1) hide show
  1. multi_language.py +7 -7
multi_language.py CHANGED
@@ -1,6 +1,6 @@
1
  """
2
- Translate this project to Other languages
3
- Usage:
4
  1. modify LANG
5
  LANG = "English"
6
 
@@ -24,14 +24,14 @@ import time
24
  CACHE_FOLDER = "gpt_log"
25
  blacklist = ['multi-language', 'gpt_log', '.git', 'private_upload', 'multi_language.py']
26
 
27
- LANG = "TraditionalChinese"
28
- TransPrompt = f"Replace each json value `#` with translated results in Traditional Chinese, e.g., \"原始文本\":\"翻譯後文字\". Keep Json format. Do not answer #."
29
 
30
  # LANG = "Japanese"
31
  # TransPrompt = f"Replace each json value `#` with translated results in Japanese, e.g., \"原始文本\":\"テキストの翻訳\". Keep Json format. Do not answer #."
32
 
33
- # LANG = "English"
34
- # TransPrompt = f"Replace each json value `#` with translated results in English, e.g., \"原始文本\":\"TranslatedText\". Keep Json format. Do not answer #."
35
 
36
 
37
  if not os.path.exists(CACHE_FOLDER):
@@ -496,4 +496,4 @@ def step_2_core_key_translate():
496
  os.remove(file_path)
497
 
498
  step_1_core_key_translate()
499
- step_2_core_key_translate()
 
1
  """
2
+ Translate this project to other languages
3
+ Usage:o
4
  1. modify LANG
5
  LANG = "English"
6
 
 
24
  CACHE_FOLDER = "gpt_log"
25
  blacklist = ['multi-language', 'gpt_log', '.git', 'private_upload', 'multi_language.py']
26
 
27
+ # LANG = "TraditionalChinese"
28
+ # TransPrompt = f"Replace each json value `#` with translated results in Traditional Chinese, e.g., \"原始文本\":\"翻譯後文字\". Keep Json format. Do not answer #."
29
 
30
  # LANG = "Japanese"
31
  # TransPrompt = f"Replace each json value `#` with translated results in Japanese, e.g., \"原始文本\":\"テキストの翻訳\". Keep Json format. Do not answer #."
32
 
33
+ LANG = "English"
34
+ TransPrompt = f"Replace each json value `#` with translated results in English, e.g., \"原始文本\":\"TranslatedText\". Keep Json format. Do not answer #."
35
 
36
 
37
  if not os.path.exists(CACHE_FOLDER):
 
496
  os.remove(file_path)
497
 
498
  step_1_core_key_translate()
499
+ step_2_core_key_translate()