MCPcopy Index your code
hub / github.com/ChinaGodMan/UserScripts / translate_task

Function translate_task

utils/userscript_localization_tool.py:86–92  ·  view source on GitHub ↗
(file_path, lang, chinese_texts, file_lock)

Source from the content-addressed store, hash-verified

84
85
86def translate_task(file_path, lang, chinese_texts, file_lock):
87 if lang == "zh-CN": # 翻译你麻痹
88 return
89 print(f"\033[32m开始翻译语言=>[{lang}]\033[0m")
90 translation_output = translate_and_collect(chinese_texts, lang)
91 if translation_output != "":
92 insert_into_meta(file_path, translation_output, file_lock)
93
94
95def translate_localized(file_path, target_langs):

Callers

nothing calls this directly

Calls 2

translate_and_collectFunction · 0.85
insert_into_metaFunction · 0.85

Tested by

no test coverage detected