Skip to content

Commit 94b7697

Browse files
committed
Localize snapshot diagnostics in notifications
1 parent f346daa commit 94b7697

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

application/rebalance_service.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@
2929
("regime=risk_on", "市场阶段=进攻"),
3030
("benchmark_trend=down", "基准趋势=向下"),
3131
("benchmark_trend=up", "基准趋势=向上"),
32+
("benchmark=down", "基准趋势=向下"),
33+
("benchmark=up", "基准趋势=向上"),
3234
("breadth=", "市场宽度="),
3335
("target_stock=", "目标股票仓位="),
3436
("realized_stock=", "实际股票仓位="),
37+
("stock_exposure=", "股票目标仓位="),
38+
("safe_haven=", "避险仓位="),
3539
("selected=", "入选标的数="),
3640
("top=", "前排标的="),
3741
("no_selection", "无入选标的"),

notifications/telegram.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"empty_target_weights": " (无目标持仓)",
1717
"target_weights_title": "目标持仓",
1818
"strategy_profile_detail": "策略={profile}",
19-
"execution_profile_detail": "profile={profile}",
19+
"execution_profile_detail": "执行配置={profile}",
2020
"regime_detail": "市场阶段={value}",
2121
"breadth_detail": "宽度={value}",
2222
"target_stock_detail": "目标股票仓位={value}",
@@ -28,17 +28,17 @@
2828
"snapshot_file_ts_detail": "快照文件时间={value}",
2929
"snapshot_path_detail": "快照路径={value}",
3030
"config_source_detail": "配置来源={value}",
31-
"dry_run_snapshot_prices": "🧪 dry-run估价: 使用快照收盘价 {count}个标的 ({symbols})",
31+
"dry_run_snapshot_prices": "🧪 模拟运行估价: 使用快照收盘价 {count}个标的 ({symbols})",
3232
"target_diff_summary": "调仓变化: {details}",
3333
"trade_date_detail": "交易日={value}",
3434
"target_diff": "目标差异 {symbol}: 当前={current} 目标={target} 变化={delta}",
35-
"pending_orders_detected": "检测到未完成订单: profile={profile} symbols={symbols}",
36-
"same_day_fills_detected": "检测到当日成交: profile={profile} mode={mode} symbols={symbols} trade_date={trade_date}",
37-
"same_day_execution_locked": "当日执行锁已存在: profile={profile} mode={mode} trade_date={trade_date} snapshot_date={snapshot_date} target_hash={target_hash} lock_path={lock_path}",
38-
"execution_lock_acquired": "已获取执行锁: mode={mode} trade_date={trade_date} snapshot_date={snapshot_date} lock_path={lock_path}",
39-
"same_day_execution_locked_notice": "当日已执行过: mode={mode} | 交易日={trade_date} | 快照日期={snapshot_date}",
40-
"dry_run_buy_batch": "🧪 dry-run买入 {count}个标的: {details}",
41-
"dry_run_sell_batch": "🧪 dry-run卖出 {count}个标的: {details}",
35+
"pending_orders_detected": "检测到未完成订单: 策略={profile} 标的={symbols}",
36+
"same_day_fills_detected": "检测到当日成交: 策略={profile} 模式={mode} 标的={symbols} 交易日={trade_date}",
37+
"same_day_execution_locked": "当日执行锁已存在: 策略={profile} 模式={mode} 交易日={trade_date} 快照日期={snapshot_date} 目标哈希={target_hash} 锁文件={lock_path}",
38+
"execution_lock_acquired": "已获取执行锁: 模式={mode} 交易日={trade_date} 快照日期={snapshot_date} 锁文件={lock_path}",
39+
"same_day_execution_locked_notice": "当日已执行过: 模式={mode} | 交易日={trade_date} | 快照日期={snapshot_date}",
40+
"dry_run_buy_batch": "🧪 模拟买入 {count}个标的: {details}",
41+
"dry_run_sell_batch": "🧪 模拟卖出 {count}个标的: {details}",
4242
"submitted_buy_batch": "📈 已提交买单 {count}个标的: {details}",
4343
"submitted_sell_batch": "📉 已提交卖单 {count}个标的: {details}",
4444
"filled_buy_batch": "✅ 买单成交 {count}个标的: {details}",

0 commit comments

Comments
 (0)