Skip to content

Commit ff70b16

Browse files
authored
Merge pull request #519 from QuantStrategyLab/fix/operational-workflow-query-i18n-rebased
fix: localize workflow heartbeat query failures
2 parents b293c21 + 284590c commit ff70b16

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/quant_platform_kit/common/operational_notification_localization.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"activity_rebalance_recorded": "已记录调仓操作",
4848
"workflow_heartbeat_latest_failed": "最近一次运行未成功完成(结论:{conclusion})",
4949
"workflow_heartbeat_no_success": "GitHub Actions 查询未返回成功的运行记录",
50+
"workflow_heartbeat_query_failed": "GitHub Actions 运行记录查询失败",
5051
"workflow_heartbeat_missing_dispatches": "已连续 {count} 个预期周期未发现运行(阈值:{threshold})",
5152
},
5253
"en": {
@@ -82,6 +83,7 @@
8283
"activity_rebalance_recorded": "rebalance action recorded",
8384
"workflow_heartbeat_latest_failed": "The latest runtime run did not complete successfully (conclusion: {conclusion})",
8485
"workflow_heartbeat_no_success": "The GitHub Actions query returned no successful runtime run",
86+
"workflow_heartbeat_query_failed": "The GitHub Actions runtime-run query failed",
8587
"workflow_heartbeat_missing_dispatches": "No runtime dispatch was found for {count} expected interval(s) (threshold: {threshold})",
8688
},
8789
}

tests/test_notification_localization.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ def test_operational_locale_and_normal_heartbeat_are_bilingual(self):
148148
operational_notification_text("zh", "heartbeat_no_enabled_target"),
149149
"没有与当前心跳匹配的可执行运行目标;未提交订单。",
150150
)
151+
self.assertEqual(
152+
operational_notification_text("zh", "workflow_heartbeat_query_failed"),
153+
"GitHub Actions 运行记录查询失败",
154+
)
151155
self.assertEqual(
152156
format_operational_heartbeat_status(
153157
locale="zh",

0 commit comments

Comments
 (0)