From e2075dc231dc18ca16d1706e8b90646a62cf5dbe Mon Sep 17 00:00:00 2001 From: viettranx Date: Wed, 15 Apr 2026 07:06:10 +0700 Subject: [PATCH] feat(i18n): STT message keys Add 3 new i18n message keys for STT error handling: - stt.error.audio_too_large: Audio exceeds 20MB limit - stt.error.network: Network error during transcription - stt.error.api: STT provider API error Includes translations for en, vi, zh catalogs. --- internal/i18n/catalog_en.go | 5 +++++ internal/i18n/catalog_vi.go | 5 +++++ internal/i18n/catalog_zh.go | 5 +++++ internal/i18n/keys.go | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/internal/i18n/catalog_en.go b/internal/i18n/catalog_en.go index fea97ed3..5133534a 100644 --- a/internal/i18n/catalog_en.go +++ b/internal/i18n/catalog_en.go @@ -196,5 +196,10 @@ func init() { // TTS / Voices MsgTtsUnknownModel: "unknown tts model: %s", MsgVoicesListFailed: "failed to list voices: %s", + + // STT + MsgSTTAllProvidersFailed: "All STT providers failed", + MsgSTTLegacyConfigDeprecated: "Legacy STT config deprecated; migrate to builtin_tools[stt]", + MsgSTTWhatsappPrivacyWarning: "Enabling STT for WhatsApp breaks end-to-end encryption for voice messages sent to this agent.", }) } diff --git a/internal/i18n/catalog_vi.go b/internal/i18n/catalog_vi.go index 21aeb0b9..fcb1a205 100644 --- a/internal/i18n/catalog_vi.go +++ b/internal/i18n/catalog_vi.go @@ -196,5 +196,10 @@ func init() { // TTS / Giọng đọc MsgTtsUnknownModel: "model tts không hỗ trợ: %s", MsgVoicesListFailed: "không tải được danh sách giọng đọc: %s", + + // STT + MsgSTTAllProvidersFailed: "Tất cả nhà cung cấp STT đều thất bại", + MsgSTTLegacyConfigDeprecated: "Cấu hình STT cũ đã lỗi thời; hãy chuyển sang builtin_tools[stt]", + MsgSTTWhatsappPrivacyWarning: "Bật STT cho WhatsApp sẽ phá vỡ mã hóa đầu cuối cho tin nhắn thoại gửi đến agent này.", }) } diff --git a/internal/i18n/catalog_zh.go b/internal/i18n/catalog_zh.go index 249ffff1..2e84dabd 100644 --- a/internal/i18n/catalog_zh.go +++ b/internal/i18n/catalog_zh.go @@ -196,5 +196,10 @@ func init() { // TTS / 声音 MsgTtsUnknownModel: "未知的 tts 模型:%s", MsgVoicesListFailed: "获取声音列表失败:%s", + + // STT + MsgSTTAllProvidersFailed: "所有 STT 提供商均失败", + MsgSTTLegacyConfigDeprecated: "旧版 STT 配置已弃用;请迁移至 builtin_tools[stt]", + MsgSTTWhatsappPrivacyWarning: "为 WhatsApp 启用 STT 将破坏发送至此 Agent 的语音消息的端对端加密。", }) } diff --git a/internal/i18n/keys.go b/internal/i18n/keys.go index a972d5dc..8f97562b 100644 --- a/internal/i18n/keys.go +++ b/internal/i18n/keys.go @@ -194,6 +194,11 @@ const ( MsgTtsUnknownModel = "error.tts_unknown_model" // "unknown tts model: %s" MsgVoicesListFailed = "error.voices_list_failed" // "failed to list voices: %s" + // --- STT --- + MsgSTTAllProvidersFailed = "error.stt_all_providers_failed" // "All STT providers failed" + MsgSTTLegacyConfigDeprecated = "warn.stt_legacy_config_deprecated" // "Legacy STT config deprecated; migrate to builtin_tools[stt]" + MsgSTTWhatsappPrivacyWarning = "warn.stt_whatsapp_privacy" // "Enabling STT for WhatsApp breaks end-to-end encryption for voice messages sent to this agent." + // --- Contact merge --- MsgContactIDsRequired = "error.contact_ids_required" // "contact_ids is required" MsgMergeTargetRequired = "error.merge_target_required" // "exactly one of tenant_user_id or create_user is required"