Skip to content

Commit 1def728

Browse files
committed
更新翻译
1 parent 04d986a commit 1def728

4 files changed

Lines changed: 26 additions & 18 deletions

File tree

custom_components/ai_hub/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
"iot_class": "cloud_polling",
1010
"issue_tracker": "https://github.com/ha-china/ai_hub/issues",
1111
"requirements": ["edge-tts", "aiofiles", "aiohttp"],
12-
"version": "v2025.11.12"
12+
"version": "v2025.11.13"
1313
}

custom_components/ai_hub/services.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ async def handle_stt_transcribe(call: ServiceCall) -> dict:
491491
if not siliconflow_api_key or not siliconflow_api_key.strip():
492492
return {
493493
"success": False,
494-
"error": "Silicon Flow API密钥未配置,请先在集成配置中设置"
494+
"error": "硅基流动API密钥未配置,请先在集成配置中设置"
495495
}
496496
audio_file = call.data[CONF_STT_FILE]
497497
model = call.data.get("model", RECOMMENDED_STT_MODEL)
@@ -626,7 +626,7 @@ async def handle_send_wechat_message(call: ServiceCall) -> dict:
626626
if not bemfa_uid or not bemfa_uid.strip():
627627
return {
628628
"success": False,
629-
"error": "Bemfa UID 未配置,请在集成配置中设置或通过服务参数提供"
629+
"error": "巴法云UID未配置,请在集成配置中设置或通过服务参数提供"
630630
}
631631

632632
device_entity = call.data["device_entity"]

custom_components/ai_hub/translations/en.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"error": {
1414
"cannot_connect": "Cannot connect to AI Hub service",
1515
"invalid_auth": "Invalid API key",
16-
"unknown": "Unknown error"
16+
"unknown": "Unknown error",
17+
"bemfa_uid_required": "Bemfa UID is required"
1718
},
1819
"abort": {
1920
"already_configured": "This API key is already configured"
@@ -163,6 +164,9 @@
163164
"bemfa_uid": "Bemfa provided user ID for sending WeChat messages"
164165
}
165166
}
167+
},
168+
"error": {
169+
"bemfa_uid_required": "Bemfa UID is required"
166170
}
167171
},
168172
"translation": {

custom_components/ai_hub/translations/zh-Hans.json

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
"step": {
44
"user": {
55
"title": "连接到AI Hub",
6-
"description": "请输入您的智谱AI API密钥(必需)和硅基流动 API密钥(可选,用于语音识别功能)。点击[这里]({api_key_url})获取智谱AI密钥,从其官网获取硅基流动密钥。",
6+
"description": "请输入您的智谱AI API密钥(必需)和硅基流动API密钥(可选,用于语音识别功能)。点击[这里]({api_key_url})获取智谱AI密钥,从其官网获取硅基流动密钥。",
77
"data": {
88
"api_key": "智谱AI API密钥",
9-
"siliconflow_api_key": "硅基流动 API密钥(可选,用于语音识别)"
9+
"siliconflow_api_key": "硅基流动API密钥(可选,用于语音识别)"
1010
}
1111
}
1212
},
1313
"error": {
1414
"cannot_connect": "无法连接到AI Hub服务",
1515
"invalid_auth": "API密钥无效",
16-
"unknown": "未知错误"
16+
"unknown": "未知错误",
17+
"bemfa_uid_required": "巴法云UID是必填项"
1718
},
1819
"abort": {
1920
"already_configured": "此API密钥已经配置"
@@ -23,7 +24,7 @@
2324
"step": {
2425
"init": {
2526
"title": "配置选项",
26-
"description": "请在集成详情页面找到对应的子项目(对话助手或AI任务),点击每个子项目右侧的配置按钮修改设置。\n\n点击集成页面上的AI Hub进入详情页面,您会看到已配置的子项目列表,每个子项目都可以单独配置。"
27+
"description": "请在集成详情页面找到对应的子项目(对话助手或AI任务),点击每个子项目右侧的配置按钮修改设置。点击集成页面上的AI Hub进入详情页面,您会看到已配置的子项目列表,每个子项目都可以单独配置。"
2728
}
2829
},
2930
"abort": {
@@ -123,14 +124,14 @@
123124
},
124125
"stt": {
125126
"initiate_flow": {
126-
"user": "添加硅基流动 ASR",
127-
"reconfigure": "重新配置硅基流动 ASR"
127+
"user": "添加硅基流动ASR",
128+
"reconfigure": "重新配置硅基流动ASR"
128129
},
129-
"entry_type": "AI Hub 硅基流动 ASR",
130+
"entry_type": "AI Hub 硅基流动ASR",
130131
"step": {
131132
"init": {
132-
"title": "配置硅基流动 ASR",
133-
"description": "自定义硅基流动 ASR语音转文本参数。硅基流动提供高质量的ASR服务,支持多种模型和语言。",
133+
"title": "配置硅基流动ASR",
134+
"description": "自定义硅基流动ASR语音转文本参数。硅基流动提供高质量的ASR服务,支持多种模型和语言。",
134135
"data": {
135136
"name": "名称",
136137
"recommended": "推荐模式",
@@ -156,12 +157,15 @@
156157
"data": {
157158
"name": "名称",
158159
"recommended": "推荐模式",
159-
"bemfa_uid": "巴法云 UID"
160+
"bemfa_uid": "巴法云私钥"
160161
},
161162
"data_description": {
162163
"recommended": "使用推荐设置",
163-
"bemfa_uid": "巴法云提供的用户ID,用于发送微信消息"
164+
"bemfa_uid": "巴法云提供的用户私钥,用于发送微信消息"
164165
}
166+
},
167+
"error": {
168+
"bemfa_uid_required": "巴法云私钥是必填项"
165169
}
166170
},
167171
"abort": {
@@ -195,7 +199,7 @@
195199
},
196200
"data_description": {
197201
"recommended": "使用推荐设置",
198-
"custom_components_path": "自定义集成目录路径,默认为custom_components"
202+
"custom_components_path": "自定义集成目录路径,默认为配置目录"
199203
}
200204
}
201205
},
@@ -288,8 +292,8 @@
288292
}
289293
},
290294
"stt_transcribe": {
291-
"name": "硅基流动 ASR转录",
292-
"description": "使用硅基流动 ASR将语音转换为文本",
295+
"name": "硅基流动ASR转录",
296+
"description": "使用硅基流动ASR将语音转换为文本",
293297
"fields": {
294298
"audio_file": {
295299
"name": "音频文件",

0 commit comments

Comments
 (0)