diff --git a/src/quant_platform_kit/common/operational_notification_localization.py b/src/quant_platform_kit/common/operational_notification_localization.py index 82f21c3..b0462cc 100644 --- a/src/quant_platform_kit/common/operational_notification_localization.py +++ b/src/quant_platform_kit/common/operational_notification_localization.py @@ -39,6 +39,7 @@ "heartbeat_missing_acceptable_report": "缺少可接受的执行回执:{targets}", "heartbeat_no_acceptable_report": "最近 {count} 份执行回执均不符合要求", "heartbeat_runtime_target_disabled": "运行目标已停用;未提交订单。", + "heartbeat_no_enabled_target": "没有与当前心跳匹配的可执行运行目标;未提交订单。", "heartbeat_no_scheduled_window_due": "当前没有应执行的交易窗口;未提交订单。", "heartbeat_no_scheduler_run_due": "当前没有应执行的调度任务;未提交订单。", "heartbeat_accepted_report": "已收到合格执行回执:{detail}", @@ -73,6 +74,7 @@ "heartbeat_missing_acceptable_report": "Missing acceptable execution report: {targets}", "heartbeat_no_acceptable_report": "None of the most recent {count} execution reports was acceptable", "heartbeat_runtime_target_disabled": "Runtime target is disabled; no order was submitted.", + "heartbeat_no_enabled_target": "No enabled runtime target matches this heartbeat; no order was submitted.", "heartbeat_no_scheduled_window_due": "No scheduled trading window was due; no order was submitted.", "heartbeat_no_scheduler_run_due": "No scheduler-backed run was due; no order was submitted.", "heartbeat_accepted_report": "An acceptable execution report was received: {detail}", diff --git a/tests/test_notification_localization.py b/tests/test_notification_localization.py index 63f9629..0e7735c 100644 --- a/tests/test_notification_localization.py +++ b/tests/test_notification_localization.py @@ -144,6 +144,10 @@ def test_operational_locale_and_normal_heartbeat_are_bilingual(self): self.assertEqual(resolve_operational_notification_locale("zh_TW"), "zh") self.assertEqual(resolve_operational_notification_locale("fr"), "en") self.assertEqual(localize_operational_activity("zh", "no trade"), "无交易") + self.assertEqual( + operational_notification_text("zh", "heartbeat_no_enabled_target"), + "没有与当前心跳匹配的可执行运行目标;未提交订单。", + ) self.assertEqual( format_operational_heartbeat_status( locale="zh",