fix Translation error

This commit is contained in:
yunshu
2025-04-26 13:04:19 +08:00
parent 6d5baacb12
commit cfb57bcd1e
19 changed files with 29 additions and 25 deletions
+1 -1
View File
@@ -1 +1 @@
1745576314
1745644009
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
1745576328
1745644014
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
1745576359
1745644023
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
1745576344
1745644018
Binary file not shown.
+2 -1
View File
@@ -474,5 +474,6 @@
"是否要启用": "do you want to enable it",
"规则": "rule",
"跳过启用": "skip to enable",
"已启用": "enabled"
"已启用": "enabled",
"不支持的系统架构": "unsupported system architecture"
}
+2 -1
View File
@@ -474,5 +474,6 @@
"是否要启用": "사용 하시겠습니까",
"规则": "규칙",
"跳过启用": "사용 활성화 건너뛰기",
"已启用": "활성화 되었습니다"
"已启用": "활성화 되었습니다",
"不支持的系统架构": "지원되지 않는 시스템 아키텍처"
}
+2 -1
View File
@@ -474,5 +474,6 @@
"是否要启用": "آیا می‌خواهید فعال شود",
"规则": "قاعده",
"跳过启用": "پرش کنید به فعال سازی",
"已启用": "فعال شده است"
"已启用": "فعال شده است",
"不支持的系统架构": "معماری سیستم پشتیبانی نشده"
}
+2 -1
View File
@@ -474,5 +474,6 @@
"是否要启用": "включить ли",
"规则": "правило",
"跳过启用": "пропустить включение",
"已启用": "включен"
"已启用": "включен",
"不支持的系统架构": "неподдерживаемая архитектура системы"
}
+3 -3
View File
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: xray_install 1.0\n"
"Report-Msgid-Bugs-To: https://github.com/hello-yunshu/Xray_bash_onekey/"
"issues\n"
"POT-Creation-Date: 2025-04-25 10:18+0000\n"
"PO-Revision-Date: 2025-04-25 10:18+0000\n"
"POT-Creation-Date: 2025-04-26 05:06+0000\n"
"PO-Revision-Date: 2025-04-26 05:06+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: en\n"
@@ -540,7 +540,7 @@ msgstr "compiled ones will be downloaded soon"
#: install.sh:1267
msgid "不支持的系统架构"
msgstr "compiled ones will be downloaded soon"
msgstr "unsupported system architecture"
#: install.sh:1317 install.sh:1318 install.sh:1325 install.sh:1326
msgid "配置文件不完整, 退出升级"
+3 -3
View File
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: xray_install 1.0\n"
"Report-Msgid-Bugs-To: https://github.com/hello-yunshu/Xray_bash_onekey/"
"issues\n"
"POT-Creation-Date: 2025-04-25 10:18+0000\n"
"PO-Revision-Date: 2025-04-25 10:18+0000\n"
"POT-Creation-Date: 2025-04-26 05:06+0000\n"
"PO-Revision-Date: 2025-04-26 05:06+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: fa\n"
@@ -539,7 +539,7 @@ msgstr "در حال دانلود کردن کد شده"
#: install.sh:1267
msgid "不支持的系统架构"
msgstr "در حال دانلود کردن کد شده"
msgstr "معماری سیستم پشتیبانی نشده"
#: install.sh:1317 install.sh:1318 install.sh:1325 install.sh:1326
msgid "配置文件不完整, 退出升级"
+3 -3
View File
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: xray_install 1.0\n"
"Report-Msgid-Bugs-To: https://github.com/hello-yunshu/Xray_bash_onekey/"
"issues\n"
"POT-Creation-Date: 2025-04-25 10:18+0000\n"
"PO-Revision-Date: 2025-04-25 10:18+0000\n"
"POT-Creation-Date: 2025-04-26 05:06+0000\n"
"PO-Revision-Date: 2025-04-26 05:06+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ko\n"
@@ -540,7 +540,7 @@ msgstr "즉시 다운로드할 컴파일된 것을"
#: install.sh:1267
msgid "不支持的系统架构"
msgstr "즉시 다운로드할 컴파일된 것을"
msgstr "지원되지 않는 시스템 아키텍처"
#: install.sh:1317 install.sh:1318 install.sh:1325 install.sh:1326
msgid "配置文件不完整, 退出升级"
+3 -3
View File
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: xray_install 1.0\n"
"Report-Msgid-Bugs-To: https://github.com/hello-yunshu/Xray_bash_onekey/"
"issues\n"
"POT-Creation-Date: 2025-04-25 10:18+0000\n"
"PO-Revision-Date: 2025-04-25 10:18+0000\n"
"POT-Creation-Date: 2025-04-26 05:06+0000\n"
"PO-Revision-Date: 2025-04-26 05:06+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ru\n"
@@ -541,7 +541,7 @@ msgstr "скоро будет загружен скомпилированный"
#: install.sh:1267
msgid "不支持的系统架构"
msgstr "скоро будет загружен скомпилированный"
msgstr "неподдерживаемая архитектура системы"
#: install.sh:1317 install.sh:1318 install.sh:1325 install.sh:1326
msgid "配置文件不完整, 退出升级"
+1 -1
View File
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: xray_install 1.0\n"
"Report-Msgid-Bugs-To: https://github.com/hello-yunshu/Xray_bash_onekey/"
"issues\n"
"POT-Creation-Date: 2025-04-25 10:18+0000\n"
"POT-Creation-Date: 2025-04-26 05:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
+2 -2
View File
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: xray_install 1.0\n"
"Report-Msgid-Bugs-To: https://github.com/hello-yunshu/Xray_bash_onekey/"
"issues\n"
"POT-Creation-Date: 2025-04-25 10:18+0000\n"
"PO-Revision-Date: 2025-04-25 10:18+0000\n"
"POT-Creation-Date: 2025-04-26 05:06+0000\n"
"PO-Revision-Date: 2025-04-26 05:06+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: zh_CN\n"
+2 -2
View File
@@ -60,7 +60,7 @@ def contains_target_language_characters(text, target_lang):
def translate_text_deepseek(text, target_lang):
client = OpenAI(
api_key=os.getenv("AI_API_KEY"),
base_url="https://api.deepseek.com/v1",
base_url="https://api.deepseek.com",
)
completion = client.chat.completions.create(
model="deepseek-chat",
@@ -68,7 +68,7 @@ def translate_text_deepseek(text, target_lang):
{'role': 'system', 'content': 'You are a professional text translation assistant, focused on translating short Chinese texts into voice content in the specified target language. Your task is to translate only the Chinese parts of the text into the corresponding target language, leaving English portions as they are. The translation process should not consider context between sentences; ensure each individual sentence is translated accurately. Avoid adding any punctuation at the end of the translated sentences. The goal is to assist in the internationalization of scripts while ensuring translations are concise and accurate.Translation does not need to be bound by grammar, the simpler the better.'},
{'role': 'user', 'content': f'Translate the following text to {target_lang}: {text}'}
],
stream=False
stream=True
)
full_content = ""
for chunk in completion: