|
|
@@ -22,7 +22,7 @@ def process_batch_translations(data: List[List[str]], search_term_index: int, ca
|
|
|
"""批量处理翻译"""
|
|
|
try:
|
|
|
# 初始化翻译器
|
|
|
- translator = OpenAITranslator("openai", "zh-CN", "en", "gpt-3.5-turbo")
|
|
|
+ translator = OpenAITranslator()
|
|
|
|
|
|
# 收集所有需要翻译的文本
|
|
|
translation_batches = {
|
|
|
@@ -68,3 +68,9 @@ def process_batch_translations(data: List[List[str]], search_term_index: int, ca
|
|
|
except Exception as e:
|
|
|
logger.error(f"Error in batch translation: {e}")
|
|
|
raise
|
|
|
+
|
|
|
+def main():
|
|
|
+ pass
|
|
|
+
|
|
|
+if __name__ == "__main__":
|
|
|
+ main()
|